aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/iStream.ml2
-rw-r--r--lib/iStream.mli3
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/iStream.ml b/lib/iStream.ml
index 36b9c43ad0..ef69eaf2b0 100644
--- a/lib/iStream.ml
+++ b/lib/iStream.ml
@@ -38,6 +38,8 @@ let is_empty s = match Lazy.force s with
let peek = Lazy.force
+let is_val = Lazy.is_val
+
let rec of_list = function
| [] -> empty
| x :: l -> cons x (of_list l)
diff --git a/lib/iStream.mli b/lib/iStream.mli
index a059570107..67e5e0764f 100644
--- a/lib/iStream.mli
+++ b/lib/iStream.mli
@@ -42,6 +42,9 @@ val is_empty : 'a t -> bool
val peek : 'a t -> ('a , 'a t) u
(** Return the head and the tail of a stream, if any. *)
+val is_val : 'a t -> bool
+(** Check if the head has already been evaluated. *)
+
(** {6 Standard operations}
All stream-returning functions are lazy. The other ones are eager. *)