aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/options.ml10
-rw-r--r--lib/options.mli4
2 files changed, 13 insertions, 1 deletions
diff --git a/lib/options.ml b/lib/options.ml
index e0cebb1ebb..c4afa1e390 100644
--- a/lib/options.ml
+++ b/lib/options.ml
@@ -32,4 +32,12 @@ let set_print_hyps_limit n = print_hyps_limit := Some n
let unset_print_hyps_limit () = print_hyps_limit := None
let print_hyps_limit () = !print_hyps_limit
-
+let mes_ambig = ref true
+let make_mes_ambig flag = mes_ambig:=flag
+let is_mes_ambig() = !mes_ambig
+
+let without_mes_ambig f x =
+ let old = is_mes_ambig() in
+ try make_mes_ambig false;
+ let rslt = f x in (make_mes_ambig old; rslt)
+ with e -> (make_mes_ambig old; raise e)
diff --git a/lib/options.mli b/lib/options.mli
index c159767aec..528226360e 100644
--- a/lib/options.mli
+++ b/lib/options.mli
@@ -18,3 +18,7 @@ val set_print_hyps_limit : int -> unit
val unset_print_hyps_limit : unit -> unit
val print_hyps_limit : unit -> int option
+val make_mes_ambig : bool -> unit
+val is_mes_ambig : unit -> bool
+val without_mes_ambig : ('a -> 'b) -> 'a -> 'b
+