Module
Data.Operator.PartialOrd
- Package
- purescript-higher-order
- Repository
- matthew-hilty/purescript-higher-order
#PartialOrd1 Source
class PartialOrd1 f where
The PartialOrd1
typeclass represents type constructors f
that have
an asociated partial ordering of values of type f a
independent of any
choice of a
.
PartialOrd1
instances should satisfy the laws of partial orderings:
- Reflexivity:
a .<=? a == Just true
- Antisymmetry:
if
a .<=? b == Just true
andb .<=? a == Just true
thena .== b
- Transitivity:
if
a .<=? b == Just true
andb .<=? c == Just true
thena .<=? c == Just true
That is, partial orderings should satisfy all the laws of total orderings
- Reflexivity:
a .<= a
- Antisymmetry: if
a .<= b
andb .<= a
thena .== b
- Transitivity: if
a .<= b
andb .<= c
thena .<= c
... EXCEPT the law of connexity, which follows:
- Connexity:
a .<= b
orb .<= a
Members
Instances
(Ord1 f) => PartialOrd1 f
#pClamp1 Source
pClamp1 :: forall f a. PartialOrd1 f => f a -> f a -> f a -> Maybe (f a)
#pComparing1 Source
pComparing1 :: forall f b a. PartialOrd1 f => (a -> f b) -> a -> a -> Maybe Ordering
#pGreaterThan1 Source
pGreaterThan1 :: forall f a. PartialOrd1 f => f a -> f a -> Maybe Boolean
#(.>?) Source
Operator alias for Data.Operator.PartialOrd.pGreaterThan1 (left-associative / precedence 4)
#pGreaterThanOrEq1 Source
pGreaterThanOrEq1 :: forall f a. PartialOrd1 f => f a -> f a -> Maybe Boolean
#(.>=?) Source
Operator alias for Data.Operator.PartialOrd.pGreaterThanOrEq1 (left-associative / precedence 4)
#pLessThan1 Source
pLessThan1 :: forall f a. PartialOrd1 f => f a -> f a -> Maybe Boolean
#(.<?) Source
Operator alias for Data.Operator.PartialOrd.pLessThan1 (left-associative / precedence 4)
#pLessThanOrEq1 Source
pLessThanOrEq1 :: forall f a. PartialOrd1 f => f a -> f a -> Maybe Boolean
#(.<=?) Source
Operator alias for Data.Operator.PartialOrd.pLessThanOrEq1 (left-associative / precedence 4)
#pMax1 Source
pMax1 :: forall f a. PartialOrd1 f => f a -> f a -> Maybe (f a)
#pMin1 Source
pMin1 :: forall f a. PartialOrd1 f => f a -> f a -> Maybe (f a)