Elm Exactly

Figuregrammar-modules

Figure 9, Grammar: Modules, Headers, Imports and Exposing Lists, in Section 3.5 Grammar for Modules.

module\modm::=header imports topdec\header\ \imports\ \topdecmodule
header\header::=module modid exposing explist\kw{module}\ \modid\ \kw{exposing}\ \explistplain
port module modid exposing explist\kw{port}\ \kw{module}\ \modid\ \kw{exposing}\ \explistport module
imports\imports::=import modid ⟨as modid′⟩\kw{import}\ \modid\ \opt{\kw{as}\ \modid'}import
⟨exposing explist⟩ imports\quad\opt{\kw{exposing}\ \explist}\ \imports
empty
explist\explist::=(..)\kw{(..)}everything
( item1 , ⋯ , itemn )\kw{(}\,\expitem_1\ \kw{,}\ \cdots\ \kw{,}\ \expitem_n\,\kw{)}explicit
(n≥1)(n \geq 1)
item\expitem::=var\varvalue
(op)\kw{(}\opv\kw{)}operator
tycon\tycontype
tycon (..)\tycon\,\kw{(..)}open type
Figure 9: Grammar: Modules, Headers, Imports and Exposing Lists
Read it in its chapter·Permanent address: /standard/figures/grammar-modules

Referred to from

Tests (0)

No test of the suite checks this figure yet.

Discussions

Discuss this figure·Search the discussions on GitHub

Discussions are on GitHub; one about this figure has [fig:grammar-modules] 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.