diff --git a/.travis.yml b/.travis.yml
new file mode 100644
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,35 @@
+# Use new container infrastructure to enable caching
+sudo: false
+
+# Choose a lightweight base image; we provide our own build tools.
+language: c
+
+# GHC depends on GMP. You can add other dependencies here as well.
+addons:
+  apt:
+    packages:
+    - libgmp-dev
+
+# The different configurations we want to test. You could also do things like
+# change flags or use --stack-yaml to point to a different file.
+env:
+- HTF_TRAVIS_STACK_ARGS="--stack-yaml ${TRAVIS_BUILD_DIR}/stack-ghc-8.4.yaml"
+- HTF_TRAVIS_STACK_ARGS="--stack-yaml ${TRAVIS_BUILD_DIR}/stack.yaml"
+- HTF_TRAVIS_STACK_ARGS="--stack-yaml ${TRAVIS_BUILD_DIR}/stack-ghc-8.0.yaml"
+- HTF_TRAVIS_STACK_ARGS="--stack-yaml ${TRAVIS_BUILD_DIR}/stack-ghc-7.10.yaml"
+
+before_install:
+# Download and unpack the stack executable
+- mkdir -p ~/.local/bin
+- export PATH=$HOME/.local/bin:$PATH
+- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
+
+# This line does all of the work: installs GHC if necessary, build the library,
+# executables, and test suites, and runs the test suites. --no-terminal works
+# around some quirks in Travis's terminal implementation.
+script: stack $HTF_TRAVIS_STACK_ARGS --no-terminal --install-ghc test --haddock --cabal-verbose
+
+# Caching so the next build will be fast too.
+cache:
+  directories:
+  - $HOME/.stack
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
-* 0.13.2.{0,1,2} (2017-08-6)
+* 0.13.2.3 (2018-03-31)
+  - fix build for ghc 8.4
+
+* 0.13.2.{0,1,2} (2017-08-06)
   - various build and documentation fixes and improvements
 
 * 0.13.1.0 (2015-08-21)
diff --git a/HTF.cabal b/HTF.cabal
--- a/HTF.cabal
+++ b/HTF.cabal
@@ -1,6 +1,6 @@
 Name:             HTF
-Version:          0.13.2.2
-License:          LGPL
+Version:          0.13.2.4
+License:          LGPL-2.1
 License-File:     LICENSE
 Copyright:        (c) 2005-2015 Stefan Wehr
 Author:           Stefan Wehr <wehr@factisresearch.com>
@@ -36,6 +36,11 @@
   README.md
   TODO.org
   ChangeLog
