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
33 lines
543 B
Text
33 lines
543 B
Text
@[simp] def foo (a : Nat) : Nat :=
|
|
2 * a
|
|
|
|
/--
|
|
trace: case h
|
|
x : Nat
|
|
⊢ 2 * x = x + x
|
|
-/
|
|
#guard_msgs in
|
|
example : foo = fun a => a + a :=
|
|
by
|
|
fail_if_success simp -- should not unfold `foo` into a lambda
|
|
funext x
|
|
simp -- unfolds `foo`
|
|
trace_state
|
|
simp +arith
|
|
|
|
@[simp] def boo : Nat → Nat
|
|
| a => 2 * a
|
|
|
|
/--
|
|
trace: case h
|
|
x : Nat
|
|
⊢ 2 * x = x + x
|
|
-/
|
|
#guard_msgs in
|
|
example : boo = fun a => a + a :=
|
|
by
|
|
fail_if_success simp -- should not unfold `boo` into a lambda
|
|
funext x
|
|
simp -- unfolds `boo`
|
|
trace_state
|
|
simp +arith
|