Restrictionprogram-modules-distinct
No two modules of a program have the same module identifier, and no module of a program has the identifier of a module of the initial basis (Appendix C).
Tests (1)
- elm / FileA root module named like a module of a dependency crashes the compiler.
In Lean
This restriction is decided on the syntax tree, as the book states it, by Src.ModulesDistinct (StandardElmMech/Src/Restrictions.lean, line 349), 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:program-modules-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.