Elm Exactly

Rule 4s-atexp-op

Atomic ExpressionsC⊢atexp⇒τ\jdg{C}{\atexp}{\tau}
OTSTAT(op)=(σ,is)σ≻τC⊢(op)⇒τ\frac{\begin{array}{c}\OTstat(\opv) = (\sigma, \is) \premsep \sigma \succ \tau\end{array}}{\begin{array}{c}\jdg{C}{\kw{(}\opv\kw{)}}{\tau}\end{array}}
(4)
Read it in its chapter·Permanent address: /standard/rules/s-atexp-op

Comments

Infixed applications of operators are derived forms of this phrase (Appendix A), so this rule gives the type of every application of an operator. The context CC is absent from the premise, so an operator has the same type scheme in every module, whatever the module declares or imports: a declaration of add in a program does not change the meaning of +.

Referred to from

TeX source
\defnrule[r:s-atexp-op]
  {\OTstat(\opv) = (\sigma, \is) \premsep \sigma \succ \tau}
  {\jdg{C}{\kw{(}\opv\kw{)}}{\tau}}

Tests (92)

Discussions

Discuss this rule·Search the discussions on GitHub

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