Elm Exactly

Restrictionmodules-custom-type-tyvars

Stated in Section 3.7 Syntactic Restrictions.

In a custom-type binding tycon tyvarseq = conbind\tycon\ \tyvarseq\ \kw{=}\ \conbind, every tyvar\tyvar occurring in conbind\conbind, including the extension variable of a record type, occurs in tyvarseq\tyvarseq. A tyvar\tyvar of tyvarseq\tyvarseq need not occur in conbind\conbind.

Read it in its chapter·Permanent address: /standard/restrictions/modules-custom-type-tyvars

Tests (2)

In Lean

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

Discussions

Discuss this restriction·Search the discussions on GitHub

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