-
-
Notifications
You must be signed in to change notification settings - Fork 426
Description
I've searched for is:issue state:closed "PackageImports", and the most recent issue was created on 2022, while the most recently updated one was updated in 2024. That both seems quite some time ago. Plus the titles don't suggest they're about what I'm observing. I haven't gone through more than a few issue without finding much.
Your environment
Which OS do you use?
up-to-date ArchLinux
Which version of GHC do you use and how did you install it?
GHC 9.14.1 from GHCup
How is your project built (alternative: link to the project)?
https://github.com/sellout/pathway
Which LSP client (editor/plugin) do you use?
(terminal) Vim + YCM
Which version of HLS do you use and how did you install it?
HLS 2.13.0.0 from GHCup
Have you configured HLS in any way (especially: a hie.yaml file)?
Nope
Steps to reproduce
-
Clone the repo and build it, then open
pathway/src/Data/Path/Type.hs:git clone https://github.com/sellout/pathway.git # at the time of writing, origin/main ≡ 336a358 cd pathway cabal build all vim pathway/src/Data/Path/Type.hs # or whatever IDE you use
-
Hover with the mouse (or whatever you do in your IDE) to query the type of, say,
Any, just to make sure HLS is working. You should see no red squiggles so far. -
Tell HLS to go to the definition of
Any, thus ending up intointernal/src/Data/Path/Internal/Type.hs. All seems fine here too. -
Head back to the previously opened file,
pathway/src/Data/Path/Type.hs.
Expected behaviour
No error diagnostics.
Actual behaviour
Error diagnostic on the text Data.Path.Internal.Type, saying
Could not find module ‘Data.Path.Internal.Type’.
Perhaps you meant
Data.Path.Internal.Type (needs flag -package-id pathway-internal-0.0.1.0)
Data.Path.Internal (needs flag -package-id pathway-internal-0.0.1.0)
Debug information
If I change
import "pathway-internal" Data.Path.Internal.Type as Typeto
import Data.Path.Internal.Type as Typein pathway/src/Data/Path/Type.hs, i.e. if I remove the package-qualified import, the error disappears, so I believe the issue is precisely with the PackageImports extension.