Repository navigation
fix: let simp arguments elaborate with error recovery - #5863
Merged
Merged
Conversation
Modifies `simp` to elaborate all simp arguments, and *then* failing if any had any elaboration issues, rather than failing on the first simp argument. This enables better term info and things like tab completion. Part of addressing leanprover#3831 Closes leanprover#4888
ghost
pushed a commit
to leanprover-community/batteries
that referenced
this pull request
Oct 28, 2024
ghost
pushed a commit
to leanprover-community/mathlib4
that referenced
this pull request
Oct 28, 2024
|
Mathlib CI status (docs):
|
Collaborator
That's quite a foot gun, it seems. Should we remove the try-catch instance for TacticM and force every user to think about which one they want where? Or is that too tedious? Or is the other one the better default? |
Collaborator
Author
|
@nomeata I've shot both of my feet with this one, and it's why I added this |
simp arguments elaborate without disabling error recoverysimp arguments elaborate with error recovery
ghost
pushed a commit
to leanprover-community/batteries
that referenced
this pull request
Oct 28, 2024
ghost
pushed a commit
to leanprover-community/mathlib4
that referenced
this pull request
Oct 28, 2024
kmill
commented
Oct 28, 2024
kmill
enabled auto-merge
October 28, 2024 21:25
ghost
pushed a commit
to leanprover-community/batteries
that referenced
this pull request
Oct 28, 2024
ghost
pushed a commit
to leanprover-community/mathlib4
that referenced
this pull request
Oct 28, 2024
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Modifies
simpto 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 whensimpis used in combinators such asfirst.This enables better term info and features like tab completion when there are elaboration errors.
Also included is a fix to the
all_goalsand<;>tactic combinators. Recall thattry/catchfor the Tactic monad restores the state on failure. This meant that all messages were being cleared on tactic failure. The fix is to useTactic.tryCatchinstead, which doesn't restore state.Part of addressing #3831
Closes #4888