Restrictioncore-row-labels-distinct
No expression row, pattern row or type-expression row may contain the same twice. This applies to the expression row of a record update.
Tests (1)
- elm / NameClashARecordFieldGivenTwiceTestA record literal that gives the same field twice, `{ a = 1, a = 2 }`, is rejected with a NAME CLASH error.
In Lean
This restriction is decided on the syntax tree, as the book states it, by Src.RowLabelsDistinct (StandardElmMech/Src/Restrictions.lean, line 221), whose decider the kernel runs; each written test program has a theorem that it meets the restrictions, or that it breaks this one. Broken by: NameClashARecordFieldGivenTwiceTest.
Discussions
Discuss this restriction·Search the discussions on GitHub
Discussions are on GitHub; one about this restriction has [res:core-row-labels-distinct] 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.