| From: Eric Tanter (etanter at dcc.uchile.cl) Date: Thu Oct 20 10:45:22 EDT 2011 |
|
Hi,
Is there a way to type a monad?
For example in OCaml:
module type MonadRequirements = sig
type ‘a t
val bind : ‘a t -> (‘a -> ‘b t) -> ‘b t
val return : ‘a -> ‘a t
end;;
In Typed Racket we can use a polymorphic struct to have the parametrization by 'a and 'b, but is it possible to specify the abstract type constructor t?
Thanks,
-- Éric
| Posted on the users mailing list. |
|