I just set up a Haskell environment, but the language server keeps crashing on my
stack projects (using the
ghc 8.8.4 it chose to install). The log is about version conflicts I don’t really understand. Here is an extract:
Project GHC version: 8.8.4 haskell-language-server exe candidates: ["haskell-language-server-8.8.4","haskell-language-server-8.8","haskell-language-server"] Cannot find any haskell-language-server exe, looked for: haskell-language-server-8.8.4, haskell-language-server-8.8, haskell-language-server [Info - 00:34:17] Connection to server got closed. Server will restart.
And here is an extract of the content of the
.ghcup/bin folder (which is in my path):
haskell-language-server-8.6.4 haskell-language-server-8.6.4~0.5.1 haskell-language-server-8.6.5 haskell-language-server-8.6.5~0.5.1 haskell-language-server-8.8.2 haskell-language-server-8.8.2~0.5.1 haskell-language-server-8.8.3 haskell-language-server-8.8.3~0.5.1 haskell-language-server-8.10.1 haskell-language-server-8.8.4~0.5.1 haskell-language-server-8.10.1~0.5.1 haskell-language-server-wrapper haskell-language-server-8.10.2~0.5.1 haskell-language-server-wrapper-0.5.1
Finally, here is the command launched by the LSP extension in my IDE:
Any idea how to correctly set up a Haskell environment using the LSP? This should be straightforward, I have just installed Haskell through
ghcup, then installed
stack, then used the command
ghcup install hls and started a default stack project…
Thanks in advance!