
malcolm: Fri Jun 29 16:40:45 CEST 2001 Update of /usr/src/master/nhc/src/compiler98 In directory hinken:/tmp/cvs-serv14384 Modified Files: Flags.hs Main.hs Makefile OsOnly.hs PrettySyntax.hs Added Files: AuxFile.hs AuxFixity.hs AuxLabelAST.hs TraceId.hs Log Message: -------------------------------------------------------------- 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.
participants (1)
-
malcolmīŧ sparud.net