Idris2Doc : Data.DOrd

Data.DOrd

(source)
A module defining the `DOrd` interface

Reexports

importpublic Data.DEq

Definitions

dataDOrdering : t->t->Type
  An ordering of single-parameter dependent types

Modeled after the `GOrdering` type from Haskells "some" package

Totality: total
Visibility: public export
Constructors:
DLT : DOrderingab
DEQ : DOrderingaa
DGT : DOrderingab
ordcong' : {0f : a->b} ->DOrderingxy->DOrdering (fx) (fy)
  Like `ordcong` but the function is implicit

Visibility: export
ordcong : (0f : (a->b)) ->DOrderingxy->DOrdering (fx) (fy)
  Takes a function and an ordering of the two values and returns an ordering
of the results of that function applied to these values.

@ f the function
@ x y the values
@ ord the ordering

Visibility: export
precedes : {0f : t->tt->ttt} ->DOrderingab->DOrderingaabb->DOrdering (faaa) (fbbb)
  ``ordL `precedes` ordR`` means that, in the resulting ordering, `ordL`
precedes' `ordR`, that is, `ordR` is considered only if `ordL` is `DEQ`

Visibility: export
precedes' : Ordering->DOrderingab->DOrderingab
  Like `precedes`, except the preceding ordering is a regular `Ordering`

Visibility: export
interfacePOrd : Type->Type
  Similar to `Ord` but the operands can be equal only when they actually are,
that is, when the statement `p = q` is true (there is a `Refl : (p = q)`),
where `p` and `q` are the operands

The "P" in `POrd` stands for "proof"
Note, this is not the same as `OrdP` from the "some" package from Hackage

Parameters: a
Methods:
pcompare : (x : a) -> (y : a) ->DOrderingxy
  Compare two values

Implementations:
POrdBool
POrdNat
POrdInt
POrdInteger
POrdChar
POrdString
POrda=>POrd (Lista)
POrda=>POrdb=>POrd (a, b)
pcompare : POrda=> (x : a) -> (y : a) ->DOrderingxy
  Compare two values

Visibility: public export
interfaceDOrd : (t->Type) ->Type
  Constructors of types that allow for comparing values of such types, even
in the case when their types are constructed from different parameters

Modeled after the `GCompare` typeclass from Haskells "some" package

@ f the type constructor
@ t the parameter type

Parameters: f
Constraints: DEq f
Methods:
dcompare : fa->fb->DOrderingab
  Compare the operands
dcompare : DOrdf=>fa->fb->DOrderingab
  Compare the operands

Visibility: public export
dcompare' : DOrdf=>fa->fb->Ordering
  Compare the operands and ignore the equality proof (if the result is `DEQ`)

Visibility: export