-
Notifications
You must be signed in to change notification settings - Fork 121
/
make-hugs
executable file
·28 lines (22 loc) · 978 Bytes
/
make-hugs
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
#!/bin/bash
set -e
TOPDIR=$(dirname "$0")
TARGETDIR=$TOPDIR/quickcheck-hugs
find "$TOPDIR/src" -name '*.hs' | while read -r src; do
tgt="$TARGETDIR/$(echo "$src" | sed "s/^$TOPDIR\/src"'//')"
echo "Processing $src -> $tgt"
mkdir -p "$(dirname "$tgt")"
# If you want to switch on and off other features, look in
# QuickCheck.cabal to see what's available, or submit a patch
# adding a new -DNO_... flag.
cpphs --noline -DOLD_RANDOM -DNO_SPLITMIX -DNO_TEMPLATE_HASKELL \
-DNO_CTYPES_CONSTRUCTORS -DNO_FOREIGN_C_USECONDS -DNO_GENERICS \
-DNO_SAFE_HASKELL -DNO_POLYKINDS -DNO_MONADFAIL -DNO_TIMEOUT \
-DNO_NEWTYPE_DERIVING -DNO_TYPEABLE -DNO_GADTS -DNO_TRANSFORMERS \
-DNO_DEEPSEQ -DNO_EXTRA_METHODS_IN_APPLICATIVE -DNO_CALLSTACK \
-DNO_SEMIGROUP -DNO_EXISTENTIAL_FIELD_SELECTORS \
"$src" > "$tgt"
done
echo "A Hugs-compatible version of QuickCheck is now"
echo "available in the quickcheck-hugs directory."
echo "Load it with hugs -98."