Skip to content

Fix wrong extend import while type constuctor and data constructor have the same name#1775

Merged
mergify[bot] merged 3 commits into
haskell:masterfrom
July541:fix#1768
Apr 25, 2021
Merged

Fix wrong extend import while type constuctor and data constructor have the same name#1775
mergify[bot] merged 3 commits into
haskell:masterfrom
July541:fix#1768

Conversation

@July541

@July541 July541 commented Apr 25, 2021

Copy link
Copy Markdown
Collaborator

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.

@berberman berberman left a comment

Copy link
Copy Markdown
Collaborator

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