English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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.