aboutsummaryrefslogtreecommitdiff
path: root/src/boot/util/common.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot/util/common.ml')
-rw-r--r--src/boot/util/common.ml10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/boot/util/common.ml b/src/boot/util/common.ml
index 0ea39e2d..3271b644 100644
--- a/src/boot/util/common.ml
+++ b/src/boot/util/common.ml
@@ -341,6 +341,16 @@ let bool_of_option x =
Some _ -> true
| None -> false
+let may f x =
+ match x with
+ Some x' -> f x'
+ | None -> ()
+
+let option_get x =
+ match x with
+ Some x -> x
+ | None -> raise Not_found
+
(*
* Auxiliary stack functions.
*)