diff --git a/.gitignore b/.gitignore
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@
 **/cabal.sandbox.config
 **/idx/
 **/dist/
+dist-newstyle
 **/log/
 etc
 .stack-work
diff --git a/.travis.yml b/.travis.yml
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,6 @@
 # .travis.yml file for Extrapolate
 #
-# Copyright:   (c) 2017-2018 Rudy Matela
+# Copyright:   (c) 2017-2020 Rudy Matela
 # License:     3-Clause BSD  (see the file LICENSE)
 # Maintainer:  Rudy Matela <rudy@matela.com.br>
 
@@ -22,6 +22,9 @@
 - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
 - ghc --version
 - cabal --version
+- haddock --version
+- du -hd3 ~/.cabal ~/.ghc || true
+- du -hd4 ~/.stack || true
 - rm -f ~/.cabal/config && cabal update
 # Download and unpack the stack executable
 # "Once Travis whitelists the stack.dev files," simply include stack in the
@@ -31,35 +34,42 @@
 - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
 - stack config set system-ghc --global true
 - stack --version
-- cabal install leancheck speculate
+- cabal install leancheck express speculate || cabal install leancheck express speculate --lib
 
 script:
 - make && make test
-- make haddock HADDOCKFLAGS=
-#- travis_wait 30 cabal test
-- stack $STACKR --no-terminal --skip-ghc-check test --ghc-options=-O0
+- make haddock
+- make test-sdist
+- cabal test --ghc-option=-O0
+- stack --resolver $STACKVER --no-terminal --skip-ghc-check test --ghc-options=-O0
 
 matrix:
   allow_failures:
   - ghc: 'head'
   include:
   - ghc: 'head'
-    env:                   GHCVER=head         CABALVER=head
+    env:                   GHCVER=head         CABALVER=head   STACKVER=nightly-2020-03-28
     addons: {apt: {packages: [ghc-head,   cabal-install-head], sources: hvr-ghc}}
+  - ghc: '8.10'
+    env:                   GHCVER=8.10.1       CABALVER=3.2    STACKVER=nightly-2020-03-28
+    addons: {apt: {packages: [ghc-8.10.1, cabal-install-3.2],  sources: hvr-ghc}}
+  - ghc: '8.8'
+    env:                   GHCVER=8.8.3        CABALVER=3.0    STACKVER=lts-15.6
+    addons: {apt: {packages: [ghc-8.8.3,  cabal-install-3.0],  sources: hvr-ghc}}
   - ghc: '8.6'
-    env:                   GHCVER=8.6.3        CABALVER=2.4
-    addons: {apt: {packages: [ghc-8.6.3,  cabal-install-2.4],  sources: hvr-ghc}}
+    env:                   GHCVER=8.6.5        CABALVER=2.4    STACKVER=lts-14.27
+    addons: {apt: {packages: [ghc-8.6.5,  cabal-install-2.4],  sources: hvr-ghc}}
   - ghc: '8.4'
-    env:                   GHCVER=8.4.4        CABALVER=2.2
+    env:                   GHCVER=8.4.4        CABALVER=2.2    STACKVER=lts-12.26
     addons: {apt: {packages: [ghc-8.4.4,  cabal-install-2.2],  sources: hvr-ghc}}
   - ghc: '8.2'
-    env:                   GHCVER=8.2.2        CABALVER=2.0
+    env:                   GHCVER=8.2.2        CABALVER=2.0    STACKVER=lts-11.22
     addons: {apt: {packages: [ghc-8.2.2,  cabal-install-2.0],  sources: hvr-ghc}}
   - ghc: '8.0'
-    env:                   GHCVER=8.0.2        CABALVER=1.24
+    env:                   GHCVER=8.0.2        CABALVER=1.24   STACKVER=lts-9.21
     addons: {apt: {packages: [ghc-8.0.2,  cabal-install-1.24], sources: hvr-ghc}}
   - ghc: '7.10'
-    env:                   GHCVER=7.10.3       CABALVER=1.22   STACK_YAML=stack-lts-11.yaml
+    env:                   GHCVER=7.10.3       CABALVER=1.22   STACKVER=lts-6.35
     addons: {apt: {packages: [ghc-7.10.3, cabal-install-1.22], sources: hvr-ghc}}
   # we only support stack with GHC >= 7.10
   - ghc: '7.8'
@@ -69,10 +79,12 @@
     - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
     - ghc --version
     - cabal --version
+    - haddock --version
     - rm -f ~/.cabal/config && cabal update
     - cabal install Cabal==1.18.*
-    - cabal install leancheck speculate
+    - cabal install leancheck express speculate
     script:
     - make && make test
     - make haddock HADDOCKFLAGS=
+    - make test-sdist
     - cabal test
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -22,6 +22,10 @@
 
 To test if it installed correctly, follow through the next section.
 
+Starting from Cabal v3, you need to pass `--lib` to `cabal install`:
+
+	$ cabal install extrapolate --lib
+
 
 Using Extrapolate
 -----------------
