Copyright | (c) The University of Glasgow 2005 |
---|---|
License | BSD-style (see the file libraries/base/LICENSE) |
Maintainer | [email protected] |
Stability | stable |
Portability | portable |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
Orderings
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.
Minimal complete definition: either compare
or <=
. Using compare
can be more efficient for complex types.
compare :: a -> a -> Ordering Source
(<) :: a -> a -> Bool infix 4 Source
(<=) :: a -> a -> Bool infix 4 Source
(>) :: a -> a -> Bool infix 4 Source
Ord Bool | |
Ord Char | |
Ord Double | |
Ord Float | |
Ord Int | |
Ord Int8 | Since: 2.1 |
Ord Int16 | Since: 2.1 |
Ord Int32 | Since: 2.1 |
Ord Int64 | Since: 2.1 |
Ord Integer | |
Ord Natural | |
Ord Ordering | |
Ord Word | |
Ord Word8 | Since: 2.1 |
Ord Word16 | Since: 2.1 |
Ord Word32 | Since: 2.1 |
Ord Word64 | Since: 2.1 |
Ord SomeTypeRep | |
Methodscompare :: 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 | |
Ord () | |
Ord TyCon | |
Ord BigNat | |
Ord GeneralCategory | |
Methodscompare :: 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 | |
Ord Fingerprint | |
Methodscompare :: 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 | |
Ord IOMode | |
Ord IntPtr | |
Ord WordPtr | |
Ord CUIntMax | |
Ord CIntMax | |
Ord CUIntPtr | |
Ord CIntPtr | |
Ord CSUSeconds | |
Methodscompare :: 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 | |
Ord CUSeconds | |
Ord CTime | |
Ord CClock | |
Ord CSigAtomic | |
Methodscompare :: 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 | |
Ord CWchar | |
Ord CSize | |
Ord CPtrdiff | |
Ord CDouble | |
Ord CFloat | |
Ord CBool | |
Ord CULLong | |
Ord CLLong | |
Ord CULong | |
Ord CLong | |
Ord CUInt | |
Ord CInt | |
Ord CUShort | |
Ord CShort | |
Ord CUChar | |
Ord CSChar | |
Ord CChar | |
Ord SomeNat | Since: 4.7.0.0 |
Ord SomeSymbol | Since: 4.7.0.0 |
Methodscompare :: 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 | |
Ord DecidedStrictness | |
Methodscompare :: 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 | |
Ord SourceStrictness | |
Methodscompare :: 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 | |
Ord SourceUnpackedness | |
Methodscompare :: 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 | |
Ord Associativity | |
Methodscompare :: 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 | |
Ord Fixity | |
Ord Any | |
Ord All | |
Ord ArithException | |
Methodscompare :: 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 | |
Ord ErrorCall | |
Ord SeekMode | |
Ord NewlineMode | |
Methodscompare :: 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 | |
Ord Newline | |
Ord BufferMode | |
Methodscompare :: 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 | |
Ord ExitCode | |
Ord ArrayException | |
Methodscompare :: 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 | |
Ord AsyncException | |
Methodscompare :: 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 | |
Ord Fd | |
Ord CTimer | |
Ord CKey | |
Ord CId | |
Ord CFsFilCnt | |
Ord CFsBlkCnt | |
Ord CClockId | |
Ord CBlkCnt | |
Ord CBlkSize | |
Ord CRLim | |
Ord CTcflag | |
Ord CSpeed | |
Ord CCc | |
Ord CUid | |
Ord CNlink | |
Ord CGid | |
Ord CSsize | |
Ord CPid | |
Ord COff | |
Ord CMode | |
Ord CIno | |
Ord CDev | |
Ord ThreadStatus | |
Methodscompare :: 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 | |
Ord BlockReason | |
Methodscompare :: 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 | |
Ord ThreadId | Since: 4.2.0.0 |
Ord Version | Since: 2.1 |
Ord Unique | |
Ord Void | Since: 4.8.0.0 |
Ord a => Ord [a] | |
Ord a => Ord (Maybe a) | |
Integral a => Ord (Ratio a) | Since: 2.0.1 |
Ord (Ptr a) | |
Ord (FunPtr a) | |
Ord p => Ord (Par1 p) | |
Ord a => Ord (Down a) | Since: 4.6.0.0 |
Ord a => Ord (Last a) | |
Ord a => Ord (First a) | |
Ord a => Ord (Product a) | |
Ord a => Ord (Sum a) | |
Ord a => Ord (Dual a) | |
Ord (ForeignPtr a) | Since: 2.1 |
Methodscompare :: 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 | |
Ord a => Ord (Identity a) | |
Methodscompare :: 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 | |
Ord a => Ord (ZipList a) | |
Ord a => Ord (NonEmpty a) | |
Methodscompare :: 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 | |
Ord a => Ord (Option a) | |
Ord m => Ord (WrappedMonoid m) | |
Methodscompare :: 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 | |
Ord a => Ord (Last a) | |
Ord a => Ord (First a) | |
Ord a => Ord (Max a) | |
Ord a => Ord (Min a) | |
Ord (Fixed a) | |
(Ord b, Ord a) => Ord (Either a b) | |
Methodscompare :: 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 | |
Ord (V1 k p) | |
Ord (U1 k p) | Since: 4.9.0.0 |
Ord (TypeRep k a) | Since: 4.4.0.0 |
Methodscompare :: TypeRep k a -> TypeRep k a -> Ordering Source (<) :: TypeRep k a -> TypeRep k a -> Bool Source (<=) :: TypeRep k a -> TypeRep k a -> Bool Source (>) :: TypeRep k a -> TypeRep k a -> Bool Source (>=) :: TypeRep k a -> TypeRep k a -> Bool Source | |
(Ord a, Ord b) => Ord (a, b) | |
Ord (Proxy k s) | Since: 4.7.0.0 |
Ord a => Ord (Arg a b) | Since: 4.9.0.0 |
Ord (f p) => Ord (Rec1 k f p) | |
Methodscompare :: Rec1 k f p -> Rec1 k f p -> Ordering Source (<) :: Rec1 k f p -> Rec1 k f p -> Bool Source (<=) :: Rec1 k f p -> Rec1 k f p -> Bool Source (>) :: Rec1 k f p -> Rec1 k f p -> Bool Source (>=) :: Rec1 k f p -> Rec1 k f p -> Bool Source | |
Ord (URec k Word p) | |
Methodscompare :: URec k Word p -> URec k Word p -> Ordering Source (<) :: URec k Word p -> URec k Word p -> Bool Source (<=) :: URec k Word p -> URec k Word p -> Bool Source (>) :: URec k Word p -> URec k Word p -> Bool Source (>=) :: URec k Word p -> URec k Word p -> Bool Source max :: URec k Word p -> URec k Word p -> URec k Word p Source min :: URec k Word p -> URec k Word p -> URec k Word p Source | |
Ord (URec k Int p) | |
Methodscompare :: URec k Int p -> URec k Int p -> Ordering Source (<) :: URec k Int p -> URec k Int p -> Bool Source (<=) :: URec k Int p -> URec k Int p -> Bool Source (>) :: URec k Int p -> URec k Int p -> Bool Source (>=) :: URec k Int p -> URec k Int p -> Bool Source | |
Ord (URec k Float p) | |
Methodscompare :: URec k Float p -> URec k Float p -> Ordering Source (<) :: URec k Float p -> URec k Float p -> Bool Source (<=) :: URec k Float p -> URec k Float p -> Bool Source (>) :: URec k Float p -> URec k Float p -> Bool Source (>=) :: URec k Float p -> URec k Float p -> Bool Source max :: URec k Float p -> URec k Float p -> URec k Float p Source min :: URec k Float p -> URec k Float p -> URec k Float p Source | |
Ord (URec k Double p) | |
Methodscompare :: URec k Double p -> URec k Double p -> Ordering Source (<) :: URec k Double p -> URec k Double p -> Bool Source (<=) :: URec k Double p -> URec k Double p -> Bool Source (>) :: URec k Double p -> URec k Double p -> Bool Source (>=) :: URec k Double p -> URec k Double p -> Bool Source max :: URec k Double p -> URec k Double p -> URec k Double p Source min :: URec k Double p -> URec k Double p -> URec k Double p Source | |
Ord (URec k Char p) | |
Methodscompare :: URec k Char p -> URec k Char p -> Ordering Source (<) :: URec k Char p -> URec k Char p -> Bool Source (<=) :: URec k Char p -> URec k Char p -> Bool Source (>) :: URec k Char p -> URec k Char p -> Bool Source (>=) :: URec k Char p -> URec k Char p -> Bool Source max :: URec k Char p -> URec k Char p -> URec k Char p Source min :: URec k Char p -> URec k Char p -> URec k Char p Source | |
Ord (URec k (Ptr ()) p) | |
Methodscompare :: URec k (Ptr ()) p -> URec k (Ptr ()) p -> Ordering Source (<) :: URec k (Ptr ()) p -> URec k (Ptr ()) p -> Bool Source (<=) :: URec k (Ptr ()) p -> URec k (Ptr ()) p -> Bool Source (>) :: URec k (Ptr ()) p -> URec k (Ptr ()) p -> Bool Source (>=) :: URec k (Ptr ()) p -> URec k (Ptr ()) p -> Bool Source max :: URec k (Ptr ()) p -> URec k (Ptr ()) p -> URec k (Ptr ()) p Source min :: URec k (Ptr ()) p -> URec k (Ptr ()) p -> URec k (Ptr ()) p Source | |
(Ord a, Ord b, Ord c) => Ord (a, b, c) | |
Ord ((:~:) k a b) | |
Methodscompare :: (k :~: a) b -> (k :~: a) b -> Ordering Source (<) :: (k :~: a) b -> (k :~: a) b -> Bool Source (<=) :: (k :~: a) b -> (k :~: a) b -> Bool Source (>) :: (k :~: a) b -> (k :~: a) b -> Bool Source (>=) :: (k :~: a) b -> (k :~: a) b -> Bool Source | |
Ord (Coercion k a b) | |
Methodscompare :: Coercion k a b -> Coercion k a b -> Ordering Source (<) :: Coercion k a b -> Coercion k a b -> Bool Source (<=) :: Coercion k a b -> Coercion k a b -> Bool Source (>) :: Coercion k a b -> Coercion k a b -> Bool Source (>=) :: Coercion k a b -> Coercion k a b -> Bool Source max :: Coercion k a b -> Coercion k a b -> Coercion k a b Source min :: Coercion k a b -> Coercion k a b -> Coercion k a b Source | |
Ord (f a) => Ord (Alt k f a) | |
Ord a => Ord (Const k a b) | |
Methodscompare :: Const k a b -> Const k a b -> Ordering Source (<) :: Const k a b -> Const k a b -> Bool Source (<=) :: Const k a b -> Const k a b -> Bool Source (>) :: Const k a b -> Const k a b -> Bool Source (>=) :: Const k a b -> Const k a b -> Bool Source | |
Ord c => Ord (K1 k i c p) | |
Methodscompare :: K1 k i c p -> K1 k i c p -> Ordering Source (<) :: K1 k i c p -> K1 k i c p -> Bool Source (<=) :: K1 k i c p -> K1 k i c p -> Bool Source (>) :: K1 k i c p -> K1 k i c p -> Bool Source (>=) :: K1 k i c p -> K1 k i c p -> Bool Source | |
(Ord (g p), Ord (f p)) => Ord ((:+:) k f g p) | |
Methodscompare :: (k :+: f) g p -> (k :+: f) g p -> Ordering Source (<) :: (k :+: f) g p -> (k :+: f) g p -> Bool Source (<=) :: (k :+: f) g p -> (k :+: f) g p -> Bool Source (>) :: (k :+: f) g p -> (k :+: f) g p -> Bool Source (>=) :: (k :+: f) g p -> (k :+: f) g p -> Bool Source max :: (k :+: f) g p -> (k :+: f) g p -> (k :+: f) g p Source min :: (k :+: f) g p -> (k :+: f) g p -> (k :+: f) g p Source | |
(Ord (g p), Ord (f p)) => Ord ((:*:) k f g p) | |
Methodscompare :: (k :*: f) g p -> (k :*: f) g p -> Ordering Source (<) :: (k :*: f) g p -> (k :*: f) g p -> Bool Source (<=) :: (k :*: f) g p -> (k :*: f) g p -> Bool Source (>) :: (k :*: f) g p -> (k :*: f) g p -> Bool Source (>=) :: (k :*: f) g p -> (k :*: f) g p -> Bool Source max :: (k :*: f) g p -> (k :*: f) g p -> (k :*: f) g p Source min :: (k :*: f) g p -> (k :*: f) g p -> (k :*: f) g p Source | |
(Ord a, Ord b, Ord c, Ord d) => Ord (a, b, c, d) | |
Methodscompare :: (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 | |
Ord ((:~~:) k1 k2 a b) | Since: 4.10.0.0 |
Methodscompare :: (k1 :~~: k2) a b -> (k1 :~~: k2) a b -> Ordering Source (<) :: (k1 :~~: k2) a b -> (k1 :~~: k2) a b -> Bool Source (<=) :: (k1 :~~: k2) a b -> (k1 :~~: k2) a b -> Bool Source (>) :: (k1 :~~: k2) a b -> (k1 :~~: k2) a b -> Bool Source (>=) :: (k1 :~~: k2) a b -> (k1 :~~: k2) a b -> Bool Source max :: (k1 :~~: k2) a b -> (k1 :~~: k2) a b -> (k1 :~~: k2) a b Source min :: (k1 :~~: k2) a b -> (k1 :~~: k2) a b -> (k1 :~~: k2) a b Source | |
(Ord1 f, Ord1 g, Ord a) => Ord (Sum * f g a) | Since: 4.9.0.0 |
Methodscompare :: 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 | |
(Ord1 f, Ord1 g, Ord a) => Ord (Product * f g a) | Since: 4.9.0.0 |
Methodscompare :: 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 | |
Ord (f p) => Ord (M1 k i c f p) | |
Methodscompare :: M1 k i c f p -> M1 k i c f p -> Ordering Source (<) :: M1 k i c f p -> M1 k i c f p -> Bool Source (<=) :: M1 k i c f p -> M1 k i c f p -> Bool Source (>) :: M1 k i c f p -> M1 k i c f p -> Bool Source (>=) :: M1 k i c f p -> M1 k i c f p -> Bool Source | |
Ord (f (g p)) => Ord ((:.:) k2 k1 f g p) | |
Methodscompare :: (k2 :.: k1) f g p -> (k2 :.: k1) f g p -> Ordering Source (<) :: (k2 :.: k1) f g p -> (k2 :.: k1) f g p -> Bool Source (<=) :: (k2 :.: k1) f g p -> (k2 :.: k1) f g p -> Bool Source (>) :: (k2 :.: k1) f g p -> (k2 :.: k1) f g p -> Bool Source (>=) :: (k2 :.: k1) f g p -> (k2 :.: k1) f g p -> Bool Source max :: (k2 :.: k1) f g p -> (k2 :.: k1) f g p -> (k2 :.: k1) f g p Source min :: (k2 :.: k1) f g p -> (k2 :.: k1) f g p -> (k2 :.: k1) f g p Source | |
(Ord a, Ord b, Ord c, Ord d, Ord e) => Ord (a, b, c, d, e) | |
Methodscompare :: (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 | |
(Ord1 f, Ord1 g, Ord a) => Ord (Compose * * f g a) | Since: 4.9.0.0 |
Methodscompare :: 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 | |
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f) => Ord (a, b, c, d, e, f) | |
Methodscompare :: (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 | |
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g) => Ord (a, b, c, d, e, f, g) | |
Methodscompare :: (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 | |
(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) | |
Methodscompare :: (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 | |
(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) | |
Methodscompare :: (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 | |
(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) | |
Methodscompare :: (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 | |
(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) | |
Methodscompare :: (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 | |
(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) | |
Methodscompare :: (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 | |
(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) | |
Methodscompare :: (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 | |
(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) | |
Methodscompare :: (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 | |
(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) | |
Methodscompare :: (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 |
The Down
type allows you to reverse sort order conveniently. A value of type Down a
contains a value of type a
(represented as Down a
). If a
has an Ord
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: then sortWith by Down x
Provides Show
and Read
instances (since: 4.7.0.0).
Since: 4.6.0.0
Down a |
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) ...
© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/8.2.1/docs/html/libraries/base-4.10.0.0/Data-Ord.html