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 wrong extend import while type constuctor and data constructor have the same name #1775

Merged
merged 3 commits into from Apr 25, 2021

Conversation

July541
Copy link
Collaborator

@July541 July541 commented Apr 25, 2021

Fix #1768.

Normally, there only one ident info has the same name as the target module, but if the type constructor and the data constructor have the same name, it will deduce two, which causes the original matching pattern to fail and fallback.

Without affecting the previous work, I re-ordered the match result by making the one with a parent in front of the one without if it has two items.

Copy link
Collaborator

@berberman berberman left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@berberman berberman added the merge me Label to trigger pull request merge label Apr 25, 2021
@mergify mergify bot merged commit 17fce67 into haskell:master Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Add to import list" fails to add constructor import to type import when they're named the same.
2 participants