caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: blue storm <bluestorm.dylc@gmail.com>
To: "Jérémie Dimino" <jeremie@dimino.org>
Cc: Chantal KELLER <chantal.keller@wanadoo.fr>,
	caml-list <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Constructors are not functions
Date: Tue, 6 Oct 2009 23:55:12 +0200	[thread overview]
Message-ID: <527cf6bc0910061455ndfcfe30g924aada8d03973ea@mail.gmail.com> (raw)
In-Reply-To: <1254844259.2737.22.camel@localhost.localdomain>

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


      reply	other threads:[~2009-10-06 21:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-06 12:01 Chantal KELLER
2009-10-06 12:19 ` [Caml-list] " Philippe Wang
2009-10-06 12:38   ` Jon Harrop
2009-10-06 13:38     ` Richard Jones
2009-10-10 11:49     ` blue storm
2009-10-06 12:45 ` David Allsopp
2009-10-06 12:46   ` David Allsopp
2009-10-06 13:14   ` Jim Farrand
2009-10-06 13:51     ` Michel Mauny
2009-10-06 13:15   ` Jon Harrop
2009-10-06 14:04     ` David Allsopp
2009-10-06 14:51       ` Jon Harrop
2009-10-06 15:24       ` Richard Jones
2009-10-06 16:31         ` Jacques Garrigue
2009-10-08 12:37       ` Goswin von Brederlow
2009-10-09  6:29         ` David Allsopp
2009-10-10  6:16           ` Goswin von Brederlow
2009-10-06 13:18 ` Gerd Stolpmann
2009-10-06 15:50 ` Jérémie Dimino
2009-10-06 21:55   ` blue storm [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=527cf6bc0910061455ndfcfe30g924aada8d03973ea@mail.gmail.com \
    --to=bluestorm.dylc@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=chantal.keller@wanadoo.fr \
    --cc=jeremie@dimino.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).