W3cubDocs

/Haskell 8

Prelude

Copyright (c) The University of Glasgow 2001
License BSD-style (see the file libraries/base/LICENSE)
Maintainer libraries@haskell.org
Stability stable
Portability portable
Safe Haskell Trustworthy
Language Haskell2010

Description

The Prelude: a standard module. The Prelude is imported by default into all Haskell modules unless either there is an explicit import statement for it, or the NoImplicitPrelude extension is enabled.

Standard types, classes and related functions

Basic data types

data Bool :: * Source

Constructors

False
True

Instances

Bounded Bool

Since: 2.1

Enum Bool

Since: 2.1

Eq Bool

Methods

(==) :: Bool -> Bool -> Bool Source

(/=) :: Bool -> Bool -> Bool Source

Data Bool

Since: 4.0.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Bool -> c Bool Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Bool Source

toConstr :: Bool -> Constr Source

dataTypeOf :: Bool -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Bool) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Bool) Source

gmapT :: (forall b. Data b => b -> b) -> Bool -> Bool Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bool -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bool -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Bool -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Bool -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Bool -> m Bool Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Bool -> m Bool Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Bool -> m Bool Source

Ord Bool

Methods

compare :: Bool -> Bool -> Ordering Source

(<) :: Bool -> Bool -> Bool Source

(<=) :: Bool -> Bool -> Bool Source

(>) :: Bool -> Bool -> Bool Source

(>=) :: Bool -> Bool -> Bool Source

max :: Bool -> Bool -> Bool Source

min :: Bool -> Bool -> Bool Source

Read Bool

Since: 2.1

Show Bool
Ix Bool

Since: 2.1

Methods

range :: (Bool, Bool) -> [Bool] Source

index :: (Bool, Bool) -> Bool -> Int Source

unsafeIndex :: (Bool, Bool) -> Bool -> Int

inRange :: (Bool, Bool) -> Bool -> Bool Source

rangeSize :: (Bool, Bool) -> Int Source

unsafeRangeSize :: (Bool, Bool) -> Int

Generic Bool

Associated Types

type Rep Bool :: * -> * Source

Methods

from :: Bool -> Rep Bool x Source

to :: Rep Bool x -> Bool Source

FiniteBits Bool

Since: 4.7.0.0

Bits Bool

Interpret Bool as 1-bit bit-field

Since: 4.7.0.0

Storable Bool

Since: 2.1

type Rep Bool
type Rep Bool = D1 * (MetaData "Bool" "GHC.Types" "ghc-prim" False) ((:+:) * (C1 * (MetaCons "False" PrefixI False) (U1 *)) (C1 * (MetaCons "True" PrefixI False) (U1 *)))
type (==) Bool a b
type (==) Bool a b

(&&) :: Bool -> Bool -> Bool infixr 3 Source

Boolean "and"

(||) :: Bool -> Bool -> Bool infixr 2 Source

Boolean "or"

not :: Bool -> Bool Source

Boolean "not"

otherwise :: Bool Source

otherwise is defined as the value True. It helps to make guards more readable. eg.

 f x | x < 0     = ...
     | otherwise = ...

data Maybe a Source

The Maybe type encapsulates an optional value. A value of type Maybe a either contains a value of type a (represented as Just a), or it is empty (represented as Nothing). Using Maybe is a good way to deal with errors or exceptional cases without resorting to drastic measures such as error.

The Maybe type is also a monad. It is a simple kind of error monad, where all errors are represented by Nothing. A richer error monad can be built using the Either type.

Constructors

Nothing
Just a

Instances

Monad Maybe

Since: 2.1

Methods

(>>=) :: Maybe a -> (a -> Maybe b) -> Maybe b Source

(>>) :: Maybe a -> Maybe b -> Maybe b Source

return :: a -> Maybe a Source

fail :: String -> Maybe a Source

Functor Maybe

Since: 2.1

Methods

fmap :: (a -> b) -> Maybe a -> Maybe b Source

(<$) :: a -> Maybe b -> Maybe a Source

MonadFix Maybe

Since: 2.1

Methods

mfix :: (a -> Maybe a) -> Maybe a Source

MonadFail Maybe

Since: 4.9.0.0

Methods

fail :: String -> Maybe a Source

Applicative Maybe

Since: 2.1

Methods

pure :: a -> Maybe a Source

(<*>) :: Maybe (a -> b) -> Maybe a -> Maybe b Source

liftA2 :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c Source

(*>) :: Maybe a -> Maybe b -> Maybe b Source

(<*) :: Maybe a -> Maybe b -> Maybe a Source

Foldable Maybe

Since: 2.1

Methods

fold :: Monoid m => Maybe m -> m Source

foldMap :: Monoid m => (a -> m) -> Maybe a -> m Source

foldr :: (a -> b -> b) -> b -> Maybe a -> b Source

foldr' :: (a -> b -> b) -> b -> Maybe a -> b Source

foldl :: (b -> a -> b) -> b -> Maybe a -> b Source

foldl' :: (b -> a -> b) -> b -> Maybe a -> b Source

foldr1 :: (a -> a -> a) -> Maybe a -> a Source

foldl1 :: (a -> a -> a) -> Maybe a -> a Source

toList :: Maybe a -> [a] Source

null :: Maybe a -> Bool Source

length :: Maybe a -> Int Source

elem :: Eq a => a -> Maybe a -> Bool Source

maximum :: Ord a => Maybe a -> a Source

minimum :: Ord a => Maybe a -> a Source

sum :: Num a => Maybe a -> a Source

product :: Num a => Maybe a -> a Source

Traversable Maybe

Since: 2.1

Methods

traverse :: Applicative f => (a -> f b) -> Maybe a -> f (Maybe b) Source

sequenceA :: Applicative f => Maybe (f a) -> f (Maybe a) Source

mapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b) Source

sequence :: Monad m => Maybe (m a) -> m (Maybe a) Source

MonadPlus Maybe

Since: 2.1

Methods

mzero :: Maybe a Source

mplus :: Maybe a -> Maybe a -> Maybe a Source

Alternative Maybe

Since: 2.1

Methods

empty :: Maybe a Source

(<|>) :: Maybe a -> Maybe a -> Maybe a Source

some :: Maybe a -> Maybe [a] Source

many :: Maybe a -> Maybe [a] Source

MonadZip Maybe

Since: 4.8.0.0

Methods

mzip :: Maybe a -> Maybe b -> Maybe (a, b) Source

mzipWith :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c Source

munzip :: Maybe (a, b) -> (Maybe a, Maybe b) Source

Show1 Maybe

Since: 4.9.0.0

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Maybe a -> ShowS Source

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Maybe a] -> ShowS Source

Read1 Maybe

Since: 4.9.0.0

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Maybe a) Source

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Maybe a] Source

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Maybe a) Source

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Maybe a] Source

Ord1 Maybe

Since: 4.9.0.0

Methods

liftCompare :: (a -> b -> Ordering) -> Maybe a -> Maybe b -> Ordering Source

Eq1 Maybe

Since: 4.9.0.0

Methods

liftEq :: (a -> b -> Bool) -> Maybe a -> Maybe b -> Bool Source

Eq a => Eq (Maybe a)

Methods

(==) :: Maybe a -> Maybe a -> Bool Source

(/=) :: Maybe a -> Maybe a -> Bool Source

Data a => Data (Maybe a)

Since: 4.0.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Maybe a -> c (Maybe a) Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Maybe a) Source

toConstr :: Maybe a -> Constr Source

dataTypeOf :: Maybe a -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Maybe a)) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Maybe a)) Source

gmapT :: (forall b. Data b => b -> b) -> Maybe a -> Maybe a Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Maybe a -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Maybe a -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Maybe a -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Maybe a -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) Source

Ord a => Ord (Maybe a)

Methods

compare :: Maybe a -> Maybe a -> Ordering Source

(<) :: Maybe a -> Maybe a -> Bool Source

(<=) :: Maybe a -> Maybe a -> Bool Source

(>) :: Maybe a -> Maybe a -> Bool Source

(>=) :: Maybe a -> Maybe a -> Bool Source

max :: Maybe a -> Maybe a -> Maybe a Source

min :: Maybe a -> Maybe a -> Maybe a Source

Read a => Read (Maybe a)

Since: 2.1

Show a => Show (Maybe a)

Methods

showsPrec :: Int -> Maybe a -> ShowS Source

show :: Maybe a -> String Source

showList :: [Maybe a] -> ShowS Source

Generic (Maybe a)

Associated Types

type Rep (Maybe a) :: * -> * Source

Methods

from :: Maybe a -> Rep (Maybe a) x Source

to :: Rep (Maybe a) x -> Maybe a Source

Semigroup a => Semigroup (Maybe a)

Since: 4.9.0.0

Methods

(<>) :: Maybe a -> Maybe a -> Maybe a Source

sconcat :: NonEmpty (Maybe a) -> Maybe a Source

stimes :: Integral b => b -> Maybe a -> Maybe a Source

Monoid a => Monoid (Maybe a)

Lift a semigroup into Maybe forming a Monoid according to http://en.wikipedia.org/wiki/Monoid: "Any semigroup S may be turned into a monoid simply by adjoining an element e not in S and defining e*e = e and e*s = s = s*e for all s ∈ S." Since there used to be no "Semigroup" typeclass providing just mappend, we use Monoid instead.

Since: 2.1

Methods

mempty :: Maybe a Source

mappend :: Maybe a -> Maybe a -> Maybe a Source

mconcat :: [Maybe a] -> Maybe a Source

