-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathdoctest.sh
executable file
·53 lines (49 loc) · 1 KB
/
doctest.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/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 \
-XDefaultSignatures \
-XDeriveFoldable \
-XDeriveFunctor \
-XDeriveGeneric \
-XDeriveTraversable \
-XEmptyCase \
-XFlexibleContexts \
-XFlexibleInstances \
-XFunctionalDependencies \
-XGADTs \
-XGeneralizedNewtypeDeriving \
-XInstanceSigs \
-XKindSignatures \
-XLambdaCase \
-XOverloadedLabels \
-XPatternSynonyms \
-XRankNTypes \
-XScopedTypeVariables \
-XTupleSections \
-XTypeApplications \
-XTypeFamilies \
-XTypeOperators \
-XViewPatterns
popd
}
if [ $# -eq 0 ]; then
dirs="optics-core optics-extra optics-th optics"
else
dirs="$@"
fi
for dir in $dirs; do
run_doctest "$dir" src
done