# https://github.com/hvr/multi-ghc-travis
env:
 - CABALVER=1.22 GHCVER=7.8.4
 - CABALVER=1.22 GHCVER=7.10.2
 - CABALVER=head GHCVER=head

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

install:
 - cabal --version
 - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
 - cabal install --only-dependencies -f-build-js

script:
 - if [ -f configure.ac ]; then autoreconf -i; fi
 - cabal configure -f-build-js -v2
 - "cabal build --ghc-options='-fno-warn-dodgy-imports -Werror'"
 # commented out because Python tests don't want to run
 # - cabal test

# https://github.com/hvr/multi-ghc-travis
env:
 - CABALVER=1.22 GHCVER=7.8.4
 - CABALVER=1.22 GHCVER=7.10.2
 - CABALVER=head GHCVER=head

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

install:
 - cabal --version
 - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
 - cabal install --only-dependencies -f-build-js

script:
 - if [ -f configure.ac ]; then autoreconf -i; fi
 - cabal configure -f-build-js -v2
 - "cabal build --ghc-options='-fno-warn-unused-imports -fno-warn-dodgy-imports -Werror'"
 # commented out because Python tests don't want to run
 # - cabal test

Fix Travis build for GHC 7.10
Fix Travis build for GHC 7.10
