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
|
#! /bin/sh
#
# hat-trans script for performing the trace transformation
# on a Haskell'98 source file. The original Module.hs
# is supplemented with Module.T.hs.
#
# HATBINDIR is where to find driver scripts,
# HATLIBDIR is where to find executable programs and libraries,
# HATINCDIR is where to find the hx files for the standard libraries,
# MACHINE is used to choose which architecture's binaries and
# libraries to use.
HATBINDIR=${NHC98BINDIR-ScriptDir}
HATLIBDIR=${NHC98LIBDIR-ExecutableDir}
MACHINE=${MACHINE-"`$HATBINDIR/harch`"}
# -- HATINCDIR is blank when building the hat library, but must be set to
# -- the installed location of the .hx files afterwards.
HATINCDIR=
# -- Determine whether any of the input files are literate haskell.
unlit=""
for arg in "$@"
do
case $arg in
*.lhs) unlit="-unlit";;
esac
done
# -- Now call the real program.
exec $HATLIBDIR/$MACHINE/`basename $0` -P$HATINCDIR $unlit "$@"
exit 0 # never reached...
|