base Prelude Data.Ord, hedgehog Hedgehog.Internal.Prelude, base-compat Prelude.Compat, protolude Protolude, relude Relude.Base, universum Universum.Base, Cabal-syntax Distribution.Compat.Prelude, github GitHub.Internal.Prelude, numhask NumHask.Prelude, basement Basement.Compat.Base Basement.Imports, foundation Foundation, ghc-lib-parser GHC.Prelude.Basic, rebase Rebase.Prelude, quaalude Essentials, hledger Hledger.Cli.Script, stack Stack.Prelude, incipit-base Incipit.Base, cabal-install-solver Distribution.Solver.Compat.Prelude, loc Data.Loc.Internal.Prelude

The Ord class is used for totally ordered datatypes.
Instances of Ord can be derived for any user-defined datatype
whose constituent types are in Ord. The declared order of the
constructors in the data declaration determines the ordering in
derived Ord instances. The Ordering datatype allows a
single comparison to determine the precise ordering of two objects.
Ord, as defined by the Haskell report, implements a total order
and has the following properties:
*not* require min and
max to return either of their arguments. The result is merely
required to *equal* one of the arguments in terms of (==).
Minimal complete definition: either compare or <=.
Using compare can be more efficient for complex types.

**Comparability**`x <= y || y <= x`= Trueif**Transitivity**`x <= y && y <= z`= True, then`x <= z`= True**Reflexivity**`x <= x`= Trueif**Antisymmetry**`x <= y && y <= x`= True, then`x == y`= True

`x >= y`=`y <= x``x < y`=`x <= y && x /= y``x > y`=`y < x``x < y`=`compare x y == LT``x > y`=`compare x y == GT``x == y`=`compare x y == EQ``min x y == if x <= y then x else y`= True`max x y == if x >= y then x else y`= True

The Ord class is used for totally ordered datatypes.
Instances of Ord can be derived for any user-defined datatype
whose constituent types are in Ord. The declared order of the
constructors in the data declaration determines the ordering in
derived Ord instances. The Ordering datatype allows a
single comparison to determine the precise ordering of two objects.
Ord, as defined by the Haskell report, implements a total order
and has the following properties:
*not* require min and
max to return either of their arguments. The result is merely
required to *equal* one of the arguments in terms of (==).
Minimal complete definition: either compare or <=.
Using compare can be more efficient for complex types.

**Comparability**`x <= y || y <= x`= Trueif**Transitivity**`x <= y && y <= z`= True, then`x <= z`= True**Reflexivity**`x <= x`= Trueif**Antisymmetry**`x <= y && y <= x`= True, then`x == y`= True

`x >= y`=`y <= x``x < y`=`x <= y && x /= y``x > y`=`y < x``x < y`=`compare x y == LT``x > y`=`compare x y == GT``x == y`=`compare x y == EQ``min x y == if x <= y then x else y`= True`max x y == if x >= y then x else y`= True

rio RIO.Prelude.Types, base-prelude BasePrelude, classy-prelude ClassyPrelude, numeric-prelude NumericPrelude NumericPrelude.Base, dimensional Numeric.Units.Dimensional.Prelude, xmonad-contrib XMonad.Config.Prime, LambdaHack Game.LambdaHack.Core.Prelude, protobuf-simple Data.ProtoBufInt

The Ord class is used for totally ordered datatypes.
Instances of Ord can be derived for any user-defined datatype
whose constituent types are in Ord. The declared order of the
constructors in the data declaration determines the ordering in
derived Ord instances. The Ordering datatype allows a
single comparison to determine the precise ordering of two objects.
The Haskell Report defines no laws for Ord. However,
<= is customarily expected to implement a non-strict partial
order and have the following properties:
*not* require min and
max to return either of their arguments. The result is merely
required to *equal* one of the arguments in terms of (==).
Minimal complete definition: either compare or <=.
Using compare can be more efficient for complex types.

if**Transitivity**`x <= y && y <= z`= True, then`x <= z`= True**Reflexivity**`x <= x`= Trueif**Antisymmetry**`x <= y && y <= x`= True, then`x == y`= True

