
Just 2 quick questions to see if I understand things correctly: * Current Haddock versions have the ability to render hyperlinked coloured source code built-in, there is no need for a separate HsColour executable anymore (IIRC, this was required in ancient times), correct? * The haskell-language-server executables have all their "plugins" compiled and linked into them, correct? So there is e.g. no need for an external ormolu, hlint, ... executable. This would be a good thing, but using the word "plugin" for this is quite confusing for the end user IMHO. For me, plugins are something which you can install in addition to something else. This doesn't seem to be the case here, if I understand the source code correctly. And some final questions regarding the Haskell Language Server: Why are there separate haskell-language-server-X.Y executables plus a wrapper? Why are the executables tied to a fixed GHC version and what exactly does the wrapper do? Which of these executables is used e.g. by Emacs' lsp-mode? This looks quite complicated, at least compared to all the other LSP backends I know: For C++, just point to any clangd; for Groovy, just point to a JAR; for Python just install a single python-lsp-server package (which has real plugins as separate packages BTW), etc. Slightly confused, S.

Hi! The different executables are necessary because of things like TH and base being tied to ghc versions. It uses potentially *all* of them - the HLS "wrapper" runs first, detecting what ghc version your project is on (or what your "global" ghc is in your current environment), and runs the corresponding HLS. I would recommend using ghcup to install HLS, as it takes care to install all of the binaries automatically (unless something else has already done so). Cheers, ====== Georgi

Am So., 22. Aug. 2021 um 20:24 Uhr schrieb Georgi Lyubenov < godzbanebane@gmail.com>:
[...] I would recommend using ghcup to install HLS, as it takes care to install all of the binaries automatically (unless something else has already done so).
Installing HLS was the least confusing part of this mess: Download https://github.com/haskell/haskell-language-server/releases/download/1.3.0/h..., unpack into ~/.local/bin, done. (Well, actually I like to unpack things into ~/.local/opt/<package-name-and-version> and use symlinks into ~/.local/bin to keep things separated, but that's just my personal taste.) The real confusion came when I realized that HLS 1.3.0 is far from feature-complete for GHC 9.0.1, some issues on its issue tracker gave contradicting information, installing e.g. ormolu by hand didn't help etc. etc. Regarding ghcup: IIRC it was very cabal-centric when it came out, but personally I totally ignore cabal and use stack exclusively (like most people if I remember the last surveys correctly). Recent versions of ghcup seem to handle stack, too, but there are mysterious remarks about XDG directory structures on the ghcup-hs project page (see my other mail). Furthermore, I'm not sure what the current state of affairs regarding cabal vs. stack is: I really don't want to have duplicated toolchains and tons of GBs of duplicated compiled packages lying around, but this was the case when I last had a look. Some packages don't work with stack out of the box and need cabal (or vice versa), and then things get really annoying and space-/time-consuming. Setting up a development environment from scratch for a recent GHC involves tools battling against each other, reading incomplete and/or confusing documentation and tons of free disk space. It's a bit like an ancient text adventure, but less entertaining... :-} Cheers, S.

ghcup is only used to install different toolings, I don't think you *have* to use anything related to cabal in order to use it - in particular, I also use stack 95% of the time, and I use it almost purely to install my HLS versions easily. Re your other point, HLS is indeed known to not fully support ghc9, and installing ormolu shouldn't help afaik, as it is as you noted - ormolu is compiled into HLS itself. Cheers, ======= Georgi
participants (2)
-
Georgi Lyubenov
-
Sven Panne