diff options
| author | herbelin | 2011-12-17 20:53:35 +0000 |
|---|---|---|
| committer | herbelin | 2011-12-17 20:53:35 +0000 |
| commit | f0226504cfb179a4491d43764bfdb22a1fe2d106 (patch) | |
| tree | c314725bf6f6972b2bb3d18f0f1e64554c28aed1 /pretyping | |
| 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 'pretyping')
| -rw-r--r-- | pretyping/indrec.ml | 2 | ||||
| -rw-r--r-- | pretyping/matching.ml | 17 | ||||
| -rw-r--r-- | pretyping/pattern.ml | 4 |
3 files changed, 12 insertions, 11 deletions
diff --git a/pretyping/indrec.ml b/pretyping/indrec.ml index b875912fcc..a097602957 100644 --- a/pretyping/indrec.ml +++ b/pretyping/indrec.ml @@ -158,7 +158,7 @@ let type_rec_branch is_rec dep env sigma (vargs,depPvect,decP) tyi cs recargs = (match dest_recarg ra with | Mrec (_,j) when is_rec -> (depPvect.(j),rest) | Imbr _ -> - Flags.if_verbose warning "Ignoring recursive call"; + Flags.if_warn msg_warning (str "Ignoring recursive call"); (None,rest) | _ -> (None, rest)) in diff --git a/pretyping/matching.ml b/pretyping/matching.ml index 6e0ef5af14..7a74511878 100644 --- a/pretyping/matching.ml +++ b/pretyping/matching.ml @@ -7,6 +7,7 @@ (************************************************************************) (*i*) +open Pp open Util open Names open Libnames @@ -54,23 +55,23 @@ let constrain (n,(ids,m as x)) (names,terms as subst) = with Not_found -> if List.mem_assoc n names then - Flags.if_verbose Pp.warning - ("Collision between bound variable "^string_of_id n^ - " and a metavariable of same name."); + Flags.if_warn Pp.msg_warning + (str "Collision between bound variable " ++ pr_id n ++ + str " and a metavariable of same name."); (names,(n,x)::terms) let add_binders na1 na2 (names,terms as subst) = match na1, na2 with | Name id1, Name id2 -> if List.mem_assoc id1 names then - (Flags.if_verbose Pp.warning - ("Collision between bound variables of name "^string_of_id id1); + (Flags.if_warn Pp.msg_warning + (str "Collision between bound variables of name " ++ pr_id id1); (names,terms)) else (if List.mem_assoc id1 terms then - Flags.if_verbose Pp.warning - ("Collision between bound variable "^string_of_id id1^ - " and another bound variable of same name."); + Flags.if_warn Pp.msg_warning + (str "Collision between bound variable " ++ pr_id id1 ++ + str " and another bound variable of same name."); ((id1,id2)::names,terms)); | _ -> subst diff --git a/pretyping/pattern.ml b/pretyping/pattern.ml index 585de58fba..65f342d886 100644 --- a/pretyping/pattern.ml +++ b/pretyping/pattern.ml @@ -300,8 +300,8 @@ let rec pat_of_raw metas vars = function | GHole _ -> PMeta None | GCast (_,c,_) -> - Flags.if_verbose - Pp.warning "Cast not taken into account in constr pattern"; + Flags.if_warn + Pp.msg_warning (str "Cast not taken into account in constr pattern"); pat_of_raw metas vars c | GIf (_,c,(_,None),b1,b2) -> PIf (pat_of_raw metas vars c, |