`x >= y`=`y <= x``x < y`=`x <= y && x /= y``x > y`=`y < x``x < y`=`compare x y == LT``x > y`=`compare x y == GT``x == y`=`compare x y == EQ``min x y == if x <= y then x else y`= True`max x y == if x >= y then x else y`= True

Ord properties
You will need `TypeApplications` to use these.

Equality and ordering.
Note that equality doesn't really require a class, it can be defined
uniformly as TyEq.

The Ord class is used for totally ordered datatypes.
Instances of Ord can be derived for any user-defined datatype
whose constituent types are in Ord. The declared order of the
constructors in the data declaration determines the ordering in
derived Ord instances. The Ordering datatype allows a
single comparison to determine the precise ordering of two objects.
Minimal complete definition: either compare or <=.
Using compare can be more efficient for complex types.

This *optional* module is part of LeanCheck, a simple enumerative
property-based testing library.
Toy Eq and Ord instance for functions.
`12` value. Keep in mind that this value is
number of tests for *each* argument.
**Warning:** this is only intended to be used in testing modules.
Avoid importing this on modules that are used as libraries as there is
no way to unimport a typeclass instance.

instance (Listable a, Eq b) => Eq (a -> b) where (==) = areEqualFor 12

instance (Listable a, Ord b) => Ord (a -> b) where compare = compareFor 12This compares functions by testing them for up to 12 different values of each argument. Single argument functions are tested 12 times. Two argument functions are tested 144 times. Three argument functions are tested 1728 times. At each subsequent argument, number of tests and runtime increases 12-fold. To customize the number of tests, don't import this and use the above code changing the

Ord properties
You will need `TypeApplications` to use these.

The Ord class is used for totally ordered datatypes.
Instances of Ord can be derived for any user-defined datatype
whose constituent types are in Ord. The declared order of the
constructors in the data declaration determines the ordering in
derived Ord instances. The Ordering datatype allows a
single comparison to determine the precise ordering of two objects.
The Haskell Report defines no laws for Ord. However,
<= is customarily expected to implement a non-strict partial
order and have the following properties:

if**Transitivity**`x <= y && y <= z`= True, then`x <= z`= True**Reflexivity**`x <= x`= Trueif**Antisymmetry**`x <= y && y <= x`= True, then`x == y`= True

`x >= y`=`y <= x``x < y`=`x <= y && x /= y``x > y`=`y < x``x < y`=`compare x y == LT``x > y`=`compare x y == GT``x == y`=`compare x y == EQ``min x y == if x <= y then x else y`= True`max x y == if x >= y then x else y`= True

Linear Orderings
Linear orderings provide a strict order. The laws for `(<=)`
for all <math>:
`<`:
`compare` doesn't
follow from `<=` since it requires calls: one to
`<=` and one to `==`. However, from a linear
`compare` it is easy to implement the others. Hence, the
minimal complete definition only contains `compare`.

- reflexivity: <math>
- antisymmetry: <math>
- transitivity: <math>

`x <= y`=`not (y > x)``x >= y`=`not (y < x)`

- This module is deprecated and will be removed*

**Packages**- is:exact
- is:module
- base
- hedgehog
- base-compat
- protolude
- relude
- universum
- Cabal-syntax
- github
- numhask
- basement
- foundation
- ghc-lib-parser
- rebase
- quaalude
- hledger
- stack
- incipit-base
- cabal-install-solver
- loc
- ghc-prim
- ghc
- rio
- base-prelude
- classy-prelude
- numeric-prelude
- dimensional
- xmonad-contrib
- LambdaHack
- protobuf-simple
- rerebase
- text-show
- checkers
- genvalidity-hspec
- first-class-families
- basic-prelude
- leancheck
- tfp
- genvalidity-sydtest
- prelude-compat
- mixed-types-num
- invertible
- texmath
- linear-base
- purescript-bridge
- miniutter
- swish
- universe-reverse-instances