On the design and implementation of Modular Explicits
Résumé
We present and discuss the design and implementation of modular explicits, an extension of OCaml first-class modules with module-dependent functions, functions taking first-class modules as arguments. We show some difficulties with the present use of first-class modules and how modular explicits solve them in a simpler, more direct way. Modular explicits are fully compatible with, and can be presented as an extension of, first-class modules. Interestingly, both the formalization and the implementation reuse the mechanism designed to ensure principal types in the presence of semi-explicit first-class polymorphism and OCaml polymorphic methods. Modular explicits are also meant to be the underlying language in which modular implicits, i.e., module arguments left implicit from their signatures, should be elaborated.
Domaines
Langage de programmation [cs.PL]Origine | Fichiers produits par l'(les) auteur(s) |
---|