diff --git a/extrapolate.cabal b/extrapolate.cabal
--- a/extrapolate.cabal
+++ b/extrapolate.cabal
@@ -1,5 +1,5 @@
 name:                extrapolate
-version:             0.4.1
+version:             0.4.2
 synopsis:            generalize counter-examples of test properties
 description:
   Extrapolate is a tool able to provide generalized counter-examples of test
@@ -63,13 +63,19 @@
                   , mk/ghcdeps
                   , mk/haddock-i
                   , mk/haskell.mk
+                  , mk/install-on
                   , stack.yaml
-                  , stack-lts-11.yaml
                   , test/model/bench/*.out
                   , test/model/eg/*.out
                   , test/sdist
-tested-with: GHC==8.6, GHC==8.4, GHC==8.2, GHC==8.0
-           , GHC==7.10, GHC==7.8
+tested-with: GHC==8.10
+           , GHC==8.8
+           , GHC==8.6
+           , GHC==8.4
+           , GHC==8.2
+           , GHC==8.0
+           , GHC==7.10
+           , GHC==7.8
 
 source-repository head
   type:            git
@@ -78,7 +84,7 @@
 source-repository this
   type:            git
   location:        https://github.com/rudymatela/extrapolate
-  tag:             v0.4.1
+  tag:             v0.4.2
 
 library
   exposed-modules: Test.Extrapolate
@@ -95,10 +101,10 @@
                  , Test.Extrapolate.Utils
   other-extensions:    TemplateHaskell, CPP
   build-depends: base >= 4 && < 5
-               , leancheck >= 0.9.1
+               , leancheck >= 0.9.3
                , template-haskell
-               , speculate >= 0.4.1
-               , express >= 0.1.0
+               , speculate >= 0.4.2
+               , express >= 0.1.3
   hs-source-dirs:      src
   default-language:    Haskell2010
 
diff --git a/mk/depend.mk b/mk/depend.mk
--- a/mk/depend.mk
+++ b/mk/depend.mk
@@ -305,11 +305,8 @@
   mk/Toplibs.hs
 src/Test/Extrapolate/ConditionalGeneralization.o: \
   src/Test/Extrapolate/Utils.hs \
-  src/Test/Extrapolate/TypeBinding.hs \
-  src/Test/Extrapolate/Testable.hs \
   src/Test/Extrapolate/Speculation.hs \
   src/Test/Extrapolate/Generalization.hs \
-  src/Test/Extrapolate/Generalizable.hs \
   src/Test/Extrapolate/Expr.hs \
   src/Test/Extrapolate/ConditionalGeneralization.hs
 src/Test/Extrapolate/Core.o: \
diff --git a/mk/ghcdeps b/mk/ghcdeps
--- a/mk/ghcdeps
+++ b/mk/ghcdeps
@@ -2,7 +2,7 @@
 #
 # ghcdeps: generate Haskell make dependencies for compiling with GHC.
 #
-# Copyright (c) 2015-2019 Rudy Matela.
+# Copyright (c) 2015-2020 Rudy Matela.
 # Distributed under the 3-Clause BSD licence.
 #
 # From a list of files provided on standard input,
diff --git a/mk/haddock-i b/mk/haddock-i
--- a/mk/haddock-i
+++ b/mk/haddock-i
@@ -2,7 +2,7 @@
 #
 # haddock-i: list haddock's -i parameters.
 #
-# Copyright (c) 2015-2019 Rudy Matela.
+# Copyright (c) 2015-2020 Rudy Matela.
 # Distributed under the 3-Clause BSD licence.
 #
 # $ haddock-i <package1> <package2> ... <packageN>
diff --git a/mk/haskell.mk b/mk/haskell.mk
--- a/mk/haskell.mk
+++ b/mk/haskell.mk
@@ -1,6 +1,6 @@
 # Implicit rules for compiling Haskell code.
 #
-# Copyright (c) 2015-2019 Rudy Matela.
+# Copyright (c) 2015-2020 Rudy Matela.
 # Distributed under the 3-Clause BSD licence.
 #
 # You can optionally configure the "Configuration variables" below in your main
@@ -39,7 +39,7 @@
 # ALL_HSS: all Haskell files
 # You can override ALL/LIB_HSS in your main Makefile
 LIST_LIB_HSS ?= find src -name "*.hs"
-LIST_ALL_HSS ?= find \( -path "./dist" -o -path "./.stack-work" \) -prune \
+LIST_ALL_HSS ?= find \( -path "./dist*" -o -path "./.stack-work" -o -path "./Setup.hs" \) -prune \
                      -o -name "*.*hs" -print
 LIB_HSS ?= $(shell $(LIST_LIB_HSS))
 ALL_HSS ?= $(shell $(LIST_ALL_HSS))
@@ -97,7 +97,7 @@
 haddock: doc/index.html
 
 clean-haddock:
-	rm -f doc/*.{html,css,js,png,gif,json} doc/src/*.{html,css,js} README.html
+	rm -f doc/*.{html,css,js,png,gif,json} doc/src/* README.html
 
 upload-haddock:
 	@echo "use \`cabal upload -d' instead"
diff --git a/mk/install-on b/mk/install-on
new file mode 100644
--- /dev/null
+++ b/mk/install-on
@@ -0,0 +1,30 @@
+#!/bin/bash
+#
+# mk/install-on: install or updates the mk folder on a Haskell project
+#
+# usage: ./mk/install-on path/to/project
+#
+# This assumes a few things:
+#
+# * tests are stored in a "test/" folder
+# * sources are stored in a "src/" folder
+set -e
+
+errxit() {
+	echo "$@" > /dev/stderr
+	exit 1
+}
+
+src=`dirname $0`/..
+dst="$1"
+
+[ -n "$dst" ] || errxit "destination folder not provided"
+
+mkdir -p $dst/mk
+mkdir -p $dst/test
+
+cp $src/mk/ghcdeps    $dst/mk/ghcdeps
+cp $src/mk/haddock-i  $dst/mk/haddock-i
+cp $src/mk/haskell.mk $dst/mk/haskell.mk
+cp $src/mk/install-on $dst/mk/install-on
+cp $src/test/sdist    $dst/test/sdist
diff --git a/stack-lts-11.yaml b/stack-lts-11.yaml
deleted file mode 100644
--- a/stack-lts-11.yaml
+++ /dev/null
@@ -1,13 +0,0 @@
-resolver: lts-11.22
-
-packages:
-- .
-
-extra-deps:
-- leancheck-0.9.1
-- speculate-0.4.1
-- express-0.1.1
-
-flags: {}
-
-extra-package-dbs: []
diff --git a/stack.yaml b/stack.yaml
--- a/stack.yaml
+++ b/stack.yaml
@@ -1,13 +1,9 @@
-resolver: lts-13.30
+resolver: lts-15.6 # or ghc-8.8.3
 
 packages:
 - .
 
 extra-deps:
-- leancheck-0.9.1
-- speculate-0.4.1
-- express-0.1.1
-
-flags: {}
-
-extra-package-dbs: []
+- leancheck-0.9.3
+- speculate-0.4.2
+- express-0.1.3
diff --git a/test/sdist b/test/sdist
--- a/test/sdist
+++ b/test/sdist
@@ -1,33 +1,40 @@
 #!/bin/bash
 #
-# test-sdist: tests the package generated by "cabal sdist".
+# test/sdist: tests the package generated by "cabal sdist".
 #
-# Copyright (c) 2015-2018 Rudy Matela.
+# Copyright (c) 2015-2020 Rudy Matela.
 # Distributed under the 3-Clause BSD licence.
+
+set -xe
+
 export LC_ALL=C  # consistent sort
+
 pkgver=` cat *.cabal | grep "^version:" | sed -e "s/version: *//"`
 pkgname=`cat *.cabal | grep "^name:"    | sed -e "s/name: *//"`
