Rule 67d-atexp-con
Atomic Expressions
(67)
Comments
A constructor of a custom type is bound to the constructor value , awaiting all its arguments; the value bound to the constructor of a record type alias is given in Chapter 7.
TeX source
\defnrule[r:d-atexp-con]
{E(\longcon)=v}
{\jdg{E}{\longcon}{v}}Tests (5)
- elm / BoolAndTestThe `&&` operator gives `True` only when both operands are `True`, checked over all four combinations.
- elm / BoolOrTestThe `||` operator gives `False` only when both operands are `False`, checked over all four combinations.
- elm / LssGapCtorAsValueA custom type constructor passed as a function argument builds the value it is applied to.
- elm / LssGapCtorInListA custom type constructor stored in a list can be taken out and applied.
- elm / MaybeNothingTest`Debug.log` prints a bare `Nothing` as `Nothing`.
Discussions
Discuss this rule·Search the discussions on GitHub
Discussions are on GitHub; one about this rule has [r:d-atexp-con] 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.