|
definition: |
class Eq a => Ord a where
compare :: a -> a -> Ordering
(<), (>), (<=), (>=) :: a -> a -> Bool
min, max :: a -> a -> a
compare x y | x == y = EQ
| x <= y = LT
| otherwise = GT
x < y = x <= y && x /= y
x > y = not (x <= y)
x <= y = compare x y == EQ || compare x y == LT
x >= y = y <= x
min x y | x <= y = x
| otherwise = y
max x y | x >= y = x
| otherwise = y
|
|
documentation: |
| The class `Ord` defines operations to compare values of the given type with respect to a total ordering. A minimal instance definition for some type must define `<=` or `compare`. |
|
methods: |
["compare 2 :: a -> a -> Ordering","(<) 2 :: a -> a -> Bool","(>) 2 :: a -> a -> Bool","(<=) 2 :: a -> a -> Bool","(>=) 2 :: a -> a -> Bool","min 2 :: a -> a -> a","max 2 :: a -> a -> a"] |
|
name: |
Ord |