test: doc string

This commit is contained in:
Leonardo de Moura 2021-09-30 11:27:09 -07:00
parent db5df69db4
commit 837677cb4c

View file

@ -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