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
class Eq a => Ord a where Source #
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.
Ord
, as defined by the Haskell report, implements a total order and has the
following properties:
- Comparability
x <= y || y <= x
=True
- Transitivity
- if
x <= y && y <= z
=True
, thenx <= z
=True
- Reflexivity
x <= x
=True
- Antisymmetry
- if
x <= y && y <= x
=True
, thenx == y
=True
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
Note that (7.) and (8.) do not require min
and max
to return either of
their arguments. The result is merely required to equal one of the
arguments in terms of (==)
.
Minimal complete definition: either compare
or <=
.
Using compare
can be more efficient for complex types.
Methods
compare :: a -> a -> Ordering Source #
(<) :: a -> a -> Bool infix 4 Source #
(<=) :: a -> a -> Bool infix 4 Source #
(>) :: a -> a -> Bool infix 4 Source #
Instances
Instances details
Non-lexicographic ordering. This compares the lengths of the byte arrays first and uses a lexicographic ordering if the lengths are equal. Subject to change between major versions.
Since: base-4.17.0.0
Instance details
Defined in Data.Array.Byte
Methods
compare :: ByteArray -> ByteArray -> Ordering Source #
(<) :: ByteArray -> ByteArray -> Bool Source #
(<=) :: ByteArray -> ByteArray -> Bool Source #
(>) :: ByteArray -> ByteArray -> Bool Source #
(>=) :: ByteArray -> ByteArray -> Bool Source #
Instance details
Defined in Data.Semigroup.Internal
Instance details
Defined in Data.Semigroup.Internal
Instance details
Defined in Data.Typeable.Internal
Methods
compare :: SomeTypeRep -> SomeTypeRep -> Ordering Source #
(<) :: SomeTypeRep -> SomeTypeRep -> Bool Source #
(<=) :: SomeTypeRep -> SomeTypeRep -> Bool Source #
(>) :: SomeTypeRep -> SomeTypeRep -> Bool Source #
(>=) :: SomeTypeRep -> SomeTypeRep -> Bool Source #
max :: SomeTypeRep -> SomeTypeRep -> SomeTypeRep Source #
min :: SomeTypeRep -> SomeTypeRep -> SomeTypeRep Source #
Instance details
Defined in Data.Unique
Instance details
Defined in Data.Version
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 Foreign.C.Types
Instance details
Defined in Foreign.C.Types
Methods
compare :: CSUSeconds -> CSUSeconds -> Ordering Source #
(<) :: CSUSeconds -> CSUSeconds -> Bool Source #
(<=) :: CSUSeconds -> CSUSeconds -> Bool Source #
(>) :: CSUSeconds -> CSUSeconds -> Bool Source #
(>=) :: CSUSeconds -> CSUSeconds -> Bool Source #
max :: CSUSeconds -> CSUSeconds -> CSUSeconds Source #
min :: CSUSeconds -> CSUSeconds -> CSUSeconds Source #
Instance details
Defined in Foreign.C.Types
Instance details
Defined in Foreign.C.Types
Methods
compare :: CSigAtomic -> CSigAtomic -> Ordering Source #
(<) :: CSigAtomic -> CSigAtomic -> Bool Source #
(<=) :: CSigAtomic -> CSigAtomic -> Bool Source #
(>) :: CSigAtomic -> CSigAtomic -> Bool Source #
(>=) :: CSigAtomic -> CSigAtomic -> Bool Source #
max :: CSigAtomic -> CSigAtomic -> CSigAtomic Source #
min :: CSigAtomic -> CSigAtomic -> CSigAtomic Source #
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
Methods
compare :: CUSeconds -> CUSeconds -> Ordering Source #
(<) :: CUSeconds -> CUSeconds -> Bool Source #
(<=) :: CUSeconds -> CUSeconds -> Bool Source #
(>) :: CUSeconds -> CUSeconds -> Bool Source #
(>=) :: CUSeconds -> CUSeconds -> Bool Source #
Instance details
Defined in Foreign.C.Types
Instance details
Defined in Foreign.C.Types
Instance details
Defined in Foreign.Ptr
Instance details
Defined in Foreign.Ptr
Instance details
Defined in GHC.Base
Instance details
Defined in GHC.ByteOrder
Methods
compare :: ByteOrder -> ByteOrder -> Ordering Source #
(<) :: ByteOrder -> ByteOrder -> Bool Source #
(<=) :: ByteOrder -> ByteOrder -> Bool Source #
(>) :: ByteOrder -> ByteOrder -> Bool Source #
(>=) :: ByteOrder -> ByteOrder -> Bool Source #
Instance details
Defined in GHC.Conc.Sync
Methods
compare :: BlockReason -> BlockReason -> Ordering Source #
(<) :: BlockReason -> BlockReason -> Bool Source #
(<=) :: BlockReason -> BlockReason -> Bool Source #
(>) :: BlockReason -> BlockReason -> Bool Source #
(>=) :: BlockReason -> BlockReason -> Bool Source #
max :: BlockReason -> BlockReason -> BlockReason Source #
min :: BlockReason -> BlockReason -> BlockReason Source #
Instance details
Defined in GHC.Conc.Sync
Instance details
Defined in GHC.Conc.Sync
Methods
compare :: ThreadStatus -> ThreadStatus -> Ordering Source #
(<) :: ThreadStatus -> ThreadStatus -> Bool Source #
(<=) :: ThreadStatus -> ThreadStatus -> Bool Source #
(>) :: ThreadStatus -> ThreadStatus -> Bool Source #
(>=) :: ThreadStatus -> ThreadStatus -> Bool Source #
max :: ThreadStatus -> ThreadStatus -> ThreadStatus Source #
min :: ThreadStatus -> ThreadStatus -> ThreadStatus Source #
Instance details
Defined in GHC.Event.TimeOut
Methods
compare :: TimeoutKey -> TimeoutKey -> Ordering Source #
(<) :: TimeoutKey -> TimeoutKey -> Bool Source #
(<=) :: TimeoutKey -> TimeoutKey -> Bool Source #
(>) :: TimeoutKey -> TimeoutKey -> Bool Source #
(>=) :: TimeoutKey -> TimeoutKey -> Bool Source #
max :: TimeoutKey -> TimeoutKey -> TimeoutKey Source #
min :: TimeoutKey -> TimeoutKey -> TimeoutKey Source #
Instance details
Defined in GHC.Exception
Methods
compare :: ErrorCall -> ErrorCall -> Ordering Source #
(<) :: ErrorCall -> ErrorCall -> Bool Source #
(<=) :: ErrorCall -> ErrorCall -> Bool Source #
(>) :: ErrorCall -> ErrorCall -> Bool Source #
(>=) :: ErrorCall -> ErrorCall -> Bool Source #
Instance details
Defined in GHC.Exception.Type
Methods
compare :: ArithException -> ArithException -> Ordering Source #
(<) :: ArithException -> ArithException -> Bool Source #
(<=) :: ArithException -> ArithException -> Bool Source #
(>) :: ArithException -> ArithException -> Bool Source #
(>=) :: ArithException -> ArithException -> Bool Source #
max :: ArithException -> ArithException -> ArithException Source #
min :: ArithException -> ArithException -> ArithException Source #
Instance details
Defined in GHC.Fingerprint.Type
Methods
compare :: Fingerprint -> Fingerprint -> Ordering Source #
(<) :: Fingerprint -> Fingerprint -> Bool Source #
(<=) :: Fingerprint -> Fingerprint -> Bool Source #
(>) :: Fingerprint -> Fingerprint -> Bool Source #
(>=) :: Fingerprint -> Fingerprint -> Bool Source #
max :: Fingerprint -> Fingerprint -> Fingerprint Source #
min :: Fingerprint -> Fingerprint -> Fingerprint Source #
Instance details
Defined in GHC.Generics
Methods
compare :: Associativity -> Associativity -> Ordering Source #
(<) :: Associativity -> Associativity -> Bool Source #
(<=) :: Associativity -> Associativity -> Bool Source #
(>) :: Associativity -> Associativity -> Bool Source #
(>=) :: Associativity -> Associativity -> Bool Source #
max :: Associativity -> Associativity -> Associativity Source #
min :: Associativity -> Associativity -> Associativity Source #
Instance details
Defined in GHC.Generics
Methods
compare :: DecidedStrictness -> DecidedStrictness -> Ordering Source #
(<) :: DecidedStrictness -> DecidedStrictness -> Bool Source #
(<=) :: DecidedStrictness -> DecidedStrictness -> Bool Source #
(>) :: DecidedStrictness -> DecidedStrictness -> Bool Source #
(>=) :: DecidedStrictness -> DecidedStrictness -> Bool Source #
max :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness Source #
min :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness Source #
Instance details
Defined in GHC.Generics
Instance details
Defined in GHC.Generics
Methods
compare :: SourceStrictness -> SourceStrictness -> Ordering Source #
(<) :: SourceStrictness -> SourceStrictness -> Bool Source #
(<=) :: SourceStrictness -> SourceStrictness -> Bool Source #
(>) :: SourceStrictness -> SourceStrictness -> Bool Source #
(>=) :: SourceStrictness -> SourceStrictness -> Bool Source #
max :: SourceStrictness -> SourceStrictness -> SourceStrictness Source #
min :: SourceStrictness -> SourceStrictness -> SourceStrictness Source #
Instance details
Defined in GHC.Generics
Methods
compare :: SourceUnpackedness -> SourceUnpackedness -> Ordering Source #
(<) :: SourceUnpackedness -> SourceUnpackedness -> Bool Source #
(<=) :: SourceUnpackedness -> SourceUnpackedness -> Bool Source #
(>) :: SourceUnpackedness -> SourceUnpackedness -> Bool Source #
(>=) :: SourceUnpackedness -> SourceUnpackedness -> Bool Source #
max :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness Source #
min :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness Source #
Instance details
Defined in GHC.IO.Device
Instance details
Defined in GHC.IO.Exception
Methods
compare :: ArrayException -> ArrayException -> Ordering Source #
(<) :: ArrayException -> ArrayException -> Bool Source #
(<=) :: ArrayException -> ArrayException -> Bool Source #
(>) :: ArrayException -> ArrayException -> Bool Source #
(>=) :: ArrayException -> ArrayException -> Bool Source #
max :: ArrayException -> ArrayException -> ArrayException Source #
min :: ArrayException -> ArrayException -> ArrayException Source #
Instance details
Defined in GHC.IO.Exception
Methods
compare :: AsyncException -> AsyncException -> Ordering Source #
(<) :: AsyncException -> AsyncException -> Bool Source #
(<=) :: AsyncException -> AsyncException -> Bool Source #
(>) :: AsyncException -> AsyncException -> Bool Source #
(>=) :: AsyncException -> AsyncException -> Bool Source #
max :: AsyncException -> AsyncException -> AsyncException Source #
min :: AsyncException -> AsyncException -> AsyncException Source #
Instance details
Defined in GHC.IO.Exception
Instance details
Defined in GHC.IO.Handle.Types
Methods
compare :: BufferMode -> BufferMode -> Ordering Source #
(<) :: BufferMode -> BufferMode -> Bool Source #
(<=) :: BufferMode -> BufferMode -> Bool Source #
(>) :: BufferMode -> BufferMode -> Bool Source #
(>=) :: BufferMode -> BufferMode -> Bool Source #
max :: BufferMode -> BufferMode -> BufferMode Source #
min :: BufferMode -> BufferMode -> BufferMode Source #
Instance details
Defined in GHC.IO.Handle.Types
Instance details
Defined in GHC.IO.Handle.Types
Methods
compare :: NewlineMode -> NewlineMode -> Ordering Source #
(<) :: NewlineMode -> NewlineMode -> Bool Source #
(<=) :: NewlineMode -> NewlineMode -> Bool Source #
(>) :: NewlineMode -> NewlineMode -> Bool Source #
(>=) :: NewlineMode -> NewlineMode -> Bool Source #
max :: NewlineMode -> NewlineMode -> NewlineMode Source #
min :: NewlineMode -> NewlineMode -> NewlineMode Source #
Instance details
Defined in GHC.IO.IOMode
Instance details
Defined in GHC.Int
Instance details
Defined in GHC.Int
Instance details
Defined in GHC.Int
Instance details
Defined in GHC.Int
Instance details
Defined in GHC.TypeLits
Instance details
Defined in GHC.TypeLits
Methods
compare :: SomeSymbol -> SomeSymbol -> Ordering Source #
(<) :: SomeSymbol -> SomeSymbol -> Bool Source #
(<=) :: SomeSymbol -> SomeSymbol -> Bool Source #
(>) :: SomeSymbol -> SomeSymbol -> Bool Source #
(>=) :: SomeSymbol -> SomeSymbol -> Bool Source #
max :: SomeSymbol -> SomeSymbol -> SomeSymbol Source #
min :: SomeSymbol -> SomeSymbol -> SomeSymbol Source #
Instance details
Defined in GHC.TypeNats
Instance details
Defined in GHC.Unicode
Methods
compare :: GeneralCategory -> GeneralCategory -> Ordering Source #
(<) :: GeneralCategory -> GeneralCategory -> Bool Source #
(<=) :: GeneralCategory -> GeneralCategory -> Bool Source #
(>) :: GeneralCategory -> GeneralCategory -> Bool Source #
(>=) :: GeneralCategory -> GeneralCategory -> Bool Source #
max :: GeneralCategory -> GeneralCategory -> GeneralCategory Source #
min :: GeneralCategory -> GeneralCategory -> GeneralCategory Source #
Instance details
Defined in GHC.Word
Instance details
Defined in GHC.Word
Instance details
Defined in GHC.Word
Instance details
Defined in GHC.Word
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
Methods
compare :: CFsBlkCnt -> CFsBlkCnt -> Ordering Source #
(<) :: CFsBlkCnt -> CFsBlkCnt -> Bool Source #
(<=) :: CFsBlkCnt -> CFsBlkCnt -> Bool Source #
(>) :: CFsBlkCnt -> CFsBlkCnt -> Bool Source #
(>=) :: CFsBlkCnt -> CFsBlkCnt -> Bool Source #
Instance details
Defined in System.Posix.Types
Methods
compare :: CFsFilCnt -> CFsFilCnt -> Ordering Source #
(<) :: CFsFilCnt -> CFsFilCnt -> Bool Source #
(<=) :: CFsFilCnt -> CFsFilCnt -> Bool Source #
(>) :: CFsFilCnt -> CFsFilCnt -> Bool Source #
(>=) :: CFsFilCnt -> CFsFilCnt -> Bool Source #
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 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.Num.BigNat
Instance details
Defined in GHC.Classes
Instance details
Defined in GHC.Classes
Instance details
Defined in GHC.Num.Integer
Instance details
Defined in GHC.Num.Natural
Instance details
Defined in GHC.Classes
Instance details
Defined in GHC.Classes
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
Instance details
Defined in GHC.Classes
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.Classes
Instance details
Defined in GHC.Classes
Instance details
Defined in Control.Applicative
Methods
compare :: ZipList a -> ZipList a -> Ordering Source #
(<) :: ZipList a -> ZipList a -> Bool Source #
(<=) :: ZipList a -> ZipList a -> Bool Source #
(>) :: ZipList a -> ZipList a -> Bool Source #
(>=) :: ZipList a -> ZipList a -> Bool Source #
Instance details
Defined in Data.Functor.Identity
Methods
compare :: Identity a -> Identity a -> Ordering Source #
(<) :: Identity a -> Identity a -> Bool Source #
(<=) :: Identity a -> Identity a -> Bool Source #
(>) :: Identity a -> Identity a -> Bool Source #
(>=) :: Identity a -> Identity a -> Bool Source #
Instance details
Defined in Data.Monoid
Instance details
Defined in Data.Monoid
Instance details
Defined in Data.Ord
Instance details
Defined in Data.Semigroup
Instance details
Defined in Data.Semigroup
Instance details
Defined in Data.Semigroup
Instance details
Defined in Data.Semigroup
Instance details
Defined in Data.Semigroup
Methods
compare :: WrappedMonoid m -> WrappedMonoid m -> Ordering Source #
(<) :: WrappedMonoid m -> WrappedMonoid m -> Bool Source #
(<=) :: WrappedMonoid m -> WrappedMonoid m -> Bool Source #
(>) :: WrappedMonoid m -> WrappedMonoid m -> Bool Source #
(>=) :: WrappedMonoid m -> WrappedMonoid m -> Bool Source #
max :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m Source #
min :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m Source #
Instance details
Defined in Data.Semigroup.Internal
Instance details
Defined in Data.Semigroup.Internal
Methods
compare :: Product a -> Product a -> Ordering Source #
(<) :: Product a -> Product a -> Bool Source #
(<=) :: Product a -> Product a -> Bool Source #
(>) :: Product a -> Product a -> Bool Source #
(>=) :: Product a -> Product a -> Bool Source #
Instance details
Defined in Data.Semigroup.Internal
Instance details
Defined in Foreign.C.ConstPtr
Methods
compare :: ConstPtr a -> ConstPtr a -> Ordering Source #
(<) :: ConstPtr a -> ConstPtr a -> Bool Source #
(<=) :: ConstPtr a -> ConstPtr a -> Bool Source #
(>) :: ConstPtr a -> ConstPtr a -> Bool Source #
(>=) :: ConstPtr a -> ConstPtr a -> Bool Source #
Instance details
Defined in GHC.Base
Methods
compare :: NonEmpty a -> NonEmpty a -> Ordering Source #
(<) :: NonEmpty a -> NonEmpty a -> Bool Source #
(<=) :: NonEmpty a -> NonEmpty a -> Bool Source #
(>) :: NonEmpty a -> NonEmpty a -> Bool Source #
(>=) :: NonEmpty a -> NonEmpty a -> Bool Source #
Instance details
Defined in GHC.ForeignPtr
Methods
compare :: ForeignPtr a -> ForeignPtr a -> Ordering Source #
(<) :: ForeignPtr a -> ForeignPtr a -> Bool Source #
(<=) :: ForeignPtr a -> ForeignPtr a -> Bool Source #
(>) :: ForeignPtr a -> ForeignPtr a -> Bool Source #
(>=) :: ForeignPtr a -> ForeignPtr a -> Bool Source #
max :: ForeignPtr a -> ForeignPtr a -> ForeignPtr a Source #
min :: ForeignPtr a -> ForeignPtr a -> ForeignPtr a Source #
Instance details
Defined in GHC.Generics
Instance details
Defined in GHC.Ptr
Instance details
Defined in GHC.Ptr
Instance details
Defined in GHC.Real
Instance details
Defined in GHC.Maybe
Instance details
Defined in Data.Either
Methods
compare :: Either a b -> Either a b -> Ordering Source #
(<) :: Either a b -> Either a b -> Bool Source #
(<=) :: Either a b -> Either a b -> Bool Source #
(>) :: Either a b -> Either a b -> Bool Source #
(>=) :: Either a b -> Either a b -> Bool Source #
Instance details
Defined in Data.Fixed
Instance details
Defined in Data.Proxy
Instance details
Defined in Data.Semigroup
Instance details
Defined in Data.Typeable.Internal
Methods
compare :: TypeRep a -> TypeRep a -> Ordering Source #
(<) :: TypeRep a -> TypeRep a -> Bool Source #
(<=) :: TypeRep a -> TypeRep a -> Bool Source #
(>) :: TypeRep a -> TypeRep a -> Bool Source #
(>=) :: TypeRep a -> TypeRep a -> Bool Source #
Instance details
Defined in GHC.Arr
Methods
compare :: Array i e -> Array i e -> Ordering Source #
(<) :: Array i e -> Array i e -> Bool Source #
(<=) :: Array i e -> Array i e -> Bool Source #
(>) :: Array i e -> Array i e -> Bool Source #
(>=) :: Array i e -> Array i e -> Bool Source #
Instance details
Defined in GHC.Generics
Instance details
Defined in GHC.Generics
Instance details
Defined in GHC.Classes
Instance details
Defined in Data.Functor.Const
Methods
compare :: Const a b -> Const a b -> Ordering Source #
(<) :: Const a b -> Const a b -> Bool Source #
(<=) :: Const a b -> Const a b -> Bool Source #
(>) :: Const a b -> Const a b -> Bool Source #
(>=) :: Const a b -> Const a b -> Bool Source #
Instance details
Defined in Data.Monoid
Instance details
Defined in Data.Semigroup.Internal
Instance details
Defined in Data.Type.Coercion
Methods
compare :: Coercion a b -> Coercion a b -> Ordering Source #
(<) :: Coercion a b -> Coercion a b -> Bool Source #
(<=) :: Coercion a b -> Coercion a b -> Bool Source #
(>) :: Coercion a b -> Coercion a b -> Bool Source #
(>=) :: Coercion a b -> Coercion a b -> Bool Source #
max :: Coercion a b -> Coercion a b -> Coercion a b Source #
min :: Coercion a b -> Coercion a b -> Coercion a b Source #
Instance details
Defined in Data.Type.Equality
Methods
compare :: (a :~: b) -> (a :~: b) -> Ordering Source #
(<) :: (a :~: b) -> (a :~: b) -> Bool Source #
(<=) :: (a :~: b) -> (a :~: b) -> Bool Source #
(>) :: (a :~: b) -> (a :~: b) -> Bool Source #
(>=) :: (a :~: b) -> (a :~: b) -> Bool Source #
Instance details
Defined in GHC.Generics
Methods
compare :: Generically1 f a -> Generically1 f a -> Ordering Source #
(<) :: Generically1 f a -> Generically1 f a -> Bool Source #
(<=) :: Generically1 f a -> Generically1 f a -> Bool Source #
(>) :: Generically1 f a -> Generically1 f a -> Bool Source #
(>=) :: Generically1 f a -> Generically1 f a -> Bool Source #
max :: Generically1 f a -> Generically1 f a -> Generically1 f a Source #
min :: Generically1 f a -> Generically1 f a -> Generically1 f a Source #
Instance details
Defined in GHC.Generics
Instance details
Defined in GHC.Generics
Methods
compare :: URec (Ptr ()) p -> URec (Ptr ()) p -> Ordering Source #
(<) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool Source #
(<=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool Source #
(>) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool Source #
(>=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool Source #
max :: URec (Ptr ()) p -> URec (Ptr ()) p -> URec (Ptr ()) p Source #
min :: URec (Ptr ()) p -> URec (Ptr ()) p -> URec (Ptr ()) p Source #
Instance details
Defined in GHC.Generics
Methods
compare :: URec Char p -> URec Char p -> Ordering Source #
(<) :: URec Char p -> URec Char p -> Bool Source #
(<=) :: URec Char p -> URec Char p -> Bool Source #
(>) :: URec Char p -> URec Char p -> Bool Source #
(>=) :: URec Char p -> URec Char p -> Bool Source #
Instance details
Defined in GHC.Generics
Methods
compare :: URec Double p -> URec Double p -> Ordering Source #
(<) :: URec Double p -> URec Double p -> Bool Source #
(<=) :: URec Double p -> URec Double p -> Bool Source #
(>) :: URec Double p -> URec Double p -> Bool Source #
(>=) :: URec Double p -> URec Double p -> Bool Source #
max :: URec Double p -> URec Double p -> URec Double p Source #
min :: URec Double p -> URec Double p -> URec Double p Source #
Instance details
Defined in GHC.Generics
Methods
compare :: URec Float p -> URec Float p -> Ordering Source #
(<) :: URec Float p -> URec Float p -> Bool Source #
(<=) :: URec Float p -> URec Float p -> Bool Source #
(>) :: URec Float p -> URec Float p -> Bool Source #
(>=) :: URec Float p -> URec Float p -> Bool Source #
max :: URec Float p -> URec Float p -> URec Float p Source #
min :: URec Float p -> URec Float p -> URec Float p Source #
Instance details
Defined in GHC.Generics
Methods
compare :: URec Int p -> URec Int p -> Ordering Source #
(<) :: URec Int p -> URec Int p -> Bool Source #
(<=) :: URec Int p -> URec Int p -> Bool Source #
(>) :: URec Int p -> URec Int p -> Bool Source #
(>=) :: URec Int p -> URec Int p -> Bool Source #
Instance details
Defined in GHC.Generics
Methods
compare :: URec Word p -> URec Word p -> Ordering Source #
(<) :: URec Word p -> URec Word p -> Bool Source #
(<=) :: URec Word p -> URec Word p -> Bool Source #
(>) :: URec Word p -> URec Word p -> Bool Source #
(>=) :: URec Word p -> URec Word p -> Bool Source #
Instance details
Defined in GHC.Classes
Methods
compare :: (a, b, c) -> (a, b, c) -> Ordering Source #
(<) :: (a, b, c) -> (a, b, c) -> Bool Source #
(<=) :: (a, b, c) -> (a, b, c) -> Bool Source #
(>) :: (a, b, c) -> (a, b, c) -> Bool Source #
(>=) :: (a, b, c) -> (a, b, c) -> Bool Source #
Instance details
Defined in Data.Functor.Product
Methods
compare :: Product f g a -> Product f g a -> Ordering Source #
(<) :: Product f g a -> Product f g a -> Bool Source #
(<=) :: Product f g a -> Product f g a -> Bool Source #
(>) :: Product f g a -> Product f g a -> Bool Source #
(>=) :: Product f g a -> Product f g a -> Bool Source #
max :: Product f g a -> Product f g a -> Product f g a Source #
min :: Product f g a -> Product f g a -> Product f g a Source #
Instance details
Defined in Data.Functor.Sum
Methods
compare :: Sum f g a -> Sum f g a -> Ordering Source #
(<) :: Sum f g a -> Sum f g a -> Bool Source #
(<=) :: Sum f g a -> Sum f g a -> Bool Source #
(>) :: Sum f g a -> Sum f g a -> Bool Source #
(>=) :: Sum f g a -> Sum f g a -> Bool Source #
Instance details
Defined in Data.Type.Equality
Methods
compare :: (a :~~: b) -> (a :~~: b) -> Ordering Source #
(<) :: (a :~~: b) -> (a :~~: b) -> Bool Source #
(<=) :: (a :~~: b) -> (a :~~: b) -> Bool Source #
(>) :: (a :~~: b) -> (a :~~: b) -> Bool Source #
(>=) :: (a :~~: b) -> (a :~~: b) -> Bool Source #
Instance details
Defined in GHC.Generics
Methods
compare :: (f :*: g) p -> (f :*: g) p -> Ordering Source #
(<) :: (f :*: g) p -> (f :*: g) p -> Bool Source #
(<=) :: (f :*: g) p -> (f :*: g) p -> Bool Source #
(>) :: (f :*: g) p -> (f :*: g) p -> Bool Source #
(>=) :: (f :*: g) p -> (f :*: g) p -> Bool Source #
Instance details
Defined in GHC.Generics
Methods
compare :: (f :+: g) p -> (f :+: g) p -> Ordering Source #
(<) :: (f :+: g) p -> (f :+: g) p -> Bool Source #
(<=) :: (f :+: g) p -> (f :+: g) p -> Bool Source #
(>) :: (f :+: g) p -> (f :+: g) p -> Bool Source #
(>=) :: (f :+: g) p -> (f :+: g) p -> Bool Source #
Instance details
Defined in GHC.Generics
Instance details
Defined in GHC.Classes
Methods
compare :: (a, b, c, d) -> (a, b, c, d) -> Ordering Source #
(<) :: (a, b, c, d) -> (a, b, c, d) -> Bool Source #
(<=) :: (a, b, c, d) -> (a, b, c, d) -> Bool Source #
(>) :: (a, b, c, d) -> (a, b, c, d) -> Bool Source #
(>=) :: (a, b, c, d) -> (a, b, c, d) -> Bool Source #
max :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source #
min :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source #
Instance details
Defined in Data.Functor.Compose
Methods
compare :: Compose f g a -> Compose f g a -> Ordering Source #
(<) :: Compose f g a -> Compose f g a -> Bool Source #
(<=) :: Compose f g a -> Compose f g a -> Bool Source #
(>) :: Compose f g a -> Compose f g a -> Bool Source #
(>=) :: Compose f g a -> Compose f g a -> Bool Source #
max :: Compose f g a -> Compose f g a -> Compose f g a Source #
min :: Compose f g a -> Compose f g a -> Compose f g a Source #
Instance details
Defined in GHC.Generics
Methods
compare :: (f :.: g) p -> (f :.: g) p -> Ordering Source #
(<) :: (f :.: g) p -> (f :.: g) p -> Bool Source #
(<=) :: (f :.: g) p -> (f :.: g) p -> Bool Source #
(>) :: (f :.: g) p -> (f :.: g) p -> Bool Source #
(>=) :: (f :.: g) p -> (f :.: g) p -> Bool Source #
Instance details
Defined in GHC.Generics
Methods
compare :: M1 i c f p -> M1 i c f p -> Ordering Source #
(<) :: M1 i c f p -> M1 i c f p -> Bool Source #
(<=) :: M1 i c f p -> M1 i c f p -> Bool Source #
(>) :: M1 i c f p -> M1 i c f p -> Bool Source #
(>=) :: M1 i c f p -> M1 i c f p -> Bool Source #
Instance details
Defined in GHC.Classes
Methods
compare :: (a, b, c, d, e) -> (a, b, c, d, e) -> Ordering Source #
(<) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool Source #
(<=) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool Source #
(>) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool Source #
(>=) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool Source #
max :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source #
min :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source #
Instance details
Defined in GHC.Classes
Methods
compare :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Ordering Source #
(<) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool Source #
(<=) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool Source #
(>) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool Source #
(>=) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool Source #
max :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) Source #
min :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) Source #
Instance details
Defined in GHC.Classes
Methods
compare :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Ordering Source #
(<) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool Source #
(<=) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool Source #
(>) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool Source #
(>=) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool Source #
max :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) Source #
min :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) Source #
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 Source #
(<) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool Source #
(<=) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool Source #
(>) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool Source #
(>=) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool Source #
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) Source #
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) Source #
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 Source #
(<) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool Source #
(<=) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool Source #
(>) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool Source #
(>=) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool Source #
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) Source #
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) Source #
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 Source #
(<) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool Source #
(<=) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool Source #
(>) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool Source #
(>=) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool Source #
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) Source #
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) Source #
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 Source #
(<) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool Source #
(<=) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool Source #
(>) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool Source #
(>=) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool Source #
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) Source #
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) Source #
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 Source #
(<) :: (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 Source #
(<=) :: (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 Source #
(>) :: (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 Source #
(>=) :: (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 Source #
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) Source #
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) Source #
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 Source #
(<) :: (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 Source #
(<=) :: (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 Source #
(>) :: (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 Source #
(>=) :: (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 Source #
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) Source #
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) Source #
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 Source #
(<) :: (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 Source #
(<=) :: (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 Source #
(>) :: (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 Source #
(>=) :: (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 Source #
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) Source #
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) Source #
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 Source #
(<) :: (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 Source #
(<=) :: (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 Source #
(>) :: (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 Source #
(>=) :: (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 Source #
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) Source #
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) Source #
Instances
Instances details
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.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 GHC.Ix
Instance details
Defined in GHC.Classes
The Down
type allows you to reverse sort order conveniently. A value of type
contains a value of type Down
aa
(represented as
).Down
a
If a
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
>>>
compare True False
GT
>>>
compare (Down True) (Down False)
LT
If a
has a
instance then the wrapped instance also respects
the reversed ordering by exchanging the values of Bounded
and
minBound
.maxBound
>>>
minBound :: Int
-9223372036854775808
>>>
minBound :: Down Int
Down 9223372036854775807
All other instances of
behave as they do for Down
aa
.
Since: base-4.6.0.0
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.Foldable1
Methods
fold1 :: Semigroup m => Down m -> m Source #
foldMap1 :: Semigroup m => (a -> m) -> Down a -> m Source #
foldMap1' :: Semigroup m => (a -> m) -> Down a -> m Source #
toNonEmpty :: Down a -> NonEmpty a Source #
maximum :: Ord a => Down a -> a Source #
minimum :: Ord a => Down a -> a Source #
foldrMap1 :: (a -> b) -> (a -> b -> b) -> Down a -> b Source #
foldlMap1' :: (a -> b) -> (b -> a -> b) -> Down a -> b Source #
foldlMap1 :: (a -> b) -> (b -> a -> b) -> Down a -> b Source #
foldrMap1' :: (a -> b) -> (a -> b -> b) -> Down a -> b Source #
Instance details
Defined in Data.Functor.Classes
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.Traversable
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
Methods
sizeOf :: Down a -> Int Source #
alignment :: Down a -> Int Source #
peekElemOff :: Ptr (Down a) -> Int -> IO (Down a) Source #
pokeElemOff :: Ptr (Down a) -> Int -> Down a -> IO () Source #
peekByteOff :: Ptr b -> Int -> IO (Down a) Source #
pokeByteOff :: Ptr b -> Int -> Down a -> IO () Source #
Instance details
Defined in Data.Ord
Methods
(.&.) :: Down a -> Down a -> Down a Source #
(.|.) :: Down a -> Down a -> Down a Source #
xor :: Down a -> Down a -> Down a Source #
complement :: Down a -> Down a Source #
shift :: Down a -> Int -> Down a Source #
rotate :: Down a -> Int -> Down a Source #
setBit :: Down a -> Int -> Down a Source #
clearBit :: Down a -> Int -> Down a Source #
complementBit :: Down a -> Int -> Down a Source #
testBit :: Down a -> Int -> Bool Source #
bitSizeMaybe :: Down a -> Maybe Int Source #
bitSize :: Down a -> Int Source #
isSigned :: Down a -> Bool Source #
shiftL :: Down a -> Int -> Down a Source #
unsafeShiftL :: Down a -> Int -> Down a Source #
shiftR :: Down a -> Int -> Down a Source #
unsafeShiftR :: Down a -> Int -> Down a Source #
rotateL :: Down a -> Int -> Down a Source #
Swaps
and minBound
of the underlying type.maxBound
Since: base-4.14.0.0
Swaps
and succ
of the underlying type.pred
Since: base-4.18.0.0
Instance details
Defined in Data.Ord
Methods
succ :: Down a -> Down a Source #
pred :: Down a -> Down a Source #
toEnum :: Int -> Down a Source #
fromEnum :: Down a -> Int Source #
enumFrom :: Down a -> [Down a] Source #
enumFromThen :: Down a -> Down a -> [Down a] Source #
enumFromTo :: Down a -> Down a -> [Down a] Source #
enumFromThenTo :: Down a -> Down a -> Down a -> [Down a] Source #
Instance details
Defined in Data.Ord
Methods
exp :: Down a -> Down a Source #
log :: Down a -> Down a Source #
sqrt :: Down a -> Down a Source #
(**) :: Down a -> Down a -> Down a Source #
logBase :: Down a -> Down a -> Down a Source #
sin :: Down a -> Down a Source #
cos :: Down a -> Down a Source #
tan :: Down a -> Down a Source #
asin :: Down a -> Down a Source #
acos :: Down a -> Down a Source #
atan :: Down a -> Down a Source #
sinh :: Down a -> Down a Source #
cosh :: Down a -> Down a Source #
tanh :: Down a -> Down a Source #
asinh :: Down a -> Down a Source #
acosh :: Down a -> Down a Source #
atanh :: Down a -> Down a Source #
log1p :: Down a -> Down a Source #
expm1 :: Down a -> Down a Source #
Instance details
Defined in Data.Ord
Methods
floatRadix :: Down a -> Integer Source #
floatDigits :: Down a -> Int Source #
floatRange :: Down a -> (Int, Int) Source #
decodeFloat :: Down a -> (Integer, Int) Source #
encodeFloat :: Integer -> Int -> Down a Source #
exponent :: Down a -> Int Source #
significand :: Down a -> Down a Source #
scaleFloat :: Int -> Down a -> Down a Source #
isNaN :: Down a -> Bool Source #
isInfinite :: Down a -> Bool Source #
isDenormalized :: Down a -> Bool Source #
isNegativeZero :: Down a -> Bool Source #
Instance details
Defined in Data.Ord
Instance details
Defined in Data.Ord
This instance would be equivalent to the derived instances of the
Down
newtype if the getDown
field were removed
Since: base-4.7.0.0
This instance would be equivalent to the derived instances of the
Down
newtype if the getDown
field were removed
Since: base-4.7.0.0
Instance details
Defined in Data.Ord
Instance details
Defined in GHC.Generics
Instance details
Defined in GHC.Generics
comparing :: Ord a => (b -> a) -> b -> b -> Ordering Source #
comparing p x y = compare (p x) (p y)
Useful combinator for use in conjunction with the xxxBy
family
of functions from Data.List, for example:
... sortBy (comparing fst) ...
clamp :: Ord a => (a, a) -> a -> a Source #
clamp (low, high) a = min high (max a low)
Function for ensuring the value a
is within the inclusive bounds given by
low
and high
. If it is, a
is returned unchanged. The result
is otherwise low
if a <= low
, or high
if high <= a
.
When clamp is used at Double and Float, it has NaN propagating semantics in
its second argument. That is, clamp (l,h) NaN = NaN
, but clamp (NaN, NaN)
x = x
.
>>>
clamp (0, 10) 2
2
>>>
clamp ('a', 'm') 'x'
'm'