在堆栈项目中添加MaybeT依赖项时遇到错误 [英] Encountering error while adding MaybeT dependency in stack project
问题描述
我正在学习本教程 webScrapper 使用HXT。
我在这里使用Stack。
当为MaybeT添加依赖项时,它会要求:
建议操作:在/ Users / *** / Haskell Development / Scrapper / stack.yaml:
- MaybeT-0.1.2
$ b中添加以下内容
$ b
现在完成此操作,直到运行堆栈构建时出现此消息:
在MaybeT的依赖关系-0.1.2:
base-4.9.0.0必须匹配< 4.8(最新适用的是4.7.0.2)由于Scrapper-0.1.0.0需要
- > MaybeT-0.1.2
作为Stack的新手,我无法解决问题,在我的cabal文件中
依赖:
build-depends:base> = 4.7&& < 5
,hxt
,url
,HTTP
,MaybeT
在stack.yaml中
解析器:lts-7.12
extra-deps:[MaybeT-0.1。 2]
我错过了什么。如何解决这个问题?
解决方案解决方案
解决您的具体问题的方法是从过期的 MaybeT 包到 MaybeT
变压器提供的变压器包装在 Control.Monad.Trans.Maybe
。
也就是说,请注意,版本不匹配涉及 base 。如果您实际需要使用 MaybeT 包,则必须将堆栈解析器切换为诸如 I am following this tutorial webScrapper using HXT.
I am using Stack here. While adding dependency for MaybeT, it asked to: Recommended action: try adding the following to your extra-deps in /Users/***/Haskell Development/Scrapper/stack.yaml:
- MaybeT-0.1.2 Now doing so to ended up with this message on running stack build: In the dependencies for MaybeT-0.1.2:
base-4.9.0.0 must match <4.8 (latest applicable is 4.7.0.2)
needed due to Scrapper-0.1.0.0 -> MaybeT-0.1.2 Being new to Stack, I am unable to solve the problem, in my cabal file the
the dependency: In stack.yaml What is it that I have missed. How can I solve this? The solution for your concrete problem is switching from the outdated MaybeT package to the That said, note that the version mismatch involves base. If you actually needed to use the MaybeT package, you would have to switch the Stack resolver to a snapshot such as 这篇关于在堆栈项目中添加MaybeT依赖项时遇到错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! lts-6.26
,它使用 base-4.8 <或em>或更低(即GHC 7.10.3或更低) 。 base 版本与GHC版本相关联,而其他所有内容都依赖于 base ,所以没有简单的方法将 base 切换到旧版本,因为它可能是有可能的,因为有些运气,还有其他软件包。
build-depends: base >= 4.7 && < 5
, hxt
, url
, HTTP
, MaybeT
resolver: lts-7.12
extra-deps: [MaybeT-0.1.2]
MaybeT
transformer offered by the transformers package in Control.Monad.Trans.Maybe
.
lts-6.26
, which uses base-4.8 or below (i.e. GHC 7.10.3 or below). base versions are coupled to GHC versions, and everything else depends on base, so there is no easy way of switching just base to an older version, as it might be possible, given some luck, with other packages.