aboutsummaryrefslogtreecommitdiffhomepage
path: root/tactics/class_tactics.ml4
diff options
context:
space:
mode:
authorGravatar msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7>2008-03-25 10:56:36 +0000
committerGravatar msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7>2008-03-25 10:56:36 +0000
commit1e1d06303d476b1e7f171dc09ed1e18508e20436 (patch)
treeeb4f4125c96d6e8e5e45420b07ec142bbd5a6766 /tactics/class_tactics.ml4
parent467fb77527b75cf6c214aa3b72b2826cae2e18ae (diff)
Interpret patterns for hypotheses types in match goal in type_scope (if not a
context [] pattern). May break some user contribs... Rename clsubstitute to substitute. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10716 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'tactics/class_tactics.ml4')
-rw-r--r--tactics/class_tactics.ml410
1 files changed, 6 insertions, 4 deletions
diff --git a/tactics/class_tactics.ml4 b/tactics/class_tactics.ml4
index 4f740f865..dd93d511c 100644
--- a/tactics/class_tactics.ml4
+++ b/tactics/class_tactics.ml4
@@ -332,7 +332,9 @@ let resolve_one_typeclass env gl =
let gls = { it = [ Evd.make_evar (Environ.named_context_val env) gl ] ; sigma = Evd.empty } in
let valid x = raise (FoundTerm (fst (Refiner.extract_open_proof Evd.empty (List.hd x)))) in
let gls', valid' = full_eauto ~tac:tclIDTAC false (true, 15) [] (gls, valid) in
- try ignore(valid' []); assert false with FoundTerm t -> t
+ try ignore(valid' []); assert false with FoundTerm t ->
+ let term = Evarutil.nf_evar (sig_sig gls') t in
+ if occur_existential term then raise Not_found else term
let has_undefined p evd =
Evd.fold (fun ev evi has -> has ||
@@ -890,10 +892,10 @@ let clsubstitute o c =
(fun cl ->
match cl with
| Some ((_,id),_) when is_tac id -> tclIDTAC
- | _ -> cl_rewrite_clause c o [] cl)
+ | _ -> tclTRY (cl_rewrite_clause c o [] cl))
-TACTIC EXTEND map_tac
-| [ "clsubstitute" orient(o) constr(c) ] -> [ clsubstitute o c ]
+TACTIC EXTEND substitute
+| [ "substitute" orient(o) constr(c) ] -> [ clsubstitute o c ]
END
let pr_debug _prc _prlc _prt b =