加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

haskell – 如何告诉cabal指定我的程序依赖项之一的依赖项?

发布时间:2020-12-14 04:47:05 所属栏目:百科 来源:网络整理
导读:这实际上是 How can I tell Cabal which dependency to use?的后续问题. 包haskell-src-meta有两个依赖项: template-haskell =2.7 2.9,template-haskell =2.4 2.7 和template-haskell 2.7不会在我的系统上构建.我知道解决方法是: cabal install --constrai
这实际上是 How can I tell Cabal which dependency to use?的后续问题.

包haskell-src-meta有两个依赖项:

template-haskell >=2.7 && <2.9,template-haskell >=2.4 && <2.7

和template-haskell 2.7不会在我的系统上构建.我知道解决方法是:

cabal install --constraint="template-haskell == 2.5.0.0" haskell-src-meta

但是,我现在想为我编写的具有这些依赖关系的软件编写我自己的cabal文件.它似乎不足以:

Build-depends: template-haskell-2.5.0.0

相反,我实际上想说haskell-src-meta是构建依赖项,但是进一步告诉cabal它应该使用上面指定的相同约束来安装该依赖项.有没有办法做到这一点?

解决方法

也许“安装”约束是你想要的.

cabal install --constraint "template-haskell installed" my-custom-package

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读