Generic1 * Maybe

Associated Types

type Rep1 Maybe (f :: Maybe -> *) :: k -> * Source

Methods

from1 :: f a -> Rep1 Maybe f a Source

to1 :: Rep1 Maybe f a -> f a Source

type Rep (Maybe a)
type Rep (Maybe a) = D1 * (MetaData "Maybe" "GHC.Base" "base" False) ((:+:) * (C1 * (MetaCons "Nothing" PrefixI False) (U1 *)) (C1 * (MetaCons "Just" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a))))
type Rep1 * Maybe
type (==) (Maybe k) a b
type (==) (Maybe k) a b

maybe :: b -> (a -> b) -> Maybe a -> b Source

The maybe function takes a default value, a function, and a Maybe value. If the Maybe value is Nothing, the function returns the default value. Otherwise, it applies the function to the value inside the Just and returns the result.

Examples

Basic usage:

>>> maybe False odd (Just 3)
True
>>> maybe False odd Nothing
False

Read an integer from a string using readMaybe. If we succeed, return twice the integer; that is, apply (*2) to it. If instead we fail to parse an integer, return 0 by default:

>>> import Text.Read ( readMaybe )
>>> maybe 0 (*2) (readMaybe "5")
10
>>> maybe 0 (*2) (readMaybe "")
0

Apply show to a Maybe Int. If we have Just n, we want to show the underlying Int n. But if we have Nothing, we return the empty string instead of (for example) "Nothing":

>>> maybe "" show (Just 5)
"5"
>>> maybe "" show Nothing
""

data Either a b Source

The Either type represents values with two possibilities: a value of type Either a b is either Left a or Right b.

The Either type is sometimes used to represent a value which is either correct or an error; by convention, the Left constructor is used to hold an error value and the Right constructor is used to hold a correct value (mnemonic: "right" also means "correct").

Examples

The type Either String Int is the type of values which can be either a String or an Int. The Left constructor can be used only on Strings, and the Right constructor can be used only on Ints:

>>> let s = Left "foo" :: Either String Int
>>> s
Left "foo"
>>> let n = Right 3 :: Either String Int
>>> n
Right 3
>>> :type s
s :: Either String Int
>>> :type n
n :: Either String Int

The fmap from our Functor instance will ignore Left values, but will apply the supplied function to values contained in a Right:

>>> let s = Left "foo" :: Either String Int
>>> let n = Right 3 :: Either String Int
>>> fmap (*2) s
Left "foo"
>>> fmap (*2) n
Right 6

The Monad instance for Either allows us to chain together multiple actions which may fail, and fail overall if any of the individual steps failed. First we'll write a function that can either parse an Int from a Char, or fail.

>>> import Data.Char ( digitToInt, isDigit )
>>> :{
    let parseEither :: Char -> Either String Int
        parseEither c
          | isDigit c = Right (digitToInt c)
          | otherwise = Left "parse error"
>>> :}

The following should work, since both '1' and '2' can be parsed as Ints.

>>> :{
    let parseMultiple :: Either String Int
        parseMultiple = do
          x <- parseEither '1'
          y <- parseEither '2'
          return (x + y)
>>> :}
>>> parseMultiple
Right 3

But the following should fail overall, since the first operation where we attempt to parse 'm' as an Int will fail:

>>> :{
    let parseMultiple :: Either String Int
        parseMultiple = do
          x <- parseEither 'm'
          y <- parseEither '2'
          return (x + y)
>>> :}
>>> parseMultiple
Left "parse error"

Constructors

Left a
Right b

Instances

Show2 Either

Since: 4.9.0.0

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Either a b -> ShowS Source

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Either a b] -> ShowS Source

Read2 Either

Since: 4.9.0.0

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Either a b) Source

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Either a b] Source

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Either a b) Source

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Either a b] Source

Ord2 Either

Since: 4.9.0.0

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Either a c -> Either b d -> Ordering Source

Eq2 Either

Since: 4.9.0.0

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Either a c -> Either b d -> Bool Source

Bifunctor Either

Since: 4.8.0.0

Methods

bimap :: (a -> b) -> (c -> d) -> Either a c -> Either b d Source

first :: (a -> b) -> Either a c -> Either b c Source

second :: (b -> c) -> Either a b -> Either a c Source

Bifoldable Either

Since: 4.10.0.0

Methods

bifold :: Monoid m => Either m m -> m Source

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Either a b -> m Source

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Either a b -> c Source

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Either a b -> c Source

Bitraversable Either

Since: 4.10.0.0

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Either a b -> f (Either c d) Source

Monad (Either e)

Since: 4.4.0.0

Methods

(>>=) :: Either e a -> (a -> Either e b) -> Either e b Source

(>>) :: Either e a -> Either e b -> Either e b Source

return :: a -> Either e a Source

fail :: String -> Either e a Source

Functor (Either a)

Since: 3.0

Methods

fmap :: (a -> b) -> Either a a -> Either a b Source

(<$) :: a -> Either a b -> Either a a Source

MonadFix (Either e)

Since: 4.3.0.0

Methods

mfix :: (a -> Either e a) -> Either e a Source

Applicative (Either e)

Since: 3.0

Methods

pure :: a -> Either e a Source

(<*>) :: Either e (a -> b) -> Either e a -> Either e b Source

liftA2 :: (a -> b -> c) -> Either e a -> Either e b -> Either e c Source

(*>) :: Either e a -> Either e b -> Either e b Source

(<*) :: Either e a -> Either e b -> Either e a Source

Foldable (Either a)

Since: 4.7.0.0

Methods

fold :: Monoid m => Either a m -> m Source

foldMap :: Monoid m => (a -> m) -> Either a a -> m Source

foldr :: (a -> b -> b) -> b -> Either a a -> b Source

foldr' :: (a -> b -> b) -> b -> Either a a -> b Source

foldl :: (b -> a -> b) -> b -> Either a a -> b Source

foldl' :: (b -> a -> b) -> b -> Either a a -> b Source

foldr1 :: (a -> a -> a) -> Either a a -> a Source

foldl1 :: (a -> a -> a) -> Either a a -> a Source

toList :: Either a a -> [a] Source

null :: Either a a -> Bool Source

length :: Either a a -> Int Source

elem :: Eq a => a -> Either a a -> Bool Source

maximum :: Ord a => Either a a -> a Source

minimum :: Ord a => Either a a -> a Source

sum :: Num a => Either a a -> a Source

product :: Num a => Either a a -> a Source

Traversable (Either a)

Since: 4.7.0.0

Methods

traverse :: Applicative f => (a -> f b) -> Either a a -> f (Either a b) Source

sequenceA :: Applicative f => Either a (f a) -> f (Either a a) Source

mapM :: Monad m => (a -> m b) -> Either a a -> m (Either a b) Source

sequence :: Monad m => Either a (m a) -> m (Either a a) Source

Show a => Show1 (Either a)

Since: 4.9.0.0

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Either a a -> ShowS Source

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Either a a] -> ShowS Source

Read a => Read1 (Either a)

Since: 4.9.0.0

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Either a a) Source

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Either a a] Source

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Either a a) Source

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Either a a] Source

Ord a => Ord1 (Either a)

Since: 4.9.0.0

Methods

liftCompare :: (a -> b -> Ordering) -> Either a a -> Either a b -> Ordering Source

Eq a => Eq1 (Either a)

Since: 4.9.0.0

Methods

liftEq :: (a -> b -> Bool) -> Either a a -> Either a b -> Bool Source

Generic1 * (Either a)

Associated Types

type Rep1 (Either a) (f :: Either a -> *) :: k -> * Source

Methods

from1 :: f a -> Rep1 (Either a) f a Source

to1 :: Rep1 (Either a) f a -> f a Source

(Eq b, Eq a) => Eq (Either a b)

Methods

(==) :: Either a b -> Either a b -> Bool Source

(/=) :: Either a b -> Either a b -> Bool Source

(Data a, Data b) => Data (Either a b)

Since: 4.0.0.0

Methods

gfoldl :: (forall d c. Data d => c (d -> c) -> d -> c c) -> (forall g. g -> c g) -> Either a b -> c (Either a b) Source

gunfold :: (forall c r. Data c => c (c -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Either a b) Source

toConstr :: Either a b -> Constr Source

dataTypeOf :: Either a b -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Either a b)) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Either a b)) Source

gmapT :: (forall c. Data c => c -> c) -> Either a b -> Either a b Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Either a b -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Either a b -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Either a b -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Either a b -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Either a b -> m (Either a b) Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Either a b -> m (Either a b) Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Either a b -> m (Either a b) Source

(Ord b, Ord a) => Ord (Either a b)

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

max :: Either a b -> Either a b -> Either a b Source

min :: Either a b -> Either a b -> Either a b Source

(Read b, Read a) => Read (Either a b)
(Show b, Show a) => Show (Either a b)

Methods

showsPrec :: Int -> Either a b -> ShowS Source

show :: Either a b -> String Source

showList :: [Either a b] -> ShowS Source

Generic (Either a b)

Associated Types

type Rep (Either a b) :: * -> * Source

Methods

from :: Either a b -> Rep (Either a b) x Source

to :: Rep (Either a b) x -> Either a b Source

Semigroup (Either a b)

Since: 4.9.0.0

Methods

(<>) :: Either a b -> Either a b -> Either a b Source

sconcat :: NonEmpty (Either a b) -> Either a b Source

stimes :: Integral b => b -> Either a b -> Either a b Source

