A type discipline for program modules

  • Robert Harper
  • Robin Milner
  • Mads Tofte
Session CFLP 6 Types, Polymorphism And Abstract Data Type Specifications
Part of the Lecture Notes in Computer Science book series (LNCS, volume 250)


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.


  1. [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
  2. [Har86]
    Robert Harper. Introduction to Standard ML. Technical Report, University of Edinburgh, September 1986.Google Scholar
  3. [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
  4. [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
  5. [Mil78]
    Robin Milner. A theory of type polymorphism in programming languages. Journal of Computer and System Sciences, 17:348–375, 1978.Google Scholar
  6. [Plo81]
    Gordon Plotkin. A Structural Approach to Operational Semantics. Technical Report DAIMI-FN-19, Computer Science Department, Aarhus University, Denmark, 1981.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1987

Authors and Affiliations

  • Robert Harper
    • 1
  • Robin Milner
    • 1
  • Mads Tofte
    • 1
  1. 1.Laboratory for Foundations of Computer ScienceUniversity of EdinburghEdinburghUnited Kingdom

Personalised recommendations