Skip to content
Snippets Groups Projects
Commit 7d027433 authored by Gaël Deest's avatar Gaël Deest Committed by Marge Bot
Browse files

[skip ci] Fix 'Ord' documentation inconsistency

Current documentation for the `Ord` typeclass is inconsistent. It
simultaneously mentions that:

> The 'Ord' class is used for totally ordered datatypes.

And:

> The Haskell Report defines no laws for 'Ord'. However, '<=' is
> customarily expected to implement a non-strict partial order […]

The Haskell report (both 98 and 2010 versions) mentions total ordering,
which implicitly does define laws. Moreover, `compare :: Ord a => a -> a
-> Ordering` and `data Ordering = LT | EQ | GT` imply that the order is
indeed total (there is no way to say that two elements are not
comparable). This MR fixes the Haddock comment, and adds a comparability
law to the list of suggested properties.
parent d03d8761
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment