How to start developing Dhall-haskell with VSCode

Hi! I am having trouble setting up VSCode with the dhall-haskell project. I can run stack build on the main branch without problems. But when I “open” the project with VScode it says:

I had trouble figuring out the exact GHC version for the project. Falling back to using 'ghc'.

Failed to find the GHC version of this Cabal project. Error when calling cabal exec -v0 -- ghc --print-libdir

And then there is no support for Haskell for this project, no code navigation, no type hints. It makes development very difficult, especially since I am a newcomer to Haskell and I am trying to learn my ways around the Haskell ecosystem.

I have everything installed on my Mac M1. ghc, cabal, gchup, stack, everything. I am not using nix.

Any help will be appreciated!

I fixed the issue. My mistake was that I installed cabal-install with brew, and also installed a few specific versions of ghc with brew. This confuses the “vscode” Haskell support.

Instead, I should have just installed “ghcup” with “brew” and then let the “vscode” plugins (haskelly, haskell, haskell-syntax) work to install whatever ghc versions are required. Then I need to rebuild the project (“stack build” button in VSCode). Things are working now, at least I have go-to-definition and type information on mouse hover.