Closed
Description
- To complete the initial experience with haskell including hls we could add the possibility of download the required and missing haskell toolchain in hls-wrapper, using the info from the project or file from hie-bios
- ghcup is the unique haskell installer which cover the default toolchain for all major oss: ghc, stack and cabal
- Cases:
- missing haskell-language-server:
ghcup install hls
. It will install another hls-wrapper which maybe will replace the used one. To consider.- maybe we could warn users about
- cabal cradle: do a
ghcup install cabal && ghcup install ghc ${version}
, where${version}
will be the ghc version reported by the cradle or empty if it is not known, after downloading cabal itself (needed for query the ghc version)- it will download only the missing tool, cabal or ghc
- stack cradle: do a
ghcup install stack
and let stack download the rest of needed tools (as with the default stack via ghcup will download ghc and/or msys2 in its own) - direct cradle: do a
ghcup install ghc
- bios cradle: do nothing
- missing haskell-language-server:
- We have to decide what to do if ghcup itself is missing:
- do nothing
- download ghcup
- suggest user install it
The feature will be triggered by default and disabled withThe feature will be disabled by default and enabled with--no-download-haskell-toolchain
--download-haskell-toolchain
Alternatives:
- do nothing, let users install the toolchain as they wish
- implement it only in the vscode extension (using ghcup)
- implement hook in hls-wrapper and provide a default one in vscode
- implement it opt-in in the hls-wrapper
//cc @hasufell