Rechercher une page de manuel

Chercher une autre page de manuel:


Langue: en

Version: 263814 (debian - 07/07/09)

Section: 1 (Commandes utilisateur)


hat-trans - transform a Haskell module for tracing with the Hat system


hat-trans [-cpp [cppopts]] [-Idir]* [-package p]* [transopts] Mod.[l]hs ...


hat-trans is a batch tool for transforming a Haskell program into one which calculates its own trace. It transforms each source module Mod 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 Hat/ (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 the directory Hat/. 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 -package hat to its command-line.

Alternatively, rather than invoking hat-trans and a compiler by hand on your source files, but it is often more convenient to allow hmake(1) 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 dir as an additional root when searching for imported modules.
-package p
The given source module(s) use standard modules from within the package p (this automatically adds the installed package root directory to the import search path).
Invoke the C preprocessor on the source code before it is transformed. This is useful for conditional transformation. One cpp symbol is predefined, __HAT__, whose value is the version number of the Hat toolset, expressed as a three digit integer, e.g. version 2.02 gives __HAT__=202. If the -cpp option is given, the preprocessor is invoked on all the files given as arguments. An alternative which only invokes cpp on the files that really need it, is to place a Haskell comment containing the string "-cpp" as the first line of a source file.
Define the cpp symbol sym to have the value val
Define the cpp symbol sym
Undefine the cpp symbol sym


The following options are available to change the usual transformation behaviour.
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 w (default=80).
Set layout nesting indentation (in characters) to i (default=2).
Use fully qualified names in the output. This is off by default, because the output may refer to modules which are not explicitly imported.


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)
Il y a deux sortes de femmes : celles qui sont jeunes et jolies, et
celles qui me trouvent bien.
-+- Sacha Guitry -+-