From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q3AEdEfm007412 for ; Tue, 10 Apr 2012 16:39:14 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkoCANREhE+yIWsdmWdsb2JhbABFuU4BAQEBAQgLCwcUJ4IJAQEFMgEFQBELGAkWDwkDAgECAUUTBgICiAoEuzGNPYMkBJwAjQs X-IronPort-AV: E=Sophos;i="4.75,399,1330902000"; d="scan'208";a="139691947" Received: from 15.mo5.mail-out.ovh.net (HELO mo5.mail-out.ovh.net) ([178.33.107.29]) by mail4-smtp-sop.national.inria.fr with ESMTP; 10 Apr 2012 16:39:09 +0200 Received: from mail419.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo5.mail-out.ovh.net (Postfix) with SMTP id D9B0BFF967B for ; Tue, 10 Apr 2012 16:39:50 +0200 (CEST) Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 10 Apr 2012 16:39:08 +0200 Received: from unknown (HELO ?138.231.81.156?) (romain%bardou.fr@138.231.81.156) by ns0.ovh.net with SMTP; 10 Apr 2012 16:39:06 +0200 Message-ID: <4F84460D.1010209@lsv.ens-cachan.fr> Date: Tue, 10 Apr 2012 16:39:09 +0200 From: Romain Bardou User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111114 Icedove/3.1.16 MIME-Version: 1.0 To: caml-list@inria.fr X-Ovh-Mailout: 178.32.228.5 (mo5.mail-out.ovh.net) References: <20120410135150.GD27094@kerneis.info> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 5046846333058537248 X-Ovh-Remote: 138.231.81.156 () X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-OVH-SPAMSTATE: OK X-OVH-SPAMSCORE: 0 X-OVH-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeegfedrudelucetggdotefuucfrrhhofhhilhgvmecuqfggjfenuceurghilhhouhhtmecufedttdenucenucfhrhhomheptfhomhgrihhnuceurghrughouhcuoegsrghrughouheslhhsvhdrvghnshdqtggrtghhrghnrdhfrheqnecujfgurhepkfffhfgfggfvufhfjggtgfesthekrgdttdefud X-Spam-Check: DONE|U 0.5/N X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeegfedrudelucetggdotefuucfrrhhofhhilhgvmecuqfggjfenuceurghilhhouhhtmecufedttdenucenucfhrhhomheptfhomhgrihhnuceurghrughouhcuoegsrghrughouheslhhsvhdrvghnshdqtggrtghhrghnrdhfrheqnecujfgurhepkfffhfgfggfvufhfjggtgfesthekrgdttdefud X-Validation-by: bardou@lsv.ens-cachan.fr Subject: Re: [Caml-list] Recursive polymorphic variants Le 10/04/2012 15:57, David House a écrit : > On Tue, Apr 10, 2012 at 2:51 PM, Gabriel Kerneis wrote: >> Is there any work-around? > > Depending on your requirements, just wrapping up the recursive copy of > [t] in another constructor might do: > > type t = [ `A of [ `B | `C of t ]] > > I don't know why your original example is disallowed. > I think the semantic of [t|...] is just to syntactically replace t by its definition, which is not possible if the definition is not done yet. Cheers, -- Romain Bardou