1

I am fairly new to Haskell. I am trying to build a project downloaded from GitHub using stack. When I try to run stack solver, I get this output:

cabal: Could not resolve dependencies:
trying: deeplearning-hs-0.1.0.2 (user goal)
next goal: base (dependency of deeplearning-hs-0.1.0.2)
rejecting: base-4.8.1.0/installed-075... (conflict: deeplearning-hs =>
base>=4.6 && <4.7)
rejecting: base-4.8.1.0 (global constraint requires installed instance)
rejecting: base-4.8.0.0, 4.7.0.2, 4.7.0.1, 4.7.0.0, 4.6.0.1, 4.6.0.0, 4.5.1.0,
4.5.0.0, 4.4.1.0, 4.4.0.0, 4.3.1.0, 4.3.0.0, 4.2.0.2, 4.2.0.1, 4.2.0.0,
4.1.0.0, 4.0.0.0, 3.0.3.2, 3.0.3.1 (global constraint requires ==4.8.1.0)
Dependency tree exhaustively searched.

The issue seems to be this "global constraint" but I'm not sure where that's coming from. I have looked through my global .cabal files and they are pretty generic--they don't seem to specify the versions of anything.

1 Answer 1

2

base is a library bundled with GHC (the compiler). For each GHC version, there is one base version.

To install deeplearning-hs, seems you need to satisfy base == 4.6.* constraint, i.e. have GHC version 7.6. Unfortunately you cannot install GHC older then 7.8 with stack AFAIK.

You can play with it locally if you change base >=4.6 && <4.7 bounds to base >= 4.6 && <4.8, i.e. allow base coming with GHC 7.8 for example. Note, you shouldn't remove dependencies, you should try to relax the constraints (i.e. version bounds). I tried locally, and the package seems to compile with GHC 7.8. It doesn't compile with GHC 7.10 as Foldable-Traversal-Proposal affects this package.

IMHO best way is to contact the maintainer and ask for upgrade, or even better submit a pull request, as source seems to be on GitHub (which I did).

P.S. I relaxed the bounds on Hackage, so you can install it with GHC 7.8 without worries now.

Sign up to request clarification or add additional context in comments.

2 Comments

Probably he can try editing the cabal file and see if things work with the new GHC. :)
I see. I didn't know about the GHC >= 7.8 constraint for stack. I did try editing the cabal file by commenting out the requirements for base >=4.6 && <4.7, and ran into the following: Could not find module ‘Data.List’ It is a member of the hidden package ‘base-4.8.1.0’. and same for ‘Prelude.’ Perhaps it is best to work on this one without Stack, which I guess means downloading the older version of GHC?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.