Non-dependent Types for Standard ML Modules

Two of the distinguishing features of the Standard ML modules language are its term dependent type syntax and the use of type generativity in its static semantics. From a type-theoretic perspective, the former suggests that the language involves first-order dependent types, while the latter has been regarded as an extra-logical device that bears no direct relation to type-theoretic constructs. We reformulate the existing semantics of Standard ML modules to reveal a purely second-order type theory. In particular, we show that generativity corresponds precisely to existential quantification over types and that the remainder of the modules type structure is based exclusively on the second-order notions of type parameterisation, universal type quantification and subtyping. Our account is more direct than others and has been shown to scale naturally to both higher-order and first-class modules.

[1]  M. Lillibridge Translucent Sums: A Foundation for Higher-Order Module Systems , 1997 .

[2]  Mark P. Jones,et al.  Using parameterized signatures to express modular structure , 1996, POPL '96.

[3]  Robin Milner,et al.  Definition of standard ML , 1990 .

[4]  David B. MacQueen Using dependent types to express modular structure , 1986, POPL '86.

[5]  Xavier Leroy,et al.  A syntactic theory of type generativity and sharing , 1996, Journal of Functional Programming.

[6]  John C. Mitchell,et al.  Higher-order modules and the phase distinction , 1989, POPL '90.

[7]  John C. Mitchell,et al.  Abstract types have existential type , 1988, TOPL.

[8]  David B. MacQueen,et al.  The Definition of Standard ML (Revised) , 1997 .

[9]  John C. Mitchell,et al.  On the type structure of standard ML , 1993, TOPL.

[10]  Xavier Leroy,et al.  Manifest types, modules, and separate compilation , 1994, POPL '94.

[11]  James McKinna,et al.  Pure Type Systems Formalized , 1993, TLCA.

[12]  Xavier Leroy,et al.  Applicative functors and fully transparent higher-order modules , 1995, POPL '95.

[13]  Claudio V. Russo First-Class Structures for Standard ML , 2000, Nord. J. Comput..

[14]  Claudio V. Russo Types for Modules , 2004, Electronic Notes in Theoretical Computer Science.

[15]  Robert Harper,et al.  An Interpretation of Standard ML in Type Theory , 1997 .

[16]  Richard S. Bird,et al.  Generic functional programming with types and relations , 1996, Journal of Functional Programming.

[17]  Mark Lillibridge,et al.  A type-theoretic approach to higher-order modules with sharing , 1994, POPL '94.