[MLton] Printing an SXML representation

Matthew Fluet fluet@cs.cornell.edu
Fri, 17 Mar 2006 17:47:52 -0500 (EST)


> We are working on adding a SXML -> CPS transform into MLton. Currently we
> are having a hard time grasping how exactly some of SXML works. Is there
> an easy way to get a printout of the SXML phase for a program? Would we
> need to edit the source?

Use the "-keep-pass sxmlSimplify" option to save the SXML of the program 
(after it has been simplified).  If you compile with "-verbose 2", you 
will see a list of all the passes as they are executed.  You can 
"-keep-pass *" any of them; many of the optimization passes will give you 
both a .pre and a .post file; the major passes will just give you the 
output of the pass.