是我的GHCUP配置-
我已经使用stack with Commandstack new stack-hls-dbg-demo
。我创建了Haskell项目。 然后,如下
snapshot:
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/refs/heads/master/nightly/2025/2/15.yaml
然后我运行命令来安装Haskell-DAP和GHCI-DAP
stack install haskell-dap ghci-dap haskell-debug-adapter
.。 this命令失败,以下错误 -
PrettyPrinter> for PrettyPrinter-1.7.1 ...
GHCI-DAP> [1 of 2]编译GHCI.DAP
PrettyPrinter> [1 of 28]编译prettyprinter.render.util.panicGHCI-DAP> [2 of 2]编译PATHS_GHCI_DAP PrettyPrinter> [2 of 28]编译prettyprinter.internal
GHCI-DAP> ghci-Dap-0.0.0.22.0的预处理“ GHCI-DAP” ...
GHCI-DAP>为GHCI-DAP-0.0.0.22.0 ... building
GHCI-DAP> [1 of 6]编译GHCI.DAP.CONSTANTGHCI-DAP> [2 of 6]编译Ghci.dap.type
GHCI-DAP>/tmp/stack-d3fe2f06db4f403e/ghci-dap-0.0.0.22.0/app/ghci/dap/dap/dap/type.hs:10:10:11:错误:[GHC-87110]
GHCI-DAP>找不到模块“ ghci.ghcapicompat”。
GHCI -DAP>使用-v查看搜索的文件列表。
GHCI-DAP> |GHCI-DAP> 10 |进口合格的ghci.ghcapicompat作为gac
GHCI-DAP> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^一位
GHCI-DAP>
Error:[S-7282] 堆栈未能执行构建计划。 执行构建计划时,堆栈遇到了错误:[S-7011] 在构建软件包ghci-dap-0.0.22.0(滚动到其部分的错误)时,请使用: /home/raj/.stack/setup-exe-cache/x86_64-linux/cabal-simple_w2mfvn35_3.12.0.0.ghc-9.10.10.1-verbose = 1 -buildDir = .Stack-work-work/dist/dist/dist/x86_64-linux/ghc -9.10.1构建-GHC-Options” -fdiagnostics -color =始终 用代码退出的过程:exitfailure1
我怎么可以解决此错误? 我的计算机中安装的堆栈版本是-
我正在使用的GHC版本是9.10.1
I通过将GHCI-DAP固定在全球项目(
global-project\stack.yaml
)的超DEP中的0.0.24.0来解决:
extra-deps:
- haskell-dap-0.0.16.0
- ghci-dap-0.0.24.0