From: Aleksey Nogin <nogin@metaprl.org>
To: Caml List <caml-list@inria.fr>
Subject: 3.10+beta: Camlp4: AST mapping treats record labels as patterns; should they have type ident instead?
Date: Tue, 17 Apr 2007 10:50:36 -0700 [thread overview]
Message-ID: <462508EC.2090302@metaprl.org> (raw)
Currently Camlp4 AST defines the record patterns as
PaRec of loc and list (patt * patt)
and record expressions as
ExRec of Loc.t and binding and expr
where the binding can bind arbitrary patterns to expressions. This was
not a big issue prior to 3.10, but now that 3.10 provides very powerful
mapping and folding features, this seems a bit problematic. Namely, if I
define a Camlp4 filter or an AST mapping function that affects patterns,
the array labels will get affected as well, often in an undesired way.
Would it be better to have
PaRec of loc and list (ident * patt)
and
ExRec of loc and list (ident * expr) and expr
instead?
If so, it would seem that now is the time to make the change, as 3.10 is
about to make major backwards-incompatible camlp4 changes anyway.
Aleksey
P.S. I've also filed this as http://caml.inria.fr/mantis/view.php?id=4263
next reply other threads:[~2007-04-17 17:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-17 17:50 Aleksey Nogin [this message]
2007-04-18 8:11 ` [Caml-list] " Nicolas Pouillard
2007-04-18 16:13 ` Aleksey Nogin
2007-04-20 15:17 ` Nicolas Pouillard
2007-05-03 9:16 ` Nicolas Pouillard
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=462508EC.2090302@metaprl.org \
--to=nogin@metaprl.org \
--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;
as well as URLs for NNTP newsgroup(s).