Could megaparsec be installed with cabal 3.6 and ghc 8.10?
kalxd opened this issue · 2 comments
Hi all, I installed cabal with ghcup tool:
$ ghcup list -c installed
✔✔ ghc 8.10.7 recommended,base-4.14.3.0 hls-powered
✔✔ cabal 3.6.2.0 latest,recommended
Adding megaparsec == 9.2.0
to the field build-depends
of cabal file, try run cabal build
, it shows:
$ cabal build
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: sample-0.1.0.0 (user goal)
[__1] trying: megaparsec-9.2.0 (dependency of sample)
[__2] trying: transformers-0.5.6.2/installed-0.5.6.2 (dependency of
megaparsec)
[__3] trying: scientific-0.3.7.0 (dependency of megaparsec)
[__4] next goal: primitive (dependency of scientific)
[__4] rejecting: primitive-0.6.4.0 (conflict: scientific => primitive>=0.7.1.0
&& <0.8)
[__4] skipping: primitive-0.6.1.1, primitive-0.6.1.0, primitive-0.5.4.0,
primitive-0.5.3.0, primitive-0.5.2.1, primitive-0.5.1.0, primitive-0.5.0.1,
primitive-0.5, primitive-0.4.1, primitive-0.4.0.1, primitive-0.4,
primitive-0.3.1, primitive-0.3, primitive-0.2.1, primitive-0.2, primitive-0.1,
primitive-0.6.3.0, primitive-0.6.2.0, primitive-0.6.1.2, primitive-0.6 (has
the same characteristics that caused the previous version to fail: excluded by
constraint '>=0.7.1.0 && <0.8' from 'scientific')
[__4] fail (backjumping, conflict set: primitive, scientific)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: scientific, base, megaparsec,
primitive, transformers, sample
Try running with --minimize-conflict-set to improve the error message.
I tried megaparsec 8.0
and megaparsec 7.0.5
, also the same error. So how can I fix it? switching to other cabal versions?
thanks a lot.
Well, this is weird. It fails because it doesn't find a version of primitive
satisfying >= 0.7.1.0 && <0.8
, but it doesn't even try 0.7.xxx
versions, yet we can see that they are on Hackage:
https://hackage.haskell.org/package/primitive
Might be unrelated to Megaparsec. Can you show your cabal file? Did you try to run cabal update
first?
Well, It was installed correctly by switching cabal repository mirror.
It works very well now! thanks for your help. :)