[Haskell-cafe] ordNub

Tom Ellis tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk
Thu Jan 1 14:14:16 UTC 2015


On Thu, Jan 01, 2015 at 03:12:15PM +0100, Atze van der Ploeg wrote:
> Instance Ord a where
>   _ <= _ = True
> 
> Is law abiding for any type. So there is no type that cannot support a law
> abiding Ord instance.

So let me clarify that I want (<=) to be a total order in the sense that it
is

* reflexive
* symmetric
* transitive

and `(x <= y) && (y <= x)` implies that `x == y`.

Tom


More information about the Haskell-Cafe mailing list