Skip to content

Commit

Permalink
filter internal names
Browse files Browse the repository at this point in the history
  • Loading branch information
Kha committed Mar 1, 2023
1 parent 70b2314 commit 759e270
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Main.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ def main (args : List String) : IO Unit := do
initSearchPath (← findSysroot)
let (imports, constants) := args.span (· != "--")
let imports := imports.map fun mod => { module := Syntax.decodeNameLit ("`" ++ mod) |>.get! }
let constants? := constants.tail?.map (·.map fun c => Syntax.decodeNameLit ("`" ++ c) |>.get!)
let env ← importModules imports {}
let constants := match constants.tail? with
| some cs => cs.map fun c => Syntax.decodeNameLit ("`" ++ c) |>.get!
| none => env.constants.toList.map Prod.fst |>.filter (!·.isInternal)
M.run env do
for c in constants?.getD (env.constants.toList.map (·.1)) do
for c in constants do
let _ ← dumpConstant c

0 comments on commit 759e270

Please sign in to comment.