1

我正在尝试 cabal 安装 binary-strict 并收到此错误:

src/Data/Binary/BitBuilder.hs:205:37:
Ambiguous occurrence `unsafePerformIO'
It could refer to either `Foreign.unsafePerformIO',
                         imported from `Foreign' at src/Data/Binary/BitBuilder.hs:38:1-14
                      or `System.IO.Unsafe.unsafePerformIO',
                         imported from `System.IO.Unsafe' at   src/Data/Binary/BitBuilder.hs:42:26-40
                         (and originally defined in `GHC.IO')
Failed to install binary-strict-0.4.8.1
cabal: Error: some packages failed to install:
binary-strict-0.4.8.1 failed during the building phase. The exception was:
ExitFailure 1

我正在运行 ghc 7.6.3。如果相关,我也安装了 binary-0.7.2.3。

4

2 回答 2

3

如所写,二进制严格仅适用于base >= 4.7. GHC 7.6.3 使用base = 4.6.*所以它不会工作。您应该向维护者提交错误并通过添加hiding (unsafePerformIO)import Foreign相关文件的行来解决该问题。

于 2014-12-19T23:10:17.133 回答
1

我才发现这件事。现在已修复。我还在包详细信息中列出了 git repo,因此您现在可以提出问题,我会知道它们。感谢 Thomas 提出修复建议。

于 2015-01-23T09:18:03.137 回答