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: Damien Doligez <damien.doligez@i...>
Subject: Re: [Caml-list] Type constraints
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;;

-- Damien