Elm Exactly

Basis entryBasics.compare

A value of Basics. Its type is in Section C.3 Basics.

Static basis

var or con ↦ (σ,is)compare ↦ (∀comparable. comparable→comparable→Order,v)\begin{array}{|rcl|}\hline \var\ \text{or}\ \con {\ }& \mapsto {\ }& (\sigma, \is)\\\hline \href{/standard/basis/Basics/compare}{\kw{compare}} {\ }& \mapsto {\ }& (\forall\mv{comparable}.\,\mv{comparable} \rightarrow \mv{comparable} \rightarrow \sbtOrder, \isv)\\\hline\end{array}
Figure 38: Static VE\VE of ME0(Basics)\ME_0(\kw{Basics}): Constructors, Conversions, Comparison, Booleans and Integer Functions

Dynamic basis

var or con ↦ varitycompare ↦ basic value2\begin{array}{|rclc|}\hline \var\ \text{or}\ \con {\ }& \mapsto {\ }& v {\qquad}& \arity\\\hline \href{/standard/basis/Basics/compare}{\kw{compare}} {\ }& \mapsto {\ }& \text{basic value} {\qquad}& 2\\\hline\end{array}
Figure 45: Dynamic VE\VE of ME0(Basics)\ME_0(\kw{Basics})
Read it in its chapter·Permanent address: /standard/basis/Basics/compare

Tests (19)

Discussions

Discuss this basis entry·Search the discussions on GitHub

Discussions are on GitHub; one about this basis entry has [b:Basics.compare] 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.