aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorfilliatr2001-04-03 08:04:19 +0000
committerfilliatr2001-04-03 08:04:19 +0000
commitbb76b246d1396f788d18888abe8284befb7f44b9 (patch)
treeb7dd5667977ceae4f3944945a55cac6412681abb /lib
parent78811c7ecba58fc35a3441ac1d510c67e28b159e (diff)
utilisation de Options.if_verbose
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@1519 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib')
-rw-r--r--lib/options.ml3
-rw-r--r--lib/options.mli2
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/options.ml b/lib/options.ml
index 82ee767d34..52babfdb21 100644
--- a/lib/options.ml
+++ b/lib/options.ml
@@ -35,6 +35,9 @@ let silently f x =
silent := oldsilent; raise e
end
+let if_silent f x = if !silent then f x
+let if_verbose f x = if not !silent then f x
+
(* The number of printed hypothesis in a goal *)
let print_hyps_limit = ref (None : int option)
diff --git a/lib/options.mli b/lib/options.mli
index 61372bfe5e..8d1d7e2fda 100644
--- a/lib/options.mli
+++ b/lib/options.mli
@@ -21,6 +21,8 @@ val make_silent : bool -> unit
val is_silent : unit -> bool
val is_verbose : unit -> bool
val silently : ('a -> 'b) -> 'a -> 'b
+val if_silent : ('a -> unit) -> 'a -> unit
+val if_verbose : ('a -> unit) -> 'a -> unit
val set_print_hyps_limit : int -> unit
val unset_print_hyps_limit : unit -> unit