effectful/doctest.sh

45 lines
896 B
Bash
Raw Normal View History

#!/bin/sh
#
# For this to work you need to:
#
# - Put "write-ghc-environment-files: always" in your cabal.project.local.
#
# - Compile doctest with the same GHC version the project currently uses.
#
set -eu
run_doctest() {
pushd "${1}"
doctest \
"${2}" \
-XHaskell2010 \
-XBangPatterns \
-XConstraintKinds \
-XDataKinds \
-XDeriveFunctor \
-XDeriveGeneric \
-XFlexibleContexts \
-XFlexibleInstances \
-XGADTs \
-XGeneralizedNewtypeDeriving \
2024-04-12 21:35:44 +03:00
-XImportQualifiedPost \
-XLambdaCase \
-XMultiParamTypeClasses \
-XNoStarIsType \
-XRankNTypes \
-XRecordWildCards \
-XRoleAnnotations \
-XScopedTypeVariables \
-XStandaloneDeriving \
-XTupleSections \
-XTypeApplications \
-XTypeFamilies \
-XTypeOperators
popd
}
run_doctest effectful-core src
run_doctest effectful-th src
run_doctest effectful src