summaryrefslogtreecommitdiff
path: root/libs/util.ml
diff options
context:
space:
mode:
Diffstat (limited to 'libs/util.ml')
-rw-r--r--libs/util.ml5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/util.ml b/libs/util.ml
index cfa1619..522c3ec 100644
--- a/libs/util.ml
+++ b/libs/util.ml
@@ -1,6 +1,11 @@
exception TypeError
module VarMap = Mapext.Make(String)
+exception Duplicate of string
+let disjoint_union k a b = match a, b with
+ | Some x, None -> Some x
+ | None, Some y -> Some y
+ | _ -> raise (Duplicate k)
let rec fix equal f s =
let fs = f s in