Haskell 堆栈项目中缺少ghc mod包

Haskell 堆栈项目中缺少ghc mod包,haskell,haskell-stack,ghc-mod,ghc-pkg,Haskell,Haskell Stack,Ghc Mod,Ghc Pkg,我最近破坏了我的设置(可能是堆栈升级)中的某些内容,发现它无法再次工作: ghc-mod: <command line>: cannot satisfy -package-id http-types-0.8.6-6a9e3ae2218aaee5f093c4f68fa256c5 $ stack list-dependencies | grep http http-types 0.8.6 $ cabal --version cabal-install version 1.22.6.0

我最近破坏了我的设置(可能是堆栈升级)中的某些内容,发现它无法再次工作:

ghc-mod: <command line>: cannot satisfy -package-id http-types-0.8.6-6a9e3ae2218aaee5f093c4f68fa256c5

$ stack list-dependencies | grep http
http-types 0.8.6
$ cabal --version
cabal-install version 1.22.6.0
using version 1.22.4.0 of the Cabal library
$ cabal info http-types | grep installed
    Versions installed: 0.8.6

我不知道这是否能解决您的问题,但我刚刚解决了这个问题,我通过删除项目中的
dist/
目录解决了这个问题。

您使用的解析器使用的GHC版本与用于编译GHC mod的版本不同吗?今天早些时候,我打开了一个关于同一消息的bug报告(),ghc mod开发人员回答说,ghc mod应该根据stack使用的同一ghc版本重新编译。当ghc mod决定放弃堆栈支持时,有一个pull请求至少警告您。。。
$ ghc-pkg dump | grep http-types
name: http-types
id: http-types-0.8.6-6f392f2a441fe60aa14d377f6850166a