Elm Exactly

Rule 35s-atpat-con

Atomic PatternsC⊢atpat⇒(VE,τ)\jdg{C}{\atpat}{(\VE, \tau)}
C(longcon)=(σ,c)σ≻τ(k)tC⊢longcon⇒({},τ(k)t)\frac{\begin{array}{c}C(\longcon) = (\sigma, \isc) \premsep \sigma \succ \tau^{(k)}t\end{array}}{\begin{array}{c}\jdg{C}{\longcon}{(\emptymap, \tau^{(k)}t)}\end{array}}
(35)
Read it in its chapter·Permanent address: /standard/rules/s-atpat-con

Comments

Only status c\isc is accepted, so the constructor of a record type alias, of status v\isv, cannot occur in a pattern. The instance must be a constructed type, so this rule accepts only a constructor without arguments; a constructor with arguments is covered by rule (43).

TeX source
\defnrule[r:s-atpat-con]
  {C(\longcon) = (\sigma, \isc) \premsep \sigma \succ \tau^{(k)}t}
  {\jdg{C}{\longcon}{(\emptymap, \tau^{(k)}t)}}

Tests (6)

Discussions

Discuss this rule·Search the discussions on GitHub

Discussions are on GitHub; one about this rule has [r:s-atpat-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.