Module

# Data.Operator.PartialOrd

Package
purescript-higher-order
Repository
matthew-hilty/purescript-higher-order

### #PartialOrd1Source

``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` and `b .<=? a == Just true` then `a .== b`
• Transitivity: if `a .<=? b == Just true` and `b .<=? c == Just true` then `a .<=? c == Just true`

That is, partial orderings should satisfy all 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`

... EXCEPT the law of connexity, which follows:

• Connexity: `a .<= b` or `b .<= a`

#### Members

• `pCompare1 :: forall a. f a -> f a -> Maybe Ordering`

#### Instances

• `(Ord1 f) => PartialOrd1 f`

### #pBetween1Source

``pBetween1 :: forall f a. PartialOrd1 f => f a -> f a -> f a -> Maybe Boolean``

### #pClamp1Source

``pClamp1 :: forall f a. PartialOrd1 f => f a -> f a -> f a -> Maybe (f a)``

### #pComparing1Source

``pComparing1 :: forall f b a. PartialOrd1 f => (a -> f b) -> a -> a -> Maybe Ordering``

### #pGreaterThan1Source

``pGreaterThan1 :: forall f a. PartialOrd1 f => f a -> f a -> Maybe Boolean``

### #(.>?)Source

Operator alias for Data.Operator.PartialOrd.pGreaterThan1 (left-associative / precedence 4)

### #pGreaterThanOrEq1Source

``pGreaterThanOrEq1 :: forall f a. PartialOrd1 f => f a -> f a -> Maybe Boolean``

### #(.>=?)Source

Operator alias for Data.Operator.PartialOrd.pGreaterThanOrEq1 (left-associative / precedence 4)

### #pLessThan1Source

``pLessThan1 :: forall f a. PartialOrd1 f => f a -> f a -> Maybe Boolean``

### #(.<?)Source

Operator alias for Data.Operator.PartialOrd.pLessThan1 (left-associative / precedence 4)

### #pLessThanOrEq1Source

``pLessThanOrEq1 :: forall f a. PartialOrd1 f => f a -> f a -> Maybe Boolean``

### #(.<=?)Source

Operator alias for Data.Operator.PartialOrd.pLessThanOrEq1 (left-associative / precedence 4)

### #pMax1Source

``pMax1 :: forall f a. PartialOrd1 f => f a -> f a -> Maybe (f a)``

### #pMin1Source

``pMin1 :: forall f a. PartialOrd1 f => f a -> f a -> Maybe (f a)``