From: Joel Reymont <joelr1@gmail.com>
To: Caml List <caml-list@inria.fr>
Subject: camlp4 3.10: <:ctyp< ( $list:tys$ )
Date: Tue, 1 May 2007 13:16:27 +0100 [thread overview]
Message-ID: <F72C18D9-5405-45B8-A123-3D1AE8142B39@gmail.com> (raw)
This is the old code:
| <:ctyp< ( $list:tys$ ) >> -> tupl _loc (List.map aux tys)
I figure it tries to match something like "int * int".
Following Nicolas's suggestion I thought I would see what this
expands to:
camlp4of -str '<:ctyp< ( int * int ) >>'
Ast.TyTup (_loc,
Ast.TySta (_loc, Ast.TyId (_loc, Ast.IdLid (_loc, "int")),
Ast.TyId (_loc, Ast.IdLid (_loc, "int"))))
How do I work back from this to the right expression within parens in
the original pattern above? I tried
| <:ctyp< ( $tup:tys$ ) >> -> tupl _loc (List.map aux tys)
but this produces ctyp instead of ctyp list so it's not suitable for
the tupl.
Thanks, Joel
--
http://wagerlabs.com/
next reply other threads:[~2007-05-01 12:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-01 12:16 Joel Reymont [this message]
2007-05-01 12:47 ` [Caml-list] " 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=F72C18D9-5405-45B8-A123-3D1AE8142B39@gmail.com \
--to=joelr1@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