4

警告:这里有新的 Haskell 用户

我正在尝试安装 Hoogle 的 CLI 版本以跟随教程。我在 64 位 Mac OS X 的 Haskell Platform 2013.2.0.0 上看到以下内容。

其他信息:~/Library/Haskell/bin 在我的路径中。安装了 alex 和 happy(以及 wai,我认为 BuilderResponse 是实际定义的)。这不是原始安装的副本(在失败之前安装了大量的东西),但它是我现在所处的位置。对于傻笑,我在 Fedora 19 (X86_64) 上尝试了同样的事情,但同样失败了,所以我认为它不是 Mac 专用的。

% cabal update
Downloading the latest package list from hackage.haskell.org
% cabal -V
cabal-install version 1.18.0.2
using version 1.18.1.2 of the Cabal library 
% cabal install hoogle
Resolving dependencies...
Configuring hoogle-4.2.23...
Building hoogle-4.2.23...
Preprocessing library hoogle-4.2.23...
[ 1 of 46] Compiling Paths_hoogle     ( dist/build/autogen/Paths_hoogle.hs, dist/build/Paths_hoogle.o )
[ 2 of 46] Compiling Data.TypeMap     ( src/Data/TypeMap.hs, dist/build/Data/TypeMap.o )
[ 3 of 46] Compiling Data.Heap        ( src/Data/Heap.hs, dist/build/Data/Heap.o )
[ 4 of 46] Compiling Hoogle.Score.Type ( src/Hoogle/Score/Type.hs, dist/build/Hoogle/Score/Type.o )
[ 5 of 46] Compiling Hoogle.Score.Scoring ( src/Hoogle/Score/Scoring.hs, dist/build/Hoogle/Score/Scoring.o )
[ 6 of 46] Compiling Hoogle.Score.All ( src/Hoogle/Score/All.hs, dist/build/Hoogle/Score/All.o )
[ 7 of 46] Compiling General.Base     ( src/General/Base.hs, dist/build/General/Base.o )
[ 8 of 46] Compiling General.System   ( src/General/System.hs, dist/build/General/System.o )
[ 9 of 46] Compiling Hoogle.Type.Language ( src/Hoogle/Type/Language.hs, dist/build/Hoogle/Type/Language.o )
[10 of 46] Compiling General.Util     ( src/General/Util.hs, dist/build/General/Util.o )
[11 of 46] Compiling General.Web      ( src/General/Web.hs, dist/build/General/Web.o )

src/General/Web.hs:44:19:
    Not in scope: data constructor `ResponseBuilder'
Failed to install hoogle-4.2.23
cabal: Error: some packages failed to install:
hoogle-4.2.23 failed during the building phase. The exception was:
ExitFailure 1
4

1 回答 1

5

看起来 Neil 尚未更新hoogle以使用最新的wai软件包。短期解决方案是强制 cabal 选择旧版本的违规包(wai):

cabal install hoogle --constraint='wai<2.0'

编辑:Note wai2.0 仅在 4 天前发布,hackage 并没有主动通知开发人员有关破损的信息,所以这并不奇怪。

于 2013-12-08T18:45:21.530 回答