Browse thread
polymorphic variants and promotion
-
Johannes Kanig
-
Julien Signoles
-
Keiko Nakata
- Christophe Raffalli
-
Keiko Nakata
- Remi Vanicat
-
Julien Signoles
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Christophe Raffalli <christophe.raffalli@u...> |
| Subject: | Re: [Caml-list] polymorphic variants and promotion |
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 >