Elm Exactly

Figureappendix-full-grammar-top-level

Figure 35, Full Grammar: Top-level Declarations and Bindings, in BFull Grammar.

topdec\topdec::=valbind\valbindvalue
type datbind\kw{type}\ \datbindcustom type
type alias typbind\kw{type}\ \kw{alias}\ \typbindtype alias
port var : ty\kw{port}\ \var\ \kw{:}\ \typort
topdec1 ; topdec2\topdec_1\ \kw{;}\ \topdec_2sequential
topdec1 ⋯ topdecn\topdec_1\ \cdots\ \topdec_nmodule body (n≥2n \geq 2)†
datbind\datbind::=tycon tyvarseq = conbind\tycon\ \tyvarseq\ \kw{=}\ \conbindcustom-type binding
⟨and datbind⟩\qquad\opt{\kw{and}\ \datbind}
conbind\conbind::=con ty1 ⋯ tyn ⟨| conbind⟩\con\ \ty_1\ \cdots\ \ty_n\ \opt{\kw{|}\ \conbind}constructor binding
(n≥0)(n \geq 0)
typbind\typbind::=tycon tyvarseq = ty\tycon\ \tyvarseq\ \kw{=}\ \tytype-alias binding
tyvarseq\tyvarseq::=tyvar1 ⋯ tyvark\tyvar_1\ \cdots\ \tyvar_ktype parameters
(k≥0)(k \geq 0)

† derived form, Appendix A.

Figure 35: Full Grammar: Top-level Declarations and Bindings
Read it in its chapter·Permanent address: /standard/figures/appendix-full-grammar-top-level

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:appendix-full-grammar-top-level] 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.