Section: User Commands (1)
Return to Main Contents
hat-trans - transform a Haskell module for tracing with the Hat system
is a batch tool for transforming a Haskell program into one which
calculates its own trace. It transforms each source module
supplied as arguments. The modules may be ordinary source (.hs)
or literate source (.lhs). The output is a transformed module,
whose name is the original module name prefixed with "Hat.", and it
is written to a file of similar name in the local subdirectory
(except that .lhs becomes .hs, because the literate part is stripped).
If the subdirectory does not exist, it is created. The original
source filename may include a directory path, in which case the
transformed module is placed in an identical directory tree underneath
This facilitates the easy transformation of modules within the
hierarchical module namespace.
The resulting transformed modules can be compiled and linked in the
normal way with your favorite Haskell compiler, with the addition
of the option
to its command-line.
Alternatively, rather than invoking
and a compiler by hand on your source files, but it is often more
convenient to allow
to invoke the tools automatically, especially because it also
determines dependencies between modules and attempts to perform
the minimum re-compilation necessary. Simple give the extra option
"-hat" to hmake.
Use the directory
as an additional root when searching for imported modules.
The following options are available to change the usual transformation
Unliterate the source code. (Automatic if the file is .lhs)
Do not unliterate the source code. (Automatic if the file is .hs)
Treat underscores strictly as lowercase (default).
Treat underscores as invisible, e.g. _f is varid, _F is conid.
Treat prelude definitions specially.
Do not treat definitions specially (default).
Make this a "trusted" module.
Make this an "untrusted" module (default).
Set output width (in characters) to
Set layout nesting indentation (in characters) to
Use fully qualified names in the output. This is off by default,
because the output may refer to modules which are not explicitly
The following options are available to examine the internal progress
of the transformation.
Show input after lexical analysis.
Show syntax tree after parsing.
Show syntax tree after tracing translation.
hmake(1), hat-detect(1), hat-observe(1), hat-trail(1), hat-stack(1)
- GENERAL OPTIONS
- TRANSFORMATION OPTIONS
- EXAMINATION OPTIONS
- SEE ALSO
This document was created by
using the manual pages.
Time: 16:04:58 GMT, July 03, 2003