type Rep1 * (Either a)
type Rep (Either a b)
type (==) (Either k1 k2) a b
type (==) (Either k1 k2) a b

either :: (a -> c) -> (b -> c) -> Either a b -> c Source

Case analysis for the Either type. If the value is Left a, apply the first function to a; if it is Right b, apply the second function to b.

Examples

We create two values of type Either String Int, one using the Left constructor and another using the Right constructor. Then we apply "either" the length function (if we have a String) or the "times-two" function (if we have an Int):

>>> let s = Left "foo" :: Either String Int
>>> let n = Right 3 :: Either String Int
>>> either length (*2) s
3
>>> either length (*2) n
6

data Ordering :: * Source

Constructors

LT
EQ
GT

Instances

Bounded Ordering

Since: 2.1

Enum Ordering

Since: 2.1

Eq Ordering
Data Ordering

Since: 4.0.0.0

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 :: (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

Ord Ordering
Read Ordering

Since: 2.1

Show Ordering
Ix Ordering

Since: 2.1

Generic Ordering

Associated Types

type Rep Ordering :: * -> * Source

Semigroup Ordering

Since: 4.9.0.0

Monoid Ordering

Since: 2.1

type Rep Ordering
type Rep Ordering = D1 * (MetaData "Ordering" "GHC.Types" "ghc-prim" False) ((:+:) * (C1 * (MetaCons "LT" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "EQ" PrefixI False) (U1 *)) (C1 * (MetaCons "GT" PrefixI False) (U1 *))))
type (==) Ordering a b
type (==) Ordering a b

data Char :: * Source

The character type Char is an enumeration whose values represent Unicode (or equivalently ISO/IEC 10646) characters (see http://www.unicode.org/ for details). This set extends the ISO 8859-1 (Latin-1) character set (the first 256 characters), which is itself an extension of the ASCII character set (the first 128 characters). A character literal in Haskell has type Char.

To convert a Char to or from the corresponding Int value defined by Unicode, use toEnum and fromEnum from the Enum class respectively (or equivalently ord and chr).

Instances

Bounded Char

Since: 2.1

Enum Char

Since: 2.1

Eq Char

Methods

(==) :: Char -> Char -> Bool Source

(/=) :: Char -> Char -> Bool Source

Data Char

Since: 4.0.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Char -> c Char Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Char Source

toConstr :: Char -> Constr Source

dataTypeOf :: Char -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Char) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Char) Source

gmapT :: (forall b. Data b => b -> b) -> Char -> Char Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Char -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Char -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Char -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Char -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Char -> m Char Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Char -> m Char Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Char -> m Char Source

Ord Char

Methods

compare :: Char -> Char -> Ordering Source

(<) :: Char -> Char -> Bool Source

(<=) :: Char -> Char -> Bool Source

(>) :: Char -> Char -> Bool Source

(>=) :: Char -> Char -> Bool Source

max :: Char -> Char -> Char Source

min :: Char -> Char -> Char Source

Read Char

Since: 2.1

Show Char

Since: 2.1

Ix Char

Since: 2.1

Methods

range :: (Char, Char) -> [Char] Source

index :: (Char, Char) -> Char -> Int Source

unsafeIndex :: (Char, Char) -> Char -> Int

inRange :: (Char, Char) -> Char -> Bool Source

rangeSize :: (Char, Char) -> Int Source

unsafeRangeSize :: (Char, Char) -> Int

Storable Char

Since: 2.1

IsChar Char

Since: 2.1

Methods

toChar :: Char -> Char Source

fromChar :: Char -> Char Source

PrintfArg Char

Since: 2.1

Generic1 k (URec k Char)

Associated Types

type Rep1 (URec k Char) (f :: URec k Char -> *) :: k -> * Source

Methods

from1 :: f a -> Rep1 (URec k Char) f a Source

to1 :: Rep1 (URec k Char) f a -> f a Source

Functor (URec * Char)

Methods

fmap :: (a -> b) -> URec * Char a -> URec * Char b Source

(<$) :: a -> URec * Char b -> URec * Char a Source

Foldable (URec * Char)

Methods

fold :: Monoid m => URec * Char m -> m Source

foldMap :: Monoid m => (a -> m) -> URec * Char a -> m Source

foldr :: (a -> b -> b) -> b -> URec * Char a -> b Source

foldr' :: (a -> b -> b) -> b -> URec * Char a -> b Source

foldl :: (b -> a -> b) -> b -> URec * Char a -> b Source

foldl' :: (b -> a -> b) -> b -> URec * Char a -> b Source

foldr1 :: (a -> a -> a) -> URec * Char a -> a Source

foldl1 :: (a -> a -> a) -> URec * Char a -> a Source

toList :: URec * Char a -> [a] Source

null :: URec * Char a -> Bool Source

length :: URec * Char a -> Int Source

elem :: Eq a => a -> URec * Char a -> Bool Source

maximum :: Ord a => URec * Char a -> a Source

minimum :: Ord a => URec * Char a -> a Source

sum :: Num a => URec * Char a -> a Source

product :: Num a => URec * Char a -> a Source

Traversable (URec * Char)

Methods

traverse :: Applicative f => (a -> f b) -> URec * Char a -> f (URec * Char b) Source

sequenceA :: Applicative f => URec * Char (f a) -> f (URec * Char a) Source

mapM :: Monad m => (a -> m b) -> URec * Char a -> m (URec * Char b) Source

sequence :: Monad m => URec * Char (m a) -> m (URec * Char a) Source

Eq (URec k Char p)

Methods

(==) :: URec k Char p -> URec k Char p -> Bool Source

(/=) :: URec k Char p -> URec k Char p -> Bool Source

Ord (URec k Char p)

Methods

compare :: 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

Show (URec k Char p)

Methods

showsPrec :: Int -> URec k Char p -> ShowS Source

show :: URec k Char p -> String Source

showList :: [URec k Char p] -> ShowS Source

Generic (URec k Char p)

Associated Types

type Rep (URec k Char p) :: * -> * Source

Methods

from :: URec k Char p -> Rep (URec k Char p) x Source

to :: Rep (URec k Char p) x -> URec k Char p Source

data URec k Char

Used for marking occurrences of Char#

Since: 4.9.0.0

