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

haskell – cabal(依赖)背后的原因是什么?

发布时间:2020-12-13 20:12:59 所属栏目:百科 来源:网络整理
导读:如何在Cabal-install中发生依赖? 我在Cabal/Survival – HaskellWiki阅读以下内容: 1. What is the difficulty caused by Cabal-install? The main difficulty with Cabal is otherwise known as ‘dependency hell’,in which the cabal-install does not
如何在Cabal-install中发生依赖?

我在Cabal/Survival – HaskellWiki阅读以下内容:

1. What is the difficulty caused by Cabal-install?

The main difficulty with Cabal is otherwise known as ‘dependency hell’,in which the
cabal-install does not manage to install a desired package for a
reason or another,leading to large amount of manual work. As an
example of this difficulty,consider a case where the user wishes to
install packages A and B. Both of these work with package C,but not
with the same version of C.

我理解为什么这一般有意义,但不适用于Cabal-install / ghc-pkg,因为你可以安装相同软件包的多个版本.
这就好像每个版本都是一个完全不同的软件包,在许多方面,版本如何成为软件包名称的一部分(例如mustaches-0.1.0.0) – 也许它真的是用于ghc-pkg(我不是完全熟悉它,但它会有意义).

你有这样的场景:

B和C都依赖于A.但是,如果它们是在不同时间安装的,它们可能依赖于不同版本的A.例如,版本1导出类型T = Int,但在版本2中导出类型T = Bool .

只有在尝试构建D时,才会暴露出针对不同版本的A构建B和C的问题,并且无法将T版本1与T版本2进行比较.

(编辑:李大同)

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

    推荐文章
      热点阅读