Elm Exactly

Figurestatic-core-admissible

Figure 15, Admissible Types, in Section 4.4 Classes and Admissible Types.

Admany = TypeAdmnumber = {Int,Float}∪{α ; class(α)=number}Admcomparable = {Int,Float,Char,String} ∪ {α ; class(α)≤comparable} ∪ {τ List ; τ∈Admcomparable} ∪ {(τ1,τ2)Tuple2 ; τ1,τ2∈Admcomparable} ∪ {(τ1,τ2,τ3)Tuple3 ; τ1,τ2,τ3∈Admcomparable}Admappendable = {String}∪{τ List ; τ∈Type} ∪ {α ; class(α)≤appendable}Admcompappend = {String}∪{τ List ; τ∈Admcomparable} ∪ {α ; class(α)=compappend} \begin{array}{rcl} \Adm{\kany} {\ }& = {\ }& \Type\\[2pt] \Adm{\knum} {\ }& = {\ }& \{\tInt, \tFloat\} \cup \{\alpha \,;\, \clsof(\alpha) = \knum\}\\[2pt] \Adm{\kcomp} {\ }& = {\ }& \{\tInt, \tFloat, \tChar, \tString\}\\ {\ }& \cup {\ }& \{\alpha \,;\, \clsof(\alpha) \leq \kcomp\}\\ {\ }& \cup {\ }& \{\tau\,\tList \,;\, \tau \in \Adm{\kcomp}\}\\ {\ }& \cup {\ }& \{(\tau_1, \tau_2)\tTuple{2} \,;\, \tau_1, \tau_2 \in \Adm{\kcomp}\}\\ {\ }& \cup {\ }& \{(\tau_1, \tau_2, \tau_3)\tTuple{3} \,;\, \tau_1, \tau_2, \tau_3 \in \Adm{\kcomp}\}\\[2pt] \Adm{\kapp} {\ }& = {\ }& \{\tString\} \cup \{\tau\,\tList \,;\, \tau \in \Type\}\\ {\ }& \cup {\ }& \{\alpha \,;\, \clsof(\alpha) \leq \kapp\}\\[2pt] \Adm{\kcapp} {\ }& = {\ }& \{\tString\} \cup \{\tau\,\tList \,;\, \tau \in \Adm{\kcomp}\}\\ {\ }& \cup {\ }& \{\alpha \,;\, \clsof(\alpha) = \kcapp\} \end{array}
Figure 15: Admissible Types
Read it in its chapter·Permanent address: /standard/figures/static-core-admissible

Referred to from

Tests (0)

No test of the suite checks this figure yet.

Discussions

Discuss this figure·Search the discussions on GitHub

Discussions are on GitHub; one about this figure has [fig:static-core-admissible] 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.