I have Haskell installed via GHCup and its tui says HLS is installed:
ghc
runs perfectly out of ~/.ghcup/bin
, so far so got. But:
-
I can not find a hls
(or even haskell-language-server
binary, only versioned haskell-language-server-...
binaries.
-
VS Code cannot find HLS either. Instead it asks me:
What should I do here? And how can I test from the command line whether HLS is properly installed?
1 Like
Seems VS code want’s you to install the first entry in list (1.9.1.0 instead of 1.9.0.0) - this should be fine - I’d try and install it - if this works we can try and figure out why it wants it this way 
1 Like
Thanks @CarstenK.
I now let VSCode install HLS 1.9.1.0 - and now it seems to use. (At least I can jump from a function reference via “Go to Definition” to where I define the function.)
GHCup’s TUI interface reports now two HLS versions as installed:
Any idea why has one version two ticks and the new one only one tick - despite the fact that is the one VS Code is apparently using?
1 Like
I think it is linking haskell-language-server-wrapper
to the one you set as active
(the first tick is for “installed” and the second one for the one you set as active - all installed should be in ~/.ghcup/ghc/(version)/bin/
or wherever your GHCup installation puts it’s files and ghcup symlinks the set versions to more common names in ~/.ghcup/bin
(with simpler versions and without versions - at least that what I think is mostly happening - I’m sure it’ll set additional environment variables etc. to tell cabal, stack etc. what to do but I know almost nothing about that)
2 Likes
Yep, I can confirm this. VS Code links to a haskell-language-server-wrapper-<version>
in the bin directory. I was always looking for a haskell-language-server-<version>
link!
Thanks for pointing me in the right direction!
1 Like