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
20 lines
321 B
Text
20 lines
321 B
Text
/-!
|
|
# `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
|