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

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.