Abstract
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.
Chapter PDF
References
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.
Robert Harper. Introduction to Standard ML. Technical Report, University of Edinburgh, September 1986.
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.
David MacQueen. Using dependent types to express modular structure. In Proceedings of the 13th ACM Symposium on the Principles of Programming Languages, 1986.
Robin Milner. A theory of type polymorphism in programming languages. Journal of Computer and System Sciences, 17:348–375, 1978.
Gordon Plotkin. A Structural Approach to Operational Semantics. Technical Report DAIMI-FN-19, Computer Science Department, Aarhus University, Denmark, 1981.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1987 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Harper, R., Milner, R., Tofte, M. (1987). A type discipline for program modules. In: Ehrig, H., Kowalski, R., Levi, G., Montanari, U. (eds) TAPSOFT '87. TAPSOFT 1987. Lecture Notes in Computer Science, vol 250. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0014988
Download citation
DOI: https://doi.org/10.1007/BFb0014988
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-17611-4
Online ISBN: 978-3-540-47717-4
eBook Packages: Springer Book Archive