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
Constructors are not functions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-10-06 (13:14)
From: Jim Farrand <jim.farrand@g...>
Subject: Re: [Caml-list] Constructors are not functions
David Allsopp wrote:

> I think it would be possible to simulate the SML behaviour in OCaml using camlp4 (if you assume that for [type foo = Bar of int] that future unbound references to [bar] are interpreted as [fun x -> bar x] instead of an error)

I believe this is already the behaviour under the revised syntax, so 
this is definitely possible.


Jim Farrand
E-Mail/Jabber/Google-Talk/MSN: jim.farrand@gmail.com
Phone number changed Jun 2009: Now ends 996 (Ask for the rest, delete 
the old one!)