summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ansys.com>2014-06-13 11:31:50 +0200
committerAlex Auvolat <alex.auvolat@ansys.com>2014-06-13 11:31:50 +0200
commitf7868083de2f351b5195149870e6e77398da44f9 (patch)
tree88e4b477edec70ead05f2a3d69e7a270966cd00e /libs
parent26b263fbe8938d1fe13ee67ab87a2edeea9c99aa (diff)
downloadscade-analyzer-f7868083de2f351b5195149870e6e77398da44f9.tar.gz
scade-analyzer-f7868083de2f351b5195149870e6e77398da44f9.zip
Parse activate blocks.
Diffstat (limited to 'libs')
-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