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 /vernac | |
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 'vernac')
-rw-r--r-- | vernac/command.ml | 2 | ||||
-rw-r--r-- | vernac/mltop.ml | 4 | ||||
-rw-r--r-- | vernac/vernacentries.ml | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/vernac/command.ml b/vernac/command.ml index 5ec708446..45ff57955 100644 --- a/vernac/command.ml +++ b/vernac/command.ml @@ -234,7 +234,7 @@ match local with let _ = declare_variable ident decl in let () = assumption_message ident in let () = - if is_verbose () && Pfedit.refining () then + if not !Flags.quiet && Pfedit.refining () then Feedback.msg_info (str"Variable" ++ spc () ++ pr_id ident ++ strbrk " is not visible from current goals") in diff --git a/vernac/mltop.ml b/vernac/mltop.ml index 2396cf04a..056ffca5c 100644 --- a/vernac/mltop.ml +++ b/vernac/mltop.ml @@ -138,7 +138,7 @@ let dir_ml_load s = match !load with | WithTop _ -> ml_load s | WithoutTop -> - let warn = Flags.is_verbose() in + let warn = not !Flags.quiet in let _,gname = find_file_in_path ~warn !coq_mlpath_copy s in ml_load gname @@ -365,7 +365,7 @@ let trigger_ml_object verb cache reinit ?path name = else begin let file = file_of_name (Option.default name path) in let path = - if_verbose_load (verb && is_verbose ()) load_ml_object name ?path file in + if_verbose_load (verb && not !quiet) load_ml_object name ?path file in add_loaded_module name (Some path); if cache then perform_cache_obj name end diff --git a/vernac/vernacentries.ml b/vernac/vernacentries.ml index 92b1a5956..c50c27c45 100644 --- a/vernac/vernacentries.ml +++ b/vernac/vernacentries.ml @@ -780,7 +780,7 @@ let vernac_require from import qidl = in let locate (loc, qid) = try - let warn = Flags.is_verbose () in + let warn = not !Flags.quiet in let (_, dir, f) = Library.locate_qualified_library ?root ~warn qid in (dir, f) with @@ -1232,8 +1232,8 @@ let _ = optdepr = false; optname = "silent"; optkey = ["Silent"]; - optread = is_silent; - optwrite = make_silent } + optread = (fun () -> !Flags.quiet); + optwrite = ((:=) Flags.quiet) } let _ = declare_bool_option @@ -2173,7 +2173,7 @@ let with_fail b f = | HasNotFailed -> user_err ~hdr:"Fail" (str "The command has not failed!") | HasFailed msg -> - if is_verbose () || !test_mode || !ide_slave then Feedback.msg_info + if not !Flags.quiet || !test_mode || !ide_slave then Feedback.msg_info (str "The command has indeed failed with message:" ++ fnl () ++ msg) | _ -> assert false end |