Mauricio,
Thanks for your response...
On Mar 25, 2009, at 4:24 PM, Mauricio Fernandez - m...@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 b
On Wed, Mar 25, 2009 at 02:39:28PM -0700, Warren Harris wrote:
> let rec eval = function
> | `Arr v -> (eval_arr v : [`V] Lwt.t:> [> `V] Lwt.t)
> | `Obj v -> (eval_obj v : [`V|`O] Lwt.t :> [> `V] Lwt.t)
> and eval_arr v = eval_obj v >>= arr
> and eval_obj v = eval v >>= obj
>
> | `Obj v
I stumbled upon a little puzzle that I can't quite work out. I'm
trying to use polymorphic variants as phantom types and in one
particular situation involving a polymorphic type with an invariant
type parameter (Lwt.t) the compiler is unhappy with a set of mutually
recursive functions. I ca