Commits

camlspotter committed b410971

removed dead code

Comments (0)

Files changed (1)

     | Error exn -> raise exn
 
 end
-
-(*
-module Make(Base : sig
-  include Stream_intf.Base
-  type key
-  val memo_of_attr : attr -> key memo
-end) = struct
-  include Stream.Make(Base)
-  type key = Base.key
-
-  let memo st = Base.memo_of_attr (attr st)
-
-  (* key uniqueness is the user's responsibility *)
-  let memoize (key : Base.key) (f : (t -> 'a)) (str : t) : 'a =
-    let memo = memo str in
-    let res = 
-      try Hashtbl.find memo key with
-      | Not_found ->
-          let res = 
-            try Ok (Obj.repr (f str)) with
-            | exn -> Error exn
-          in
-          Hashtbl.replace memo key res;
-          res
-    in
-    match res with
-    | Ok res -> Obj.obj res (* Type safe! Only if the key is unique... *)
-    | Error exn -> raise exn
-
-end
-
-module ByString(Base : sig
-  include Stream_intf.Base
-  val memo_of_attr : attr -> string memo
-end) = Make(struct 
-  type key = string
-  include Base
-end)
-*)