Rule 36s-atpat-unit
Atomic Patterns
(36)
TeX source
\defnrule[r:s-atpat-unit]
{}
{\jdg{C}{\kw{()}}{(\emptymap, \tunit)}}Tests (2)
- elm / MinimalUnitPatternTestThe unit pattern matches the unit value.
- elm / TypeMismatchUnitPatternTestA function annotated `Int -> Int` whose parameter is the unit pattern `()` is rejected with a TYPE MISMATCH error.
Discussions
Discuss this rule·Search the discussions on GitHub
Discussions are on GitHub; one about this rule has [r:s-atpat-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.