haskell / haskell/haskell-language-server

Error in "refine imports" suggestion

Open
#4,771 0 comments 1 reaction 0 assignees View on GitHub
component: imports plugin Hackathon type: bug
Dominant language
Haskell
Stars
3k
Forks
455
Avg merge
3d 21h
Merged PRs (30d)
13

Description

Image

That suggestion does not look right:
> Refine imports to import Agda.Utils.List1 qualified as List2

If I remove the qualified import of List2 the `List2.toList` is no longer in scope.
`toList` is `IsList` method from `GHC.Exts`.
So the suggestion is right somehow that we would not need to import Agda.Utils.List2 if Agda.Utils.List1 already reexports `IsList`. However, the suggestion still does not make sense, practically.

Unfortunately no self-contained reproducer here either. :-(

Contributor guide

No contributing guide indexed for this repository

Research direction

There is no self-contained reproducer, file, or test named. Start by reproducing the “Refine imports” suggestion around Agda.Utils.List1/List2 and GHC.Exts.IsList, then compare the suggested import with whether List2.toList remains in scope. Done means the suggestion is practically valid and preserves the required name resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.