From: "Nicolas Pouillard" <nicolas.pouillard@gmail.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Intended behavior of GenerateMap
Date: Wed, 13 Jun 2007 13:36:32 +0200 [thread overview]
Message-ID: <cd67f63a0706130436x445dd9dfjb701a5df56dfa706@mail.gmail.com> (raw)
In-Reply-To: <20070608083625.GA17210@stirner.roentgeninstitut.de>
On 6/8/07, Christian Stork <caml-list@cstork.org> wrote:
> Hi,
>
> Is my understanding correct that running "camlp4of -filter map ..." over
>
> class map = Camlp4Filters.GenerateMap.generated
>
> will produce a map class for *all* types defined in the current file --
> irrespective if the types are incapsulated in a module (which is then
> used for the Camlp4Trash trick)?
Your understanding is correct.
> Wouldn't it be much nicer, i.e., more economical and more precise, if
> the above only produces a map class for the most recently defined type
> / mutually recursive types?
Yes it will be nicer. I don't remember why I didn't do that, perhaps
to don't have to turn the AST definition in one big mutually recursive
type.
> PS: I came to the above question after reading the source and some
> experimentation. Is there any place where the rationale behind
> GenerateMap/Fold is explained?
Not really the goal was just to "scrap my boiler plate" in OCaml for
the Camlp4 AST (an economy of merely 5000 lines that are generated).
--
Nicolas Pouillard
next prev parent reply other threads:[~2007-06-13 11:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-08 8:36 Christian Stork
2007-06-13 11:36 ` Nicolas Pouillard [this message]
2007-06-14 12:35 ` [Caml-list] " Nicolas Pouillard
2007-06-23 18:59 ` Nicolas Pouillard
2007-06-23 21:04 ` Christian Stork
2007-06-24 8:13 ` Nicolas Pouillard
2007-06-24 10:21 ` Anti-matching Frédéric Gava
2007-06-24 10:52 ` [Caml-list] Anti-matching David Thomas
2007-06-24 12:32 ` Frédéric Gava
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=cd67f63a0706130436x445dd9dfjb701a5df56dfa706@mail.gmail.com \
--to=nicolas.pouillard@gmail.com \
--cc=caml-list@inria.fr \
/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