test: doc string
This commit is contained in:
parent
db5df69db4
commit
837677cb4c
1 changed files with 5 additions and 1 deletions
|
|
@ -15,8 +15,12 @@ def printDecls (pre : Name) : MetaM Unit := do
|
|||
let cs := (← getEnv).constants
|
||||
cs.forM fun declName info => do
|
||||
if pre.isPrefixOf declName && !shouldIgnore declName then
|
||||
IO.println s!"{declName} : {← ppExpr info.type}"
|
||||
if let some docString := findDocString? (← getEnv) declName then
|
||||
IO.println s!"/-- {docString} -/\n{declName} : {← ppExpr info.type}"
|
||||
else
|
||||
IO.println s!"{declName} : {← ppExpr info.type}"
|
||||
|
||||
#eval printDecls `Array
|
||||
#eval printDecls `List
|
||||
#eval printDecls `Bool
|
||||
#eval printDecls `Lean.Elab
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue