From: Christophe Raffalli <christophe.raffalli@univ-savoie.fr>
To: Keiko Nakata <keiko@kurims.kyoto-u.ac.jp>
Cc: Julien.Signoles@lri.fr, caml-list@inria.fr
Subject: Re: [Caml-list] polymorphic variants and promotion
Date: Tue, 19 Feb 2008 23:26:25 +0100 [thread overview]
Message-ID: <47BB5791.4020606@univ-savoie.fr> (raw)
In-Reply-To: <20080219.223759.125111280.keiko@kurims.kyoto-u.ac.jp>
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
>
next prev parent reply other threads:[~2008-02-19 22:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-19 10:23 Johannes Kanig
2008-02-19 12:38 ` [Caml-list] " Julien Signoles
2008-02-19 13:37 ` Keiko Nakata
2008-02-19 22:26 ` Christophe Raffalli [this message]
2008-02-20 4:50 ` Jacques Garrigue
2008-02-19 12:48 ` Remi Vanicat
2008-02-20 5:01 ` [Caml-list] " Jacques Garrigue
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=47BB5791.4020606@univ-savoie.fr \
--to=christophe.raffalli@univ-savoie.fr \
--cc=Julien.Signoles@lri.fr \
--cc=caml-list@inria.fr \
--cc=keiko@kurims.kyoto-u.ac.jp \
/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