data URec k Char = UChar {}
type Rep1 k (URec k Char)
type Rep1 k (URec k Char) = D1 k (MetaData "URec" "GHC.Generics" "base" False) (C1 k (MetaCons "UChar" PrefixI True) (S1 k (MetaSel (Just Symbol "uChar#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UChar k)))
type Rep (URec k Char p)
type Rep (URec k Char p) = D1 * (MetaData "URec" "GHC.Generics" "base" False) (C1 * (MetaCons "UChar" PrefixI True) (S1 * (MetaSel (Just Symbol "uChar#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UChar *)))

type String = [Char] Source

A String is a list of characters. String constants in Haskell are values of type String.

Tuples

fst :: (a, b) -> a Source

Extract the first component of a pair.

snd :: (a, b) -> b Source

Extract the second component of a pair.

curry :: ((a, b) -> c) -> a -> b -> c Source

curry converts an uncurried function to a curried function.

uncurry :: (a -> b -> c) -> (a, b) -> c Source

uncurry converts a curried function to a function on pairs.

Basic type classes

class Eq a where Source

The Eq class defines equality (==) and inequality (/=). All the basic datatypes exported by the Prelude are instances of Eq, and Eq may be derived for any datatype whose constituents are also instances of Eq.

Minimal complete definition: either == or /=.

Minimal complete definition

(==) | (/=)

Methods

(==) :: a -> a -> Bool infix 4 Source

(/=) :: a -> a -> Bool infix 4 Source

Instances

Eq Bool

Methods

(==) :: Bool -> Bool -> Bool Source

(/=) :: Bool -> Bool -> Bool Source

Eq Char

Methods

(==) :: Char -> Char -> Bool Source

(/=) :: Char -> Char -> Bool Source

Eq Double

Methods

(==) :: Double -> Double -> Bool Source

(/=) :: Double -> Double -> Bool Source

Eq Float

Methods

(==) :: Float -> Float -> Bool Source

(/=) :: Float -> Float -> Bool Source

Eq Int

Methods

(==) :: Int -> Int -> Bool Source

(/=) :: Int -> Int -> Bool Source

Eq Int8

Since: 2.1

Methods

(==) :: Int8 -> Int8 -> Bool Source

(/=) :: Int8 -> Int8 -> Bool Source

Eq Int16

Since: 2.1

Methods

(==) :: Int16 -> Int16 -> Bool Source

(/=) :: Int16 -> Int16 -> Bool Source

Eq Int32

Since: 2.1

Methods

(==) :: Int32 -> Int32 -> Bool Source

(/=) :: Int32 -> Int32 -> Bool Source

Eq Int64

Since: 2.1

Methods

(==) :: Int64 -> Int64 -> Bool Source

(/=) :: Int64 -> Int64 -> Bool Source

Eq Integer
Eq Natural
Eq Ordering
Eq Word

Methods

(==) :: Word -> Word -> Bool Source

(/=) :: Word -> Word -> Bool Source

Eq Word8

Since: 2.1

Methods

(==) :: Word8 -> Word8 -> Bool Source

(/=) :: Word8 -> Word8 -> Bool Source

Eq Word16

Since: 2.1

Methods

(==) :: Word16 -> Word16 -> Bool Source

(/=) :: Word16 -> Word16 -> Bool Source

Eq Word32

Since: 2.1

Methods

(==) :: Word32 -> Word32 -> Bool Source

(/=) :: Word32 -> Word32 -> Bool Source

Eq Word64

Since: 2.1

Methods

(==) :: Word64 -> Word64 -> Bool Source

(/=) :: Word64 -> Word64 -> Bool Source

Eq SomeTypeRep
Eq ()

Methods

(==) :: () -> () -> Bool Source

(/=) :: () -> () -> Bool Source

Eq TyCon

Methods

(==) :: TyCon -> TyCon -> Bool Source

(/=) :: TyCon -> TyCon -> Bool Source

Eq Module

Methods

(==) :: Module -> Module -> Bool Source

(/=) :: Module -> Module -> Bool Source

Eq TrName

Methods

(==) :: TrName -> TrName -> Bool Source

(/=) :: TrName -> TrName -> Bool Source

Eq BigNat

Methods

(==) :: BigNat -> BigNat -> Bool Source

(/=) :: BigNat -> BigNat -> Bool Source

Eq SrcLoc

Methods

(==) :: SrcLoc -> SrcLoc -> Bool Source

(/=) :: SrcLoc -> SrcLoc -> Bool Source

Eq GeneralCategory
Eq Number

Methods

(==) :: Number -> Number -> Bool Source

(/=) :: Number -> Number -> Bool Source

Eq Lexeme

Methods

(==) :: Lexeme -> Lexeme -> Bool Source

(/=) :: Lexeme -> Lexeme -> Bool Source

Eq Fingerprint
Eq IOMode

Methods

(==) :: IOMode -> IOMode -> Bool Source

(/=) :: IOMode -> IOMode -> Bool Source

Eq IntPtr

Methods

(==) :: IntPtr -> IntPtr -> Bool Source

(/=) :: IntPtr -> IntPtr -> Bool Source

Eq WordPtr
Eq CUIntMax
Eq CIntMax
Eq CUIntPtr
Eq CIntPtr
Eq CSUSeconds
Eq CUSeconds
Eq CTime

Methods

(==) :: CTime -> CTime -> Bool Source

(/=) :: CTime -> CTime -> Bool Source

Eq CClock

Methods

(==) :: CClock -> CClock -> Bool Source

(/=) :: CClock -> CClock -> Bool Source

Eq CSigAtomic
Eq CWchar

Methods

(==) :: CWchar -> CWchar -> Bool Source

(/=) :: CWchar -> CWchar -> Bool Source

Eq CSize

Methods

(==) :: CSize -> CSize -> Bool Source

(/=) :: CSize -> CSize -> Bool Source

Eq CPtrdiff
Eq CDouble
Eq CFloat

Methods

(==) :: CFloat -> CFloat -> Bool Source

(/=) :: CFloat -> CFloat -> Bool Source

Eq CBool

Methods

(==) :: CBool -> CBool -> Bool Source

(/=) :: CBool -> CBool -> Bool Source

Eq CULLong
Eq CLLong

Methods

(==) :: CLLong -> CLLong -> Bool Source

(/=) :: CLLong -> CLLong -> Bool Source

Eq CULong

Methods

(==) :: CULong -> CULong -> Bool Source

(/=) :: CULong -> CULong -> Bool Source

Eq CLong

Methods

(==) :: CLong -> CLong -> Bool Source

(/=) :: CLong -> CLong -> Bool Source

Eq CUInt

Methods

(==) :: CUInt -> CUInt -> Bool Source

(/=) :: CUInt -> CUInt -> Bool Source

Eq CInt

Methods

(==) :: CInt -> CInt -> Bool Source

(/=) :: CInt -> CInt -> Bool Source

Eq CUShort
Eq CShort

Methods

(==) :: CShort -> CShort -> Bool Source

(/=) :: CShort -> CShort -> Bool Source

Eq CUChar

Methods

(==) :: CUChar -> CUChar -> Bool Source

(/=) :: CUChar -> CUChar -> Bool Source

Eq CSChar

Methods

(==) :: CSChar -> CSChar -> Bool Source

(/=) :: CSChar -> CSChar -> Bool Source

Eq CChar

Methods

(==) :: CChar -> CChar -> Bool Source

(/=) :: CChar -> CChar -> Bool Source

Eq SomeNat

Since: 4.7.0.0

Eq SomeSymbol

Since: 4.7.0.0

Eq DecidedStrictness
Eq SourceStrictness
Eq SourceUnpackedness
Eq Associativity
Eq Fixity

Methods

(==) :: Fixity -> Fixity -> Bool Source

(/=) :: Fixity -> Fixity -> Bool Source

Eq Any

Methods

(==) :: Any -> Any -> Bool Source

(/=) :: Any -> Any -> Bool Source

Eq All

Methods

(==) :: All -> All -> Bool Source

(/=) :: All -> All -> Bool Source

Eq ArithException
Eq ErrorCall
Eq IOException

Since: 4.1.0.0

Eq MaskingState
Eq BufferState
Eq CodingProgress
Eq SeekMode
Eq IODeviceType
Eq NewlineMode
Eq Newline
Eq BufferMode
Eq Handle

Since: 4.1.0.0

Methods

(==) :: Handle -> Handle -> Bool Source

(/=) :: Handle -> Handle -> Bool Source

Eq IOErrorType

Since: 4.1.0.0

Eq ExitCode
Eq ArrayException
Eq AsyncException
Eq Errno

Since: 2.1

Methods

(==) :: Errno -> Errno -> Bool Source

(/=) :: Errno -> Errno -> Bool Source

Eq Fd

Methods

(==) :: Fd -> Fd -> Bool Source

(/=) :: Fd -> Fd -> Bool Source

Eq CTimer

Methods

(==) :: CTimer -> CTimer -> Bool Source

(/=) :: CTimer -> CTimer -> Bool Source

Eq CKey

Methods

(==) :: CKey -> CKey -> Bool Source

(/=) :: CKey -> CKey -> Bool Source

Eq CId

Methods

(==) :: CId -> CId -> Bool Source

(/=) :: CId -> CId -> Bool Source

Eq CFsFilCnt
Eq CFsBlkCnt
Eq CClockId
Eq CBlkCnt
Eq CBlkSize
Eq CRLim

Methods

(==) :: CRLim -> CRLim -> Bool Source

(/=) :: CRLim -> CRLim -> Bool Source

Eq CTcflag
Eq CSpeed

Methods

(==) :: CSpeed -> CSpeed -> Bool Source

(/=) :: CSpeed -> CSpeed -> Bool Source

Eq CCc

Methods

(==) :: CCc -> CCc -> Bool Source

(/=) :: CCc -> CCc -> Bool Source

Eq CUid

Methods

(==) :: CUid -> CUid -> Bool Source

(/=) :: CUid -> CUid -> Bool Source

Eq CNlink

Methods

(==) :: CNlink -> CNlink -> Bool Source

(/=) :: CNlink -> CNlink -> Bool Source

Eq CGid

Methods

(==) :: CGid -> CGid -> Bool Source

(/=) :: CGid -> CGid -> Bool Source

Eq CSsize

Methods

(==) :: CSsize -> CSsize -> Bool Source

(/=) :: CSsize -> CSsize -> Bool Source

Eq CPid

Methods

(==) :: CPid -> CPid -> Bool Source

(/=) :: CPid -> CPid -> Bool Source

Eq COff

Methods

(==) :: COff -> COff -> Bool Source

(/=) :: COff -> COff -> Bool Source

Eq CMode

Methods

(==) :: CMode -> CMode -> Bool Source

(/=) :: CMode -> CMode -> Bool Source

Eq CIno

Methods

(==) :: CIno -> CIno -> Bool Source

(/=) :: CIno -> CIno -> Bool Source

Eq CDev

Methods

(==) :: CDev -> CDev -> Bool Source

(/=) :: CDev -> CDev -> Bool Source

Eq Lifetime
Eq Event

Methods

(==) :: Event -> Event -> Bool Source

(/=) :: Event -> Event -> Bool Source

Eq ThreadStatus
Eq BlockReason
Eq ThreadId

Since: 4.2.0.0

Eq TimeoutKey
Eq FdKey

Methods

(==) :: FdKey -> FdKey -> Bool Source

(/=) :: FdKey -> FdKey -> Bool Source

Eq HandlePosn

Since: 4.1.0.0

Eq Version

Since: 2.1

Eq Unique

Methods

(==) :: Unique -> Unique -> Bool Source

(/=) :: Unique -> Unique -> Bool Source

Eq Fixity

Methods

(==) :: Fixity -> Fixity -> Bool Source

(/=) :: Fixity -> Fixity -> Bool Source

Eq ConstrRep
Eq DataRep
Eq Constr

Equality of constructors

Since: 4.0.0.0

Methods

(==) :: Constr -> Constr -> Bool Source

(/=) :: Constr -> Constr -> Bool Source

Eq SpecConstrAnnotation
Eq Void

Since: 4.8.0.0

Methods

(==) :: Void -> Void -> Bool Source

(/=) :: Void -> Void -> Bool Source

Eq a => Eq [a]

Methods

(==) :: [a] -> [a] -> Bool Source

(/=) :: [a] -> [a] -> Bool Source

Eq a => Eq (Maybe a)

Methods

(==) :: Maybe a -> Maybe a -> Bool Source

(/=) :: Maybe a -> Maybe a -> Bool Source

Eq a => Eq (Ratio a)

Methods

(==) :: Ratio a -> Ratio a -> Bool Source

(/=) :: Ratio a -> Ratio a -> Bool Source

Eq (StablePtr a)

Since: 2.1

Methods

(==) :: StablePtr a -> StablePtr a -> Bool Source

(/=) :: StablePtr a -> StablePtr a -> Bool Source

Eq (Ptr a)

Methods

(==) :: Ptr a -> Ptr a -> Bool Source

(/=) :: Ptr a -> Ptr a -> Bool Source

Eq (FunPtr a)

Methods

(==) :: FunPtr a -> FunPtr a -> Bool Source

(/=) :: FunPtr a -> FunPtr a -> Bool Source

Eq p => Eq (Par1 p)

Methods

(==) :: Par1 p -> Par1 p -> Bool Source

(/=) :: Par1 p -> Par1 p -> Bool Source

Eq (MVar a)

Since: 4.1.0.0

Methods

(==) :: MVar a -> MVar a -> Bool Source

(/=) :: MVar a -> MVar a -> Bool Source

Eq a => Eq (Down a)

Methods

(==) :: Down a -> Down a -> Bool Source

(/=) :: Down a -> Down a -> Bool Source

Eq a => Eq (Last a)

Methods

(==) :: Last a -> Last a -> Bool Source

(/=) :: Last a -> Last a -> Bool Source

Eq a => Eq (First a)

Methods

(==) :: First a -> First a -> Bool Source

(/=) :: First a -> First a -> Bool Source

Eq a => Eq (Product a)

Methods

(==) :: Product a -> Product a -> Bool Source

(/=) :: Product a -> Product a -> Bool Source

Eq a => Eq (Sum a)

Methods

(==) :: Sum a -> Sum a -> Bool Source

(/=) :: Sum a -> Sum a -> Bool Source

Eq a => Eq (Dual a)

Methods

(==) :: Dual a -> Dual a -> Bool Source

(/=) :: Dual a -> Dual a -> Bool Source

Eq (IORef a)

Since: 4.1.0.0

Methods

(==) :: IORef a -> IORef a -> Bool Source

(/=) :: IORef a -> IORef a -> Bool Source

Eq (ForeignPtr a)

Since: 2.1

Eq (TVar a)

Since: 4.8.0.0

Methods

(==) :: TVar a -> TVar a -> Bool Source

(/=) :: TVar a -> TVar a -> Bool Source

Eq a => Eq (Identity a)

Methods

(==) :: Identity a -> Identity a -> Bool Source

(/=) :: Identity a -> Identity a -> Bool Source

Eq a => Eq (ZipList a)

Methods

(==) :: ZipList a -> ZipList a -> Bool Source

(/=) :: ZipList a -> ZipList a -> Bool Source

Eq (StableName a)

Since: 2.1

Eq (Chan a)

Methods

(==) :: Chan a -> Chan a -> Bool Source

(/=) :: Chan a -> Chan a -> Bool Source

Eq a => Eq (NonEmpty a)

Methods

(==) :: NonEmpty a -> NonEmpty a -> Bool Source

(/=) :: NonEmpty a -> NonEmpty a -> Bool Source

Eq a => Eq (Option a)

Methods

(==) :: Option a -> Option a -> Bool Source

(/=) :: Option a -> Option a -> Bool Source

Eq m => Eq (WrappedMonoid m)
Eq a => Eq (Last a)

Methods

(==) :: Last a -> Last a -> Bool Source

(/=) :: Last a -> Last a -> Bool Source

Eq a => Eq (First a)

Methods

(==) :: First a -> First a -> Bool Source

(/=) :: First a -> First a -> Bool Source

Eq a => Eq (Max a)

Methods

(==) :: Max a -> Max a -> Bool Source

(/=) :: Max a -> Max a -> Bool Source

Eq a => Eq (Min a)

Methods

(==) :: Min a -> Min a -> Bool Source

(/=) :: Min a -> Min a -> Bool Source

Eq (Fixed a)

Methods

(==) :: Fixed a -> Fixed a -> Bool Source

(/=) :: Fixed a -> Fixed a -> Bool Source

Eq a => Eq (Complex a)

Methods

(==) :: Complex a -> Complex a -> Bool Source

(/=) :: Complex a -> Complex a -> Bool Source

(Eq b, Eq a) => Eq (Either a b)

Methods

(==) :: Either a b -> Either a b -> Bool Source

(/=) :: Either a b -> Either a b -> Bool Source

Eq (V1 k p)

Methods

(==) :: V1 k p -> V1 k p -> Bool Source

(/=) :: V1 k p -> V1 k p -> Bool Source

Eq (U1 k p)

Since: 4.9.0.0

Methods

(==) :: U1 k p -> U1 k p -> Bool Source

(/=) :: U1 k p -> U1 k p -> Bool Source

Eq (TypeRep k a)

Since: 2.1

Methods

(==) :: TypeRep k a -> TypeRep k a -> Bool Source

(/=) :: TypeRep k a -> TypeRep k a -> Bool Source

(Eq a, Eq b) => Eq (a, b)

Methods

(==) :: (a, b) -> (a, b) -> Bool Source

(/=) :: (a, b) -> (a, b) -> Bool Source

Eq (STRef s a)

Since: 2.1

Methods

(==) :: STRef s a -> STRef s a -> Bool Source

(/=) :: STRef s a -> STRef s a -> Bool Source

Eq (Proxy k s)

Since: 4.7.0.0

Methods

(==) :: Proxy k s -> Proxy k s -> Bool Source

(/=) :: Proxy k s -> Proxy k s -> Bool Source

Eq a => Eq (Arg a b)

Since: 4.9.0.0

Methods

(==) :: Arg a b -> Arg a b -> Bool Source

(/=) :: Arg a b -> Arg a b -> Bool Source

Eq (f p) => Eq (Rec1 k f p)

Methods

(==) :: Rec1 k f p -> Rec1 k f p -> Bool Source

(/=) :: Rec1 k f p -> Rec1 k f p -> Bool Source

Eq (URec k Word p)

Methods

(==) :: URec k Word p -> URec k Word p -> Bool Source

(/=) :: URec k Word p -> URec k Word p -> Bool Source

Eq (URec k Int p)

Methods

(==) :: URec k Int p -> URec k Int p -> Bool Source

(/=) :: URec k Int p -> URec k Int p -> Bool Source

Eq (URec k Float p)

Methods

(==) :: URec k Float p -> URec k Float p -> Bool Source

(/=) :: URec k Float p -> URec k Float p -> Bool Source

Eq (URec k Double p)

Methods

(==) :: URec k Double p -> URec k Double p -> Bool Source

(/=) :: URec k Double p -> URec k Double p -> Bool Source

Eq (URec k Char p)

Methods

(==) :: URec k Char p -> URec k Char p -> Bool Source

(/=) :: URec k Char p -> URec k Char p -> Bool Source

Eq (URec k (Ptr ()) p)

Methods

(==) :: URec k (Ptr ()) p -> URec k (Ptr ()) p -> Bool Source

(/=) :: URec k (Ptr ()) p -> URec k (Ptr ()) p -> Bool Source

(Eq a, Eq b, Eq c) => Eq (a, b, c)

Methods

(==) :: (a, b, c) -> (a, b, c) -> Bool Source

(/=) :: (a, b, c) -> (a, b, c) -> Bool Source

Eq ((:~:) k a b)

Methods

(==) :: (k :~: a) b -> (k :~: a) b -> Bool Source

(/=) :: (k :~: a) b -> (k :~: a) b -> Bool Source

Eq (Coercion k a b)

Methods

(==) :: Coercion k a b -> Coercion k a b -> Bool Source

(/=) :: Coercion k a b -> Coercion k a b -> Bool Source

Eq (f a) => Eq (Alt k f a)

Methods

(==) :: Alt k f a -> Alt k f a -> Bool Source

(/=) :: Alt k f a -> Alt k f a -> Bool Source

Eq a => Eq (Const k a b)

Methods

(==) :: Const k a b -> Const k a b -> Bool Source

(/=) :: Const k a b -> Const k a b -> Bool Source

Eq c => Eq (K1 k i c p)

Methods

(==) :: K1 k i c p -> K1 k i c p -> Bool Source

(/=) :: K1 k i c p -> K1 k i c p -> Bool Source

(Eq (g p), Eq (f p)) => Eq ((:+:) k f g p)

Methods

(==) :: (k :+: f) g p -> (k :+: f) g p -> Bool Source

(/=) :: (k :+: f) g p -> (k :+: f) g p -> Bool Source

(Eq (g p), Eq (f p)) => Eq ((:*:) k f g p)

Methods

(==) :: (k :*: f) g p -> (k :*: f) g p -> Bool Source

(/=) :: (k :*: f) g p -> (k :*: f) g p -> Bool Source

(Eq a, Eq b, Eq c, Eq d) => Eq (a, b, c, d)

Methods

(==) :: (a, b, c, d) -> (a, b, c, d) -> Bool Source

(/=) :: (a, b, c, d) -> (a, b, c, d) -> Bool Source

Eq ((:~~:) k1 k2 a b)

Since: 4.10.0.0

Methods

(==) :: (k1 :~~: k2) a b -> (k1 :~~: k2) a b -> Bool Source

(/=) :: (k1 :~~: k2) a b -> (k1 :~~: k2) a b -> Bool Source

(Eq1 f, Eq1 g, Eq a) => Eq (Sum * f g a)

Since: 4.9.0.0

Methods

(==) :: Sum * f g a -> Sum * f g a -> Bool Source

(/=) :: Sum * f g a -> Sum * f g a -> Bool Source

(Eq1 f, Eq1 g, Eq a) => Eq (Product * f g a)

Since: 4.9.0.0

Methods

(==) :: Product * f g a -> Product * f g a -> Bool Source

(/=) :: Product * f g a -> Product * f g a -> Bool Source

Eq (f p) => Eq (M1 k i c f p)

Methods

(==) :: 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

Eq (f (g p)) => Eq ((:.:) k2 k1 f g p)

Methods

(==) :: (k2 :.: k1) f g p -> (k2 :.: k1) f g p -> Bool Source

(/=) :: (k2 :.: k1) f g p -> (k2 :.: k1) f g p -> Bool Source

(Eq a, Eq b, Eq c, Eq d, Eq e) => Eq (a, b, c, d, e)

Methods

(==) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool Source

(/=) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool Source

(Eq1 f, Eq1 g, Eq a) => Eq (Compose * * f g a)

Since: 4.9.0.0

Methods

(==) :: Compose * * f g a -> Compose * * f g a -> Bool Source

(/=) :: Compose * * f g a -> Compose * * f g a -> Bool Source

(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f) => Eq (a, b, c, d, e, f)

Methods

(==) :: (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

(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g) => Eq (a, b, c, d, e, f, g)

Methods

(==) :: (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

(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h) => Eq (a, b, c, d, e, f, g, h)

Methods

(==) :: (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

(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i) => Eq (a, b, c, d, e, f, g, h, i)

Methods

(==) :: (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

(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j) => Eq (a, b, c, d, e, f, g, h, i, j)

Methods

(==) :: (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

(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k) => Eq (a, b, c, d, e, f, g, h, i, j, k)

Methods

(==) :: (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

(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l) => Eq (a, b, c, d, e, f, g, h, i, j, k, l)

Methods

(==) :: (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

(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m)

Methods

(==) :: (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

(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m, n)

Methods

(==) :: (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

(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n, Eq o) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)

Methods

(==) :: (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

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.

Minimal complete definition

compare | (<=)

Methods

compare :: a -> a -> Ordering Source

(<) :: a -> a -> Bool infix 4 Source

(<=) :: a -> a -> Bool infix 4 Source

(>) :: a -> a -> Bool infix 4 Source

(>=) :: a -> a -> Bool infix 4 Source

max :: a -> a -> a Source

min :: a -> a -> a Source

Instances

Ord Bool

Methods

compare :: Bool -> Bool -> Ordering Source

(<) :: Bool -> Bool -> Bool Source

(<=) :: Bool -> Bool -> Bool Source

(>) :: Bool -> Bool -> Bool Source

(>=) :: Bool -> Bool -> Bool Source

max :: Bool -> Bool -> Bool Source

min :: Bool -> Bool -> Bool Source

Ord Char

Methods

compare :: Char -> Char -> Ordering Source

(<) :: Char -> Char -> Bool Source

(<=) :: Char -> Char -> Bool Source

(>) :: Char -> Char -> Bool Source

(>=) :: Char -> Char -> Bool Source

max :: Char -> Char -> Char Source

min :: Char -> Char -> Char Source

Ord Double
Ord Float
Ord Int

Methods

compare :: Int -> Int -> Ordering Source

(<) :: Int -> Int -> Bool Source

(<=) :: Int -> Int -> Bool Source

(>) :: Int -> Int -> Bool Source

(>=) :: Int -> Int -> Bool Source

max :: Int -> Int -> Int Source

min :: Int -> Int -> Int Source

Ord Int8

Since: 2.1

Methods

compare :: Int8 -> Int8 -> Ordering Source

(<) :: Int8 -> Int8 -> Bool Source

(<=) :: Int8 -> Int8 -> Bool Source

(>) :: Int8 -> Int8 -> Bool Source

(>=) :: Int8 -> Int8 -> Bool Source

max :: Int8 -> Int8 -> Int8 Source

min :: Int8 -> Int8 -> Int8 Source

Ord Int16

Since: 2.1

Ord Int32

Since: 2.1

Ord Int64

Since: 2.1

Ord Integer
Ord Natural
Ord Ordering
Ord Word

Methods

compare :: Word -> Word -> Ordering Source

(<) :: Word -> Word -> Bool Source

(<=) :: Word -> Word -> Bool Source

(>) :: Word -> Word -> Bool Source

(>=) :: Word -> Word -> Bool Source

max :: Word -> Word -> Word Source

min :: Word -> Word -> Word Source

Ord Word8

Since: 2.1

Ord Word16

Since: 2.1

Ord Word32

Since: 2.1

Ord Word64

Since: 2.1

Ord SomeTypeRep
Ord ()

Methods

compare :: () -> () -> Ordering Source

(<) :: () -> () -> Bool Source

(<=) :: () -> () -> Bool Source

(>) :: () -> () -> Bool Source

(>=) :: () -> () -> Bool Source

max :: () -> () -> () Source

min :: () -> () -> () Source

Ord TyCon
Ord BigNat
Ord GeneralCategory
Ord Fingerprint
Ord IOMode
Ord IntPtr
Ord WordPtr
Ord CUIntMax
Ord CIntMax
Ord CUIntPtr
Ord CIntPtr
Ord CSUSeconds
Ord CUSeconds
Ord CTime
Ord CClock
Ord CSigAtomic
Ord CWchar
Ord CSize
Ord CPtrdiff
Ord CDouble
Ord CFloat
Ord CBool
Ord CULLong
Ord CLLong
Ord CULong
Ord CLong
Ord CUInt
Ord CInt

Methods

compare :: CInt -> CInt -> Ordering Source

(<) :: CInt -> CInt -> Bool Source

(<=) :: CInt -> CInt -> Bool Source

(>) :: CInt -> CInt -> Bool Source

(>=) :: CInt -> CInt -> Bool Source

max :: CInt -> CInt -> CInt Source

min :: CInt -> CInt -> CInt Source

Ord CUShort
Ord CShort
Ord CUChar
Ord CSChar
Ord CChar
Ord SomeNat

Since: 4.7.0.0

Ord SomeSymbol

Since: 4.7.0.0

Ord DecidedStrictness
Ord SourceStrictness
Ord SourceUnpackedness
Ord Associativity
Ord Fixity
Ord Any

Methods

compare :: Any -> Any -> Ordering Source

(<) :: Any -> Any -> Bool Source

(<=) :: Any -> Any -> Bool Source

(>) :: Any -> Any -> Bool Source

(>=) :: Any -> Any -> Bool Source

max :: Any -> Any -> Any Source

min :: Any -> Any -> Any Source

Ord All

Methods

compare :: All -> All -> Ordering Source

(<) :: All -> All -> Bool Source

(<=) :: All -> All -> Bool Source

(>) :: All -> All -> Bool Source

(>=) :: All -> All -> Bool Source

max :: All -> All -> All Source

min :: All -> All -> All Source

Ord ArithException
Ord ErrorCall
Ord SeekMode
Ord NewlineMode
Ord Newline
Ord BufferMode
Ord ExitCode
Ord ArrayException
Ord AsyncException
Ord Fd

Methods

compare :: Fd -> Fd -> Ordering Source

(<) :: Fd -> Fd -> Bool Source

(<=) :: Fd -> Fd -> Bool Source

(>) :: Fd -> Fd -> Bool Source

(>=) :: Fd -> Fd -> Bool Source

max :: Fd -> Fd -> Fd Source

min :: Fd -> Fd -> Fd Source

Ord CTimer
Ord CKey

Methods

compare :: CKey -> CKey -> Ordering Source

(<) :: CKey -> CKey -> Bool Source

(<=) :: CKey -> CKey -> Bool Source

(>) :: CKey -> CKey -> Bool Source

(>=) :: CKey -> CKey -> Bool Source

max :: CKey -> CKey -> CKey Source

min :: CKey -> CKey -> CKey Source

Ord CId

Methods

compare :: CId -> CId -> Ordering Source

(<) :: CId -> CId -> Bool Source

(<=) :: CId -> CId -> Bool Source

(>) :: CId -> CId -> Bool Source

(>=) :: CId -> CId -> Bool Source

max :: CId -> CId -> CId Source

min :: CId -> CId -> CId Source

Ord CFsFilCnt
Ord CFsBlkCnt
Ord CClockId
Ord CBlkCnt
Ord CBlkSize
Ord CRLim
Ord CTcflag
Ord CSpeed
Ord CCc

Methods

compare :: CCc -> CCc -> Ordering Source

(<) :: CCc -> CCc -> Bool Source

(<=) :: CCc -> CCc -> Bool Source

(>) :: CCc -> CCc -> Bool Source

(>=) :: CCc -> CCc -> Bool Source

max :: CCc -> CCc -> CCc Source

min :: CCc -> CCc -> CCc Source

Ord CUid

Methods

compare :: CUid -> CUid -> Ordering Source

(<) :: CUid -> CUid -> Bool Source

(<=) :: CUid -> CUid -> Bool Source

(>) :: CUid -> CUid -> Bool Source

(>=) :: CUid -> CUid -> Bool Source

max :: CUid -> CUid -> CUid Source

min :: CUid -> CUid -> CUid Source

Ord CNlink
Ord CGid

Methods

compare :: CGid -> CGid -> Ordering Source

(<) :: CGid -> CGid -> Bool Source

(<=) :: CGid -> CGid -> Bool Source

(>) :: CGid -> CGid -> Bool Source

(>=) :: CGid -> CGid -> Bool Source

max :: CGid -> CGid -> CGid Source

min :: CGid -> CGid -> CGid Source

Ord CSsize
Ord CPid

Methods

compare :: CPid -> CPid -> Ordering Source

(<) :: CPid -> CPid -> Bool Source

(<=) :: CPid -> CPid -> Bool Source

(>) :: CPid -> CPid -> Bool Source

(>=) :: CPid -> CPid -> Bool Source

max :: CPid -> CPid -> CPid Source

min :: CPid -> CPid -> CPid Source

Ord COff

Methods

compare :: COff -> COff -> Ordering Source

(<) :: COff -> COff -> Bool Source

(<=) :: COff -> COff -> Bool Source

(>) :: COff -> COff -> Bool Source

(>=) :: COff -> COff -> Bool Source

max :: COff -> COff -> COff Source

min :: COff -> COff -> COff Source

Ord CMode
Ord CIno

Methods

compare :: CIno -> CIno -> Ordering Source

(<) :: CIno -> CIno -> Bool Source

(<=) :: CIno -> CIno -> Bool Source

(>) :: CIno -> CIno -> Bool Source

(>=) :: CIno -> CIno -> Bool Source

max :: CIno -> CIno -> CIno Source

min :: CIno -> CIno -> CIno Source

Ord CDev

Methods

compare :: CDev -> CDev -> Ordering Source

(<) :: CDev -> CDev -> Bool Source

(<=) :: CDev -> CDev -> Bool Source

(>) :: CDev -> CDev -> Bool Source

(>=) :: CDev -> CDev -> Bool Source

max :: CDev -> CDev -> CDev Source

min :: CDev -> CDev -> CDev Source

Ord ThreadStatus
Ord BlockReason
Ord ThreadId

Since: 4.2.0.0

Ord Version

Since: 2.1

Ord Unique
Ord Void

Since: 4.8.0.0

Methods

compare :: Void -> Void -> Ordering Source

(<) :: Void -> Void -> Bool Source

(<=) :: Void -> Void -> Bool Source

(>) :: Void -> Void -> Bool Source

(>=) :: Void -> Void -> Bool Source

max :: Void -> Void -> Void Source

min :: Void -> Void -> Void Source

Ord a => Ord [a]

Methods

compare :: [a] -> [a] -> Ordering Source

(<) :: [a] -> [a] -> Bool Source

(<=) :: [a] -> [a] -> Bool Source

(>) :: [a] -> [a] -> Bool Source

(>=) :: [a] -> [a] -> Bool Source

max :: [a] -> [a] -> [a] Source

min :: [a] -> [a] -> [a] Source

Ord a => Ord (Maybe a)

Methods

compare :: Maybe a -> Maybe a -> Ordering Source

(<) :: Maybe a -> Maybe a -> Bool Source

(<=) :: Maybe a -> Maybe a -> Bool Source

(>) :: Maybe a -> Maybe a -> Bool Source

(>=) :: Maybe a -> Maybe a -> Bool Source

max :: Maybe a -> Maybe a -> Maybe a Source

min :: Maybe a -> Maybe a -> Maybe a Source

Integral a => Ord (Ratio a)

Since: 2.0.1

Methods

compare :: Ratio a -> Ratio a -> Ordering Source

(<) :: Ratio a -> Ratio a -> Bool Source

(<=) :: Ratio a -> Ratio a -> Bool Source

(>) :: Ratio a -> Ratio a -> Bool Source

(>=) :: Ratio a -> Ratio a -> Bool Source

max :: Ratio a -> Ratio a -> Ratio a Source

min :: Ratio a -> Ratio a -> Ratio a Source

Ord (Ptr a)

Methods

compare :: Ptr a -> Ptr a -> Ordering Source

(<) :: Ptr a -> Ptr a -> Bool Source

(<=) :: Ptr a -> Ptr a -> Bool Source

(>) :: Ptr a -> Ptr a -> Bool Source

(>=) :: Ptr a -> Ptr a -> Bool Source

max :: Ptr a -> Ptr a -> Ptr a Source

min :: Ptr a -> Ptr a -> Ptr a Source

Ord (FunPtr a)

Methods

compare :: FunPtr a -> FunPtr a -> Ordering Source

(<) :: FunPtr a -> FunPtr a -> Bool Source

(<=) :: FunPtr a -> FunPtr a -> Bool Source

(>) :: FunPtr a -> FunPtr a -> Bool Source

(>=) :: FunPtr a -> FunPtr a -> Bool Source

max :: FunPtr a -> FunPtr a -> FunPtr a Source

min :: FunPtr a -> FunPtr a -> FunPtr a Source

Ord p => Ord (Par1 p)

Methods

compare :: Par1 p -> Par1 p -> Ordering Source

(<) :: Par1 p -> Par1 p -> Bool Source

(<=) :: Par1 p -> Par1 p -> Bool Source

(>) :: Par1 p -> Par1 p -> Bool Source

(>=) :: Par1 p -> Par1 p -> Bool Source

max :: Par1 p -> Par1 p -> Par1 p Source

min :: Par1 p -> Par1 p -> Par1 p Source

Ord a => Ord (Down a)

Since: 4.6.0.0

Methods

compare :: Down a -> Down a -> Ordering Source

(<) :: Down a -> Down a -> Bool Source

(<=) :: Down a -> Down a -> Bool Source

(>) :: Down a -> Down a -> Bool Source

(>=) :: Down a -> Down a -> Bool Source

max :: Down a -> Down a -> Down a Source

min :: Down a -> Down a -> Down a Source

Ord a => Ord (Last a)

Methods

compare :: Last a -> Last a -> Ordering Source

(<) :: Last a -> Last a -> Bool Source

(<=) :: Last a -> Last a -> Bool Source

(>) :: Last a -> Last a -> Bool Source

(>=) :: Last a -> Last a -> Bool Source

max :: Last a -> Last a -> Last a Source

min :: Last a -> Last a -> Last a Source

Ord a => Ord (First a)

Methods

compare :: First a -> First a -> Ordering Source

(<) :: First a -> First a -> Bool Source

(<=) :: First a -> First a -> Bool Source

(>) :: First a -> First a -> Bool Source

(>=) :: First a -> First a -> Bool Source

max :: First a -> First a -> First a Source

min :: First a -> First a -> First a Source

Ord a => Ord (Product a)

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

max :: Product a -> Product a -> Product a Source

min :: Product a -> Product a -> Product a Source

Ord a => Ord (Sum a)

Methods

compare :: Sum a -> Sum a -> Ordering Source

(<) :: Sum a -> Sum a -> Bool Source

(<=) :: Sum a -> Sum a -> Bool Source

(>) :: Sum a -> Sum a -> Bool Source

(>=) :: Sum a -> Sum a -> Bool Source

max :: Sum a -> Sum a -> Sum a Source

min :: Sum a -> Sum a -> Sum a Source

Ord a => Ord (Dual a)

Methods

compare :: Dual a -> Dual a -> Ordering Source

(<) :: Dual a -> Dual a -> Bool Source

(<=) :: Dual a -> Dual a -> Bool Source

(>) :: Dual a -> Dual a -> Bool Source

(>=) :: Dual a -> Dual a -> Bool Source

max :: Dual a -> Dual a -> Dual a Source

min :: Dual a -> Dual a -> Dual a Source

Ord (ForeignPtr a)

Since: 2.1

Ord a => Ord (Identity a)
Ord a => Ord (ZipList a)

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

max :: ZipList a -> ZipList a -> ZipList a Source

min :: ZipList a -> ZipList a -> ZipList a Source

Ord a => Ord (NonEmpty a)
Ord a => Ord (Option a)

Methods

compare :: Option a -> Option a -> Ordering Source

(<) :: Option a -> Option a -> Bool Source

(<=) :: Option a -> Option a -> Bool Source

(>) :: Option a -> Option a -> Bool Source

(>=) :: Option a -> Option a -> Bool Source

max :: Option a -> Option a -> Option a Source

min :: Option a -> Option a -> Option a Source

Ord m => Ord (WrappedMonoid m)
Ord a => Ord (Last a)

Methods

compare :: Last a -> Last a -> Ordering Source

(<) :: Last a -> Last a -> Bool Source

(<=) :: Last a -> Last a -> Bool Source

(>) :: Last a -> Last a -> Bool Source

(>=) :: Last a -> Last a -> Bool Source

max :: Last a -> Last a -> Last a Source

min :: Last a -> Last a -> Last a Source

Ord a => Ord (First a)

Methods

compare :: First a -> First a -> Ordering Source

(<) :: First a -> First a -> Bool Source

(<=) :: First a -> First a -> Bool Source

(>) :: First a -> First a -> Bool Source

(>=) :: First a -> First a -> Bool Source

max :: First a -> First a -> First a Source

min :: First a -> First a -> First a Source

Ord a => Ord (Max a)

Methods

compare :: Max a -> Max a -> Ordering Source

(<) :: Max a -> Max a -> Bool Source

(<=) :: Max a -> Max a -> Bool Source

(>) :: Max a -> Max a -> Bool Source

(>=) :: Max a -> Max a -> Bool Source

max :: Max a -> Max a -> Max a Source

min :: Max a -> Max a -> Max a Source

Ord a => Ord (Min a)

Methods

compare :: Min a -> Min a -> Ordering Source

(<) :: Min a -> Min a -> Bool Source

(<=) :: Min a -> Min a -> Bool Source

(>) :: Min a -> Min a -> Bool Source

(>=) :: Min a -> Min a -> Bool Source

max :: Min a -> Min a -> Min a Source

min :: Min a -> Min a -> Min a Source

Ord (Fixed a)

Methods

compare :: Fixed a -> Fixed a -> Ordering Source

(<) :: Fixed a -> Fixed a -> Bool Source

(<=) :: Fixed a -> Fixed a -> Bool Source

(>) :: Fixed a -> Fixed a -> Bool Source

(>=) :: Fixed a -> Fixed a -> Bool Source

max :: Fixed a -> Fixed a -> Fixed a Source

min :: Fixed a -> Fixed a -> Fixed a Source

(Ord b, Ord a) => Ord (Either a b)

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

max :: Either a b -> Either a b -> Either a b Source

min :: Either a b -> Either a b -> Either a b Source

Ord (V1 k p)

Methods

compare :: V1 k p -> V1 k p -> Ordering Source

(<) :: V1 k p -> V1 k p -> Bool Source

(<=) :: V1 k p -> V1 k p -> Bool Source

(>) :: V1 k p -> V1 k p -> Bool Source

(>=) :: V1 k p -> V1 k p -> Bool Source

max :: V1 k p -> V1 k p -> V1 k p Source

min :: V1 k p -> V1 k p -> V1 k p Source

Ord (U1 k p)

Since: 4.9.0.0

Methods

compare :: U1 k p -> U1 k p -> Ordering Source

(<) :: U1 k p -> U1 k p -> Bool Source

(<=) :: U1 k p -> U1 k p -> Bool Source

(>) :: U1 k p -> U1 k p -> Bool Source

(>=) :: U1 k p -> U1 k p -> Bool Source

max :: U1 k p -> U1 k p -> U1 k p Source

min :: U1 k p -> U1 k p -> U1 k p Source

Ord (TypeRep k a)

Since: 4.4.0.0

Methods

compare :: 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

max :: TypeRep k a -> TypeRep k a -> TypeRep k a Source

min :: TypeRep k a -> TypeRep k a -> TypeRep k a Source

(Ord a, Ord b) => Ord (a, b)

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

max :: (a, b) -> (a, b) -> (a, b) Source

min :: (a, b) -> (a, b) -> (a, b) Source

Ord (Proxy k s)

Since: 4.7.0.0

Methods

compare :: Proxy k s -> Proxy k s -> Ordering Source

(<) :: Proxy k s -> Proxy k s -> Bool Source

(<=) :: Proxy k s -> Proxy k s -> Bool Source

(>) :: Proxy k s -> Proxy k s -> Bool Source

(>=) :: Proxy k s -> Proxy k s -> Bool Source

max :: Proxy k s -> Proxy k s -> Proxy k s Source

min :: Proxy k s -> Proxy k s -> Proxy k s Source

Ord a => Ord (Arg a b)

Since: 4.9.0.0

Methods

compare :: Arg a b -> Arg a b -> Ordering Source

(<) :: Arg a b -> Arg a b -> Bool Source

(<=) :: Arg a b -> Arg a b -> Bool Source

(>) :: Arg a b -> Arg a b -> Bool Source

(>=) :: Arg a b -> Arg a b -> Bool Source

max :: Arg a b -> Arg a b -> Arg a b Source

min :: Arg a b -> Arg a b -> Arg a b Source

Ord (f p) => Ord (Rec1 k f p)

Methods

compare :: 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

max :: Rec1 k f p -> Rec1 k f p -> Rec1 k f p Source

min :: Rec1 k f p -> Rec1 k f p -> Rec1 k f p Source

Ord (URec k Word p)

Methods

compare :: 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)

Methods

compare :: 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

max :: URec k Int p -> URec k Int p -> URec k Int p Source

min :: URec k Int p -> URec k Int p -> URec k Int p Source

Ord (URec k Float p)

Methods

compare :: 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)

Methods

compare :: 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)

Methods

compare :: 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)

Methods

compare :: 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)

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

max :: (a, b, c) -> (a, b, c) -> (a, b, c) Source

min :: (a, b, c) -> (a, b, c) -> (a, b, c) Source

Ord ((:~:) k a b)

Methods

compare :: (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

max :: (k :~: a) b -> (k :~: a) b -> (k :~: a) b Source

min :: (k :~: a) b -> (k :~: a) b -> (k :~: a) b Source

Ord (Coercion k a b)

Methods

compare :: 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)

Methods

compare :: Alt k f a -> Alt k f a -> Ordering Source

(<) :: Alt k f a -> Alt k f a -> Bool Source

(<=) :: Alt k f a -> Alt k f a -> Bool Source

(>) :: Alt k f a -> Alt k f a -> Bool Source

(>=) :: Alt k f a -> Alt k f a -> Bool Source

max :: Alt k f a -> Alt k f a -> Alt k f a Source

min :: Alt k f a -> Alt k f a -> Alt k f a Source

Ord a => Ord (Const k a b)

Methods

compare :: 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

max :: Const k a b -> Const k a b -> Const k a b Source

min :: Const k a b -> Const k a b -> Const k a b Source

Ord c => Ord (K1 k i c p)

Methods

compare :: 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

max :: K1 k i c p -> K1 k i c p -> K1 k i c p Source

min :: K1 k i c p -> K1 k i c p -> K1 k i c p Source

(Ord (g p), Ord (f p)) => Ord ((:+:) k f g p)

Methods

compare :: (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)

Methods

compare :: (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)

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

Ord ((:~~:) k1 k2 a b)

Since: 4.10.0.0

Methods

compare :: (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

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

max :: Sum * f g a -> Sum * f g a -> Sum * f g a Source

min :: Sum * f g a -> Sum * f g a -> Sum * f g a Source

(Ord1 f, Ord1 g, Ord a) => Ord (Product * f g a)

Since: 4.9.0.0

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

Ord (f p) => Ord (M1 k i c f p)

Methods

compare :: 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

max :: M1 k i c f p -> M1 k i c f p -> M1 k i c f p Source

min :: M1 k i c f p -> M1 k i c f p -> M1 k i c f p Source

Ord (f (g p)) => Ord ((:.:) k2 k1 f g p)

Methods

compare :: (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)

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

(Ord1 f, Ord1 g, Ord a) => Ord (Compose * * f g a)

Since: 4.9.0.0

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

(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f) => Ord (a, b, c, d, e, f)

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

(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g) => Ord (a, b, c, d, e, f, g)

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

(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)

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

(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)

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

(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)

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

(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)

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

(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)

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

(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)

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

(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)

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

(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)

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

class Enum a where Source

Class Enum defines operations on sequentially ordered types.

The enumFrom... methods are used in Haskell's translation of arithmetic sequences.

Instances of Enum may be derived for any enumeration type (types whose constructors have no fields). The nullary constructors are assumed to be numbered left-to-right by fromEnum from 0 through n-1. See Chapter 10 of the Haskell Report for more details.

For any type that is an instance of class Bounded as well as Enum, the following should hold:

   enumFrom     x   = enumFromTo     x maxBound
   enumFromThen x y = enumFromThenTo x y bound
     where
       bound | fromEnum y >= fromEnum x = maxBound
             | otherwise                = minBound

Minimal complete definition

toEnum, fromEnum

Methods

succ :: a -> a Source

the successor of a value. For numeric types, succ adds 1.

pred :: a -> a Source

the predecessor of a value. For numeric types, pred subtracts 1.

toEnum :: Int -> a Source

Convert from an Int.

fromEnum :: a -> Int Source

Convert to an Int. It is implementation-dependent what fromEnum returns when applied to a value that is too large to fit in an Int.

enumFrom :: a -> [a] Source

Used in Haskell's translation of [n..].

enumFromThen :: a -> a -> [a] Source

Used in Haskell's translation of [n,n'..].

enumFromTo :: a -> a -> [a] Source

Used in Haskell's translation of [n..m].

enumFromThenTo :: a -> a -> a -> [a] Source

Used in Haskell's translation of [n,n'..m].

Instances

Enum Bool

Since: 2.1

Enum Char

Since: 2.1

Enum Int

Since: 2.1

Enum Int8

Since: 2.1

Enum Int16

Since: 2.1

Enum Int32

Since: 2.1

Enum Int64

Since: 2.1

Enum Integer

Since: 2.1

Enum Natural

Since: 4.8.0.0

Enum Ordering

Since: 2.1

Enum Word

Since: 2.1

Enum Word8

Since: 2.1

Enum Word16

Since: 2.1

Enum Word32

Since: 2.1

Enum Word64

Since: 2.1

Enum VecCount

Since: 4.10.0.0

Enum VecElem

Since: 4.10.0.0

Enum ()

Since: 2.1

Methods

succ :: () -> () Source

pred :: () -> () Source

toEnum :: Int -> () Source

fromEnum :: () -> Int Source

enumFrom :: () -> [()] Source

enumFromThen :: () -> () -> [()] Source

enumFromTo :: () -> () -> [()] Source

enumFromThenTo :: () -> () -> () -> [()] Source

Enum GeneralCategory
Enum IOMode
Enum IntPtr
Enum WordPtr
Enum CUIntMax
Enum CIntMax
Enum CUIntPtr
Enum CIntPtr
Enum CSUSeconds
Enum CUSeconds
Enum CTime
Enum CClock
Enum CSigAtomic
Enum CWchar
Enum CSize
Enum CPtrdiff
Enum CDouble
Enum CFloat
Enum CBool
Enum CULLong
Enum CLLong
Enum CULong
Enum CLong
Enum CUInt

Methods

succ :: CUInt -> CUInt