gpt4 book ai didi

haskell - cabal 错误 : Could not find module `GHC.TypeLits' . 如何修复此问题?

转载 作者:行者123 更新时间:2023-12-02 17:14:54 29 4
gpt4 key购买 nike

尝试安装 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.

有什么建议吗?

最佳答案

模块 GHC.TypeLits 仅适用于 base-4.6 及 ghc-7.6.1。

我在导入方面没有看到任何防护措施,因此构建依赖项中对 base 的规定约束在版本 0.1.0.0 和 0.1.0.1 中是错误的。

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

$ cabal-install "HLearn-distributions < 0.1" 

关于haskell - cabal 错误 : Could not find module `GHC.TypeLits' . 如何修复此问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14177181/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com