Rule 18s-mrule
Match Rules
(18)
Comments
This rule lets new free type variables enter the context: the types of the variables of are chosen in elaborating , and they may have to agree with the explicit variables of annotations within .
TeX source
\defnrule[r:s-mrule]
{\jdg{C}{\pat}{(\VE, \tau)} \premsep \jdg{C + \VE}{\expm}{\tau'}}
{\jdg{C}{\pat\ \kw{->}\ \expm}{\tau \rightarrow \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-mrule] 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.