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
Strange parsing of with-clauses
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-11-29 (19:41)
From: Stefan Monnier <monnier@i...>
Subject: Re: Strange parsing of with-clauses
> definition. `E of string * string' defines an exception with two
> arguments of type string, which has a different representation than an
> exception with one argument of type "tuple of strings". The latter
> should be defined as `E of (string * string)'. There's the same issue
> with variant types (but not the polymorphic ones !).

I think this is another place where Haskell got it right: make those
constructors curried so that it's obvious that it's not carrying a tuple.