2013-01-05 78 views
3

我在尝试安装Hlearn时,以下几点:阴谋错误:找不到模块`GHC.TypeLits'。我该如何解决?

$ 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 

我试过安装使用阴谋(阴谋安装GHC-整洁)的包,但没有这样的包。也试过

$ 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

模块GHC.TypeLits只能从base-4.6上,与GHC-7.6.1。

我看不到任何关于导入的警告,因此在版本0.1.0.0和0.1.0.1中build-depends中base的规定限制是错误的。

如果要安装该软件包,你必须升级到GHC-7.6或安装了某个版本< 0.1,

$ cabal-install "HLearn-distributions < 0.1" 
+0

确定。当我安装haskell平台时,我得到ghc 7.4.1。 – yalis

+1

是的,7.6是为平台太新了那个时候了。如果你想要流血的优势,平台不适合你,那包括经过试验和测试的东西。 –