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
polymorphic variants and recursive functions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-03-26 (00:06)
From: Warren Harris <warrensomebody@g...>
Subject: Re: [Caml-list] polymorphic variants and recursive functions (caml: to exclusive)

Thanks for your response...

On Mar 25, 2009, at 4:24 PM, Mauricio Fernandez - wrote:

> The Lwt.t type is abstract and invariant since no annotation has  
> been given
> for the type variable (you'd need it to be  type +'a t):


> Unfortunately, the type variable is in both variant and  
> contravariant position
> in the definition of Lwt.t...

Just to be sure I understand you... you're saying due to the  
definition/implementation of Lwt and the fact that the type parameter  
cannot be declared covariant, that what I'm trying to do with phantom  
types just can't work in this case. I was afraid of that. :-(