0
votes

I want to install the Haskell libary hip from https://hackage.haskell.org/package/hip by using stack. This does not work, because stack seems to not being able to install dependencies.

I have stack freshly installed by curl -sSL https://get.haskellstack.org/ | sh, and stack --version gives me

Version 1.9.3, Git revision 40cf7b37526b86d1676da82167ea8758a854953b (6211 commits) x86_64 hpack-0.31.1

I have tried several things like another resolver, reinstalling different versions of stack, ghc or cabal.

I have tried stack new test, and inside the test folder, i wrote stack install hip.

I got the following error:

Error: While constructing the build plan, the following exceptions were
encountered:

In the dependencies for hip-1.5.3.0:
    Chart must match >=1.5, but the stack configuration has no specified
          version  (latest matching version is 1.9)
    Chart-diagrams must match >=1.5, but the stack configuration has no
                   specified version  (latest matching version is 1.9)
needed since hip is a build target.

Some different approaches to resolving this:

  * Consider trying 'stack solver', which uses the cabal-install solver to
    attempt to find some working build configuration. This can be convenient
    when dealing with many complicated constraint errors, but results may be
    unpredictable.

  * Recommended action: try adding the following to your extra-deps
    in /home/jarek/Desktop/test/stack.yaml:

Chart-1.9@sha256:f41568b6b3704f66c2ec163295b430ab7d798f91de426c2d5aba747d1135cd9b
Chart-diagrams-1.9@sha256:cdd0c22d730e507f9644e690833096ee127302b5ff5e1571f6def419160a2642

Plan construction failed.

I expect something like:

Building dependencies...
Installing Chart-1.9
...
...
...
hip successfully installed.

Please tell me if i did not provide all infos necessary for you to help me with my problem.

2

2 Answers

0
votes

Installing with the resolver lts-7.5 works.

0
votes

Why not do what stack recommended?

Recommended action: try adding the following to your extra-deps
in /home/jarek/Desktop/test/stack.yaml:

Chart-1.9@sha256:f41568b6b3704f66c2ec163295b430ab7d798f91de426c2d5aba747d1135cd9b
Chart-diagrams-1.9@sha256:cdd0c22d730e507f9644e690833096ee127302b5ff5e1571f6def419160a

It's the easiest way to accomplish your goal.

Update: lts-10.10 is the most recent resolver to include hip. If you update your stack.yaml to use lts-10.10 and add hip in your .cabal file, you should be good to go.