Existential types are reconstructed in terms of small reflective subuniverses and dependent sums. The folklore decomposition detailed here gives rise to a particularly simple account of first-class modules as a mode of use of traditional second-class modules in connection with the modal operator induced by a reflective subuniverse, leading to a semantic justification for the rules of first-class modules in languages like OCaml and MoscowML. Additionally, we expose several constructions that give rise to semantic models of ML-style programming languages with both first-class modules and realistic computational effects, culminating in a model that accommodates higher-order first-class recursive modules and higher-order store.
翻译:以小型反射子体和依赖金额对存在类型进行再造,在此详述的民俗分解导致一个特别简单的一流模块描述,作为使用传统二流模块的一种模式,与反射子体引发的模式操作者相关,导致以OCaml和莫斯科ML等语言对一流模块规则进行语义解释。 此外,我们暴露出若干构思,这些构思产生了具有一流模块和现实的计算效果的ML型语义编程语言的语义模型,最终形成了一种模式,容纳了上层一流循环模块和高端存储模块。