-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: let
simp
arguments elaborate with error recovery (#5863)
Modifies `simp` to elaborate all simp arguments without disabling error recovery. Like in #4177, simp arguments with elaboration errors are not added to the simp set. Error recovery is still disabled when `simp` is used in combinators such as `first`. This enables better term info and features like tab completion when there are elaboration errors. Also included is a fix to the `all_goals` and `<;>` tactic combinators. Recall that `try`/`catch` for the Tactic monad restores the state on failure. This meant that all messages were being cleared on tactic failure. The fix is to use `Tactic.tryCatch` instead, which doesn't restore state. Part of addressing #3831 Closes #4888
- Loading branch information
Showing
4 changed files
with
53 additions
and
15 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,20 @@ | ||
/-! | ||
# `all_goals` should not consume error messages | ||
https://github.com/leanprover/lean4/issues/4888 | ||
-/ | ||
|
||
/-- | ||
error: application type mismatch | ||
Nat.succ True | ||
argument | ||
True | ||
has type | ||
Prop : Type | ||
but is expected to have type | ||
Nat : Type | ||
-/ | ||
#guard_msgs in | ||
theorem bug: True := by | ||
all_goals exact Nat.succ True | ||
trivial |
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