From: "Dmitry Bely" <dmitry.bely@gmail.com>
To: "Caml List" <caml-list@inria.fr>
Subject: Camlp4: type declaration quotation
Date: Fri, 13 Jul 2007 19:51:19 +0400 [thread overview]
Message-ID: <90823c940707130851j5cc801b2o919261db22064da9@mail.gmail.com> (raw)
Suppose I have
EXTEND Gram
str_item:
[ [ "type"; tdl = LIST1 type_declaration SEP "and" ->
...
How to de-construct tdl elements? Specifically I would like to get the
same type here as with the old Camlp4. I am thinking of something like
let tdl = List.map (fun [<:ctyp< type ... >> -> ... | _ -> assert False]) tdl in
...
But how to use <:ctyp< type ... >> ? The only mention in the docs is
<:ctyp< type t 'a 'b 'c = t constraint t = t constraint t = t >>
Type declaration
TyDcl of Loc.t and string and list ctyp and ctyp and list (ctyp * ctyp)
Can you explain what it means and give any example?
- Dmitry Bely
reply other threads:[~2007-07-13 15:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=90823c940707130851j5cc801b2o919261db22064da9@mail.gmail.com \
--to=dmitry.bely@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;
as well as URLs for NNTP newsgroup(s).