Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: use exprToSyntax in comefrom elaborator #28

Merged
merged 1 commit into from
Dec 1, 2023
Merged

Conversation

kmill
Copy link
Contributor

@kmill kmill commented Nov 29, 2023

The current logic to embed an expression into syntax has a bug where it doesn't unify types while doing the metavariable assignment. This can leave unassigned universe level metavariables. Switching to core's exprToSyntax resolves this issue.

I discovered this while working on lean4#2973. Without this fix, all the match examples in this repository fail when using that PR's version of Lean.

The current logic to embed an expression into syntax is buggy since it doesn't unify types while doing the metavariable assignment. This can leave unassigned universe metavariables. Switching to core's `exprToSyntax` resolves this issue.

I discovered this while working on lean4#2973. Without this fix, all the `match` examples in this repository fail when using that PR's version of Lean.
Copy link
Collaborator

@kim-em kim-em left a comment

Choose a reason for hiding this comment

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

Mathlib compiles with this change.

@gebner
Copy link
Member

gebner commented Dec 1, 2023

Thank you!

@gebner gebner merged commit ccba5d3 into master Dec 1, 2023
2 checks passed
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.

3 participants