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

如何在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进行比较.

相关文章

迭代器模式(Iterator)迭代器模式(Iterator)[Cursor]意图...
高性能IO模型浅析服务器端编程经常需要构造高性能的IO模型,...
策略模式(Strategy)策略模式(Strategy)[Policy]意图:定...
访问者模式(Visitor)访问者模式(Visitor)意图:表示一个...
命令模式(Command)命令模式(Command)[Action/Transactio...
生成器模式(Builder)生成器模式(Builder)意图:将一个对...