A type discipline for program modules
The ML modules system is organized around the notions of structure, signature, and functor. A structure is an encapsulated declaration of data types and values, a signature is a “type” or specification of a structure, and a functor is a function taking structures to structures. We present a static semantics for a fragment of this system in the style of Plotkin's operational semantics. The treatment of structures and signatures has interesting parallels with the type assignment rules for ML given by Damas and Milner. In particular there is a notion of principal typing.
- [DM82]Luis Damas and Robin Milner. Principal type schemes for functional programs. In Proceedings of the 9th ACM Symposium on the Principles of Programming Languages, pages 207–212, 1982.Google Scholar
- [Har86]Robert Harper. Introduction to Standard ML. Technical Report, University of Edinburgh, September 1986.Google Scholar
- [Mac86a]David MacQueen. Modules for Standard ML. In Standard ML, by Robert Harper and David MacQueen and Robin Milner, Technical Report ECS-LFCS-86-2, Laboratory for the Foundations of Computer Science, Edinburgh University, March 1986.Google Scholar
- [Mac86b]David MacQueen. Using dependent types to express modular structure. In Proceedings of the 13th ACM Symposium on the Principles of Programming Languages, 1986.Google Scholar
- [Mil78]Robin Milner. A theory of type polymorphism in programming languages. Journal of Computer and System Sciences, 17:348–375, 1978.Google Scholar
- [Plo81]Gordon Plotkin. A Structural Approach to Operational Semantics. Technical Report DAIMI-FN-19, Computer Science Department, Aarhus University, Denmark, 1981.Google Scholar