An Implementation of Standard ML Modules

Standard ML includes a set of module constructs that support programming in the large. These constructs extend ML’s basic polymorphic type system by introducing the dependent types of Martin Lo "f’s Intuitionistic Type Theory. This paper discusses the problems involved in implementing Standard ML’s modules and describes a practical, efficient solution to these problems. The representations and algorithms of this implementation were inspired by a detailed formal semantics of Standard ML developed by Milner, Tofte, and Harper. The implementation is part of a new Standard ML compiler that is written in Standard ML using the module system.