Rule 34s-atpat-var
Atomic Patterns
(34)
Comments
The variable receives a type, not a type scheme. Constructors and variables are spelt differently, so no status test is needed here.
TeX source
\defnrule[r:s-atpat-var]
{}
{\jdg{C}{\var}{(\{\var \mapsto (\tau, \isv)\}, \tau)}}Tests (2)
- elm / CaseBranchSelectionTestA `case` tries its branches in order: a branch whose pattern fails passes the value on, and the first that matches is evaluated with its pattern's bindings.
- elm / MinimalCaseTestA case expression with one rule whose pattern is a variable.
Discussions
Discuss this rule·Search the discussions on GitHub
Discussions are on GitHub; one about this rule has [r:s-atpat-var] 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.