[cvs-nhc98] patch applied (hat):
--------------------------------------------------------------
Malcolm Wallace
Malcolm.Wallace at cs.york.ac.uk
Tue Oct 10 07:05:46 EDT 2006
Fri Jun 29 07:40:45 PDT 2001 malcolm
* --------------------------------------------------------------
Portability: preparation for moving the tracing transformation
to an early phase of the compiler.
----------------------------------
The tracing transformation will eventually move from its current
position to be just after lexing/parsing. This commit prepares the
ground in various ways for that move.
* There is a new "auxiliary" information file generated for every
module. Its extension is .hx, and it holds arity and fixity
information for every exported identifier. This means that
imports must be chased to read .hx files (separate from the
ordinary .hi file chasing).
* There is a new type TraceId, which associates the current TokenId
type with auxiliary information about arity and let/lambda-bound.
* The new compiler flag -hx causes .hx information to be generated,
and the abstract syntax tree to be completely relabelled from
TokenIds to TraceIds. (The relabelling also sorts out fixity,
so that all ambiguous infix expressions are changed to simple
applications.)
* At the moment, with the -hx flag, the compiler simply pretty-prints
the relabelled syntax tree and then stops. The /plan/ is that the
tracing transformation will take the relabelled tree as input
and generate a new syntax tree, with the type dropped back down
to simple TokenIds. This tree could then either be pretty-printed
for input to another compiler, or simply carried on through the
normal nhc98 middle and back end.
Issues still to be addressed:
* The .hx information currently takes no account of qualified identifiers.
* Class methods have no arity information.
A ./src/compiler98/AuxFile.hs
A ./src/compiler98/AuxFixity.hs
A ./src/compiler98/AuxLabelAST.hs
M ./src/compiler98/Flags.hs -4 +7
M ./src/compiler98/Main.hs -14 +30
M ./src/compiler98/Makefile -1 +2
M ./src/compiler98/OsOnly.hs +2
M ./src/compiler98/PrettySyntax.hs -7 +30
A ./src/compiler98/TraceId.hs
A ./src/hattrans/AuxFile.hs
A ./src/hattrans/AuxFixity.hs
A ./src/hattrans/AuxLabelAST.hs
M ./src/hattrans/Flags.hs -4 +7
A ./src/hattrans/TraceId.hs
More information about the Cvs-nhc98
mailing list