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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 4F75ABBC1 for ; Tue, 19 Feb 2008 23:22:14 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAABrlukfAXQInh2dsb2JhbACBWYpghBgBAQEICimeNQ X-IronPort-AV: E=Sophos;i="4.25,378,1199660400"; d="scan'208";a="9365919" Received: from concorde.inria.fr ([192.93.2.39]) by mail3-smtp-sop.national.inria.fr with ESMTP; 19 Feb 2008 23:22:14 +0100 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m1JMMDIx008365 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Tue, 19 Feb 2008 23:22:13 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAJTlukfUGypAi2dsb2JhbACBWYpghBgBAQEIAgIGCQgRB545 X-IronPort-AV: E=Sophos;i="4.25,378,1199660400"; d="scan'208";a="8294054" Received: from smtp7-g19.free.fr ([212.27.42.64]) by mail1-smtp-roc.national.inria.fr with ESMTP; 19 Feb 2008 23:22:13 +0100 Received: from smtp7-g19.free.fr (localhost [127.0.0.1]) by smtp7-g19.free.fr (Postfix) with ESMTP id 0B540322805; Tue, 19 Feb 2008 23:22:13 +0100 (CET) Received: from macbookpro.local (lns-bzn-48f-81-56-220-129.adsl.proxad.net [81.56.220.129]) by smtp7-g19.free.fr (Postfix) with ESMTP id A7754322831; Tue, 19 Feb 2008 23:22:12 +0100 (CET) Message-ID: <47BB5791.4020606@univ-savoie.fr> Date: Tue, 19 Feb 2008 23:26:25 +0100 From: Christophe Raffalli User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: Keiko Nakata Cc: Julien.Signoles@lri.fr, caml-list@inria.fr Subject: Re: [Caml-list] polymorphic variants and promotion References: <926565e50802190223r456d0ec2we4b8a4f51b134f42@mail.gmail.com> <20080219.223759.125111280.keiko@kurims.kyoto-u.ac.jp> In-Reply-To: <20080219.223759.125111280.keiko@kurims.kyoto-u.ac.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Miltered: at concorde with ID 47BB5695.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; christophe:01 raffalli:01 christophe:01 raffalli:01 univ-savoie:01 variants:01 bug:01 cheers:01 christohe:01 coercions:01 beginner's:01 ocaml:01 bug:01 polymorphic:01 beginners:01 Keiko Nakata a écrit : > Hello, > > indeed we need to use double coercion, instead of single: > > # ((`A 1 : [ `A of int ]) : [ `A of int ] :> [> `A of int ]);; > - : [> `A of int ] = `A 1 > # ((`A 1 : [ `A of int ]) :> [> `A of int ]);; > - : [ `A of int ] = `A 1 > > To me this looks like a bug ? Should not we always have that "e :> t" has type "t" (if it typechecks) ? Cheers, Christohe > This explains a little to me about the differences > between double and single coercions. > Thanks. > > With best, > Keiko > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >