Cabal 无法解决 Idris 的依赖关系

Cabal cannot resolve dependencies for Idris

我是 Haskell 生态系统的新手,正在尝试在我的 MacOS Catalina 上安装 Idris。

所以在

之后
$ brew install ghc
$ brew install cabal-install

我有 The Glorious Glasgow Haskell Compilation System, version 8.8.2cabal-install version 3.0.0.0。然后我尝试安装 Idris 但是

$ cabal update; cabal install idris

来自 official docs 失败

Resolving dependencies... cabal: Could not resolve dependencies: [__6] fail (backjumping, conflict set: template-haskell, text, time) After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: hashable, trifecta, base, idris, text, template-haskell, time, pretty, blaze-builder, blaze-markup, idris:setup.Cabal, zlib, unordered-containers, ivor, optparse-applicative Try running with --minimize-conflict-set to improve the error message.

运行消息中提到的标志也无济于事。

我应该尝试从源代码构建还是有任何其他好的方法来修复此错误?

在 Linux 我需要在 cabal 之外安装 zlib,你可能需要这样做。我在你的失败包列表中看到了。

这个支持这些版本的 PR 刚刚在 1 月份合并:https://github.com/idris-lang/Idris-dev/pull/4808

然而,Hackage 的最后一个版本是去年 7 月: http://hackage.haskell.org/package/idris

所以我假设当前发布的版本不是基于 GHC 8.8 构建的。 您可以从 git 存储库构建当前的 master。 或者您可以从 https://www.idris-lang.org/download/ 安装 idris-current.pkg 二进制文件,而不是自己从源代码构建它。