how do I override upper-bounds in a haskell project?

Question

I would like to use kind equality, which seems only present in GHC head for now.

I made a system-install of GHC, and in my project I added a snapshot.yaml

resolver: nightly-2016-12-31
compiler: ghc-8.1.20170103

and updated stack.yaml accordingly

resolver:
  name: snapshot
  location: snapshot.yaml

I can see using stack path that it picks the correct compiler.

When I build my project I now have

In the dependencies for array-0.5.1.1:
    base-4.10.0.0 must match >=4.5 && <4.10 (latest applicable is 4.9.0.0)
needed due to bookkeeper-0.2.4 -> array-0.5.1.1

How can I override from my project the upper-bound declared by array-0.5.1.1, which is probably not actually required ?


Show source
| haskell   | haskell-stack   2017-01-07 23:01 1 Answers

Answers to how do I override upper-bounds in a haskell project? ( 1 )

  1. 2017-01-08 01:01

    Your main problem is that the nightly-2016-12-31 snapshot uses GHC 8.0.1 and base 4.9.0.0, and so it is incompatible with your installation of GHC 8.1. It should be enough to set the resolver to ghc-8.1.20170103, so that no snapshots are used. (There is also a system-ghc option; however, given that Stack is already using the correct compiler I guess it won't be necessary to turn that on.) If you need packages not bundled with GHC, you will have to add them to the extra-deps in stack.yaml (if you already have a .cabal file specifying your dependencies, stack solver --update-config can be used to fill that in automatically).

Leave a reply to - how do I override upper-bounds in a haskell project?

◀ Go back