From a499845f0ad3cdc9f795ae0c66ed0f5e74fe7b89 Mon Sep 17 00:00:00 2001 From: msozeau Date: Fri, 13 Jun 2008 14:23:47 +0000 Subject: Temporary fix for bug #1876, printing fails because of unresolved globals. Change program_simpl to use [auto] and not [auto with *]. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11124 85f007b7-540e-0410-9357-904b9bb8a0f7 --- theories/Program/Tactics.v | 6 +++--- toplevel/himsg.ml | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/theories/Program/Tactics.v b/theories/Program/Tactics.v index 946fdf6185..5182123f4e 100644 --- a/theories/Program/Tactics.v +++ b/theories/Program/Tactics.v @@ -221,14 +221,14 @@ Ltac refine_hyp c := | ?H _ _ _ _ _ _ _ _ => tac H end. -(** The default simplification tactic used by Program is defined by [program_simpl], sometimes [auto with *] - is overkill and slows things down, better rebind using [Obligations Tactic := tac] in this case, +(** The default simplification tactic used by Program is defined by [program_simpl], sometimes [auto] + is not enough, better rebind using [Obligations Tactic := tac] in this case, possibly using [program_simplify] to use standard goal-cleaning tactics. *) Ltac program_simplify := simpl ; intros ; destruct_conjs ; simpl proj1_sig in * ; subst* ; autoinjections ; try discriminates ; try (solve [ red ; intros ; destruct_conjs ; autoinjections ; discriminates ]). -Ltac program_simpl := program_simplify ; auto with *. +Ltac program_simpl := program_simplify ; auto. Ltac obligations_tactic := program_simpl. diff --git a/toplevel/himsg.ml b/toplevel/himsg.ml index 0a35673c18..787e43c15d 100644 --- a/toplevel/himsg.ml +++ b/toplevel/himsg.ml @@ -286,11 +286,13 @@ let explain_ill_formed_rec_body env err names i fixenv vdefj = strbrk " not in guarded form (should be a constructor," ++ strbrk " an abstraction, a match, a cofix or a recursive call)" in - let pvd = pr_lconstr_env fixenv vdefj.(i).uj_val in prt_name i ++ str " is ill-formed." ++ fnl () ++ pr_ne_context_of (str "In environment") env ++ st ++ str "." ++ fnl () ++ - str"Recursive definition is:" ++ spc () ++ pvd ++ str "." + (try (* May fail with unresolved globals. *) + let pvd = pr_lconstr_env fixenv vdefj.(i).uj_val in + str"Recursive definition is:" ++ spc () ++ pvd ++ str "." + with _ -> mt ()) let explain_ill_typed_rec_body env i names vdefj vargs = let env = make_all_name_different env in -- cgit v1.2.3