-
Notifications
You must be signed in to change notification settings - Fork 446
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: allow dot idents to resolve to local names #6602
base: master
Are you sure you want to change the base?
Conversation
Mathlib CI status (docs):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nevermind, looks like there is more work to be done)
This causes breakage in Batteries and Mathlib due to code such as https://github.com/leanprover-community/batteries/blob/66225aab4f6bd1687053b03916105f7cab140507/Batteries/Data/UnionFind/Lemmas.lean#L100-L101 which rely on the dot ident not resolving to the current definition. This can easily be fixed by using |
Thanks for the investigation. Can you add this analysis to #6601, ideally with a self-contained example of the idiom that this fix would be breaking (so that we can use it for the test suite)? Under which circumstaces can Also, if possible, contrast the behavior with the |
This PR allows the dot ident notation to resolve to the current definition, or to any of the other definitions in the same mutual block. Existing code that uses dot ident notation may need to have
nonrec
added if the ident has the same name as the definition.Closes #6601