effectful/doctest.sh
Andrzej Rybczak 109d441656
Prevent possibility of mixing functions for different dispatch types (#49)
* Prevent possibility of mixing functions for different dispatch types

* Rename Rep to EffectR

* Turn DataR into a data family

* Fix doctest with GHC 9.2.1

* HandlerR -> Handler, EffectR -> EffectRep, DataR -> StaticRep

* Safer unsafeConsEnv

* Better haddock

* Rename *Data operations to *StaticRep

* Haddock adjustment

* More haddock adjustments

* One more haddock adjustment
2022-01-07 20:28:19 +01:00

43 lines
839 B
Bash
Executable File

#!/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 \
-XLambdaCase \
-XMultiParamTypeClasses \
-XNoStarIsType \
-XRankNTypes \
-XRecordWildCards \
-XRoleAnnotations \
-XScopedTypeVariables \
-XStandaloneDeriving \
-XTupleSections \
-XTypeApplications \
-XTypeFamilies \
-XTypeOperators
popd
}
run_doctest effectful-core src
run_doctest effectful src