Rule 47sm-header
Headers
(47)
Comments
Whether a module is a port module matters only to the syntactic restrictions, which allow port declarations in it and require at least one. The exposing list of a header elaborates by the operation of Section 5.2, which the syntactic restrictions make defined; the rules of the groups Exposing Lists and Exposing Items below are for the exposing lists of imports.
TeX source
\defnrule[r:sm-header]
{I = \Expose(E, \explist)}
{\jdg{E}{\opt{\kw{port}}\ \kw{module}\ \modid\ \kw{exposing}\ \explist}{(\modid, I)}}Tests (2)
- elm / ImportExposingItemsTestAn import's exposing list brings exactly its items into scope, with what the imported module's header exposes.
- elm / ImportUnexposedValueTestA value its module's header does not expose cannot be used, even qualified.
Discussions
Discuss this rule·Search the discussions on GitHub
Discussions are on GitHub; one about this rule has [r:sm-header] in its title.
A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.