简体   繁体   English

将Parsec与Yesod结合使用:阴谋依赖错误

[英]Using Parsec with Yesod: cabal dependencies error

I want to use Parsec in a Yesod project but get a cabal error. 我想在Yesod项目中使用Parsec,但是出现了一个小错误。

Here is what i added to my code: 这是我添加到代码中的内容:

import Text.ParserCombinators.Parsec

Got this error: 得到这个错误:

Could not find module `Text.ParserCombinators.Parsec'

So i added 'parsec' to my .cabal file and finally got this error: 所以我在我的.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...)

Any ideas what is going wrong here? 任何想法出什么问题了吗?

edit: It is a fresh Yesod install (including cabal update) and it worked before adding anything parsec related. 编辑:这是Yesod的全新安装(包括cabal更新),并且在添加任何与parsec相关的内容之前起作用。

rm -Rf ~/.cabal && rm -Rf ~/.ghc

and reinstalling everything solved the problem. 并重新安装一切都解决了问题。

I really wish i understood what's going on with installing haskell packages though... 我真的希望我能理解安装haskell软件包的过程...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM