【发布时间】:2022-06-13 22:49:56
【问题描述】:
几个月前我创建了一个 stack haskell 项目,然后完成了它。我想添加并修复它存在的一些问题,但是当我尝试在 vs 代码(Visual Studio 代码)上打开 .hs 文件时,我在标题中遇到了错误,完整的问题在这个问题的底部。我尝试重新安装堆栈,但没有任何改变。我还将stack.yaml 解析器更新为最新的 lts 版本,即 19.9,使用
resolver: url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/9.yaml
错误似乎是我的项目正在使用我的机器没有的旧版本 ghc,特别是因为文件夹 C:\cabal\store\ghc-8.10.7 在我的机器上不存在,这是该路径中唯一存在的文件夹 @ 987654324@ 所以我的问题是,如何为我的特定堆栈项目更新我的 GHC 版本?
完整错误:ghcide compiled by GHC 8.10 failed to load packages: haskell-language-server-8.10.7~1.7.0.0.exe: can't find a package database at C:\cabal\store\ghc-8.10.7\package.db. Please ensure that ghcide is compiled with the same GHC installation as the project.
堆栈版本:2.7.5
GHCi/GHC 版本:8.10.7
IDE:VS 代码(Visual Studio 代码)
【问题讨论】:
标签: haskell ghc haskell-stack