1. Dmitry Grebeniuk
  2. ocaml-iteratees

Commits

Dmitry Grebeniuk  committed 35e6bff

explicit covariance for MonadIO type

  • Participants
  • Parent commits 23037c2
  • Branches default

Comments (0)

Files changed (2)

File direct_IO.ml

View file
  • Ignore whitespace
 module Direct_IO
  :
   sig
-    type m 'a = res 'a;
+    type m +'a = res 'a;
 
     value return : 'a -> m 'a;
     value bind : ('a -> m 'b) -> m 'a -> m 'b;
   end
  =
   struct
-    type m 'a = res 'a;
+    type m +'a = res 'a;
     value return x = `Ok x;
     value bind f m =
       match m with

File types.ml

View file
  • Ignore whitespace
 module type MonadIO
  =
   sig
-    type m 'a;
+    type m +'a;
     value return : 'a -> m 'a;
     value bind : ('a -> m 'b) -> m 'a -> m 'b;
 
    See function [mres] in functor.
 *)
 
-type res 'a = [= `Ok of 'a | `Error of (exn * place) ]
+type res +'a = [= `Ok of 'a | `Error of (exn * place) ]
 ;