[Haskell-cafe] Testing for different dependency versions?

Simon Jakobi simon.jakobi at googlemail.com
Sun May 29 05:46:40 UTC 2016

(I'm sending this again because I had subscribed to the mailing list
with a different email address)


I'm not sure if there's a better tool out there but I think stack
(http://haskellstack.org/) is pretty convenient for testing a package
with different versions of base and other packages on the same system.

To test your package with base-4.7 you'd simply run

     stack test --resolver ghc-7.8 --install-ghc

To test your package with base- and pkg-x-1.2.3 you'd save the
following in a stack.yaml in the same directory as your cabal file:

    resolver: ghc-7.10.3
    - pkg-x-1.2.3

Then run

     stack solver --update-config

to add the remaining dependencies and

    stack test

to build the package and run the tests.

If you have your package on Github you can also use Travis CI to test
your package with different configurations:

Hope that helps!

More information about the Haskell-Cafe mailing list