English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
class type param constraint
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-04-09 (10:21)
From: Radzevich Belevich <radzevich.belevich@g...>
Subject: Re: [Caml-list] class type param constraint
On Thu, 2009-04-09 at 19:13 +0900, Jacques Garrigue wrote:
> This may be a bit confusing, but the .. in your constraint on 'c means
> that no actual subtyping will occur when you use this type as target.
> Indeed, if the constraint was left unchanged, it would mean that by
> choosing an arbitrary instance, you could use the as_c method to
> convert an object of type "t a" to any "t".
Why it can't be converted to any valid "t"?