Elm Exactly

Basis entryBasics.ge

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

Static basis

op stands for ↦ OTSTAT(op)<=, >= le, ge ↦ (∀comparable. comparable→comparable→Bool,v)\begin{array}{|clcl|}\hline \opv {\ }& \text{stands for} {\ }& \mapsto {\ }& \OTstat(\opv)\\\hline \kw{<=},\ \kw{>=} {\ }& \href{/standard/basis/Basics/le}{\kw{le}},\ \href{/standard/basis/Basics/ge}{\kw{ge}} {\ }& \mapsto {\ }& (\forall\mv{comparable}.\,\mv{comparable} \rightarrow \mv{comparable} \rightarrow \tBool, \isv)\\\hline\end{array}
Figure 40: The Static Operator Table, OTSTAT\OTstat

Dynamic basis

opstands for ↦ OTDYN(op)arity<, >, <=, >=lt, gt, le, ge ↦ basic value2\begin{array}{|clclc|}\hline \opv {\quad}& \text{stands for} {\ }& \mapsto {\ }& \OTdyn(\opv) {\qquad}& \arity\\\hline \kw{<},\ \kw{>},\ \kw{<=},\ \kw{>=} {\quad}& \href{/standard/basis/Basics/lt}{\kw{lt}},\ \href{/standard/basis/Basics/gt}{\kw{gt}},\ \href{/standard/basis/Basics/le}{\kw{le}},\ \href{/standard/basis/Basics/ge}{\kw{ge}} {\ }& \mapsto {\ }& \text{basic value} {\qquad}& 2\\\hline\end{array}
Figure 46: The Dynamic Operator Table, OTDYN\OTdyn

Its APPLY

APPLY(ge,x,y) = APPLY(le,y,x)\begin{array}{rcll} \APPLY(\kw{ge},x,y) {\ }& = {\ }& \APPLY(\kw{le},y,x) {\quad}& \end{array}
APPLY(ge,v,v′) = APPLY(le,v′,v)\begin{array}{rcll} \APPLY(\kw{ge},v,v') {\ }& = {\ }& \APPLY(\kw{le},v',v) {\quad}& \end{array}
Read it in its chapter·Permanent address: /standard/basis/Basics/ge

Tests (9)

  • elm-core / ContainerCompareCharTest
    Ordering of pairs, triples and lists of `Char` with `compare` and the relational operators.
  • elm-core / ContainerCompareIntTest
    Ordering of pairs, triples and lists of `Int` with `compare` and the relational operators.
  • elm-core / CoreIssue1050NanGreaterThanNanTest
    `NaN > NaN` and `NaN >= NaN` are False.
  • elm-core / FloatCompareTest
    `<`, `>`, `<=`, `>=`, `==` and `/=` on `Float` literals, each in a case where the comparison is `True`.
  • elm-core / IntCompareTest
    Checks that the six comparison operators `<`, `>`, `<=`, `>=`, `==` and `/=` give `True` on Int literals.
  • elm-core / OrderingEmptyListTest
    Tests that `<`, `<=`, `>` and `>=` on `List Int` order the empty list before any non-empty list and treat two empty lists as equal.
  • elm-core / OrderingEmptyStringTest
    Tests that `<`, `<=`, `>` and `>=` on `String` order `""` before any non-empty string and treat two empty strings as equal.
  • elm-core / OrderingTupleWithEmptyListTest
    Tests `<`, `<=`, `>` and `>=` on `( Int, List Int )` tuples whose first components are equal, so the result is decided by comparing `[]` with `[ 1 ]` in the second component.
  • elm-core / OrderingTupleWithEmptyStringTest
    Tests `<`, `<=`, `>` and `>=` on `( Int, String )` tuples whose first components are equal, so the result is decided by comparing `""` with `"a"` in the second component.

Discussions

Discuss this basis entry·Search the discussions on GitHub

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