aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/flags.ml
diff options
context:
space:
mode:
authorGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2017-04-21 02:01:02 +0200
committerGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2017-04-21 02:01:02 +0200
commita821f74dc91e438c86037d1dc8903a49934e6ee5 (patch)
treee29fdcb22b310768b400387167db9f97916333d6 /lib/flags.ml
parentbeb3acd2fd3831404f0be2da61d3f28e210e8349 (diff)
[flags] Deprecate is_silent/is_verbose in favor of single flag.
Today, both modes are controlled by a single flag, however this is a bit misleading as is_silent really means "quiet", that is to say `coqc -q` whereas "verbose" is Coq normal operation. We also restore proper behavior of goal printing in coqtop on quiet mode, thanks to @Matafou for the report.
Diffstat (limited to 'lib/flags.ml')
-rw-r--r--lib/flags.ml16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/flags.ml b/lib/flags.ml
index d87d9e729..00f515b5a 100644
--- a/lib/flags.ml
+++ b/lib/flags.ml
@@ -143,16 +143,16 @@ let beautify = ref false
let beautify_file = ref false
(* Silent / Verbose *)
-let silent = ref false
-let make_silent flag = silent := flag; ()
-let is_silent () = !silent
-let is_verbose () = not !silent
+let quiet = ref false
+let silently f x = with_option quiet f x
+let verbosely f x = without_option quiet f x
-let silently f x = with_option silent f x
-let verbosely f x = without_option silent f x
+let if_silent f x = if !quiet then f x
+let if_verbose f x = if not !quiet then f x
-let if_silent f x = if !silent then f x
-let if_verbose f x = if not !silent then f x
+let make_silent flag = quiet := flag
+let is_silent () = !quiet
+let is_verbose () = not !quiet
let auto_intros = ref true
let make_auto_intros flag = auto_intros := flag