Skip to content

fix import name generation#19

Open
mo271 wants to merge 1 commit intoleanprover:masterfrom
mo271:import_fix
Open

fix import name generation#19
mo271 wants to merge 1 commit intoleanprover:masterfrom
mo271:import_fix

Conversation

@mo271
Copy link

@mo271 mo271 commented Feb 13, 2026

this potentially fixes handling of filenames starting with number, for more details see leanprover/comparator#17

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants