forked from nick8325/quickcheck
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make-hugs
executable file
·27 lines (21 loc) · 909 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
#!/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 \
"$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."