Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Simon Spies
stdpp
Commits
9a16f9be
Commit
9a16f9be
authored
Feb 24, 2016
by
Ralf Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make find_pat more robust: work with idtac
parent
b9ff487e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
theories/tactics.v
theories/tactics.v
+2
-1
No files found.
theories/tactics.v
View file @
9a16f9be
...
...
@@ -303,7 +303,8 @@ Tactic Notation "feed" "destruct" constr(H) "as" simple_intropattern(IP) :=
It will search for the first subterm of the goal matching [pat], and then call [tac]
with that subterm. *)
Ltac
find_pat
pat
tac
:
=
match
goal
with
|-
context
[
?x
]
=>
unify
pat
x
;
tac
x
||
fail
2
match
goal
with
|-
context
[
?x
]
=>
unify
pat
x
;
tryif
tac
x
then
idtac
else
fail
2
end
.
(** Coq's [firstorder] tactic fails or loops on rather small goals already. In
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment