summaryrefslogtreecommitdiffstats
path: root/stdlib/lazy.ml
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2012-03-08 19:52:03 +0000
committerDamien Doligez <damien.doligez-inria.fr>2012-03-08 19:52:03 +0000
commit6c24f4f90b23e8c4536281d31461adfe5a15b739 (patch)
tree29f6c4af8052800cc7d0eafb9650c6be8e90a2e5 /stdlib/lazy.ml
parent1fb4007ece64b1d59e16d7a84639fce1dd69ed45 (diff)
merge version 3.12 from 3.12.1 to r12205
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12210 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib/lazy.ml')
-rw-r--r--stdlib/lazy.ml12
1 files changed, 9 insertions, 3 deletions
diff --git a/stdlib/lazy.ml b/stdlib/lazy.ml
index 359fcaa63..6a114245e 100644
--- a/stdlib/lazy.ml
+++ b/stdlib/lazy.ml
@@ -57,13 +57,13 @@ external force : 'a t -> 'a = "%lazy_force";;
let force_val = CamlinternalLazy.force_val;;
-let lazy_from_fun (f : unit -> 'arg) =
+let from_fun (f : unit -> 'arg) =
let x = Obj.new_block Obj.lazy_tag 1 in
Obj.set_field x 0 (Obj.repr f);
(Obj.obj x : 'arg t)
;;
-let lazy_from_val (v : 'arg) =
+let from_val (v : 'arg) =
let t = Obj.tag (Obj.repr v) in
if t = Obj.forward_tag || t = Obj.lazy_tag || t = Obj.double_tag then begin
make_forward v
@@ -72,4 +72,10 @@ let lazy_from_val (v : 'arg) =
end
;;
-let lazy_is_val (l : 'arg t) = Obj.tag (Obj.repr l) <> Obj.lazy_tag;;
+let is_val (l : 'arg t) = Obj.tag (Obj.repr l) <> Obj.lazy_tag;;
+
+let lazy_from_fun = from_fun;;
+
+let lazy_from_val = from_val;;
+
+let lazy_is_val = is_val;;