-pkg=$pkgname-$pkgver
-set -x
-cabal sdist &&
-cd dist &&
-tar -tf $pkg.tar.gz | sort --ignore-case          > ls-cabal-i  &&
-tar -tf $pkg.tar.gz | sort --ignore-case --unique > ls-cabal-iu &&
-diff -rud ls-cabal-i ls-cabal-iu &&
-rm -f ls-cabal ls-cabal-ignore-case &&
-if [ -d ../.git ]
+pkgbase=$pkgname-$pkgver
+
+cabal sdist
+
+# Try to find the package generated by cabal.
+pkg=`find dist* -name $pkgbase.tar.gz`
+[ -f "$pkg" ]
+# If the script fails here, either:
+#   * no package was generated
+#   * there are packages in both dist and dist-newstyle folders.
+
+tmp=`mktemp -d /tmp/test-sdist-XXXXXXXXXX`
+
+# Test if our file is compatible with case-insensitive filesystems.
+tar -tf $pkg | sort --ignore-case          > $tmp/ls-cabal-i
+tar -tf $pkg | sort --ignore-case --unique > $tmp/ls-cabal-iu
+diff -rud $tmp/ls-cabal-i $tmp/ls-cabal-iu
+
+if [ -d .git ]
 then
-	# on git repo, test if files are the same
-	git -C .. ls-files                                      | sort > ls-git   &&
-	tar -tf $pkg.tar.gz | grep -v "/$" | sed -e "s,$pkg/,," | sort > ls-cabal &&
-	diff -rud ls-git ls-cabal &&
-	rm -f ls-git ls-cabal
-else
-	# outside of git repo, test build
-	rm -rf $pkg/ &&
-	tar -xzf $pkg.tar.gz &&
-	cd $pkg/ &&
-	cabal configure --enable-tests --enable-benchmarks &&
-	cabal build &&
-	cabal test
+	# Test if files included by cabal are the same as files tracked in git.
+	git ls-files                                         | sort > $tmp/ls-git
+	tar -tf $pkg | grep -v "/$" | sed -e "s,$pkgbase/,," | sort > $tmp/ls-cabal
+	diff -rud $tmp/ls-git $tmp/ls-cabal
 fi
+
+rm -r $tmp
