From: "Nicolas Pouillard" <nicolas.pouillard@gmail.com>
To: "Pietro Abate" <Pietro.Abate@anu.edu.au>,
"ocaml ml" <caml-list@inria.fr>
Subject: Re: [Caml-list] polymorphic variants and camlp4
Date: Mon, 12 Feb 2007 11:54:15 +0100 [thread overview]
Message-ID: <cd67f63a0702120254y4724572fya56b21874f677a97@mail.gmail.com> (raw)
In-Reply-To: <20070212033220.GA30365@pulp.rsise.anu.edu.au>
On 2/12/07, Pietro Abate <Pietro.Abate@anu.edu.au> wrote:
> Hi all,
>
> What is the syntax to use polymorphic variants with camlp4 ?
It depends what you mean by "with camlp4", but I suppose you mean
"what is the revised syntax for polymorphic variants ?".
> <:str_item< type a = A >> is ok, but <:str_item< type a = [ `A ] >>
<:str_item< type a = A >> is not really ok neither
try <:str_item< type a = A | B >> to see that's not ok, the grammar
just accept it as an alias.
The syntax for classic variants is <:str_item< type a = [ A | B of int
and int | C of (int * int) ] >>
For polymorphic ones it's <:str_item< type a = [ = A | B ] >>
> doesn't work as expected...
Yes but you expected the original syntax for types declaration.
--
Nicolas Pouillard
prev parent reply other threads:[~2007-02-12 10:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-12 3:32 Pietro Abate
2007-02-12 4:01 ` [Caml-list] " Martin Jambon
2007-02-12 4:12 ` Pietro Abate
2007-02-12 14:29 ` Serge Aleynikov
2007-02-12 10:54 ` Nicolas Pouillard [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=cd67f63a0702120254y4724572fya56b21874f677a97@mail.gmail.com \
--to=nicolas.pouillard@gmail.com \
--cc=Pietro.Abate@anu.edu.au \
--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