Restrictioncore-no-shadowing
No binding site may bind a that is already bound by a binding site in whose scope it lies. Constructors, type constructors and type variables are not subject to this restriction.
Tests (1)
- elm / ShadowingShadowingInLambdaTestA lambda argument with the same name as an argument of the enclosing function is rejected with a SHADOWING error.
In Lean
This restriction is decided on the syntax tree, as the book states it, by Src.NoShadowing (StandardElmMech/Src/Restrictions.lean, line 232), 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: ShadowingShadowingInLambdaTest.
Discussions
Discuss this restriction·Search the discussions on GitHub
Discussions are on GitHub; one about this restriction has [res:core-no-shadowing] 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.