From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 1FA70BC0A for ; Mon, 12 Feb 2007 05:01:53 +0100 (CET) Received: from out5.smtp.messagingengine.com (out5.smtp.messagingengine.com [66.111.4.29]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l1C41q8I018761 for ; Mon, 12 Feb 2007 05:01:52 +0100 Received: from out1.internal (unknown [10.202.2.149]) by out1.messagingengine.com (Postfix) with ESMTP id 17E031A9791; Sun, 11 Feb 2007 23:01:50 -0500 (EST) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by out1.internal (MEProxy); Sun, 11 Feb 2007 23:01:50 -0500 X-Sasl-enc: MttQPZ3ahQcGKsz2lqEzFIcatjNnKl8q2cFC2+5mgXDd 1171252909 Received: from adsl-75-37-187-240.dsl.sndg02.sbcglobal.net (adsl-75-37-187-240.dsl.sndg02.sbcglobal.net [75.37.187.240]) by mail.messagingengine.com (Postfix) with ESMTP id C698A180A; Sun, 11 Feb 2007 23:01:48 -0500 (EST) Date: Sun, 11 Feb 2007 20:01:35 -0800 (PST) From: Martin Jambon X-X-Sender: martin@droopy To: Pietro Abate Cc: ocaml ml Subject: Re: [Caml-list] polymorphic variants and camlp4 In-Reply-To: <20070212033220.GA30365@pulp.rsise.anu.edu.au> Message-ID: References: <20070212033220.GA30365@pulp.rsise.anu.edu.au> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Miltered: at discorde with ID 45CFE6B0.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ens-lyon:01 variants:01 camlp:01 syntax:01 variants:01 camlp:01 uncaught:01 pcaml:01 syntax:01 2007,:98 polymorphic:01 polymorphic:01 wrote:01 constructor:01 exception:01 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