diff options
author | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2011-12-17 20:53:35 +0000 |
---|---|---|
committer | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2011-12-17 20:53:35 +0000 |
commit | f0226504cfb179a4491d43764bfdb22a1fe2d106 (patch) | |
tree | c314725bf6f6972b2bb3d18f0f1e64554c28aed1 /interp | |
parent | 473bc54aa1df56b64a6fefb355041e6fa277022b (diff) |
A pass on warning printings. Made systematic the use of msg_warning so
as to ensure the warning is flushed in real time. Made systematic the
use of if_warn instead of if_verbose when the warning is intended to
signal something anormal (if_warn is activated when compiling
verbosely and when working interactively while if_verbose is activated
only when working interactively and when loading verbosely).
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14803 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'interp')
-rw-r--r-- | interp/constrintern.ml | 6 | ||||
-rw-r--r-- | interp/notation.ml | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/interp/constrintern.ml b/interp/constrintern.ml index 8dee1f0e0..b161d001d 100644 --- a/interp/constrintern.ml +++ b/interp/constrintern.ml @@ -804,8 +804,8 @@ let alias_of = function | (id::_,_) -> Name id let message_redundant_alias (id1,id2) = - if_verbose warning - ("Alias variable "^(string_of_id id1)^" is merged with "^(string_of_id id2)) + if_warn msg_warning + (str "Alias variable " ++ pr_id id1 ++ str " is merged with " ++ pr_id id2) (* Expanding notations *) @@ -933,7 +933,7 @@ let maybe_constructor ref f aliases env = | InternalizationError _ -> VarPat (find_pattern_variable ref) (* patt var also exists globally but does not satisfy preconditions *) | (Environ.NotEvaluableConst _ | Not_found) -> - if_verbose msg_warning (str "pattern " ++ pr_reference ref ++ + if_warn msg_warning (str "pattern " ++ pr_reference ref ++ str " is understood as a pattern variable"); VarPat (find_pattern_variable ref) diff --git a/interp/notation.ml b/interp/notation.ml index aa35e4af0..9967a8e5e 100644 --- a/interp/notation.ml +++ b/interp/notation.ml @@ -71,7 +71,7 @@ let init_scope_map () = let declare_scope scope = try let _ = Gmap.find scope !scope_map in () with Not_found -> -(* Flags.if_verbose message ("Creating scope "^scope);*) +(* Flags.if_warn message ("Creating scope "^scope);*) scope_map := Gmap.add scope empty_scope !scope_map let find_scope scope = @@ -151,15 +151,15 @@ let declare_delimiters scope key = | None -> scope_map := Gmap.add scope newsc !scope_map | Some oldkey when oldkey = key -> () | Some oldkey -> - Flags.if_verbose warning - ("overwriting previous delimiting key "^oldkey^" in scope "^scope); + Flags.if_warn msg_warning + (str ("Overwriting previous delimiting key "^oldkey^" in scope "^scope)); scope_map := Gmap.add scope newsc !scope_map end; try let oldscope = Gmap.find key !delimiters_map in if oldscope = scope then () else begin - Flags.if_verbose warning ("Hiding binding of key "^key^" to "^oldscope); + Flags.if_warn msg_warning (str ("Hiding binding of key "^key^" to "^oldscope)); delimiters_map := Gmap.add key scope !delimiters_map end with Not_found -> delimiters_map := Gmap.add key scope !delimiters_map |