Closed georgefst closed 1 year ago
For completeness, this would be a manifestation of
There is a known issue where if you have three components, such that A depends on B which depends on C then if you load A and C into the session but not B then under certain situations you can get strange errors about a type coming from two different places. See this repo for a simple reproduction of the bug.
Any update on this? Or do we have a known workaround, for example a quick way to load all packages in the local project?
Afaik no other than load the appropiate files to load all the needed components. The long awaited proper fix (for this and so many other hls issues around setup) would be the use of show-build-info in cabal/stack, see https://github.com/haskell/hie-bios/issues/269
Does https://github.com/haskell/haskell-language-server/pull/2994 fix this? I don't have a GHC-9.4-compatible reproducer to hand.
Oh, I missed @jneira's comment above. I thought this was down to MHU, not show-build-info. Must have misremembered.
As alluded to in https://github.com/haskell/haskell-language-server/issues/3422, this tends to manifest differently with GHC 9.4, usually with spurious "overlapping instance" errors.
Closing in favour of #3738.
EDIT/tl;dr: This is a known issue, and the solution seems to involve https://github.com/haskell/haskell-language-server/issues/3422 and/or https://github.com/haskell/hie-bios/issues/269.
One of my projects hits a strange error which doesn't show up outside of HLS. Could be to do with the way I'm using
cabal.project
, orc2hs
. No idea really.When loading
evdev-examples/evtest/Main.hs
:PS. will only build on Linux (or BSD)