Elm Exactly

Restrictionmodules-no-top-pattern

Stated in Section 3.7 Syntactic Restrictions.

No value declaration of a topdec\topdec may contain a binding other than one of the form var ⟨: ty⟩ = exp\var\ \opt{\kw{:}\ \ty}\ \kw{=}\ \expm; there is no pattern binding at the top level.

Read it in its chapter·Permanent address: /standard/restrictions/modules-no-top-pattern

Tests (1)

In Lean

This restriction is decided on the syntax tree, as the book states it, by Src.NoTopPattern (StandardElmMech/Src/Restrictions.lean, line 268), whose decider the kernel runs; each written test program has a theorem that it meets the restrictions, or that it breaks this one. No written test program breaks it.

Discussions

Discuss this restriction·Search the discussions on GitHub

Discussions are on GitHub; one about this restriction has [res:modules-no-top-pattern] 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.