Extending OCaml's 'open'
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 ...
Main Authors: | , |
---|---|
Format: | Article |
Language: | English |
Published: |
Open Publishing Association
2019-05-01
|
Series: | Electronic Proceedings in Theoretical Computer Science |
Online Access: | http://arxiv.org/pdf/1905.06543v1 |
id |
doaj-5e9bc43b75484151bfbdc6d35aa4262e |
---|---|
record_format |
Article |
spelling |
doaj-5e9bc43b75484151bfbdc6d35aa4262e2020-11-24T21:43:51ZengOpen Publishing AssociationElectronic Proceedings in Theoretical Computer Science2075-21802019-05-01294Proc. ML 201711410.4204/EPTCS.294.1:5Extending OCaml's 'open'Runhang Li0Jeremy Yallop1 Twitter, Inc University of Cambridge 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.http://arxiv.org/pdf/1905.06543v1 |
collection |
DOAJ |
language |
English |
format |
Article |
sources |
DOAJ |
author |
Runhang Li Jeremy Yallop |
spellingShingle |
Runhang Li Jeremy Yallop Extending OCaml's 'open' Electronic Proceedings in Theoretical Computer Science |
author_facet |
Runhang Li Jeremy Yallop |
author_sort |
Runhang Li |
title |
Extending OCaml's 'open' |
title_short |
Extending OCaml's 'open' |
title_full |
Extending OCaml's 'open' |
title_fullStr |
Extending OCaml's 'open' |
title_full_unstemmed |
Extending OCaml's 'open' |
title_sort |
extending ocaml's 'open' |
publisher |
Open Publishing Association |
series |
Electronic Proceedings in Theoretical Computer Science |
issn |
2075-2180 |
publishDate |
2019-05-01 |
description |
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. |
url |
http://arxiv.org/pdf/1905.06543v1 |
work_keys_str_mv |
AT runhangli extendingocamlsopen AT jeremyyallop extendingocamlsopen |
_version_ |
1725911656680128512 |