<commit_before>#!/bin/bash

set -e

version=1.3

if ! hash ghc >& /dev/null; then
    echo 'GHC not found.' 1>&2
    exit 1
fi

cabal sandbox init --sandbox='cabal-sandbox'
cabal update

# GTK in version 13 and higher is not supported.
# See https://github.com/haskell/ThreadScope/issues/39
cabal install gtk2hs-buildtools-0.13.0.5 # --constraint='gtk >= 0.12.1 && <= 0.13'
cabal install -fcairo -fgtk diagrams-$version # --constraint='gtk >= 0.12.1 && < 0.13'<commit_msg>Cleanup of Cabal sandbox installation script<commit_after>#!/bin/bash

set -e

version=1.3

if ! hash ghc >& /dev/null; then
    echo 'GHC not found.' 1>&2
    exit 1
fi

cabal sandbox init --sandbox='cabal-sandbox'
cabal update

cabal install gtk2hs-buildtools-0.13.0.5
cabal install -fcairo -fgtk diagrams-$version
{'fraction_non_alphanumeric': 0.14213197969543148, 'fraction_numerical': 0.050761421319796954, 'mean_word_length': 3.457627118644068, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '927578', 'n_tokens_mistral': 340, 'n_tokens_neox': 307, 'n_words': 83}