Elm Exactly

Restrictioncore-pattern-row-label-only

Stated in Section 2.10 Syntactic Restrictions, under Records.

No pattern row of a program has the form lab = var\lab\ \kw{=}\ \var: a program writes each component of a record pattern as a label alone, the derived form of Appendix A, whose equivalent form lab = var\lab\ \kw{=}\ \var binds the variable spelt as the label. The bare form exists so that number specialisation (Chapter 6) can give the variable of a row a new name while keeping its label.

Read it in its chapter·Permanent address: /standard/restrictions/core-pattern-row-label-only

Tests (2)

Discussions

Discuss this restriction·Search the discussions on GitHub

Discussions are on GitHub; one about this restriction has [res:core-pattern-row-label-only] 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.