Browse thread
Constructors are not functions
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2009-10-06 (21:55) |
From: | blue storm <bluestorm.dylc@g...> |
Subject: | Re: [Caml-list] Constructors are not functions |
On Tue, Oct 6, 2009 at 5:50 PM, Jérémie Dimino <jeremie@dimino.org> wrote: > This does not answer the question, but you can have function generated > automatically for constructors using camlp4. > > I wrote some time ago an extension which add a type-conv type processor > "constructor", so you can write: > > The extension is available here: > http://darcs.ocamlcore.org/cgi-bin/darcsweb.cgi?r=obus;a=headblob;f=/syntax/pa_constructor.ml I also have an old extension of mine, wich use a slightly different naming scheme (prepend a "_" instead of uncapitalization), and also provides destructors for record types : http://bluestorm.info/camlp4/ty_constr.ml.html