I'm trying out the haskell-halogen framework that compiles to javascript via GHC's JS backend.
I'm able to compile the sample project from the library author with the following config:
- GHCup 0.1.40.0
- Stack 3.1.1
- HLS 2.9.0.1
- cabal 3.14.1.1
- GHC javascript-unknown-ghcjs-9.12.1 (base 4.21.0.0)
When I try to use the Haskell extension on VS Code it errors out with this error:
0000-00-00T00:00:00.000000Z [client] INFO Starting language server
No 'hie.yaml' found. Try to discover the project type!
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 2.9.0.1 x86_64 ghc-9.10.1
Current directory: ...
Operating system: linux
Arguments: ["--lsp"]
Cradle directory: ...
Cradle type: Cabal
Tool versions found on the $PATH
cabal: 3.14.1.1
stack: 3.1.1
ghc: 9.12.1
Consulting the cradle to get project GHC version...
0000-00-00T00:00:00.000000Z | Debug | cabal exec -v0 -- ghc --print-libdir
0000-00-00T00:00:00.000000Z | Debug | cabal exec -v0 -- ghc -package-env=- -ignore-dot-ghci -e Control.Monad.join (Control.Monad.fmap System.IO.putStr System.Environment.getExecutablePath)
Failed to find the GHC version of this Cabal project.
Error when calling cabal exec -v0 -- ghc -package-env=- -ignore-dot-ghci -e Control.Monad.join (Control.Monad.fmap System.IO.putStr System.Environment.getExecutablePath)
<command line>: not built for interactive use
This command is trying to find out the GHC version by directly executing System.Environment.getExecutablePath
using ghc. The specific command that HLS calls also fails when run on the terminal. It does work in ghci.
I understand that HLS (with stock ghc) should mostly work with this sample project as the javascript specific bits are cordoned off to the program edges. Is there a way to override the HLS settings for the VS code extension so that I get the IDE features enabled?