MLton 20100608 SXML
Home  Index  
SXML is an IntermediateLanguage, translated from XML by Monomorphise, optimized by SXMLSimplify, and translated by ClosureConvert to SSA.

Description

SXML is a simply-typed version of XML.

Implementation

[WWW]sxml.sig [WWW]sxml.fun
[WWW]sxml-tree.sig

Type Checking

SXML shares the type checker for XML.

Details and Notes

There are only two differences between XML and SXML. First, SXML val, fun, and datatype declarations always have an empty list of type variables. Second, SXML variable references always have an empty list of type arguments. Constructors uses can only have a nonempty list of type arguments if the constructor is a primitive.

Although we could rely on the type system to enforce these constraints by parameterizing the XML signature, StephenWeeks did so in a previous version of the compiler, and the software engineering gains were not worth the effort.


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