Module

Data.Bounded

Package
purescript-prelude
Repository
purescript/purescript-prelude

#Bounded Source

class (Ord a) <= Bounded a  where

The Bounded type class represents totally ordered types that have an upper and lower boundary.

Instances should satisfy the following law in addition to the Ord laws:

  • Bounded: bottom <= a <= top

Members

Instances

#BoundedRecord Source

class BoundedRecord :: RowList Type -> Row Type -> Row Type -> Constraintclass (OrdRecord rowlist row) <= BoundedRecord rowlist row subrow | rowlist -> subrow where

Members

Instances

Re-exports from Data.Ord

#Ordering Source

data Ordering

The Ordering data type represents the three possible outcomes of comparing two values:

LT - The first value is less than the second. GT - The first value is greater than the second. EQ - The first value is equal to the second.

Constructors

Instances

#Ord Source

class (Eq a) <= Ord a  where

The Ord type class represents types which support comparisons with a total order.

Ord instances should satisfy the laws of total orderings:

  • Reflexivity: a <= a
  • Antisymmetry: if a <= b and b <= a then a = b
  • Transitivity: if a <= b and b <= c then a <= c

Note: The Number type is not an entirely law abiding member of this class due to the presence of NaN, since NaN <= NaN evaluates to false

Members

Instances

#OrdRecord Source

class OrdRecord :: RowList Type -> Row Type -> Constraintclass (EqRecord rowlist row) <= OrdRecord rowlist row 

Instances

#(>=) Source

Operator alias for Data.Ord.greaterThanOrEq (left-associative / precedence 4)

#(>) Source

Operator alias for Data.Ord.greaterThan (left-associative / precedence 4)

#(<=) Source

Operator alias for Data.Ord.lessThanOrEq (left-associative / precedence 4)

#(<) Source

Operator alias for Data.Ord.lessThan (left-associative / precedence 4)