[MLton] Printing an SXML representation

Stephen Weeks MLton@mlton.org
Fri, 17 Mar 2006 14:43:07 -0800


> Is there an easy way to get a printout of the SXML phase for a
> program?

Compile with 

  -keep-pass monomorphise
  -keep-pass sxmlSimplify
  -show-types true

You can see the pass names if you compile with -verbose 2.  The
outputs will be saved in

  <file>.monomorphise.sxml
  <file>.sxmlSimplify.sxml
   
"monomorphise" is the pass that produces SXML, so looking at that will
show you the SXML before simplification.  sxmlSimplify does shrink
reductions and polyvariant function duplication on the SXML.  Keeping
the output of that pass will show you the last SXML IL, just before
closure conversion.

Using "-show-types true" is optional, but it is often helpful to see
the types of variables in the ILs.

> Also, can you add me to the mailing list?

You're welcome to join the list.  To subscribe, follow the links at

  http://mlton.org/Contact