From 9b98242a950637beb38b6234e1c76392fe4c69f3 Mon Sep 17 00:00:00 2001 From: Moritz Firsching Date: Fri, 13 Feb 2026 19:47:01 +0100 Subject: [PATCH] fix import name generation --- Main.lean | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Main.lean b/Main.lean index 60d597d..33b2e70 100644 --- a/Main.lean +++ b/Main.lean @@ -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 + } let env ← importModules imports {} let constants := match constants.tail? with | some cs => cs.map fun c => Syntax.decodeNameLit ("`" ++ c) |>.get!