Skip to content

Applying a code action to a _ hole produces too many suggestions #4198

Closed
@mitchellwrosen

Description

@mitchellwrosen

I'm often using code actions to import out-of-scope identifiers. But sometimes I accidentally run a code action on a line that contains both an out-of-scope identifier and an underscore, such as:

TwoWay.twoWay (zipDefnsWith (alignWith _) undefined) conflicts
                             ^^^^^^^^^
                                this is out of scope, and I want HLS to suggest
                                `import Data.Semialign (alignWith)` with a code action.

In this case, the _ on the same line will cause 1800 (!) suggestions that look like

1: replace _ with foo
2: replace _ with bar
...

for (I guess?) every single identifier in scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    HackathonThis issue is suitable for hackathon sessionstype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions