summaryrefslogtreecommitdiff
path: root/src/util.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.ml')
-rw-r--r--src/util.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util.ml b/src/util.ml
index 59ba7026..762e0f88 100644
--- a/src/util.ml
+++ b/src/util.ml
@@ -359,3 +359,9 @@ let rec string_of_list sep string_of = function
let string_of_option string_of = function
| None -> ""
| Some x -> string_of x
+
+let is_some = function
+ | Some _ -> true
+ | None -> false
+
+let is_none opt = not (is_some opt)