env:
 - GHCVER=7.4.2 CABALVER=1.16
 - GHCVER=7.6.3 CABALVER=1.18
 - GHCVER=head CABALVER=1.18 

before_install:
 - sudo add-apt-repository -y ppa:hvr/ghc
 - sudo apt-get update
 - sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER hlint
 - cabal-$CABALVER update
 - cabal-$CABALVER install happy -j
 - export PATH=/opt/ghc/$GHCVER/bin:~/.cabal/bin:$PATH

install:
 - cabal-$CABALVER install --only-dependencies --enable-tests --enable-benchmarks -j
 - sudo ln -s $(which cabal-$CABALVER) /usr/bin/cabal

script:
 - travis/script.sh && cat log
 - hlint src

matrix:
  allow_failures:
   - env: GHCVER=head CABALVER=1.18
  fast_finish: true
env:
 - GHCVER=7.4.2 CABALVER=1.16
 - GHCVER=7.6.3 CABALVER=1.18
 - GHCVER=head CABALVER=1.18 

before_install:
 - sudo add-apt-repository -y ppa:hvr/ghc
 - sudo apt-get update
 - sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER hlint
 - cabal-$CABALVER update
 - cabal-$CABALVER install happy Cabal-$(cabal-$CABALVER --version | sed -nre "s/using version (([0123456789]|\\.)*) of the Cabal library/\\1/gp") -j
 - export PATH=/opt/ghc/$GHCVER/bin:~/.cabal/bin:$PATH

install:
 - cabal-$CABALVER install --only-dependencies --enable-tests --enable-benchmarks -j
 - sudo ln -s $(which cabal-$CABALVER) /usr/bin/cabal

script:
 - travis/script.sh && cat log
 - hlint src

matrix:
  allow_failures:
   - env: GHCVER=head CABALVER=1.18
  fast_finish: true
Install a matching version of the Cabal library
Install a matching version of the Cabal library
