aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/iStream.ml8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/iStream.ml b/lib/iStream.ml
index ba08ffd24e..65a336dafd 100644
--- a/lib/iStream.ml
+++ b/lib/iStream.ml
@@ -14,13 +14,9 @@ type 'a node = ('a,'a t) peek
and 'a t = 'a node Lazy.t
-let lift (n : 'a node) : 'a t = Obj.magic n
-(** Small hack to overcome a missing optimization in OCaml compilation of lazy
- values. *)
+let empty = Lazy.lazy_from_val Nil
-let empty = lift Nil
-
-let cons x s = lift (Cons (x, s))
+let cons x s = Lazy.lazy_from_val (Cons (x, s))
let thunk s = lazy (Lazy.force (Lazy.force s))