| 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
TheOrd class is used for totally ordered datatypes.
Instances ofOrd can be derived for any user-defined datatype whose constituent types are inOrd. The declared order of the constructors in the data declaration determines the ordering in derivedOrd instances. TheOrdering datatype allows a single comparison to determine the precise ordering of two objects.
The Haskell Report defines no laws forOrd. However,<= is customarily expected to implement a non-strict partial order and have the following properties:
x <= y && y <= z =True, thenx <= z =Truex <= x =Truex <= y && y <= x =True, thenx == y =TrueNote that the following operator interactions are expected to hold:
x >= y =y <= xx < y =x <= y && x /= yx > y =y < xx < y =compare x y == LTx > y =compare x y == GTx == y =compare x y == EQmin x y == if x <= y then x else y =Truemax x y == if x >= y then x else y =TrueMinimal complete definition: eithercompare or<=. Usingcompare can be more efficient for complex types.
Methods
| OrdBool | |
| OrdChar | |
| OrdDouble | Note that due to the presence of
Also note that, due to the same,
|
| OrdFloat | Note that due to the presence of
Also note that, due to the same,
|
| OrdInt | |
| OrdInt8Source# | Since: 2.1 |
| OrdInt16Source# | Since: 2.1 |
| OrdInt32Source# | Since: 2.1 |
| OrdInt64Source# | Since: 2.1 |
| OrdInteger | |
| OrdNaturalSource# | Since: 4.8.0.0 |
| OrdOrdering | |
| OrdWord | |
| OrdWord8Source# | Since: 2.1 |
| OrdWord16Source# | Since: 2.1 |
| OrdWord32Source# | Since: 2.1 |
| OrdWord64Source# | Since: 2.1 |
| OrdSomeTypeRepSource# | |
Instance detailsDefined inData.Typeable.Internal Methods compare ::SomeTypeRep ->SomeTypeRep ->Ordering# (<) ::SomeTypeRep ->SomeTypeRep ->Bool# (<=) ::SomeTypeRep ->SomeTypeRep ->Bool# (>) ::SomeTypeRep ->SomeTypeRep ->Bool# (>=) ::SomeTypeRep ->SomeTypeRep ->Bool# | |
| Ord () | |
| OrdTyCon | |
| OrdBigNat | |
| OrdGeneralCategorySource# | Since: 2.1 |
Instance detailsDefined inGHC.Unicode Methods compare ::GeneralCategory ->GeneralCategory ->Ordering# (<) ::GeneralCategory ->GeneralCategory ->Bool# (<=) ::GeneralCategory ->GeneralCategory ->Bool# (>) ::GeneralCategory ->GeneralCategory ->Bool# (>=) ::GeneralCategory ->GeneralCategory ->Bool# | |
| OrdFingerprintSource# | Since: 4.4.0.0 |
Instance detailsDefined inGHC.Fingerprint.Type Methods compare ::Fingerprint ->Fingerprint ->Ordering# (<) ::Fingerprint ->Fingerprint ->Bool# (<=) ::Fingerprint ->Fingerprint ->Bool# (>) ::Fingerprint ->Fingerprint ->Bool# (>=) ::Fingerprint ->Fingerprint ->Bool# | |
| OrdIOModeSource# | Since: 4.2.0.0 |
| OrdIntPtrSource# | |
| OrdWordPtrSource# | |
| OrdCUIntMaxSource# | |
| OrdCIntMaxSource# | |
| OrdCUIntPtrSource# | |
| OrdCIntPtrSource# | |
| OrdCSUSecondsSource# | |
Instance detailsDefined inForeign.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# | |
| OrdCUSecondsSource# | |
Instance detailsDefined inForeign.C.Types | |
| OrdCTimeSource# | |
| OrdCClockSource# | |
| OrdCSigAtomicSource# | |
Instance detailsDefined inForeign.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# | |
| OrdCWcharSource# | |
| OrdCSizeSource# | |
| OrdCPtrdiffSource# | |
| OrdCDoubleSource# | |
| OrdCFloatSource# | |
| OrdCBoolSource# | |
| OrdCULLongSource# | |
| OrdCLLongSource# | |
| OrdCULongSource# | |
| OrdCLongSource# | |
| OrdCUIntSource# | |
| OrdCIntSource# | |
| OrdCUShortSource# | |
| OrdCShortSource# | |
| OrdCUCharSource# | |
| OrdCSCharSource# | |
| OrdCCharSource# | |
| OrdSomeNatSource# | Since: 4.7.0.0 |
| OrdSomeSymbolSource# | Since: 4.7.0.0 |
Instance detailsDefined inGHC.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# | |
| OrdDecidedStrictnessSource# | Since: 4.9.0.0 |
Instance detailsDefined inGHC.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# | |
| OrdSourceStrictnessSource# | Since: 4.9.0.0 |
Instance detailsDefined inGHC.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# | |
| OrdSourceUnpackednessSource# | Since: 4.9.0.0 |
Instance detailsDefined inGHC.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# | |
| OrdAssociativitySource# | Since: 4.6.0.0 |
Instance detailsDefined inGHC.Generics Methods compare ::Associativity ->Associativity ->Ordering# (<) ::Associativity ->Associativity ->Bool# (<=) ::Associativity ->Associativity ->Bool# (>) ::Associativity ->Associativity ->Bool# (>=) ::Associativity ->Associativity ->Bool# | |
| OrdFixitySource# | Since: 4.6.0.0 |
| OrdAnySource# | Since: 2.1 |
| OrdAllSource# | Since: 2.1 |
| OrdArithExceptionSource# | Since: 3.0 |
Instance detailsDefined inGHC.Exception.Type Methods compare ::ArithException ->ArithException ->Ordering# (<) ::ArithException ->ArithException ->Bool# (<=) ::ArithException ->ArithException ->Bool# (>) ::ArithException ->ArithException ->Bool# (>=) ::ArithException ->ArithException ->Bool# | |
| OrdErrorCallSource# | Since: 4.7.0.0 |
Instance detailsDefined inGHC.Exception | |
| OrdSeekModeSource# | Since: 4.2.0.0 |
| OrdNewlineModeSource# | Since: 4.3.0.0 |
Instance detailsDefined inGHC.IO.Handle.Types Methods compare ::NewlineMode ->NewlineMode ->Ordering# (<) ::NewlineMode ->NewlineMode ->Bool# (<=) ::NewlineMode ->NewlineMode ->Bool# (>) ::NewlineMode ->NewlineMode ->Bool# (>=) ::NewlineMode ->NewlineMode ->Bool# | |
| OrdNewlineSource# | Since: 4.3.0.0 |
| OrdBufferModeSource# | Since: 4.2.0.0 |
Instance detailsDefined inGHC.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# | |
| OrdExitCodeSource# | |
| OrdArrayExceptionSource# | Since: 4.2.0.0 |
Instance detailsDefined inGHC.IO.Exception Methods compare ::ArrayException ->ArrayException ->Ordering# (<) ::ArrayException ->ArrayException ->Bool# (<=) ::ArrayException ->ArrayException ->Bool# (>) ::ArrayException ->ArrayException ->Bool# (>=) ::ArrayException ->ArrayException ->Bool# | |
| OrdAsyncExceptionSource# | Since: 4.2.0.0 |
Instance detailsDefined inGHC.IO.Exception Methods compare ::AsyncException ->AsyncException ->Ordering# (<) ::AsyncException ->AsyncException ->Bool# (<=) ::AsyncException ->AsyncException ->Bool# (>) ::AsyncException ->AsyncException ->Bool# (>=) ::AsyncException ->AsyncException ->Bool# | |
| OrdFdSource# | |
| OrdCTimerSource# | |
| OrdCKeySource# | |
| OrdCIdSource# | |
| OrdCFsFilCntSource# | |
Instance detailsDefined inSystem.Posix.Types | |
| OrdCFsBlkCntSource# | |
Instance detailsDefined inSystem.Posix.Types | |
| OrdCClockIdSource# | |
Instance detailsDefined inSystem.Posix.Types | |
| OrdCBlkCntSource# | |
| OrdCBlkSizeSource# | |
Instance detailsDefined inSystem.Posix.Types | |
| OrdCRLimSource# | |
| OrdCTcflagSource# | |
| OrdCSpeedSource# | |
| OrdCCcSource# | |
| OrdCUidSource# | |
| OrdCNlinkSource# | |
| OrdCGidSource# | |
| OrdCSsizeSource# | |
| OrdCPidSource# | |
| OrdCOffSource# | |
| OrdCModeSource# | |
| OrdCInoSource# | |
| OrdCDevSource# | |
| OrdThreadStatusSource# | Since: 4.3.0.0 |
Instance detailsDefined inGHC.Conc.Sync Methods compare ::ThreadStatus ->ThreadStatus ->Ordering# (<) ::ThreadStatus ->ThreadStatus ->Bool# (<=) ::ThreadStatus ->ThreadStatus ->Bool# (>) ::ThreadStatus ->ThreadStatus ->Bool# (>=) ::ThreadStatus ->ThreadStatus ->Bool# | |
| OrdBlockReasonSource# | Since: 4.3.0.0 |
Instance detailsDefined inGHC.Conc.Sync Methods compare ::BlockReason ->BlockReason ->Ordering# (<) ::BlockReason ->BlockReason ->Bool# (<=) ::BlockReason ->BlockReason ->Bool# (>) ::BlockReason ->BlockReason ->Bool# (>=) ::BlockReason ->BlockReason ->Bool# | |
| OrdThreadIdSource# | Since: 4.2.0.0 |
| OrdVersionSource# | Since: 2.1 |
| OrdByteOrderSource# | Since: 4.11.0.0 |
Instance detailsDefined inGHC.ByteOrder | |
| OrdUniqueSource# | |
| OrdVoidSource# | Since: 4.8.0.0 |
| Ord a =>Ord [a] | |
| Ord a =>Ord (Maybe a)Source# | Since: 2.1 |
| Integral a =>Ord (Ratio a)Source# | Since: 2.0.1 |
| Ord (Ptr a)Source# | Since: 2.1 |
| Ord (FunPtr a)Source# | |
| Ord p =>Ord (Par1 p)Source# | Since: 4.7.0.0 |
| Ord a =>Ord (NonEmpty a)Source# | Since: 4.9.0.0 |
Instance detailsDefined inGHC.Base | |
| Ord a =>Ord (Down a)Source# | Since: 4.6.0.0 |
| Ord a =>Ord (Product a)Source# | Since: 2.1 |
Instance detailsDefined inData.Semigroup.Internal | |
| Ord a =>Ord (Sum a)Source# | Since: 2.1 |
| Ord a =>Ord (Dual a)Source# | Since: 2.1 |
| Ord a =>Ord (Last a)Source# | Since: 2.1 |
| Ord a =>Ord (First a)Source# | Since: 2.1 |
| Ord (ForeignPtr a)Source# | Since: 2.1 |
Instance detailsDefined inGHC.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# | |
| Ord a =>Ord (Identity a)Source# | Since: 4.8.0.0 |
Instance detailsDefined inData.Functor.Identity | |
| Ord a =>Ord (ZipList a)Source# | Since: 4.7.0.0 |
Instance detailsDefined inControl.Applicative | |
| Ord a =>Ord (Option a)Source# | Since: 4.9.0.0 |
| Ord m =>Ord (WrappedMonoid m)Source# | Since: 4.9.0.0 |
Instance detailsDefined inData.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# | |
| Ord a =>Ord (Last a)Source# | Since: 4.9.0.0 |
| Ord a =>Ord (First a)Source# | Since: 4.9.0.0 |
| Ord a =>Ord (Max a)Source# | Since: 4.9.0.0 |
| Ord a =>Ord (Min a)Source# | Since: 4.9.0.0 |
| Ord (Fixed a)Source# | Since: 2.1 |
| (Ord a,Ord b) =>Ord (Either a b)Source# | Since: 2.1 |
Instance detailsDefined inData.Either | |
| Ord (V1 p)Source# | Since: 4.9.0.0 |
| Ord (U1 p)Source# | Since: 4.7.0.0 |
| Ord (TypeRep a)Source# | Since: 4.4.0.0 |
Instance detailsDefined inData.Typeable.Internal | |
| (Ord a,Ord b) =>Ord (a, b) | |
| Ord (Proxy s)Source# | Since: 4.7.0.0 |
| Ord a =>Ord (Arg a b)Source# | Since: 4.9.0.0 |
| Ord (f p) =>Ord (Rec1 f p)Source# | Since: 4.7.0.0 |
| Ord (URecWord p)Source# | Since: 4.9.0.0 |
Instance detailsDefined inGHC.Generics | |
| Ord (URecInt p)Source# | Since: 4.9.0.0 |
Instance detailsDefined inGHC.Generics | |
| Ord (URecFloat p)Source# | |
| Ord (URecDouble p)Source# | Since: 4.9.0.0 |
Instance detailsDefined inGHC.Generics | |
| Ord (URecChar p)Source# | Since: 4.9.0.0 |
Instance detailsDefined inGHC.Generics | |
| Ord (URec (Ptr ()) p)Source# | Since: 4.9.0.0 |
Instance detailsDefined inGHC.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# | |
| (Ord a,Ord b,Ord c) =>Ord (a, b, c) | |
Instance detailsDefined inGHC.Classes | |
| Ord (a:~: b)Source# | Since: 4.7.0.0 |
Instance detailsDefined inData.Type.Equality | |
| Ord (Coercion a b)Source# | Since: 4.7.0.0 |
Instance detailsDefined inData.Type.Coercion | |
| Ord (f a) =>Ord (Alt f a)Source# | Since: 4.8.0.0 |
| Ord (f a) =>Ord (Ap f a)Source# | Since: 4.12.0.0 |
| Ord a =>Ord (Const a b)Source# | Since: 4.9.0.0 |
Instance detailsDefined inData.Functor.Const | |
| Ord c =>Ord (K1 i c p)Source# | Since: 4.7.0.0 |
| (Ord (f p),Ord (g p)) =>Ord ((f:+: g) p)Source# | Since: 4.7.0.0 |
| (Ord (f p),Ord (g p)) =>Ord ((f:*: g) p)Source# | Since: 4.7.0.0 |
| (Ord a,Ord b,Ord c,Ord d) =>Ord (a, b, c, d) | |
Instance detailsDefined inGHC.Classes | |
| Ord (a:~~: b)Source# | Since: 4.10.0.0 |
Instance detailsDefined inData.Type.Equality | |
| (Ord1 f,Ord1 g,Ord a) =>Ord (Sum f g a)Source# | Since: 4.9.0.0 |
Instance detailsDefined inData.Functor.Sum | |
| (Ord1 f,Ord1 g,Ord a) =>Ord (Product f g a)Source# | Since: 4.9.0.0 |
Instance detailsDefined inData.Functor.Product | |
| Ord (f p) =>Ord (M1 i c f p)Source# | Since: 4.7.0.0 |
Instance detailsDefined inGHC.Generics | |
| Ord (f (g p)) =>Ord ((f:.: g) p)Source# | Since: 4.7.0.0 |
| (Ord a,Ord b,Ord c,Ord d,Ord e) =>Ord (a, b, c, d, e) | |
Instance detailsDefined inGHC.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)# | |
| (Ord1 f,Ord1 g,Ord a) =>Ord (Compose f g a)Source# | Since: 4.9.0.0 |
Instance detailsDefined inData.Functor.Compose | |
| (Ord a,Ord b,Ord c,Ord d,Ord e,Ord f) =>Ord (a, b, c, d, e, f) | |
Instance detailsDefined inGHC.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)# | |
| (Ord a,Ord b,Ord c,Ord d,Ord e,Ord f,Ord g) =>Ord (a, b, c, d, e, f, g) | |
Instance detailsDefined inGHC.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)# | |
| (Ord a,Ord b,Ord c,Ord d,Ord e,Ord f,Ord g,Ord h) =>Ord (a, b, c, d, e, f, g, h) | |
Instance detailsDefined inGHC.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)# | |
| (Ord a,Ord b,Ord c,Ord d,Ord e,Ord f,Ord g,Ord h,Ord i) =>Ord (a, b, c, d, e, f, g, h, i) | |
Instance detailsDefined inGHC.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)# | |
| (Ord a,Ord b,Ord c,Ord d,Ord e,Ord f,Ord g,Ord h,Ord i,Ord j) =>Ord (a, b, c, d, e, f, g, h, i, j) | |
Instance detailsDefined inGHC.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)# | |
| (Ord a,Ord b,Ord c,Ord d,Ord e,Ord f,Ord g,Ord h,Ord i,Ord j,Ord k) =>Ord (a, b, c, d, e, f, g, h, i, j, k) | |
Instance detailsDefined inGHC.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)# | |
| (Ord a,Ord b,Ord c,Ord d,Ord e,Ord f,Ord g,Ord h,Ord i,Ord j,Ord k,Ord l) =>Ord (a, b, c, d, e, f, g, h, i, j, k, l) | |
Instance detailsDefined inGHC.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)# | |
| (Ord a,Ord b,Ord c,Ord d,Ord e,Ord f,Ord g,Ord h,Ord i,Ord j,Ord k,Ord l,Ord m) =>Ord (a, b, c, d, e, f, g, h, i, j, k, l, m) | |
Instance detailsDefined inGHC.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)# | |
| (Ord a,Ord b,Ord c,Ord d,Ord e,Ord f,Ord g,Ord h,Ord i,Ord j,Ord k,Ord l,Ord m,Ord n) =>Ord (a, b, c, d, e, f, g, h, i, j, k, l, m, n) | |
Instance detailsDefined inGHC.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)# | |
| (Ord a,Ord b,Ord c,Ord d,Ord e,Ord f,Ord g,Ord h,Ord i,Ord j,Ord k,Ord l,Ord m,Ord n,Ord o) =>Ord (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) | |
Instance detailsDefined inGHC.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)# | |
TheDown type allows you to reverse sort order conveniently. A value of type contains a value of typeDown aa (represented as). IfDown 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:Ordthen sortWith byDown x
Since: 4.6.0.0
Constructors
| Down a |
| MonadDownSource# | Since: 4.11.0.0 |
| FunctorDownSource# | Since: 4.11.0.0 |
| MonadFixDownSource# | Since: 4.12.0.0 |
| ApplicativeDownSource# | Since: 4.11.0.0 |
| FoldableDownSource# | Since: 4.12.0.0 |
Instance detailsDefined inData.Foldable Methods fold ::Monoid m =>Down m -> mSource# foldMap ::Monoid m => (a -> m) ->Down a -> mSource# foldr :: (a -> b -> b) -> b ->Down a -> bSource# foldr' :: (a -> b -> b) -> b ->Down a -> bSource# foldl :: (b -> a -> b) -> b ->Down a -> bSource# foldl' :: (b -> a -> b) -> b ->Down a -> bSource# foldr1 :: (a -> a -> a) ->Down a -> aSource# foldl1 :: (a -> a -> a) ->Down a -> aSource# elem ::Eq a => a ->Down a ->BoolSource# maximum ::Ord a =>Down a -> aSource# minimum ::Ord a =>Down a -> aSource# | |
| TraversableDownSource# | Since: 4.12.0.0 |
| MonadZipDownSource# | Since: 4.12.0.0 |
| Show1DownSource# | Since: 4.12.0.0 |
| Read1DownSource# | Since: 4.12.0.0 |
Instance detailsDefined inData.Functor.Classes | |
| Ord1DownSource# | Since: 4.12.0.0 |
Instance detailsDefined inData.Functor.Classes | |
| Eq1DownSource# | Since: 4.12.0.0 |
| Eq a =>Eq (Down a)Source# | Since: 4.6.0.0 |
| Data a =>Data (Down a)Source# | Since: 4.12.0.0 |
Instance detailsDefined inData.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 ->ConstrSource# dataTypeOf ::Down a ->DataTypeSource# 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 aSource# gmapQl :: (r -> r' -> r) -> r -> (forall d.Data d => d -> r') ->Down a -> rSource# gmapQr :: (r' -> r -> r) -> r -> (forall d.Data d => d -> r') ->Down a -> rSource# gmapQ :: (forall d.Data d => d -> u) ->Down a -> [u]Source# gmapQi ::Int -> (forall d.Data d => d -> u) ->Down a -> uSource# 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# | |
| Num a =>Num (Down a)Source# | Since: 4.11.0.0 |
| Ord a =>Ord (Down a)Source# | Since: 4.6.0.0 |
| Read a =>Read (Down a)Source# | Since: 4.7.0.0 |
| Show a =>Show (Down a)Source# | Since: 4.7.0.0 |
| Generic (Down a)Source# | |
| Semigroup a =>Semigroup (Down a)Source# | Since: 4.11.0.0 |
| Monoid a =>Monoid (Down a)Source# | Since: 4.11.0.0 |
| Generic1DownSource# | |
| typeRep (Down a)Source# | Since: 4.12.0.0 |
Instance detailsDefined inGHC.Generics | |
| typeRep1DownSource# | Since: 4.12.0.0 |
Instance detailsDefined inGHC.Generics | |
Produced byHaddock version 2.20.0