Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] failwith, raise and type inference
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-04-09 (07:32)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] failwith, raise and type inference
> > > -. 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 Archives:
Bug reports: FAQ:
Beginner's list: