Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tej Chajed
iris
Commits
d7f627fd
Commit
d7f627fd
authored
Mar 12, 2018
by
Joseph Tassarotti
Browse files
iFresh: document the Ltac trick to force evaluation of the side-effect.
parent
ba8b9e94
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/proofmode/tactics.v
View file @
d7f627fd
...
...
@@ -92,6 +92,10 @@ Tactic Notation "iStartProof" uconstr(PROP) :=
(** * Generate a fresh identifier *)
(* Tactic Notation tactics cannot return terms *)
Ltac
iFresh
:
=
(* We need to increment the environment counter using [tac_fresh].
But because [iFresh] returns a value, we have to let bind
[tac_fresh] wrapped under a match to force evaluation of this
side-effect. See https://stackoverflow.com/a/46178884 *)
let
do_incr
:
=
lazymatch
goal
with
|
_
=>
iStartProof
;
eapply
tac_fresh
;
first
by
(
env_reflexivity
)
...
...
Write
Preview
Supports
Markdown
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