在 macOS Sierra 上安装 Snap 时出现问题

Issue installing Snap on macOS Sierra

我在 macOS Sierra 上安装 Haskell 框架 Snap 时遇到问题。每当我安装它时,我都会收到以下消息:

Resolving dependencies...
Configuring securemem-0.1.9...
Configuring skein-1.0.9.4...
Configuring configurator-0.3.0.0...
Configuring cryptonite-0.24...
Building configurator-0.3.0.0...
Building securemem-0.1.9...
Building skein-1.0.9.4...
Failed to install configurator-0.3.0.0
Build log ( /Users/nicholas/.cabal/logs/ghc-8.2.1/configurator-0.3.0.0-6dySPcNCURWFswtMXJvzho.log ):
cabal: Entering directory '/tmp/cabal-tmp-66175/configurator-0.3.0.0'
Configuring configurator-0.3.0.0...
Preprocessing library for configurator-0.3.0.0..
Building library for configurator-0.3.0.0..
<command line>: cannot satisfy -package-id attoparsec-0.13.2.0-5dp4kBDsiGY4dQpLKbD5rk: 
    attoparsec-0.13.2.0-5dp4kBDsiGY4dQpLKbD5rk is unusable due to shadowed dependencies:
      scientific-0.3.5.1-L0qYzdp0wpz8rO8gircNSR text-1.2.2.2-EGUst8sqNAZCw1xLPcmcMH
    (use -v for more information)
cabal: Leaving directory '/tmp/cabal-tmp-66175/configurator-0.3.0.0'
Configuring transformers-base-0.4.4...
Building cryptonite-0.24...
Building transformers-base-0.4.4...
Installed securemem-0.1.9
Installed transformers-base-0.4.4
Installed skein-1.0.9.4
Installed cryptonite-0.24
Updating documentation index
/Users/nicholas/Library/Haskell/share/doc/x86_64-osx-ghc-8.2.1/index.html
cabal: Error: some packages failed to install:
configurator-0.3.0.0-6dySPcNCURWFswtMXJvzho failed during the building phase.
The exception was:
ExitFailure 1
snap-1.0.0.2-5CZKyA9EY4oLgkpHYCVfnv depends on snap-1.0.0.2 which failed to
install.

我正在使用通过自制软件 (brew cask install haskell-platform) 和 cabal 版本 2.0.0.2 安装的 Haskell 平台。我尝试使用 sudo 并删除我的 ~/.ghc 文件

这看起来像是 Cabal 2(或潜在的 GHC 8.2)中的错误。参见 https://github.com/haskell/cabal/issues/4728。我建议暂时使用 cabal 1.24 或 Stack 坚持使用 GHC 8.0.2。我是 Stack 的情况,版本无关紧要,因为它将使用 GHC 附带的 Cabal 版本。

完整的 8.2.1 二进制平台构建存在一个刚刚解决的问题:https://mail.haskell.org/pipermail/haskell-cafe/2017-October/127979.html

这很可能就是其中的一个例子。

(另见:GHC cannot find libraries on fresh install of Haskell-Platform