aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/util.mli
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2017-08-21 23:49:20 +0200
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2017-09-12 20:17:27 +0200
commit8b07b9296dac108d7a3d44db227bb1c6042db555 (patch)
tree63a788b3e9fc6c4094b86417058f06f630b3bc01 /lib/util.mli
parentcc94172036789cfef28007f59510b7f17df5d45d (diff)
Adding function to be typically used to pass values from an OCaml "when" clause.
Diffstat (limited to 'lib/util.mli')
-rw-r--r--lib/util.mli5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/util.mli b/lib/util.mli
index d910e7e28..c54f5825c 100644
--- a/lib/util.mli
+++ b/lib/util.mli
@@ -137,3 +137,8 @@ val sym : ('a, 'b) eq -> ('b, 'a) eq
val open_utf8_file_in : string -> in_channel
(** Open an utf-8 encoded file and skip the byte-order mark if any. *)
+
+val set_temporary_memory : unit -> ('a -> 'a) * (unit -> 'a)
+(** A trick which can typically be used to store on the fly the
+ computation of values in the "when" clause of a "match" then
+ retrieve the evaluated result in the r.h.s of the clause *)