MLton 20100608 XMLSimplifyTypes
Home  Index  
XMLSimplifyTypes is an optimization pass for the XML IntermediateLanguage, invoked from XMLSimplify.

Description

This pass simplifies types in an XML program, eliminating all unused type arguments.

Implementation

[WWW]simplify-types.sig [WWW]simplify-types.fun

Details and Notes

It first computes a simple fixpoint on all the datatype declarations to determine which datatype tycon args are actually used. Then it does a single pass over the program to determine which polymorphic declaration type variables are used, and rewrites types to eliminate unused type arguments.

This pass should eliminate any spurious duplication that the Monomorphise pass might perform due to phantom types.


Last edited on 2006-11-02 17:56:47 by MatthewFluet.