Browse thread
polymorphic variants and recursive functions
-
Warren Harris
-
Mauricio Fernandez
- Warren Harris
-
Mauricio Fernandez
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Warren Harris <warrensomebody@g...> |
| Subject: | Re: [Caml-list] polymorphic variants and recursive functions (caml: to exclusive) |
Mauricio, Thanks for your response... On Mar 25, 2009, at 4:24 PM, Mauricio Fernandez - mfp@acm.org 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. :-( Warren