【问题标题】:Using Parsec with Yesod: cabal dependencies error将 Parsec 与 Yesod 一起使用:cabal 依赖项错误
【发布时间】:2012-06-17 00:02:35
【问题描述】:

我想在 Yesod 项目中使用 Parsec,但遇到了 cabal 错误。

这是我添加到代码中的内容:

import Text.ParserCombinators.Parsec

收到此错误:

Could not find module `Text.ParserCombinators.Parsec'

所以我在我的 .cabal 文件中添加了“parsec”,最后得到了这个错误:

cabal: Could not resolve dependencies:
trying: Blackbox-0.0.0 (user goal)
trying: parsec-3.1.3/installed-6a5... (dependency of Blackbox-0.0.0)
trying: warp-1.2.1.1/installed-638... (dependency of Blackbox-0.0.0)
next goal: network (dependency of warp-1.2.1.1/installed-638...)
rejecting: network-2.3.0.11/installed-b9c... (conflict:
parsec==3.1.3/installed-6a5..., network => parsec==3.1.2/installed-a67...)
rejecting: network-2.3.0.10/installed-e97... (package is broken)
rejecting: network-2.3.0.14, 2.3.0.13, 2.3.0.12, 2.3.0.11, 2.3.0.10, 2.3.0.9,
2.3.0.8, 2.3.0.7, 2.3.0.6, 2.3.0.5, 2.3.0.4, 2.3.0.3, 2.3.0.2, 2.3.0.1, 2.3,
2.2.1.10, 2.2.1.9, 2.2.1.8, 2.2.1.7, 2.2.1.6, 2.2.1.5, 2.2.1.4, 2.2.1.3,
2.2.1.2, 2.2.1.1, 2.2.1, 2.2.0.1, 2.2.0.0, 2.1.0.0, 2.0, 2.2.3.1, 2.2.3
(conflict: warp => network==2.3.0.11/installed-b9c...)

你知道这里出了什么问题吗?

编辑:这是一个全新的 Yesod 安装(包括 cabal 更新),它在添加任何与 parsec 相关的内容之前就可以工作。

【问题讨论】:

    标签: haskell cabal yesod


    【解决方案1】:
    rm -Rf ~/.cabal && rm -Rf ~/.ghc
    

    并重新安装一切解决了问题。

    我真的希望我能理解安装 haskell 包的过程...

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-06-08
      • 2017-11-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多