File: hat-trans.inst

package info (click to toggle)
hat 2.02-12
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,296 kB
  • ctags: 668
  • sloc: haskell: 64,394; ansic: 6,112; sh: 888; makefile: 451
file content (32 lines) | stat: -rw-r--r-- 979 bytes parent folder | download
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...