3

尝试安装 Hlearn 时,我得到以下信息:

$ cabal install HLearn-distributions --ghc-options=-XConstraintKinds
Resolving dependencies...
Configuring HLearn-distributions-0.1.0.1...
Building HLearn-distributions-0.1.0.1...
Preprocessing library HLearn-distributions-0.1.0.1...

src\HLearn\Models\Distributions\Moments.hs:13:14:
    Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.

src\HLearn\Models\Distributions\Moments.hs:24:8:
    Could not find module `GHC.TypeLits'
    Perhaps you meant GHC.Types (needs flag -package ghc-prim)
    Use -v to see a list of the files searched for.
cabal.exe: Error: some packages failed to install:
HLearn-distributions-0.1.0.1 failed during the building phase. The exception
was:
ExitFailure 1

我尝试使用 cabal (cabal install ghc-prim) 安装该软件包,但没有这样的软件包。也试过

$ cabal install HLearn-distributions --ghc-options=-XConstraintKinds -f-package ghc-prim
cabal.exe: There is no package named 'ghc-prim'.
You may need to run 'cabal update' to get the latest list of available
packages.

有什么建议么?

4

1 回答 1

4

该模块GHC.TypeLits只能从base-4.6ghc-7.6.1 开始使用。

我没有看到任何关于导入的保护措施,因此base在版本 0.1.0.0 和 0.1.0.1 中,构建依赖中声明的约束是错误的。

如果要安装该软件包,则必须升级到 ghc-7.6 或安装版本 < 0.1,

$ cabal-install "HLearn-distributions < 0.1" 
于 2013-01-05T22:50:34.473 回答