+  .travis.yml
+  stack.yaml
+  stack-ghc-7.10.yaml
+  stack-ghc-8.0.yaml
+  stack-ghc-8.4.yaml
   tests/bbt/should_fail/BBTArgs
   tests/bbt/should_fail/*.err
   tests/bbt/should_fail/*.out
@@ -72,6 +77,8 @@
   sample/bbt-dir/should-pass/x.num
   sample/bbt-dir/should-pass/x.out
   scripts/local-htfpp
+  scripts/dist.sh
+  scripts/check.sh
   scripts/run-sample
 
 Source-Repository head
diff --git a/Test/Framework/Pretty.hs b/Test/Framework/Pretty.hs
--- a/Test/Framework/Pretty.hs
+++ b/Test/Framework/Pretty.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
+{-# LANGUAGE CPP, FlexibleInstances, TypeSynonymInstances #-}
 
 {- |
 
@@ -19,7 +19,12 @@
 
 where
 
+#if MIN_VERSION_base(4,11,0)
+-- Text.PrettyPrint exports (<>) conflicting with newer Prelude.
+import Text.PrettyPrint hiding ((<>))
+#else
 import Text.PrettyPrint
+#endif
 
 -- | A type class for pretty-printable things.
 -- Minimal complete definition: @pretty@.
diff --git a/Test/Framework/ThreadPool.hs b/Test/Framework/ThreadPool.hs
--- a/Test/Framework/ThreadPool.hs
+++ b/Test/Framework/ThreadPool.hs
@@ -20,7 +20,7 @@
 module Test.Framework.ThreadPool (
 
     ThreadPoolEntry, ThreadPool(..), StopFlag(..), sequentialThreadPool, parallelThreadPool
-  , threadPoolTest, threadPoolTestStop
+  , threadPoolTest
 
 ) where
 
@@ -39,7 +39,9 @@
 
 type ThreadPoolEntry m a b = ( m a        -- pre-action, must not throw exceptions
                              , a -> IO b  -- action
-                             , Either Ex.SomeException b -> m StopFlag  -- post-action, must not throw exceptions. If the result is DoStop, the thread pool is terminated asap.
+                             , Either Ex.SomeException b -> m StopFlag
+                               -- post-action, must not throw exceptions. If the result is
+                               -- DoStop, the thread pool is terminated asap.
                              )
 
 data ThreadPool m a b
@@ -225,33 +227,3 @@
     mapM (runTestParallel nEntries) [i..j] `Ex.catch`
              (\(e::Ex.BlockedIndefinitelyOnMVar) ->
                   fail ("main-thread blocked " ++ show e))
-
-threadPoolTestStop =
-    do putStrLn ("Running test to see of STOP works")
-       boxesAndEntries <- mapM mkEntry [1..100]
-       let (boxes, entries) = unzip boxesAndEntries
-       runParallel numberOfThreads entries
-       debug ("Checking boxes...")
-       mapM_ checkBox (zip [1..] boxes)
-       putStrLn ("Test for STOP successful")
-    where
-      mkEntry i =
-          do mvar <- newEmptyNamedMVar ("box-" ++ show i)
-             let pre = return ()
-                 action () =
-                     do putNamedMVar mvar ()
-                        return ()
-                 post _exc  = return (if i >= numberOfThreads then DoStop else DoNotStop)
-             return (mvar, (pre, action, post))
-      numberOfThreads = 10
-      checkBox (i, (name, box)) =
-          do isEmpty <- isEmptyMVar box
-             if isEmpty
-             then if i > 20
-                  then return ()
-                  else if i <= 10
-                       then fail ("Box " ++ name ++ " is still empty")
-                       else return ()
-             else if i > 20
-                  then fail ("Box " ++ name ++ " not empty")
-                  else return ()
diff --git a/scripts/check.sh b/scripts/check.sh
new file mode 100644
--- /dev/null
+++ b/scripts/check.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+if [ "$1" == "--help" ]; then
+    echo "Checks that HTF compiles against all resolvers mentioned in .travis.yml"
+    exit 1
+fi
+
+set -e
+
+TOP=$(cd $(dirname ${BASH_SOURCE[0]})/.. > /dev/null && pwd -P)
+TRAVIS="$TOP/.travis.yml"
+if [ ! -e "$TRAVIS" ]; then
+    echo "$TRAVIS does not exist!"
+    exit 1
+fi
+
+YAMLS=$(grep '^- HTF_TRAVIS_STACK_ARGS' "$TRAVIS" | sed 's/^.*="--stack-yaml //g; s/"$//g')
+
+if [ -z "$TRAVIS_BUILD_DIR" ]; then
+    export TRAVIS_BUILD_DIR="$TOP"
+fi
+
+for yaml in $YAMLS; do
+    eval yaml="$yaml" # evaluate variables contained in $yaml
+    echo >&2 "Checking with $yaml ..."
+    export HTF_TRAVIS_STACK_ARGS="--stack-yaml $yaml"
+    stack $HTF_TRAVIS_STACK_ARGS test
+    ecode=$?
+    if [ $ecode -ne 0 ]; then
+        echo >&2 "Check for $yaml failed!"
+        exit 1
+    fi
+done
diff --git a/scripts/dist.sh b/scripts/dist.sh
new file mode 100644
--- /dev/null
+++ b/scripts/dist.sh
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+if [ "$1" == "--help" ]; then
+    echo "USAGE: $0 [--no-check]"
+    echo "Creates an dist tarball and checks that it builds."
+    exit 1
+fi
+
+no_check=no
+if [ "$1" == "--no-check" ]; then
+    no_check=yes
+fi
+
+version=$(gawk -F: '/^Version:/ { print $2 }' HTF.cabal | sed 's/ //g')
+
+echo "Building version $version"
+
+# Somehow, --test-tarball always because of a strange permission error. That's why
+# we do the checks here by hand.
+
+stack sdist . --no-test-tarball || exit 1
+tarball=$(find $(pwd)/.stack-work/dist -name "*${version}.tar.gz" | xargs ls -t | head -1)
+
+echo "Distribution tarball is $tarball"
+
+tmp=$(mktemp -d)
+tar -C "$tmp" -x -z -f "$tarball" || exit 1
+
+if [ "$no_check" == "yes" ]; then
+    echo "Skipping tests as requested"
+else
+    pushd "${tmp}/HTF-${version}" > /dev/null
+    echo "Running checks in directory $(pwd)"
+    scripts/check.sh || exit 1
+    popd > /dev/null
+fi
+
+git_tag="release/${version}"
+if ! git tag --points-at HEAD | grep -E "^$git_tag$" > /dev/null; then
+    git tag "$git_tag" || exit 1
+    echo "Tagged HEAD with $git_tag"
+fi
+
+echo
+echo
+echo 'All checks succeeded, now upload to archive using the following command:'
+echo '$ stack upload . --no-test-tarball'
+echo
+echo 'And do not forget to push all tags:'
+echo '$ git push --tags'
diff --git a/scripts/local-htfpp b/scripts/local-htfpp
--- a/scripts/local-htfpp
+++ b/scripts/local-htfpp
@@ -1,11 +1,36 @@
 #!/bin/bash
 
+DEBUG=no
 TOP=$(cd $(dirname ${BASH_SOURCE[0]})/.. > /dev/null && pwd -P)
-d=$(stack $HTF_TRAVIS_STACK_ARGS path --dist-dir)
-bin="$TOP/$d/build/htfpp/htfpp"
+dist=$(stack $HTF_TRAVIS_STACK_ARGS path --dist-dir 2> /dev/null)
+find=find
+if [ "$(uname)" == "Darwin" ]; then
+    find=gfind
+fi
 
-if [ ! -x "$bin" ]; then
-    echo "No executable found at $bin" >&2
-    exit 1
+function find_bin()
+{
+    bin=$($find "$TOP/$dist" -name htfpp -type f -executable -printf "%T+\t%p\n" | sort -r | head -1 | gawk '{print $2}')
+}
+
+find_bin
+
+if [ "$DEBUG" == "yes" ]; then
+    echo "TOP=$TOP" >&2
+    echo "dist=$dist" >&2
+    echo "bin=$bin" >&2
+fi
+
+if [ -z "$bin" ]; then
+    echo "No executable named htfpp found in $TOP/$dist, trying to build it" >&2
+    stack $HTF_TRAVIS_STACK_ARGS build 2> /dev/null > /dev/null
+    find_bin
+    if [ -z "$bin" ]; then
+        echo "Still no executable named htfpp found in $TOP/$dist (even after trying to build it)" >&2
+        echo "TOP=$TOP" >&2
+        echo "dist=$dist" >&2
+        find "$TOP/$dist" -type f >&2
+        exit 1
+    fi
 fi
 "$bin" "$@"
diff --git a/stack-ghc-7.10.yaml b/stack-ghc-7.10.yaml
new file mode 100644
--- /dev/null
+++ b/stack-ghc-7.10.yaml
@@ -0,0 +1,5 @@
+resolver: lts-6.35
+flags: {}
+packages:
+- '.'
+extra-deps: []
diff --git a/stack-ghc-8.0.yaml b/stack-ghc-8.0.yaml
new file mode 100644
--- /dev/null
+++ b/stack-ghc-8.0.yaml
@@ -0,0 +1,5 @@
+resolver: lts-9.21
+flags: {}
+packages:
+- '.'
+extra-deps: []
diff --git a/stack-ghc-8.4.yaml b/stack-ghc-8.4.yaml
new file mode 100644
--- /dev/null
+++ b/stack-ghc-8.4.yaml
@@ -0,0 +1,6 @@
+resolver: nightly-2018-03-31
+flags: {}
+packages:
+- '.'
+extra-deps:
+- haskell-src-1.0.3.0
diff --git a/stack.yaml b/stack.yaml
new file mode 100644
--- /dev/null
+++ b/stack.yaml
@@ -0,0 +1,5 @@
+resolver: lts-11.2
+flags: {}
+packages:
+- '.'
+extra-deps: []
diff --git a/tests/ThreadPoolTest.hs b/tests/ThreadPoolTest.hs
--- a/tests/ThreadPoolTest.hs
+++ b/tests/ThreadPoolTest.hs
@@ -31,7 +31,6 @@
                           [x] -> return (read x, 100)
                           [x, y] -> return (read x, read y)
                           _ -> usage
-       threadPoolTestStop
        threadPoolTest (1, i) nEntries
        return ()
     where
