[cvs-nhc98] patch applied (hat): Add new trace transformation phase
(just after parsing)
Malcolm Wallace
Malcolm.Wallace at cs.york.ac.uk
Tue Oct 10 07:06:32 EDT 2006
Wed Jul 25 06:17:08 PDT 2001 olaf
* Add new trace transformation phase (just after parsing)
The new module TraceTrans is a completely rewritten version of DbgDataTrans and DbgTrans. If you call nhc with -hx it will, after parsing, read and write the .hx files, then apply the new transformation and finally pretty print the result of the transformation. Nearly all names are prefixed by a character.
Note that the new transformation only is for untrusted traced modules. Until a wrapping scheme for trusted modules makes the prelude available, the transformation cannot be properly trusted.
The transformation also needs some new trace generating combinators that are not yet implemented:
mkModule, mkPos, mkAtomId
It also assumes that all combinators are imported from module "T", not the prelude any more (but easy to change for testing).
A few language constructs are still missing, but it should yield syntactically correct transformed Haskell programs for most input.
To handle imports (and exports) of the form TyCon(..) correctly, TraceId should provide an additinal function tyConDataCons :: TraceId -> Maybe [TraceId] that returns the data constructors for a type constructors, if the traceId is a type constructor and all data constructors are exported.
M ./src/compiler98/DbgDataTrans.hs -2 +2
M ./src/compiler98/Main.hs -6 +10
M ./src/compiler98/Remove1_3.hs -3 +4
M ./src/compiler98/TokenId.hs -1 +1
M ./src/compiler98/TokenInt.hs -1 +1
M ./src/compiler98/TraceId.hs -3 +23
A ./src/compiler98/TraceTrans.hs
M ./src/hattrans/TraceId.hs -3 +23
A ./src/hattrans/TraceTrans.hs
More information about the Cvs-nhc98
mailing list