env:
  - ghc=7.6.1
  - ghc=7.8.1
  - ghc=7.10.1

install:
  # Set up the Shell to treat the semicolon as &&
  - set -o pipefail && set -e
  # Install GHC and Cabal
  - 
    travis_retry sudo add-apt-repository -y ppa:hvr/ghc;
    travis_retry sudo apt-get update;
    travis_retry sudo apt-get install cabal-install-1.22 ghc-$ghc;
    export PATH=/opt/ghc/$ghc/bin:/opt/cabal/1.22/bin:$PATH;
  # Update the Cabal database
  - cabal update
  # Switch to the distro:
  - 
    export pkg_name=$(cabal info . | awk '{print $2;exit}');
    cabal sdist;
    cd dist;
    tar xzvf $pkg_name.tar.gz;
    cd $pkg_name;
  # Install the library dependencies
  - cabal install --only-dependencies --enable-tests
  # Build the library
  - cabal build
  # Configure and build the remaining stuff
  - cabal configure 
      --enable-tests 
      $([ "$build_benchmarks" = "1" ] && echo "--enable-benchmarks")
  - cabal build

script:
  - cabal test --show-details=always

env:
  - ghc=7.6.1 cabal=1.22
  - ghc=7.8.1 cabal=1.22
  - ghc=7.10.1 cabal=1.22
  - ghc=8.0.1 cabal=1.24

install:
  # Set up the Shell to treat the semicolon as &&
  - set -o pipefail && set -e
  # Install GHC and Cabal
  - 
    travis_retry sudo add-apt-repository -y ppa:hvr/ghc;
    travis_retry sudo apt-get update;
    travis_retry sudo apt-get install cabal-install-$cabal ghc-$ghc;
    export PATH=/opt/ghc/$ghc/bin:/opt/cabal/$cabal/bin:$PATH;
  # Update the Cabal database
  - cabal update
  # Switch to the distro:
  - 
    export pkg_name=$(cabal info . | awk '{print $2;exit}');
    cabal sdist;
    cd dist;
    tar xzvf $pkg_name.tar.gz;
    cd $pkg_name;
  # Install the library dependencies
  - cabal install --only-dependencies --enable-tests
  # Build the library
  - cabal build
  # Configure and build the remaining stuff
  - cabal configure 
      --enable-tests 
      $([ "$build_benchmarks" = "1" ] && echo "--enable-benchmarks")
  - cabal build

script:
  - cabal test --show-details=always

Test with GHC-8.0.1 as well
Test with GHC-8.0.1 as well
