Reference. A category-theoretic account of program modules [moggi-1989]
The type-theoretic explanation of modules proposed to date (for programming languages like ML) is unsatisfactory, in that it fails to reflect the distinction between compile-time, when type-expressions are evaluated, and run-time, when value-expressions are evaluated. This paper proposes a new explanation based on “programming languages as indexed categories” and illustrates, as an application, how ML should be extended to support higher order modules. The paper also outlines a methodology for a modular approach to programming languages, where programming languages (of a certain kind) are identified with objects in a 2-category and features are viewed as 2-categorical notions.