<commit_before>#!/bin/bash
if [[ $1 == "" ]] ; then
    echo "Usage: $0 path_to_ghc_source"
    exit 1
fi

libpath=$1/libraries

# Install builtin RTS package, and create some dirs.
mkdir -p ~/.haste/haste-install/lib/ghc
haste-copy-pkg rts-1.0 rts

# Install custom ghc-prim.
pushd .
cd libraries/ghc-prim
haste-inst configure --unbooted
haste-inst build --unbooted --install-jsmods
haste-install-his ghc-prim-0.3.0.0 dist/build
haste-pkg update packageconfig
popd

# Install custom integer-gmp.
pushd .
cd libraries/integer-gmp
haste-inst install --unbooted
popd

# Install base from GHC source. GHC needs to be built beforehand.
pushd .
cd $libpath/base
baseversion=$(cat base.cabal|egrep '^version'|awk '{print $2}')
haste-inst configure --unbooted
haste-inst build --unbooted --install-jsmods
haste-install-his base-$baseversion dist/build
haste-copy-pkg base-$baseversion --package-db=dist/package.conf.inplace
popd

# Install fursuit, since haste-lib depends on it.
pushd .<commit_msg>Build integer-gmp twice, since it sometimes mysteriously fails the first time.<commit_after>#!/bin/bash
if [[ $1 == "" ]] ; then
    echo "Usage: $0 path_to_ghc_source"
    exit 1
fi

libpath=$1/libraries

# Install builtin RTS package, and create some dirs.
mkdir -p ~/.haste/haste-install/lib/ghc
haste-copy-pkg rts-1.0 rts

# Install custom ghc-prim.
pushd .
cd libraries/ghc-prim
haste-inst configure --unbooted
haste-inst build --unbooted --install-jsmods
haste-install-his ghc-prim-0.3.0.0 dist/build
haste-pkg update packageconfig
popd

# Install custom integer-gmp.
pushd .
cd libraries/integer-gmp
haste-inst install --unbooted
haste-inst install --unbooted
popd

# Install base from GHC source. GHC needs to be built beforehand.
pushd .
cd $libpath/base
baseversion=$(cat base.cabal|egrep '^version'|awk '{print $2}')
haste-inst configure --unbooted
haste-inst build --unbooted --install-jsmods
haste-install-his base-$baseversion dist/build
haste-copy-pkg base-$baseversion --package-db=dist/package.conf.inplace
popd

# Install fursuit, since haste-lib depends on it.
pushd .
{'fraction_non_alphanumeric': 0.12121212121212122, 'fraction_numerical': 0.010582010582010581, 'mean_word_length': 3.964200477326969, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '3652660', 'n_tokens_mistral': 762, 'n_tokens_neox': 749, 'n_words': 207}