lean4-htt/tests/lean/run/recInfo1.lean
Joe Hendrix 8b0dd2e835
chore: upstream Std.Logic (#3312)
This will collect definitions from Std.Logic

---------

Co-authored-by: David Thrane Christiansen <david@davidchristiansen.dk>
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
2024-02-14 09:40:55 +00:00

22 lines
528 B
Text

import Lean.Meta
open Lean
open Lean.Meta
def print (msg : MessageData) : MetaM Unit := do
trace[Meta.debug] msg
def showRecInfo (declName : Name) (majorPos? : Option Nat := none) : MetaM Unit := do
let info ← mkRecursorInfo declName majorPos?
print (toString info)
set_option trace.Meta true
set_option trace.Meta.isDefEq false
#eval showRecInfo `Acc.recOn
#eval showRecInfo `Prod.casesOn
#eval showRecInfo `List.recOn
#eval showRecInfo `List.casesOn
#eval showRecInfo `List.brecOn
#eval showRecInfo `Iff.elim (some 4)