Elm Exactly

Rule 28s-ty-con

Type ExpressionsC⊢ty⇒τ\jdg{C}{\ty}{\tau}
C(longtycon)=(θ,VE)C⊢tyi⇒τi(1≤i≤k)C⊢longtycon ty1⋯tyk⇒θ(τ1,⋯ ,τk)\frac{\begin{array}{c}C(\longtycon) = (\theta, \VE) \premsep \jdg{C}{\ty_i}{\tau_i} \quad (1 \le i \le k)\end{array}}{\begin{array}{c}\jdg{C}{\longtycon\ \ty_1 \cdots \ty_k}{\theta(\tau_1, \cdots, \tau_k)}\end{array}}
(28)
Read it in its chapter·Permanent address: /standard/rules/s-ty-con

Comments

For θ(τ1,⋯ ,τk)\theta(\tau_1, \cdots, \tau_k) to be defined, θ\theta must have arity kk, so a type constructor is never partially applied. Application of a type function performs the substitution, so a type alias denotes its expansion, and an alias with a row parameter applies only to a record type.

Referred to from

TeX source
\defnrule[r:s-ty-con]
  {C(\longtycon) = (\theta, \VE) \premsep \jdg{C}{\ty_i}{\tau_i} \quad (1 \le i \le k)}
  {\jdg{C}{\longtycon\ \ty_1 \cdots \ty_k}{\theta(\tau_1, \cdots, \tau_k)}}

Tests (37)

Discussions

Discuss this rule·Search the discussions on GitHub

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