language: haskell
notifications:
  email:
    - erkokl@gmail.com
  on_success: always
  on_failure: always

language: haskell

env:
    - GHCVER=7.10.1

notifications:
  email:
    - erkokl@gmail.com
  on_success: always
  on_failure: always

before_install:
  - |
    if [ $GHCVER = `ghc --numeric-version` ]; then
      echo "No need to install GHC, already have $GHCVER";
    else
      travis_retry sudo add-apt-repository -y ppa:hvr/ghc
      travis_retry sudo apt-get update
      travis_retry sudo apt-get install ghc-$GHCVER
      export PATH=/opt/ghc/$GHCVER/bin:$PATH
    fi
  - $CABAL update

install:
  - $CABAL install --dependencies-only --enable-tests
  - $CABAL configure

script:
  - $CABAL build
  - $CABAL test --show-details=always
  - cabal sdist
  - export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}') ;
    cd dist/;
    if [ -f "$SRC_TGZ" ]; then
       cabal install --force-reinstalls "$SRC_TGZ";
    else
       echo "expected '$SRC_TGZ' not found";
       exit 1;
    fi

Update Travis-CI to use GHC 7.10.1
Update Travis-CI to use GHC 7.10.1
