tree_monadize tweaks
authorJim Pryor <profjim@jimpryor.net>
Sun, 5 Dec 2010 14:33:24 +0000 (09:33 -0500)
committerJim Pryor <profjim@jimpryor.net>
Sun, 5 Dec 2010 14:33:24 +0000 (09:33 -0500)
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
code/tree_monadize.ml

index c751b36..08b8d69 100644 (file)
@@ -184,7 +184,7 @@ module TreeCont =  Tree_monadizer2(Continuation_monad);;
  *)
 
 
-let int_readerize : int -> int reader =
+let int_readerize : int -> int Reader_monad.monad =
   fun (a : int) -> fun (env : int -> int) -> env a;;
 
 (* int_readerize takes an int and returns a Reader monad that
@@ -202,7 +202,7 @@ TreeReader.monadize int_readerize t1 env;;
 
 
 
-let incrementer : int -> int state =
+let incrementer : int -> int State_monad.monad =
   fun (a : int) -> fun s -> (a, s+1);;
 
 (* incrementer takes an 'a and returns it wrapped in a
@@ -221,7 +221,7 @@ TreeList.monadize (fun i -> [ [i;i*i] ]) t1;;
 
 (* do nothing *)
 let initial_continuation = fun t -> t in
-TreeCont.monadize cont_unit t1 initial_continuation;;
+TreeCont.monadize Continuation_monad.unit t1 initial_continuation;;
 
 (* convert tree to list of leaves *)
 let initial_continuation = fun t -> [] in