Skip to content

Commit f5d8b7c

Browse files
committed
Update docs for 'Ord' re total ordering
1 parent 5071b4e commit f5d8b7c

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

docs/Prelude.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ comparing two values:
756756

757757
`LT` - The first value is _less than_ the second.
758758
`GT` - The first value is _greater than_ the second.
759-
`EQ` - The first value is _equal to_ or _incomparable to_ the second.
759+
`EQ` - The first value is _equal to_ the second.
760760

761761
##### Instances
762762
``` purescript
@@ -775,9 +775,10 @@ class (Eq a) <= Ord a where
775775
compare :: a -> a -> Ordering
776776
```
777777

778-
The `Ord` type class represents types which support comparisons.
778+
The `Ord` type class represents types which support comparisons with a
779+
_total order_.
779780

780-
`Ord` instances should satisfy the laws of _partially orderings_:
781+
`Ord` instances should satisfy the laws of total orderings:
781782

782783
- Reflexivity: `a <= a`
783784
- Antisymmetry: if `a <= b` and `b <= a` then `a = b`

src/Prelude.purs

+4-3
Original file line numberDiff line numberDiff line change
@@ -624,12 +624,13 @@ foreign import eqArrayImpl :: forall a. (a -> a -> Boolean) -> Array a -> Array
624624
-- |
625625
-- | `LT` - The first value is _less than_ the second.
626626
-- | `GT` - The first value is _greater than_ the second.
627-
-- | `EQ` - The first value is _equal to_ or _incomparable to_ the second.
627+
-- | `EQ` - The first value is _equal to_ the second.
628628
data Ordering = LT | GT | EQ
629629

630-
-- | The `Ord` type class represents types which support comparisons.
630+
-- | The `Ord` type class represents types which support comparisons with a
631+
-- | _total order_.
631632
-- |
632-
-- | `Ord` instances should satisfy the laws of _partially orderings_:
633+
-- | `Ord` instances should satisfy the laws of total orderings:
633634
-- |
634635
-- | - Reflexivity: `a <= a`
635636
-- | - Antisymmetry: if `a <= b` and `b <= a` then `a = b`

0 commit comments

Comments
 (0)