Rule 27s-ty-tuple
Type Expressions
(27)
Comments
By the grammar is 2 or 3.
TeX source
\defnrule[r:s-ty-tuple]
{\jdg{C}{\ty_i}{\tau_i} \quad (1 \le i \le k)}
{\jdg{C}{\kw{(}\,\ty_1\kw{,}\ \cdots\kw{,}\ \ty_k\,\kw{)}}{(\tau_1, \cdots, \tau_k)\tTuple{k}}}Tests (2)
- elm / TypeMismatchTriplesDifferTestA triple whose third component does not match its annotation is rejected with a TYPE MISMATCH.
- elm / TypeMismatchTupleSizesDifferTestA triple given where the annotation promises a pair is rejected with a TYPE MISMATCH.
Discussions
Discuss this rule·Search the discussions on GitHub
Discussions are on GitHub; one about this rule has [r:s-ty-tuple] 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.