caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Martin Jambon <martin.jambon@ens-lyon.org>
To: Pietro Abate <Pietro.Abate@anu.edu.au>
Cc: ocaml ml <caml-list@inria.fr>
Subject: Re: [Caml-list] polymorphic variants and camlp4
Date: Sun, 11 Feb 2007 20:01:35 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0702111957130.17867@droopy> (raw)
In-Reply-To: <20070212033220.GA30365@pulp.rsise.anu.edu.au>

On Mon, 12 Feb 2007, Pietro Abate wrote:

> Hi all,
>
> What is the syntax to use polymorphic variants with camlp4 ?
>
> <:str_item< type a = A >> is ok, but <:str_item< type a = [ `A ] >>
> doesn't work as expected...
>
> While expanding quotation "str_item":
> Parse error: '=' or '>' or '<' or [a_list] or [constructor_declaration]
>  expected after '[' (in [type])
> Uncaught exception: Pcaml.Qerror("str_item", 1, _)

The syntax is:

   type a = [ = `A ]

(found it in pa_o.ml)

Martin

--
Martin Jambon
http://martin.jambon.free.fr


  reply	other threads:[~2007-02-12  4:01 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 ` Martin Jambon [this message]
2007-02-12  4:12 ` [Caml-list] " Pietro Abate
2007-02-12 14:29   ` Serge Aleynikov
2007-02-12 10:54 ` 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=Pine.LNX.4.64.0702111957130.17867@droopy \
    --to=martin.jambon@ens-lyon.org \
    --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;
as well as URLs for NNTP newsgroup(s).