在 this question ,我们安装了 Hat
的依赖项.现在当我尝试做
cabal install Hat
我最后得到:
[ 6 of 11] Compiling Environment ( trans/Environment.hs, dist/build/hat-trans/hat-trans-tmp/Environment.o )
trans/Environment.hs:497:13:
Not in scope: data constructor `PExplTypeArg'
Failed to install hat-2.8.0.0
World file is already up to date.
cabal: Error: some packages failed to install:
hat-2.8.0.0 failed during the building phase. The exception was:
ExitFailure 1
最佳答案
Hat 依赖于旧版本的 haskell-src-exts
.有问题的构造函数似乎在 1.14 版本中消失了。
您可以编辑文件,删除有问题的行并向 Hat 提交补丁。或者,指定和额外的约束:
cabal install hat --constraint haskell-src-exts==1.13.5
将来,您可以通过查看包依赖关系,找到包含相关类型的模块并查找构造函数来自行追踪此类问题。这种特殊情况也可以用谷歌搜索。
关于debugging - ExitFailure 1 再次出现在 `Hat`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25083979/