Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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 <> wrote:
> See the paper _Relaxing the value restriction_ by Jacques Garrigue (
> ), 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