arXiv · 1905.06543
Extending OCaml's 'open'
Abstract
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.
Explore related subjects
Keep this discovery
Runhang Li, Jeremy Yallop. 2019-05-16. Extending OCaml's 'open'. https://doi.org/10.4204/eptcs.294.1
Cite the original work for its findings. Save a collection to share your selection of sources.