feat: dbg_trace tactic for low-level tactic debugging
This commit is contained in:
parent
9727387129
commit
bd7827ed04
2 changed files with 7 additions and 0 deletions
|
|
@ -437,6 +437,8 @@ syntax "trivial" : tactic
|
|||
|
||||
syntax (name := split) "split " (colGt term)? (location)? : tactic
|
||||
|
||||
syntax (name := dbgTrace) "dbg_trace " str : tactic
|
||||
|
||||
/--
|
||||
The tactic `specialize h a₁ ... aₙ` works on local hypothesis `h`.
|
||||
The premises of this hypothesis, either universal quantifications or non-dependent implications,
|
||||
|
|
|
|||
|
|
@ -291,4 +291,9 @@ where
|
|||
| some msg => throwError "{msg}\n{goalsMsg}"
|
||||
| _ => throwUnsupportedSyntax
|
||||
|
||||
@[tactic dbgTrace] def evalDbgTrace : Tactic := fun stx => do
|
||||
match stx[1].isStrLit? with
|
||||
| none => throwIllFormedSyntax
|
||||
| some msg => dbg_trace msg
|
||||
|
||||
end Lean.Elab.Tactic
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue