Skip to content

Don't suggest import an unnecessary data constructor.#1984

Merged
mergify[bot] merged 3 commits into
haskell:masterfrom
peterwicksstringfield:dont_import_extraneous_constructors_1932
Jun 28, 2021
Merged

Don't suggest import an unnecessary data constructor.#1984
mergify[bot] merged 3 commits into
haskell:masterfrom
peterwicksstringfield:dont_import_extraneous_constructors_1932

Conversation

@peterwicksstringfield

Copy link
Copy Markdown
Contributor

Usually, when the type constructor is used but the data constructor isn't, we
only suggest importing the type constructor. When the data constructor and type
constructor share the same name we get mixed up and suggest importing both.

The solution is to do a better job filtering out the data cons when we know we
are looking for a type con.

Closes #1932 .

Usually, when the type constructor is used but the data constructor isn't, we
only suggest importing the type constructor. When the data constructor and type
constructor share the same name we get mixed up and suggest importing both.

The solution is to do a better job filtering out the data cons when we know we
are looking for a type con.

@jneira jneira left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Many thanks for refine this

@jneira jneira added the merge me Label to trigger pull request merge label Jun 28, 2021
@mergify
mergify Bot merged commit 8d44068 into haskell:master Jun 28, 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.

Adding types to import list includes identically named constructors.

2 participants