安装二进制严格时出现模糊不清的“unsafePerformIO”

时间:2014-12-19 22:44:12

标签: haskell hackage

我正在尝试安装二进制严格的cabal,我收到此错误:

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。

2 个答案:

答案 0 :(得分:3)

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

答案 1 :(得分:1)

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