Restrictioncore-binding-site-distinct
No binding site may bind the same twice.
Tests (2)
- elm / NameClashTwoArgumentsOfOneNameTestA function whose two arguments share one name, `pick a a`, is rejected with a NAME CLASH error.
- elm / NameClashTwoLetBindingsOfOneNameTestA `let` block that defines `y` twice is rejected with a NAME CLASH error.
In Lean
This restriction is decided on the syntax tree, as the book states it, by Src.BindingSiteDistinct (StandardElmMech/Src/Restrictions.lean, line 229), 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: NameClashTwoArgumentsOfOneNameTest, NameClashTwoLetBindingsOfOneNameTest.
Discussions
Discuss this restriction·Search the discussions on GitHub
Discussions are on GitHub; one about this restriction has [res:core-binding-site-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.