Extending OCaml's 'open'

Autor: Runhang Li, Jeremy Yallop
Jazyk: angličtina
Rok vydání: 2019
Předmět:
Zdroj: Electronic Proceedings in Theoretical Computer Science, Vol 294, Iss Proc. ML 2017, Pp 1-14 (2019)
Druh dokumentu: article
ISSN: 2075-2180
DOI: 10.4204/EPTCS.294.1
Popis: We propose a harmonious extension of OCaml's 'open' construct. OCaml's existing construct 'open M' imports the names exported by the module 'M' into the current scope. At present 'M' is required to be the path to a module. We propose extending 'open' to instead accept an arbitrary module expression, making it possible to succinctly address a number of existing scope-related difficulties that arise when writing OCaml programs.
Databáze: Directory of Open Access Journals