Abstract
ML modules provide hierarchical namespace management, as well as fine-grained control over the propagation of type information, but they do not allow modules to be broken up into mutually recursive, separately compilable components. Mixin modules facilitate recursive linking of separately compiled components, but they are not hierarchically composable and typically do not support type abstraction. We synthesize the complementary advantages of these two mechanisms in a novel module system design we call MixML.
A MixML module is like an ML structure in which some of the components are specified but not defined. In other words, it unifies the ML structure and signature languages into one. MixML seamlessly integrates hierarchical composition, translucent MLstyle data abstraction, and mixin-style recursive linking. Moreover, the design of MixML is clean and minimalist; it emphasizes how all the salient, semantically interesting features of the ML module system (as well as several proposed extensions to it) can be understood simply as stylized uses of a small set of orthogonal underlying constructs, with mixin composition playing a central role.
Supplemental Material
Available for Download
Supplemental material for: Mixin' up the ML module system
- D. Ancona, S. Fagorzi, E. Moggi, and E. Zucca. Mixin modules and computational effects. In ICALP '03. Google Scholar
Digital Library
- Davide Ancona and Elena Zucca. A theory of mixin modules: Basic and derived operators. Mathematical Structures in Computer Science, 8(4):401--446, 1998. Google Scholar
Digital Library
- Davide Ancona and Elena Zucca. A calculus of module systems. Journal of Functional Programming, 12(2):91--132, 2002. Google Scholar
Digital Library
- Gilad Bracha and William Cook. Mixin-based inheritance. In OOPSLA '90. Google Scholar
Digital Library
- Gilad Bracha and Gary Lindstrom. Modularity meets inheritance. In ICCL '92.Google Scholar
- Karl Crary, Robert Harper, and Sidd Puri. What is a recursive module? In PLDI '99. Google Scholar
Digital Library
- Derek Dreyer. A type system for recursive modules. In ICFP '07. Google Scholar
Digital Library
- Derek Dreyer. A type system for well-founded recursion. In POPL '04. Google Scholar
Digital Library
- Derek Dreyer. Recursive type generativity. Journal of Functional Programming, 17(4&5):433--471, 2007. Google Scholar
Digital Library
- Derek Dreyer, Karl Crary, and Robert Harper. A type system for higher-order modules. In POPL '03. Google Scholar
Digital Library
- Derek Dreyer and Andreas Rossberg. MixML (project website). http://www.mpi-sws.mpg.de/~rossberg/mixml/.Google Scholar
- Dominic Duggan. Type-safe linking with recursive DLLs and shared libraries. ACM Transactions on Programming Languages and Systems, 24(6):711--804, 2002. Google Scholar
Digital Library
- Dominic Duggan and Constantinos Sourelis. Mixin modules. In ICFP '96.Google Scholar
- Matthew Flatt and Matthias Felleisen. Units: Cool modules for HOT languages. In PLDI '98. Google Scholar
Digital Library
- Robert Harper and Mark Lillibridge. A type-theoretic approach to higher-order modules with sharing. In POPL '94. Google Scholar
Digital Library
- Robert Harper and Chris Stone. A type-theoretic interpretation of Standard ML. In Proof, Language, and Interaction: Essays in Honor of Robin Milner. MIT Press, 2000. Google Scholar
Digital Library
- Tom Hirschowitz and Xavier Leroy. Mixin modules in a call-by-value setting. ACM Transactions on Programming Languages and Systems, 27(5):857--881, 2005. Google Scholar
Digital Library
- Mark P. Jones. Using parameterized signatures to express modular structure. In POPL '96. Google Scholar
Digital Library
- Xavier Leroy. Applicative functors and fully transparent higher-order modules. In POPL '95. Google Scholar
Digital Library
- Xavier Leroy. Manifest types, modules, and separate compilation. In POPL '94. Google Scholar
Digital Library
- Xavier Leroy. A modular module system. Journal of Functional Programming, 10(3):269--303, 2000. Google Scholar
Digital Library
- Xavier Leroy. A proposal for recursive modules in Objective Caml, 2003. http://caml.inria.fr/pub/papers/xleroy-recursive_modules-03.pdf.Google Scholar
- David MacQueen. Modules for Standard ML. In LFP '84. Google Scholar
Digital Library
- Robin Milner, Mads Tofte, Robert Harper, and David MacQueen. The Definition of Standard ML (Revised). MIT Press, 1997. Google Scholar
Digital Library
- D. A. Moon. Object-oriented programming with Flavors. In OOPSLA '86. Google Scholar
Digital Library
- Keiko Nakata and Jacques Garrigue. Recursive modules for programming. In ICFP '06. Google Scholar
Digital Library
- Nathaniel Nystrom, Xin Qi, and Andrew Myers. J&: Nested intersection for scalable software composition. In OOPSLA '06. Google Scholar
Digital Library
- M. Odersky, V. Cremet, C. Röckl, and M. Zenger. A nominal theory of objects with dependent types. In ECOOP '03.Google Scholar
- Martin Odersky and Matthias Zenger. Scalable component abstractions. In OOPSLA '05. Google Scholar
Digital Library
- Scott Owens and Matthew Flatt. From structures and functors to modules and units. In ICFP '06. Google Scholar
Digital Library
- Norman Ramsey, Kathleen Fisher, and Paul Govereau. An expressive language of signatures. In ICFP '05. Google Scholar
Digital Library
- Andreas Rossberg. The missing link - dynamic components for ML. In ICFP '06. Google Scholar
Digital Library
- Claudio V. Russo. Recursive structures for Standard ML. In ICFP '01. Google Scholar
Digital Library
Index Terms
Mixin' up the ML module system
Recommendations
Mixin’ Up the ML Module System
ML modules provide hierarchical namespace management, as well as fine-grained control over the propagation of type information, but they do not allow modules to be broken up into mutually recursive, separately compilable components. Mixin modules ...
Mixin' up the ML module system
ICFP '08: Proceedings of the 13th ACM SIGPLAN international conference on Functional programmingML modules provide hierarchical namespace management, as well as fine-grained control over the propagation of type information, but they do not allow modules to be broken up into mutually recursive, separately compilable components. Mixin modules ...
Type inference, principal typings, and let-polymorphism for first-class mixin modules
Proceedings of the tenth ACM SIGPLAN international conference on Functional programmingA mixin module is a programming abstraction that simultaneously generalizes λ-abstractions, records, and mutually recursive definitions. Although various mixin module type systems have been developed, no one has investigated principal typings or ...







Comments