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
25 lines
530 B
Text
25 lines
530 B
Text
import Lean.Meta
|
|
|
|
|
|
open Lean
|
|
open Lean.Meta
|
|
|
|
axiom simple : forall {p q : Prop}, p → q → p
|
|
|
|
def print (msg : MessageData) : MetaM Unit := do
|
|
trace[Meta.Tactic] msg
|
|
|
|
def tst1 : MetaM Unit := do
|
|
let cinfo ← getConstInfo `simple
|
|
let mvar ← mkFreshExprSyntheticOpaqueMVar cinfo.type
|
|
let mvarId := mvar.mvarId!
|
|
let (_, mvarId) ← mvarId.introN 4
|
|
mvarId.assumption
|
|
let result ← instantiateMVars mvar
|
|
print result
|
|
|
|
set_option trace.Meta.Tactic true
|
|
|
|
/-- trace: [Meta.Tactic] fun {p q} a a_1 => a -/
|
|
#guard_msgs in
|
|
#eval tst1
|