<commit_before># NB: don't set `language: haskell` here

# The following enables several GHC versions to be tested; often it's
# enough to test only against the last release in a major GHC
# version. Feel free to omit lines listings versions you don't
# need/want testing for.
env:
 - CABALVER=1.22 GHCVER=7.8.4

# Note: the distinction between `before_install` and `install` is not
# important.
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
 - travis_retry sudo cabal install happy alex
 - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH

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

# Here starts the actual work to be performed for the package under
# test; any command which exits with a non-zero exit code causes the
# build to fail.
script:
 - cabal configure --enable-tests -v2
 - cabal build --ghc-options -Werror
 - cabal test  # Run the Cabal test suite.
 - cabal install && PATH=dist/build/futhark/:$PATH data/tests/runtests.sh # Run integration test suite.
 - tools/style-check.sh src # Check for style issues.
 - cabal haddock # Can we build the documentation?
 - cabal check # Sanity-checks the .cabal file.

# FIXME: Generating a source distribution is broken at the moment,
# because Cabal cannot handle our autogenerated Build_futhark.hs
# module.

# # - cabal sdist # Tests that a source-distribution can be generated

# # The following scriptlet checks that the resulting source
# # distribution can be built & installed
#  - 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
<commit_msg>Move cabal usage to after necessary exports.<commit_after># NB: don't set `language: haskell` here

# The following enables several GHC versions to be tested; often it's
# enough to test only against the last release in a major GHC
# version. Feel free to omit lines listings versions you don't
# need/want testing for.
env:
 - CABALVER=1.22 GHCVER=7.8.4

# Note: the distinction between `before_install` and `install` is not
# important.
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 sudo cabal install happy alex

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

# Here starts the actual work to be performed for the package under
# test; any command which exits with a non-zero exit code causes the
# build to fail.
script:
 - cabal configure --enable-tests -v2
 - cabal build --ghc-options -Werror
 - cabal test  # Run the Cabal test suite.
 - cabal install && PATH=dist/build/futhark/:$PATH data/tests/runtests.sh # Run integration test suite.
 - tools/style-check.sh src # Check for style issues.
 - cabal haddock # Can we build the documentation?
 - cabal check # Sanity-checks the .cabal file.

# FIXME: Generating a source distribution is broken at the moment,
# because Cabal cannot handle our autogenerated Build_futhark.hs
# module.

# # - cabal sdist # Tests that a source-distribution can be generated

# # The following scriptlet checks that the resulting source
# # distribution can be built & installed
#  - 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

{'fraction_non_alphanumeric': 0.1083683041224389, 'fraction_numerical': 0.004937052579609973, 'mean_word_length': 3.492239467849224, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1484314', 'n_tokens_mistral': 1334, 'n_tokens_neox': 1287, 'n_words': 476}