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


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

  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-
    base- must match >=4.5 && <4.10 (latest applicable is
needed due to bookkeeper-0.2.4 -> array-

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

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

Answers ( 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, 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).

◀ Go back