From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA18243; Fri, 9 Apr 2004 09:32:19 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA18247 for ; Fri, 9 Apr 2004 09:32:18 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i397WHYM024586; Fri, 9 Apr 2004 09:32:18 +0200 Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA18388; Fri, 9 Apr 2004 09:32:17 +0200 (MET DST) Date: Fri, 9 Apr 2004 09:32:17 +0200 From: Xavier Leroy To: Christophe TROESTLER Cc: skaller@users.sourceforge.net, caml-list@inria.fr Subject: Re: [Caml-list] failwith, raise and type inference Message-ID: <20040409093217.A6469@pauillac.inria.fr> References: <20040405225238.33087.qmail@web40613.mail.yahoo.com> <20040406.031524.77866470.debian00@tiscali.be> <1081235143.19232.22.camel@pelican> <20040409.091810.84299384.debian00@tiscali.be> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20040409.091810.84299384.debian00@tiscali.be>; from debian00@tiscali.be on Fri, Apr 09, 2004 at 09:18:10AM +0200 X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 failwith:01 inference:01 developpers:01 oddity:01 intentional:01 precedences:01 expressing:01 precedences:01 ocaml:01 behavior:03 raise:05 grammar:05 probably:05 somewhat:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 202 > > > -. 3.**2. > > > > > > returns 9. while in math -x^2 means -(x^2) and not (-x)^2 ! > > > > I'm not sure there *are* any 'usual' rules in maths. > > Well -x^2 as meaning -(x^2) *is* a usual rule -- no mathematician will > ever understand it as (-x)^2. Still my question remains as whether > the above is intended by the OCaml developpers or is just a case that > "slipped through" (and an oddity that has bitten me once). Off the top of my head, I'd say this behavior wasn't intentional and is probably a mistake. I haven't checked with the Yacc grammar, though (Yacc is somewhat cranky with the precedences, and it happens that expressing the right precedences isn't obvious.) - Xavier Leroy ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners