Version française
Home     About     Download     Resources     Contact us    
Browse thread
Type constraints
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Andreas Rossberg <rossberg@p...>
Subject: Re: [Caml-list] Type constraints
Damien Doligez wrote:
> On 7 Dec 2004, at 08:12, Alain Frisch wrote:
> 
>> Btw, does someone know why in
>>
>> # let module M : sig val v: 'a -> 'a end = struct let v x = x end in 
>> M.v;;
>> - : '_a -> '_a = <fun>
>>
>> the type variable is not generalized ?
> 
> Consider this:
> 
>   let module M = struct let v = ref end in M.v;;

Is this really a counter-example? I don't see any problem with making it 
polymorphic - it evaluates to ref, and ref can happily be polymorphic.

	- Andreas

-- 
Andreas Rossberg, rossberg@ps.uni-sb.de

Let's get rid of those possible thingies!  -- TB