summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/util.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/util.ml b/libs/util.ml
index 6931ed9..01b0c5c 100644
--- a/libs/util.ml
+++ b/libs/util.ml
@@ -25,6 +25,8 @@ let loc_error l f x =
| NoLocError e -> raise (LocError([l], e))
| LocError(q, e) -> raise (LocError(l::q, e))
+let not_implemented e = error ("Not implemented: " ^ e)
+
(* Varmaps *)
module VarMap = Mapext.Make(String)
@@ -33,6 +35,10 @@ let disjoint_union k a b = match a, b with
| None, Some y -> Some y
| _ -> error ("Duplicate name in disjoint union: " ^ k)
+module SSet = Set.Make(String)
+
+(* Fixpoint *)
+
let rec fix equal f s =
let fs = f s in
if equal fs s