Continuing to try to work through the Clash.Tutorial examples - my VSCode Haskell extension is failing with the following error:
Failed to parse result of calling cabal
Failed command: cabal --builddir=/home/bry/.cache/hie-bios/dist-clash-misc-d35e8c8fc4856f7cddec64eaaf9725cc v2-repl --with-compiler /home/bry/.cache/hie-bios/wrapper-b54f81dea4c0e6d1626911c526bc4e36 lib:clash-misc
Build profile: -w ghc-9.6.7 -O1
In order, the following will be built (use -v for more details):
- clash-misc-0.1 (interactive) (lib) (first run)
Preprocessing library for clash-misc-0.1...
GHCi, version 9.6.7: https://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling Test ( src/Test.hs, interpreted )
Ok, one module loaded.
ghci> Leaving GHCi.
Process Environment:
HIE_BIOS_GHC: /home/bry/.ghcup/tmp/ghcup-ghc-9.6.7_cabal-3.16.0.0_hls-2.11.0.0_stack-3.7.1/ghc
HIE_BIOS_GHC_ARGS: -B/home/bry/.ghcup/ghc/9.6.7/lib/ghc-9.6.7/lib
Has anyone encountered this issue before? I get the same issue in both Stack and the Cabal example. My main motivation for switching from Verilog to Clash is better type annotation in the editor so if this doesnât work itâs kind of a deal-breaker for me.
Additionally, I tried to manually install Clash via cabal install (Iâm more comfortable with makefiles than integrated build managers anyway) but got the following error:
src/Clash/Unique.hs:73:17: error: [GHC-83865]
⢠Couldn't match type âWord64â with âIntâ
Expected: GHC.Unique -> Unique
Actual: GHC.Unique -> Word64
⢠In the expression: GHC.getKey
In an equation for âfromGhcUniqueâ: fromGhcUnique = GHC.getKey
|
73 | fromGhcUnique = GHC.getKey
Is this a known issue? I get the same when I try to build the example Cabal project.
A while ago I did see that same Failed to parse result of calling cabal in VSCode at a the machine of a colleague.
I donât remember the specifics, but that error seems to means something like: âSomething went, but I wonât tell you what. Let me just show these things that seems to indicate no problem what so everâ
Try executing that failed cabal command manually in a terminal, look at all itâs output.
Or just execute cabal build all manually, see if it works.
And then follow the errors you get, or if you canât figure them out, post them here.
But probably a lot easier way is to start a project using the this starter project.
It sets up a number of things, so every should âjust workâ, including IDE integration.
Try running haskell-language-server typecheck
Depending on how the haskell-language-server is installed, its actual executable might be called something like haskell-language-server-GHC_VERSION~HLS_VERSION.
Shell tab completion is your friend here.
If building with cabal on its own work correctly, then it doesnât seem like a clash issue.
But some problem with HLS, maybe their troubleshooting page can help you.