diff options
author | Emilio Jesus Gallego Arias <e+git@x80.org> | 2017-04-21 02:01:02 +0200 |
---|---|---|
committer | Emilio Jesus Gallego Arias <e+git@x80.org> | 2017-04-21 02:01:02 +0200 |
commit | a821f74dc91e438c86037d1dc8903a49934e6ee5 (patch) | |
tree | e29fdcb22b310768b400387167db9f97916333d6 /toplevel | |
parent | beb3acd2fd3831404f0be2da61d3f28e210e8349 (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 'toplevel')
-rw-r--r-- | toplevel/coqtop.ml | 8 | ||||
-rw-r--r-- | toplevel/vernac.ml | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/toplevel/coqtop.ml b/toplevel/coqtop.ml index c259beb17..18a38525d 100644 --- a/toplevel/coqtop.ml +++ b/toplevel/coqtop.ml @@ -215,7 +215,7 @@ let glob_opt = ref false let add_compile verbose s = set_batch_mode (); - Flags.make_silent true; + Flags.quiet := true; if not !glob_opt then Dumpglob.dump_to_dotglob (); (** make the file name explicit; needed not to break up Coq loadpath stuff. *) let s = @@ -384,7 +384,7 @@ let vio_tasks = ref [] let add_vio_task f = set_batch_mode (); - Flags.make_silent true; + Flags.quiet := true; vio_tasks := f :: !vio_tasks let check_vio_tasks () = @@ -398,7 +398,7 @@ let vio_files_j = ref 0 let vio_checking = ref false let add_vio_file f = set_batch_mode (); - Flags.make_silent true; + Flags.quiet := true; vio_files := f :: !vio_files let set_vio_checking_j opt j = @@ -563,7 +563,7 @@ let parse_args arglist = |"-output-context" -> output_context := true |"-profile-ltac" -> Flags.profile_ltac := true |"-q" -> no_load_rc () - |"-quiet"|"-silent" -> Flags.make_silent true; Flags.make_warn false + |"-quiet"|"-silent" -> Flags.quiet := true; Flags.make_warn false |"-quick" -> Flags.compilation_mode := BuildVio |"-list-tags" -> print_tags := true |"-time" -> Flags.time := true diff --git a/toplevel/vernac.ml b/toplevel/vernac.ml index 18f93197c..fd208bd89 100644 --- a/toplevel/vernac.ml +++ b/toplevel/vernac.ml @@ -116,7 +116,7 @@ let rec interp_vernac sid po (loc,com) = load_vernac verbosely sid f | v -> try - let nsid, ntip = Stm.add sid (Flags.is_verbose()) (loc,v) in + let nsid, ntip = Stm.add sid (not !Flags.quiet) (loc,v) in (* Main STM interaction *) if ntip <> `NewTip then @@ -128,7 +128,7 @@ let rec interp_vernac sid po (loc,com) = (* We could use a more refined criteria that depends on the vernac. For now we imitate the old approach. *) - let hide_goals = !Flags.batch_mode || is_query v || + let hide_goals = !Flags.batch_mode || is_query v || !Flags.quiet || not (Proof_global.there_are_pending_proofs ()) in if not hide_goals then Feedback.msg_notice (pr_open_cur_subgoals ()); |