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
Unexpected '_a problem
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-08-02 (17:57)
From: Chris King <colanderman@g...>
Subject: Re: [Caml-list] Unexpected '_a problem
On 8/2/06, Alain Frisch <Alain.Frisch@inria.fr> wrote:
> See the paper _Relaxing the value restriction_ by Jacques Garrigue (
> http://wwwfun.kurims.kyoto-u.ac.jp/~garrigue/papers/morepoly-long.pdf
> ), page 15: dangerous type variables (which are not generalized when the
> right-hand side of the let-binding is not a value) are not only those is
> contravariant position - this would be enough to ensure type soundness -
> but also those which appear in a contravariant branch (e.g. anywhere on
> the left of an arrow) - this is necessary to ensure that the type system
> has principal types.

Okay, that (and Christophe's explanation) explains why hiding
everything in a module works.  Thanks everyone for your help!  It
seems I will have to use Obj.magic to get the type I want but at least
its use in this situation seems both safe and warranted.

- Chris