Dear all,
When we wrote bindings for promise, we want to express things (simplified ) like below:
class type ['b] promise = object
method then_ : 'a . ('b -> 'a promise) -> 'a promise
end
It is not expressible in OCaml, The universal type variable 'a can not be generalized, I tried this too:
type 'b promise = < then_ : 'a . ('b -> 'a u) -> 'a u >
It does not work either, thanks -- Hongbo