15-150: Principles of Functional Programming

Lecture 16: Modules

Today we began our discussion of SML's module system. The Basis Library is built on top of this system and the system is more generally useful for software development, particularly as support for large projects involving many interfaces. Signatures are specifications of those interfaces; structures are implementations. In many instances one may wish to hide particulars of an implementation from a user, perhaps to prevent the user from breaking an abstraction barrier. The module system provides tools to ensure such data hiding. In turn, that allows a developer to alter the details of an implementation, without breaking a client's code, so long as both adhere to the interface described by the signatures they use.

Key Concepts

Sample Code

Some Notes on Modules

Slides from Lecture