簡體   English   中英

將Parsec與Yesod結合使用:陰謀依賴錯誤

[英]Using Parsec with Yesod: cabal dependencies error

我想在Yesod項目中使用Parsec,但是出現了一個小錯誤。

這是我添加到代碼中的內容:

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相關的內容之前起作用。

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

並重新安裝一切都解決了問題。

我真的希望我能理解安裝haskell軟件包的過程...

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM