From: Philippe Veber <philippe.veber@googlemail.com>
To: caml-list@yquem.inria.fr
Subject: Re: Camlp4 quotations for tuples
Date: Tue, 28 Jul 2009 14:05:48 +0200 [thread overview]
Message-ID: <721f7f5a0907280505y50d30aaax64a53dd4e010ea11@mail.gmail.com> (raw)
In-Reply-To: <721f7f5a0907280438o479785efr3793f4d1dff5c1f4@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 567 bytes --]
Self-answer, though I'm not sure that's the prettiest way (not even sure it
is even valid) :
<:ctyp< ($Ast.tySta_of_list tuple_types$) >>
ph.
2009/7/28 Philippe Veber <philippe.veber@googlemail.com>
> Hi list,
>
> Does someone know how to write a camlp4 quotation for types of the form 'a
> * 'b * 'c * 'd ... For now I could only obtain types of the form 'a * ('b *
> ('c * ('d * ... )...))), using a code similar to
>
>
> List.fold_right
> (fun x accu -> <:ctyp< $x$ * $accu$ >>)
> (List.tl tuple_types)
> (List.hd tuple_types)
>
>
> TIA,
> ph.
>
>
[-- Attachment #2: Type: text/html, Size: 1263 bytes --]
prev parent reply other threads:[~2009-07-28 12:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-28 11:38 Philippe Veber
2009-07-28 12:05 ` Philippe Veber [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=721f7f5a0907280505y50d30aaax64a53dd4e010ea11@mail.gmail.com \
--to=philippe.veber@googlemail.com \
--cc=caml-list@yquem.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