Elm Exactly

Restrictionmodules-types-distinct

Stated in Section 3.7 Syntactic Restrictions.

No topdec\topdec may declare the same tycon\tycon twice: custom types and aliases share one name space.

Read it in its chapter·Permanent address: /standard/restrictions/modules-types-distinct

Tests (1)

In Lean

This restriction is decided on the syntax tree, as the book states it, by Src.TypesDistinct (StandardElmMech/Src/Restrictions.lean, line 274), 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: TopLevelTypeAndAliasSameNameTest.

Discussions

Discuss this restriction·Search the discussions on GitHub

Discussions are on GitHub; one about this restriction has [res:modules-types-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.