forked from leanprover-community/batteries
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix:
repeat'
should roll back the state (leanprover-community#305)
* fix: `repeat'` should roll back the state * use repeat1' in repeat1 * rename repeat1 to repeat1'
- Loading branch information
Showing
3 changed files
with
22 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import Std.Tactic.Basic | ||
import Std.Tactic.GuardMsgs | ||
|
||
open Lean Elab Tactic Meta | ||
|
||
elab "foo" : tactic => liftMetaTactic fun g => do | ||
g.assign (← mkFreshExprMVar (← g.getType)) | ||
throwError "" | ||
|
||
#guard_msgs in | ||
example : True := by | ||
repeat' foo | ||
trivial |