# language: haskell

# See http://www.reddit.com/r/haskell/comments/1os3f6/how_to_use_travisci_with_multiple_ghc_versions/

dist: trusty
sudo: required

env:
 - GHCVER=7.0.4
 - GHCVER=7.2.2
 - GHCVER=7.4.2
 - GHCVER=7.6.3
 - GHCVER=7.8.4
 - GHCVER=7.10.3
 - GHCVER=8.0.2
 - GHCVER=8.2.1

before_install:
 - sudo add-apt-repository -y ppa:hvr/ghc
 - travis_retry sudo apt-get update
 - travis_retry sudo apt-get install cabal-install-2.0 ghc-$GHCVER
 - export PATH=/opt/ghc/bin:$PATH

install:
 - travis_retry cabal update
 - cabal install --only-dependencies --enable-tests

script:
 - cabal configure --enable-tests
 - cabal build
 - cabal check
 - cabal haddock
 - cabal sdist
