lean4-htt/tests/lean/run/3257.lean
Joachim Breitner 0e49576fe4
feat: guard_msgs to treat trace messages separate (#8267)
This PR makes `#guard_msgs` to treat `trace` messages separate from
`info`, `warning` and `error`. It also introduce the ability to say
`#guard_msgs (pass info`, like `(drop info)` so far, and also adds
`(check info)` as the explicit form of `(info)`, for completeness.

Fixes #8266
2025-05-09 05:44:34 +00:00

28 lines
598 B
Text

structure T : Prop
structure U : Prop
theorem foo : T → U := λ _ => {}
theorem bar : (_ : T := by trivial) → U := λ _ => {}
-- fails as expected
example : U := by
fail_if_success simp
sorry
-- works as expected, discharging `T` via `T.mk`
example : U := by
simp [foo, T.mk]
/--
trace: [Meta.Tactic.simp.discharge] bar discharge ✅️
autoParam T _auto✝
[Meta.Tactic.simp.rewrite] T.mk:1000:
T
==>
True
[Meta.Tactic.simp.rewrite] bar:1000: U ==> True
-/
#guard_msgs in
example : U := by
set_option trace.Meta.Tactic.simp true in
simp [bar, T.mk]