Skip to content

HLS reports non-existent errors when using Calamity and Polysemy with Polysemy.Plugin (polysemy-plugin) #2989

Closed
@subterfugue

Description

@subterfugue

haskell-language-server-wrapper --probe-tools:

haskell-language-server version: 1.7.0.0 (GHC: 9.2.2) (PATH: /home/mon/.local/share/ghcup/hls/1.7.0.0/lib/haskell-language-server-1.7.0.0/bin/haskell-language-server-wrapper)
Tool versions found on the $PATH
cabal:          3.6.2.0
stack:          Not found
ghc:            9.2.2

(I launched HLS in the terminal with haskell-language-server-wrapper to provide the errors it reports in the paste below)
HLS reports errors that seem to not exist, because building & running the project works, and testing the program results in correct behaviour. I have this paste: https://bpa.st/J32A which has the Main.hs and the errors that HLS thinks exist. The git repository is provided later on in this issue.

Your environment

Which OS do you use:
Arch Linux (Artix variant)
Which LSP client (editor/plugin) do you use:
doom emacs+lsp-mode
Describe your project (alternative: link to the project): https://git.sr.ht/~monaaraj/bot

Steps to reproduce

I just run doom emacs and open up my project. This issue happens only with this calamity and polysemy (with polysemy-plugin) project, HLS acts well in every other project I have.

Expected behaviour

The program should be deemed without error, if GHC builds and runs the program, with the program successfully running without issue.

Actual behaviour

HLS reports very very weird errors regarding Internal.Typeable things, P.Member instance overlaps, ambiguous use of type variables... the specific errors have been provided in the bpaste link above.

Include debug information

The HLS log seems to be too long to be pasted to any paste service, so I have provided it as an attachment file:
hls.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    GHCissues with particular GHC versionstype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions