Commits

camlspotter  committed 66ff860

port to 4.00

  • Participants
  • Parent commits 4b13721

Comments (0)

Files changed (4)

 OCAMLPACKS[] =
     pcre
     sexplib
-    type-conv
+    type_conv
     xml-light
 
 MyOCamlPackage(hasexp, $(FILES), $(EMPTY), $(EMPTY))

File combinator.ml

 open Sexp
 
 module Z = Zlist.Lazy
-let (!!) = Z.(!!)
 open Zlist.Infix
 
 type filter = Sexp.t -> Sexp.t Zlist.t
   in
   zlist ()
 
-
-let of_list l =
-  let rec of_list = function
-    | [] -> Z.return Nil
-    | x::xs -> Z.return (Cons (x, of_list xs))
-  in
-  ref (of_list l)
-
 let is_nil t = hd t = None
 
 let rec map ~f t =
   filter_map t ~f:(fun v ->
     if f v then Some v else None)
 
+(* CR jfuruse: Completely wrong *)
 let fold_right ~f t ~init = 
   let rec fold_right_ ~f t ~init =
     match Lazy.force t with
 module Lazy : sig
   type 'a t
   val (!!) : 'a Lazy.t -> 'a
+  module Infix : sig
+    val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
+    val (>>|) : 'a t -> ('a -> 'b) -> 'b t
+  end
 end
 
 type 'a t with sexp
 val append : 'a t -> 'a t -> 'a t
 val bind : 'a t -> ('a -> 'b t) -> 'b t
 
+val of_list : 'a list -> 'a t
+
 (* force functions which may loop infinite *)
 val to_list : 'a t -> 'a list
 val force : 'a t -> unit