Below are my ghcup config -
I've I've created haskell project using stack with command stack new stack-hls-dbg-demo
.
I then updated snapshot.url as below so that it uses ghc-9.10.1-
snapshot:
url: .yaml
Then I run the command to install haskell-dap and ghci-dap stack install haskell-dap ghci-dap haskell-debug-adapter
.
This command failed with below error -
prettyprinter > Building library for prettyprinter-1.7.1...
ghci-dap > [1 of 2] Compiling GHCi.DAP
prettyprinter > [ 1 of 28] Compiling Prettyprinter.Render.Util.Panic
ghci-dap > [2 of 2] Compiling Paths_ghci_dap prettyprinter > [ 2 of 28] Compiling Prettyprinter.Internal
ghci-dap > Preprocessing executable 'ghci-dap' for ghci-dap-0.0.22.0...
ghci-dap > Building executable 'ghci-dap' for ghci-dap-0.0.22.0...
ghci-dap > [1 of 6] Compiling GHCi.DAP.Constant
ghci-dap > [2 of 6] Compiling GHCi.DAP.Type
ghci-dap > /tmp/stack-d3fe2f06db4f403e/ghci-dap-0.0.22.0/app/GHCi/DAP/Type.hs:10:1: error: [GHC-87110]
ghci-dap > Could not find module ‘GHCi.GhcApiCompat’.
ghci-dap > Use -v to see a list of the files searched for.
ghci-dap > |
ghci-dap > 10 | import qualified GHCi.GhcApiCompat as GAC
ghci-dap > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ghci-dap >
Error: [S-7282] Stack failed to execute the build plan.
While executing the build plan, Stack encountered the error:
[S-7011] While building package ghci-dap-0.0.22.0 (scroll up to its section tosee the error) using: /home/raj/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_w2MFVN35_3.12.0.0_ghc-9.10.1 --verbose=1 --builddir=.stack-work/dist/x86_64-linux/ghc-9.10.1 build --ghc-options " -fdiagnostics-color=always" Process exited with code: ExitFailure 1
How can I fix this error?
Stack version installed in my machine is -
Ghc version I'm using is 9.10.1
Below are my ghcup config -
I've I've created haskell project using stack with command stack new stack-hls-dbg-demo
.
I then updated snapshot.url as below so that it uses ghc-9.10.1-
snapshot:
url: https://raw.githubusercontent/commercialhaskell/stackage-snapshots/refs/heads/master/nightly/2025/2/15.yaml
Then I run the command to install haskell-dap and ghci-dap stack install haskell-dap ghci-dap haskell-debug-adapter
.
This command failed with below error -
prettyprinter > Building library for prettyprinter-1.7.1...
ghci-dap > [1 of 2] Compiling GHCi.DAP
prettyprinter > [ 1 of 28] Compiling Prettyprinter.Render.Util.Panic
ghci-dap > [2 of 2] Compiling Paths_ghci_dap prettyprinter > [ 2 of 28] Compiling Prettyprinter.Internal
ghci-dap > Preprocessing executable 'ghci-dap' for ghci-dap-0.0.22.0...
ghci-dap > Building executable 'ghci-dap' for ghci-dap-0.0.22.0...
ghci-dap > [1 of 6] Compiling GHCi.DAP.Constant
ghci-dap > [2 of 6] Compiling GHCi.DAP.Type
ghci-dap > /tmp/stack-d3fe2f06db4f403e/ghci-dap-0.0.22.0/app/GHCi/DAP/Type.hs:10:1: error: [GHC-87110]
ghci-dap > Could not find module ‘GHCi.GhcApiCompat’.
ghci-dap > Use -v to see a list of the files searched for.
ghci-dap > |
ghci-dap > 10 | import qualified GHCi.GhcApiCompat as GAC
ghci-dap > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ghci-dap >
Error: [S-7282] Stack failed to execute the build plan.
While executing the build plan, Stack encountered the error:
[S-7011] While building package ghci-dap-0.0.22.0 (scroll up to its section tosee the error) using: /home/raj/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_w2MFVN35_3.12.0.0_ghc-9.10.1 --verbose=1 --builddir=.stack-work/dist/x86_64-linux/ghc-9.10.1 build --ghc-options " -fdiagnostics-color=always" Process exited with code: ExitFailure 1
How can I fix this error?
Stack version installed in my machine is -
Ghc version I'm using is 9.10.1
Share Improve this question asked Feb 16 at 0:17 user51user51 10.2k29 gold badges91 silver badges184 bronze badges 1- I don't have detailed diagnostics for this specific issue, but do you really need to depend on a nightly build rather than something more stable? In most open-source packages, nightlies are quite bleeding-edge, and I would expect to cut myself often if I depended on one unless I were intimately involved with development of that project itself. – amalloy Commented Feb 16 at 4:33
1 Answer
Reset to default 1It looks like ghci-dap build is somewhat broken in certain versions (issue).
I solved it by pinning ghci-dap to 0.0.24.0 in extra-deps (I did it for global project (global-project\stack.yaml
)):
extra-deps:
- haskell-dap-0.0.16.0
- ghci-dap-0.0.24.0