Commits

camlspotter committed 3a9ba56

monad parameter is now covariant

  • Participants
  • Parent commits 20f0c0c

Comments (0)

Files changed (1)

File monad_intf.ml

 (** Minimum monad interface *)
 module type S = sig
-  type 'a t
+  type +'a t
   val return : 'a -> 'a t
   val bind : 'a t -> ('a -> 'b t) -> 'b t
 end
 
 module type Open = sig
-  type 'a t
+  type +'a t
   val bind : 'a t -> ('a -> 'b t) -> 'b t
   val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t
   val ( >>| ) : 'a t -> ('a -> 'b) -> 'b t