Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Main.lean
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ def main (args : List String) : IO Unit := do
initSearchPath (← findSysroot)
let (opts, args) := args.partition (fun s => s.startsWith "--" && s.length ≥ 3)
let (imports, constants) := args.span (· != "--")
let imports := imports.toArray.map fun mod => { module := Syntax.decodeNameLit ("`" ++ mod) |>.get! }
let imports := imports.toArray.map fun mod => {
module := mod.splitOn "." |>.foldl Name.mkStr .anonymous

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks wrong to me, dots are allowed in french quotes.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think String.toName is what you want instead.

}
let env ← importModules imports {}
let constants := match constants.tail? with
| some cs => cs.map fun c => Syntax.decodeNameLit ("`" ++ c) |>.get!
Expand Down