Version française
Home     About     Download     Resources     Contact us    
Browse thread
why Hashtbl.t are not covarint?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Stéphane Glondu <steph@g...>
Subject: Re: [Caml-list] why Hashtbl.t are not covarint?
Radzevich Belevich a écrit :
> hashtbl.mli: type ('a,'b) t
> Why not "type ('a,+'b) t"?

For the same reason as 'a in 'a ref, i.e. mutable things cannot be
covariant.


Cheers,

-- 
Stéphane