Copyright | (c) The University of Glasgow 2005 |
---|---|
License | BSD-style (see the file libraries/base/LICENSE) |
Maintainer | libraries@haskell.org |
Stability | stable |
Portability | portable |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
Data.Ord
Description
Orderings
Documentation
The Ord
class is used for totally ordered datatypes.
Instances of Ord
can be derived for any user-defined datatype whose
constituent types are in Ord
. The declared order of the constructors in
the data declaration determines the ordering in derived Ord
instances. The
Ordering
datatype allows a single comparison to determine the precise
ordering of two objects.
The Haskell Report defines no laws for Ord
. However, <=
is customarily
expected to implement a non-strict partial order and have the following
properties:
- Transitivity
- if
x <= y && y <= z
=True
, thenx <= z
=True
- Reflexivity
x <= x
=True
- Antisymmetry
- if
x <= y && y <= x
=True
, thenx == y
=True
Note that the following operator interactions are expected to hold:
x >= y
=y <= x
x < y
=x <= y && x /= y
x > y
=y < x
x < y
=compare x y == LT
x > y
=compare x y == GT
x == y
=compare x y == EQ
min x y == if x <= y then x else y
=True
max x y == if x >= y then x else y
=True
Minimal complete definition: either compare
or <=
.
Using compare
can be more efficient for complex types.
Methods
compare :: a -> a -> Ordering #
(<) :: a -> a -> Bool infix 4 #
(<=) :: a -> a -> Bool infix 4 #
(>) :: a -> a -> Bool infix 4 #
Instances
Instances details
Note that due to the presence of NaN
, Double
's Ord
instance does not
satisfy reflexivity.
>>>
0/0 <= (0/0 :: Double)
False
Also note that, due to the same, Ord
's operator interactions are not
respected by Double
's instance:
>>>
(0/0 :: Double) > 1
False>>>
compare (0/0 :: Double) 1
GT
Note that due to the presence of NaN
, Float
's Ord
instance does not
satisfy reflexivity.
>>>
0/0 <= (0/0 :: Float)
False
Also note that, due to the same, Ord
's operator interactions are not
respected by Float
's instance:
>>>
(0/0 :: Float) > 1
False>>>
compare (0/0 :: Float) 1
GT
Instance details
Defined in GHC.Integer.Type
Instance details
Defined in GHC.Natural
Instance details
Defined in GHC.Classes
Instance details
Defined in Data.Typeable.Internal
Methods
compare :: SomeTypeRep -> SomeTypeRep -> Ordering #
(<) :: SomeTypeRep -> SomeTypeRep -> Bool #
(<=) :: SomeTypeRep -> SomeTypeRep -> Bool #
(>) :: SomeTypeRep -> SomeTypeRep -> Bool #
(>=) :: SomeTypeRep -> SomeTypeRep -> Bool #
max :: SomeTypeRep -> SomeTypeRep -> SomeTypeRep #
min :: SomeTypeRep -> SomeTypeRep -> SomeTypeRep #
Instance details
Defined in GHC.Integer.Type
Instance details
Defined in GHC.Unicode
Methods
compare :: GeneralCategory -> GeneralCategory -> Ordering #
(<) :: GeneralCategory -> GeneralCategory -> Bool #
(<=) :: GeneralCategory -> GeneralCategory -> Bool #
(>) :: GeneralCategory -> GeneralCategory -> Bool #
(>=) :: GeneralCategory -> GeneralCategory -> Bool #
max :: GeneralCategory -> GeneralCategory -> GeneralCategory #
min :: GeneralCategory -> GeneralCategory -> GeneralCategory #
Instance details
Defined in GHC.Fingerprint.Type
Methods
compare :: Fingerprint -> Fingerprint -> Ordering #
(<) :: Fingerprint -> Fingerprint -> Bool #
(<=) :: Fingerprint -> Fingerprint -> Bool #
(>) :: Fingerprint -> Fingerprint -> Bool #
(>=) :: Fingerprint -> Fingerprint -> Bool #
max :: Fingerprint -> Fingerprint -> Fingerprint #
min :: Fingerprint -> Fingerprint -> Fingerprint #
Instance details
Defined in Foreign.Ptr
Instance details
Defined in Foreign.C.Types
Instance details
Defined in Foreign.C.Types
Instance details
Defined in Foreign.C.Types
Instance details
Defined in Foreign.C.Types
Instance details
Defined in Foreign.C.Types
Methods
compare :: CSUSeconds -> CSUSeconds -> Ordering #
(<) :: CSUSeconds -> CSUSeconds -> Bool #
(<=) :: CSUSeconds -> CSUSeconds -> Bool #
(>) :: CSUSeconds -> CSUSeconds -> Bool #
(>=) :: CSUSeconds -> CSUSeconds -> Bool #
max :: CSUSeconds -> CSUSeconds -> CSUSeconds #
min :: CSUSeconds -> CSUSeconds -> CSUSeconds #
Instance details
Defined in Foreign.C.Types
Instance details
Defined in Foreign.C.Types
Instance details
Defined in Foreign.C.Types
Methods
compare :: CSigAtomic -> CSigAtomic -> Ordering #
(<) :: CSigAtomic -> CSigAtomic -> Bool #
(<=) :: CSigAtomic -> CSigAtomic -> Bool #
(>) :: CSigAtomic -> CSigAtomic -> Bool #
(>=) :: CSigAtomic -> CSigAtomic -> Bool #
max :: CSigAtomic -> CSigAtomic -> CSigAtomic #
min :: CSigAtomic -> CSigAtomic -> CSigAtomic #
Instance details
Defined in Foreign.C.Types
Instance details
Defined in Foreign.C.Types
Instance details
Defined in Foreign.C.Types
Instance details
Defined in Foreign.C.Types
Instance details
Defined in Foreign.C.Types
Instance details
Defined in Foreign.C.Types
Instance details
Defined in Foreign.C.Types
Instance details
Defined in Foreign.C.Types
Instance details
Defined in Foreign.C.Types
Instance details
Defined in Foreign.C.Types
Instance details
Defined in Foreign.C.Types
Instance details
Defined in GHC.TypeNats
Instance details
Defined in GHC.TypeLits
Methods
compare :: SomeSymbol -> SomeSymbol -> Ordering #
(<) :: SomeSymbol -> SomeSymbol -> Bool #
(<=) :: SomeSymbol -> SomeSymbol -> Bool #
(>) :: SomeSymbol -> SomeSymbol -> Bool #
(>=) :: SomeSymbol -> SomeSymbol -> Bool #
max :: SomeSymbol -> SomeSymbol -> SomeSymbol #
min :: SomeSymbol -> SomeSymbol -> SomeSymbol #
Instance details
Defined in GHC.Generics
Methods
compare :: DecidedStrictness -> DecidedStrictness -> Ordering #
(<) :: DecidedStrictness -> DecidedStrictness -> Bool #
(<=) :: DecidedStrictness -> DecidedStrictness -> Bool #
(>) :: DecidedStrictness -> DecidedStrictness -> Bool #
(>=) :: DecidedStrictness -> DecidedStrictness -> Bool #
max :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness #
min :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness #
Instance details
Defined in GHC.Generics
Methods
compare :: SourceStrictness -> SourceStrictness -> Ordering #
(<) :: SourceStrictness -> SourceStrictness -> Bool #
(<=) :: SourceStrictness -> SourceStrictness -> Bool #
(>) :: SourceStrictness -> SourceStrictness -> Bool #
(>=) :: SourceStrictness -> SourceStrictness -> Bool #
max :: SourceStrictness -> SourceStrictness -> SourceStrictness #
min :: SourceStrictness -> SourceStrictness -> SourceStrictness #
Instance details
Defined in GHC.Generics
Methods
compare :: SourceUnpackedness -> SourceUnpackedness -> Ordering #
(<) :: SourceUnpackedness -> SourceUnpackedness -> Bool #
(<=) :: SourceUnpackedness -> SourceUnpackedness -> Bool #
(>) :: SourceUnpackedness -> SourceUnpackedness -> Bool #
(>=) :: SourceUnpackedness -> SourceUnpackedness -> Bool #
max :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness #
min :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness #
Instance details
Defined in GHC.Generics
Methods
compare :: Associativity -> Associativity -> Ordering #
(<) :: Associativity -> Associativity -> Bool #
(<=) :: Associativity -> Associativity -> Bool #
(>) :: Associativity -> Associativity -> Bool #
(>=) :: Associativity -> Associativity -> Bool #
max :: Associativity -> Associativity -> Associativity #
min :: Associativity -> Associativity -> Associativity #
Instance details
Defined in GHC.Exception.Type
Methods
compare :: ArithException -> ArithException -> Ordering #
(<) :: ArithException -> ArithException -> Bool #
(<=) :: ArithException -> ArithException -> Bool #
(>) :: ArithException -> ArithException -> Bool #
(>=) :: ArithException -> ArithException -> Bool #
max :: ArithException -> ArithException -> ArithException #
min :: ArithException -> ArithException -> ArithException #
Instance details
Defined in GHC.Exception
Instance details
Defined in GHC.IO.Device
Instance details
Defined in GHC.IO.Handle.Types
Methods
compare :: NewlineMode -> NewlineMode -> Ordering #
(<) :: NewlineMode -> NewlineMode -> Bool #
(<=) :: NewlineMode -> NewlineMode -> Bool #
(>) :: NewlineMode -> NewlineMode -> Bool #
(>=) :: NewlineMode -> NewlineMode -> Bool #
max :: NewlineMode -> NewlineMode -> NewlineMode #
min :: NewlineMode -> NewlineMode -> NewlineMode #
Instance details
Defined in GHC.IO.Handle.Types
Instance details
Defined in GHC.IO.Handle.Types
Methods
compare :: BufferMode -> BufferMode -> Ordering #
(<) :: BufferMode -> BufferMode -> Bool #
(<=) :: BufferMode -> BufferMode -> Bool #
(>) :: BufferMode -> BufferMode -> Bool #
(>=) :: BufferMode -> BufferMode -> Bool #
max :: BufferMode -> BufferMode -> BufferMode #
min :: BufferMode -> BufferMode -> BufferMode #
Instance details
Defined in GHC.IO.Exception
Instance details
Defined in GHC.IO.Exception
Methods
compare :: ArrayException -> ArrayException -> Ordering #
(<) :: ArrayException -> ArrayException -> Bool #
(<=) :: ArrayException -> ArrayException -> Bool #
(>) :: ArrayException -> ArrayException -> Bool #
(>=) :: ArrayException -> ArrayException -> Bool #
max :: ArrayException -> ArrayException -> ArrayException #
min :: ArrayException -> ArrayException -> ArrayException #
Instance details
Defined in GHC.IO.Exception
Methods
compare :: AsyncException -> AsyncException -> Ordering #
(<) :: AsyncException -> AsyncException -> Bool #
(<=) :: AsyncException -> AsyncException -> Bool #
(>) :: AsyncException -> AsyncException -> Bool #
(>=) :: AsyncException -> AsyncException -> Bool #
max :: AsyncException -> AsyncException -> AsyncException #
min :: AsyncException -> AsyncException -> AsyncException #
Instance details
Defined in System.Posix.Types
Instance details
Defined in System.Posix.Types
Instance details
Defined in System.Posix.Types
Instance details
Defined in System.Posix.Types
Instance details
Defined in System.Posix.Types
Instance details
Defined in System.Posix.Types
Instance details
Defined in System.Posix.Types
Instance details
Defined in System.Posix.Types
Instance details
Defined in System.Posix.Types
Instance details
Defined in System.Posix.Types
Instance details
Defined in GHC.Conc.Sync
Methods
compare :: ThreadStatus -> ThreadStatus -> Ordering #
(<) :: ThreadStatus -> ThreadStatus -> Bool #
(<=) :: ThreadStatus -> ThreadStatus -> Bool #
(>) :: ThreadStatus -> ThreadStatus -> Bool #
(>=) :: ThreadStatus -> ThreadStatus -> Bool #
max :: ThreadStatus -> ThreadStatus -> ThreadStatus #
min :: ThreadStatus -> ThreadStatus -> ThreadStatus #
Instance details
Defined in GHC.Conc.Sync
Methods
compare :: BlockReason -> BlockReason -> Ordering #
(<) :: BlockReason -> BlockReason -> Bool #
(<=) :: BlockReason -> BlockReason -> Bool #
(>) :: BlockReason -> BlockReason -> Bool #
(>=) :: BlockReason -> BlockReason -> Bool #
max :: BlockReason -> BlockReason -> BlockReason #
min :: BlockReason -> BlockReason -> BlockReason #
Instance details
Defined in GHC.Conc.Sync
Instance details
Defined in Data.Version
Instance details
Defined in GHC.ByteOrder
Instance details
Defined in GHC.Maybe
Instance details
Defined in GHC.Real
Instance details
Defined in GHC.Ptr
Instance details
Defined in GHC.Base
Instance details
Defined in Data.Semigroup.Internal
Instance details
Defined in Data.Semigroup.Internal
Instance details
Defined in Data.Monoid
Instance details
Defined in GHC.ForeignPtr
Methods
compare :: ForeignPtr a -> ForeignPtr a -> Ordering #
(<) :: ForeignPtr a -> ForeignPtr a -> Bool #
(<=) :: ForeignPtr a -> ForeignPtr a -> Bool #
(>) :: ForeignPtr a -> ForeignPtr a -> Bool #
(>=) :: ForeignPtr a -> ForeignPtr a -> Bool #
max :: ForeignPtr a -> ForeignPtr a -> ForeignPtr a #
min :: ForeignPtr a -> ForeignPtr a -> ForeignPtr a #
Instance details
Defined in Data.Functor.Identity
Instance details
Defined in Control.Applicative
Instance details
Defined in Data.Semigroup
Instance details
Defined in Data.Semigroup
Methods
compare :: WrappedMonoid m -> WrappedMonoid m -> Ordering #
(<) :: WrappedMonoid m -> WrappedMonoid m -> Bool #
(<=) :: WrappedMonoid m -> WrappedMonoid m -> Bool #
(>) :: WrappedMonoid m -> WrappedMonoid m -> Bool #
(>=) :: WrappedMonoid m -> WrappedMonoid m -> Bool #
max :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m #
min :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m #
Instance details
Defined in Data.Semigroup
Instance details
Defined in Data.Semigroup
Instance details
Defined in Data.Fixed
Instance details
Defined in Data.Either
Instance details
Defined in Data.Typeable.Internal
Instance details
Defined in Data.Proxy
Instance details
Defined in Data.Semigroup
Instance details
Defined in GHC.Generics
Instance details
Defined in GHC.Generics
Instance details
Defined in GHC.Generics
Instance details
Defined in GHC.Generics
Methods
compare :: URec Float p -> URec Float p -> Ordering #
(<) :: URec Float p -> URec Float p -> Bool #
(<=) :: URec Float p -> URec Float p -> Bool #
(>) :: URec Float p -> URec Float p -> Bool #
(>=) :: URec Float p -> URec Float p -> Bool #
Instance details
Defined in GHC.Generics
Methods
compare :: URec Double p -> URec Double p -> Ordering #
(<) :: URec Double p -> URec Double p -> Bool #
(<=) :: URec Double p -> URec Double p -> Bool #
(>) :: URec Double p -> URec Double p -> Bool #
(>=) :: URec Double p -> URec Double p -> Bool #
Instance details
Defined in GHC.Generics
Instance details
Defined in GHC.Generics
Methods
compare :: URec (Ptr ()) p -> URec (Ptr ()) p -> Ordering #
(<) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #
(<=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #
(>) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #
(>=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #
max :: URec (Ptr ()) p -> URec (Ptr ()) p -> URec (Ptr ()) p #
min :: URec (Ptr ()) p -> URec (Ptr ()) p -> URec (Ptr ()) p #
Instance details
Defined in GHC.Classes
Instance details
Defined in Data.Type.Equality
Instance details
Defined in Data.Type.Coercion
Methods
compare :: Coercion a b -> Coercion a b -> Ordering #
(<) :: Coercion a b -> Coercion a b -> Bool #
(<=) :: Coercion a b -> Coercion a b -> Bool #
(>) :: Coercion a b -> Coercion a b -> Bool #
(>=) :: Coercion a b -> Coercion a b -> Bool #
Instance details
Defined in Data.Semigroup.Internal
Instance details
Defined in Data.Functor.Const
Instance details
Defined in GHC.Generics
Instance details
Defined in GHC.Generics
Instance details
Defined in GHC.Generics
Instance details
Defined in GHC.Classes
Methods
compare :: (a, b, c, d) -> (a, b, c, d) -> Ordering #
(<) :: (a, b, c, d) -> (a, b, c, d) -> Bool #
(<=) :: (a, b, c, d) -> (a, b, c, d) -> Bool #
(>) :: (a, b, c, d) -> (a, b, c, d) -> Bool #
(>=) :: (a, b, c, d) -> (a, b, c, d) -> Bool #
Instance details
Defined in Data.Type.Equality
Instance details
Defined in Data.Functor.Sum
Instance details
Defined in Data.Functor.Product
Methods
compare :: Product f g a -> Product f g a -> Ordering #
(<) :: Product f g a -> Product f g a -> Bool #
(<=) :: Product f g a -> Product f g a -> Bool #
(>) :: Product f g a -> Product f g a -> Bool #
(>=) :: Product f g a -> Product f g a -> Bool #
Instance details
Defined in GHC.Generics
Instance details
Defined in GHC.Generics
Instance details
Defined in GHC.Classes
Methods
compare :: (a, b, c, d, e) -> (a, b, c, d, e) -> Ordering #
(<) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool #
(<=) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool #
(>) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool #
(>=) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool #
max :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #
min :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #
Instance details
Defined in Data.Functor.Compose
Methods
compare :: Compose f g a -> Compose f g a -> Ordering #
(<) :: Compose f g a -> Compose f g a -> Bool #
(<=) :: Compose f g a -> Compose f g a -> Bool #
(>) :: Compose f g a -> Compose f g a -> Bool #
(>=) :: Compose f g a -> Compose f g a -> Bool #
Instance details
Defined in GHC.Classes
Methods
compare :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Ordering #
(<) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool #
(<=) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool #
(>) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool #
(>=) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool #
max :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) #
min :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) #
Instance details
Defined in GHC.Classes
Methods
compare :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Ordering #
(<) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool #
(<=) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool #
(>) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool #
(>=) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool #
max :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) #
min :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) #
Instance details
Defined in GHC.Classes
Methods
compare :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Ordering #
(<) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool #
(<=) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool #
(>) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool #
(>=) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool #
max :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) #
min :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) #
Instance details
Defined in GHC.Classes
Methods
compare :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Ordering #
(<) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool #
(<=) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool #
(>) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool #
(>=) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool #
max :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) #
min :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) #
Instance details
Defined in GHC.Classes
Methods
compare :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Ordering #
(<) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool #
(<=) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool #
(>) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool #
(>=) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool #
max :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) #
min :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) #
Instance details
Defined in GHC.Classes
Methods
compare :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Ordering #
(<) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool #
(<=) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool #
(>) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool #
(>=) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool #
max :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) #
min :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) #
Instance details
Defined in GHC.Classes
Methods
compare :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Ordering #
(<) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool #
(<=) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool #
(>) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool #
(>=) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool #
max :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) #
min :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) #
Instance details
Defined in GHC.Classes
Methods
compare :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Ordering #
(<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool #
(<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool #
(>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool #
(>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool #
max :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) #
min :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) #
Instance details
Defined in GHC.Classes
Methods
compare :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Ordering #
(<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool #
(<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool #
(>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool #
(>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool #
max :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) #
min :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) #
Instance details
Defined in GHC.Classes
Methods
compare :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Ordering #
(<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool #
(<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool #
(>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool #
(>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool #
max :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #
min :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #
Instances
Instances details
Instance details
Defined in GHC.Enum
Methods
succ :: Ordering -> Ordering Source #
pred :: Ordering -> Ordering Source #
toEnum :: Int -> Ordering Source #
fromEnum :: Ordering -> Int Source #
enumFrom :: Ordering -> [Ordering] Source #
enumFromThen :: Ordering -> Ordering -> [Ordering] Source #
enumFromTo :: Ordering -> Ordering -> [Ordering] Source #
enumFromThenTo :: Ordering -> Ordering -> Ordering -> [Ordering] Source #
Instance details
Defined in Data.Data
Methods
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ordering -> c Ordering Source #
gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Ordering Source #
toConstr :: Ordering -> Constr Source #
dataTypeOf :: Ordering -> DataType Source #
dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Ordering) Source #
dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Ordering) Source #
gmapT :: (forall b. Data b => b -> b) -> Ordering -> Ordering Source #
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ordering -> r Source #
gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ordering -> r Source #
gmapQ :: (forall d. Data d => d -> u) -> Ordering -> [u] Source #
gmapQi :: Int -> (forall d. Data d => d -> u) -> Ordering -> u Source #
gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering Source #
gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering Source #
gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering Source #
Instance details
Defined in GHC.Classes
Instance details
Defined in GHC.Arr
The Down
type allows you to reverse sort order conveniently. A value of type
contains a value of type Down
aa
(represented as
).
If Down
aa
has an
instance associated with it then comparing two
values thus wrapped will give you the opposite of their normal sort order.
This is particularly useful when sorting in generalised list comprehensions,
as in: Ord
then sortWith by
Down
x
Since: 4.6.0.0
Constructors
Instances
Instances details
Instance details
Defined in Data.Foldable
Methods
fold :: Monoid m => Down m -> m Source #
foldMap :: Monoid m => (a -> m) -> Down a -> m Source #
foldMap' :: Monoid m => (a -> m) -> Down a -> m Source #
foldr :: (a -> b -> b) -> b -> Down a -> b Source #
foldr' :: (a -> b -> b) -> b -> Down a -> b Source #
foldl :: (b -> a -> b) -> b -> Down a -> b Source #
foldl' :: (b -> a -> b) -> b -> Down a -> b Source #
foldr1 :: (a -> a -> a) -> Down a -> a Source #
foldl1 :: (a -> a -> a) -> Down a -> a Source #
toList :: Down a -> [a] Source #
null :: Down a -> Bool Source #
length :: Down a -> Int Source #
elem :: Eq a => a -> Down a -> Bool Source #
maximum :: Ord a => Down a -> a Source #
minimum :: Ord a => Down a -> a Source #
Instance details
Defined in Data.Traversable
Instance details
Defined in Data.Functor.Classes
Methods
liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Down a) Source #
liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Down a] Source #
liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Down a) Source #
liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Down a] Source #
Instance details
Defined in Data.Functor.Classes
Instance details
Defined in Data.Data
Methods
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Down a -> c (Down a) Source #
gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Down a) Source #
toConstr :: Down a -> Constr Source #
dataTypeOf :: Down a -> DataType Source #
dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Down a)) Source #
dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Down a)) Source #
gmapT :: (forall b. Data b => b -> b) -> Down a -> Down a Source #
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Down a -> r Source #
gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Down a -> r Source #
gmapQ :: (forall d. Data d => d -> u) -> Down a -> [u] Source #
gmapQi :: Int -> (forall d. Data d => d -> u) -> Down a -> u Source #
gmapM :: Monad m => (forall d. Data d => d -> m d) -> Down a -> m (Down a) Source #
gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Down a -> m (Down a) Source #
gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Down a -> m (Down a) Source #
Instance details
Defined in Data.Ord
Instance details
Defined in GHC.Generics
Instance details
Defined in GHC.Generics