Rule 5s-atexp-unit
Atomic Expressions
(5)
TeX source
\defnrule[r:s-atexp-unit]
{}
{\jdg{C}{\kw{()}}{\tunit}}Tests (3)
- elm / MinimalUnitTestThe unit expression has the unit type and value.
- elm / TypeMismatchRigidNumberAsUnitTestReturning `()` where the annotation promises a `number` is rejected with a TYPE MISMATCH.
- elm / TypeMismatchRigidVarAsUnitTestA function annotated `a -> a` that returns unit 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-atexp-unit] 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.