base-4.10.1.0: Basic libraries

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

Prelude

Contents

- Standard types, classes and related functions
  - Basic data types
    - Tuples
  - Basic type classes
  - Numbers
    - Numeric types
    - Numeric type classes
    - Numeric functions
  - Monoids
  - Monads and functors
  - Folds and traversals
  - Miscellaneous functions
- List operations
  - Special folds
  - Building lists
    - Scans
    - Infinite lists
  - Sublists
  - Searching lists
  - Zipping and unzipping lists
  - Functions on strings
- Converting to and from `String`
  - Converting to `String`
  - Converting from `String`
- Basic Input and output
  - Simple I/O operations
    - Output functions
    - Input functions
    - Files
  - Exception handling in the I/O monad

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.

Synopsis

- data Bool :: *
  - = False
  - | True
- (&&) :: Bool -> Bool -> Bool
- (||) :: Bool -> Bool -> Bool
- not :: Bool -> Bool
- otherwise :: Bool
- data Maybe a
  - = Nothing
  - | Just a
- maybe :: b -> (a -> b) -> Maybe a -> b
- data Either a b
  - = Left a
  - | Right b
- either :: (a -> c) -> (b -> c) -> Either a b -> c
- data Ordering :: *
  - = LT
  - | EQ
  - | GT
- data Char :: *
- type String = [Char]
- fst :: (a, b) -> a
- snd :: (a, b) -> b
- curry :: ((a, b) -> c) -> a -> b -> c
- uncurry :: (a -> b -> c) -> (a, b) -> c
- class Eq a where
- class Eq a => Ord a where
- class Enum a where
- class Bounded a where
- data Int :: *
- data Integer :: *
- data Float :: *
- data Double :: *
- type Rational = Ratio Integer
- data Word :: *
- class Num a where
- class (Num a, Ord a) => Real a where
- class (Real a, Enum a) => Integral a where
- class Num a => Fractional a where
- class Fractional a => Floating a where
- class (Real a, Fractional a) => RealFrac a where
- class (RealFrac a, Floating a) => RealFloat a where
- subtract :: Num a => a -> a -> a
- even :: Integral a => a -> Bool
- odd :: Integral a => a -> Bool
- gcd :: Integral a => a -> a -> a
- lcm :: Integral a => a -> a -> a
- (^) :: (Num a, Integral b) => a -> b -> a
- (^^) :: (Fractional a, Integral b) => a -> b -> a
- fromIntegral :: (Integral a, Num b) => a -> b
- realToFrac :: (Real a, Fractional b) => a -> b
- class Monoid a where
- class Functor f where
- (<$>) :: Functor f => (a -> b) -> f a -> f b
- class Functor f => Applicative f where
- class Applicative m => Monad m where
- mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()
- sequence_ :: (Foldable t, Monad m) => t (m a) -> m ()
- (=<<) :: Monad m => (a -> m b) -> m a -> m b
- class Foldable t where
- class (Functor t, Foldable t) => Traversable t where
- id :: a -> a
- const :: a -> b -> a
- (.) :: (b -> c) -> (a -> b) -> a -> c
- flip :: (a -> b -> c) -> b -> a -> c
- ($) :: (a -> b) -> a -> b
- until :: (a -> Bool) -> (a -> a) -> a -> a
- asTypeOf :: a -> a -> a
- error :: forall (r :: RuntimeRep). forall (a :: TYPE r). HasCallStack => [Char] -> a
- errorWithoutStackTrace :: forall (r :: RuntimeRep). forall (a :: TYPE r). [Char] -> a
- undefined :: forall (r :: RuntimeRep). forall (a :: TYPE r). HasCallStack => a
- seq :: a -> b -> b
- ($!) :: (a -> b) -> a -> b
- map :: (a -> b) -> [a] -> [b]
- (++) :: [a] -> [a] -> [a]
- filter :: (a -> Bool) -> [a] -> [a]
- head :: [a] -> a
- last :: [a] -> a
- tail :: [a] -> [a]
- init :: [a] -> [a]
- null :: Foldable t => t a -> Bool
- length :: Foldable t => t a -> Int
- (!!) :: [a] -> Int -> a
- reverse :: [a] -> [a]
- and :: Foldable t => t Bool -> Bool
- or :: Foldable t => t Bool -> Bool
- any :: Foldable t => (a -> Bool) -> t a -> Bool
- all :: Foldable t => (a -> Bool) -> t a -> Bool
- concat :: Foldable t => t [a] -> [a]
- concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
- scanl :: (b -> a -> b) -> b -> [a] -> [b]
- scanl1 :: (a -> a -> a) -> [a] -> [a]
- scanr :: (a -> b -> b) -> b -> [a] -> [b]
- scanr1 :: (a -> a -> a) -> [a] -> [a]
- iterate :: (a -> a) -> a -> [a]
- repeat :: a -> [a]
- replicate :: Int -> a -> [a]
- cycle :: [a] -> [a]
- take :: Int -> [a] -> [a]
- drop :: Int -> [a] -> [a]
- splitAt :: Int -> [a] -> ([a], [a])
- takeWhile :: (a -> Bool) -> [a] -> [a]
- dropWhile :: (a -> Bool) -> [a] -> [a]
- span :: (a -> Bool) -> [a] -> ([a], [a])
- break :: (a -> Bool) -> [a] -> ([a], [a])
- notElem :: (Foldable t, Eq a) => a -> t a -> Bool
- lookup :: Eq a => a -> [(a, b)] -> Maybe b
- zip :: [a] -> [b] -> [(a, b)]
- zip3 :: [a] -> [b] -> [c] -> [(a, b, c)]
- zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
- zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
- unzip :: [(a, b)] -> ([a], [b])
- unzip3 :: [(a, b, c)] -> ([a], [b], [c])
- lines :: String -> [String]
- words :: String -> [String]
- unlines :: [String] -> String
- unwords :: [String] -> String
- type ShowS = String -> String
- class Show a where
- shows :: Show a => a -> ShowS
- showChar :: Char -> ShowS
- showString :: String -> ShowS
- showParen :: Bool -> ShowS -> ShowS
- type ReadS a = String -> [(a, String)]
- class Read a where
- reads :: Read a => ReadS a
- readParen :: Bool -> ReadS a -> ReadS a
- read :: Read a => String -> a
- lex :: ReadS String
- data IO a :: * -> *
- putChar :: Char -> IO ()
- putStr :: String -> IO ()
- putStrLn :: String -> IO ()
- print :: Show a => a -> IO ()
- getChar :: IO Char
- getLine :: IO String
- getContents :: IO String
- interact :: (String -> String) -> IO ()
- type FilePath = String
- readFile :: FilePath -> IO String
- writeFile :: FilePath -> String -> IO ()
- appendFile :: FilePath -> String -> IO ()
- readIO :: Read a => String -> IO a
- readLn :: Read a => IO a
- type IOError = IOException
- ioError :: IOError -> IO a
- userError :: String -> IOError

# Standard types, classes and related functions

## Basic data types

data Bool :: * Source #

Constructors

False |
True |

Instances

Bounded Bool # | Since: 2.1
Methods minBound :: Bool # maxBound :: Bool #
Enum Bool # | Since: 2.1
Methods succ :: Bool -> Bool # pred :: Bool -> Bool # toEnum :: Int -> Bool # fromEnum :: Bool -> Int # enumFrom :: Bool -> [Bool] # enumFromThen :: Bool -> Bool -> [Bool] # enumFromTo :: Bool -> Bool -> [Bool] # enumFromThenTo :: Bool -> Bool -> Bool -> [Bool] #
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 #

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

toConstr :: Bool -> Constr #

dataTypeOf :: Bool -> DataType #

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

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

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

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

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

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

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

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

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

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

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
Methods readsPrec :: Int -> ReadS Bool # readList :: ReadS [Bool] # readPrec :: ReadPrec Bool # readListPrec :: ReadPrec [Bool] #
Show Bool # |
Methods showsPrec :: Int -> Bool -> ShowS # show :: Bool -> String # showList :: [Bool] -> ShowS #
Ix Bool # | Since: 2.1
Methods range :: (Bool, Bool) -> [Bool] # index :: (Bool, Bool) -> Bool -> Int # unsafeIndex :: (Bool, Bool) -> Bool -> Int inRange :: (Bool, Bool) -> Bool -> Bool # rangeSize :: (Bool, Bool) -> Int # unsafeRangeSize :: (Bool, Bool) -> Int
Generic Bool # |
Associated Types type Rep Bool :: * -> * # Methods from :: Bool -> Rep Bool x # to :: Rep Bool x -> Bool #
FiniteBits Bool # | Since: 4.7.0.0
Methods finiteBitSize :: Bool -> Int # countLeadingZeros :: Bool -> Int # countTrailingZeros :: Bool -> Int #
Bits Bool # | Interpret `Bool` as 1-bit bit-field Since: 4.7.0.0

Methods

(.&.) :: Bool -> Bool -> Bool #

(.|.) :: Bool -> Bool -> Bool #

xor :: Bool -> Bool -> Bool #

complement :: Bool -> Bool #

shift :: Bool -> Int -> Bool #

rotate :: Bool -> Int -> Bool #

zeroBits :: Bool #

bit :: Int -> Bool #

setBit :: Bool -> Int -> Bool #

clearBit :: Bool -> Int -> Bool #

complementBit :: Bool -> Int -> Bool #

testBit :: Bool -> Int -> Bool #

bitSizeMaybe :: Bool -> Maybe Int #

bitSize :: Bool -> Int #

isSigned :: Bool -> Bool #

shiftL :: Bool -> Int -> Bool #

unsafeShiftL :: Bool -> Int -> Bool #

shiftR :: Bool -> Int -> Bool #

unsafeShiftR :: Bool -> Int -> Bool #

rotateL :: Bool -> Int -> Bool #

rotateR :: Bool -> Int -> Bool #

popCount :: Bool -> Int #

Storable Bool # | Since: 2.1
Methods sizeOf :: Bool -> Int # alignment :: Bool -> Int # peekElemOff :: Ptr Bool -> Int -> IO Bool # pokeElemOff :: Ptr Bool -> Int -> Bool -> IO () # peekByteOff :: Ptr b -> Int -> IO Bool # pokeByteOff :: Ptr b -> Int -> Bool -> IO () # peek :: Ptr Bool -> IO Bool # poke :: Ptr Bool -> Bool -> IO () #
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 #

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

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

data Maybe a #

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 # (>>) :: Maybe a -> Maybe b -> Maybe b # return :: a -> Maybe a # fail :: String -> Maybe a #
Functor Maybe # | Since: 2.1
Methods fmap :: (a -> b) -> Maybe a -> Maybe b # (<$) :: a -> Maybe b -> Maybe a #
MonadFix Maybe # | Since: 2.1
Methods mfix :: (a -> Maybe a) -> Maybe a #
MonadFail Maybe # | Since: 4.9.0.0
Methods fail :: String -> Maybe a #
Applicative Maybe # | Since: 2.1
Methods pure :: a -> Maybe a # (<*>) :: Maybe (a -> b) -> Maybe a -> Maybe b # liftA2 :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c # (*>) :: Maybe a -> Maybe b -> Maybe b # (<*) :: Maybe a -> Maybe b -> Maybe a #
Foldable Maybe # | Since: 2.1

Methods

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

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

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

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

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

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

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

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

toList :: Maybe a -> [a] #

null :: Maybe a -> Bool #

length :: Maybe a -> Int #

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

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

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

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

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

Traversable Maybe # | Since: 2.1
Methods traverse :: Applicative f => (a -> f b) -> Maybe a -> f (Maybe b) # sequenceA :: Applicative f => Maybe (f a) -> f (Maybe a) # mapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b) # sequence :: Monad m => Maybe (m a) -> m (Maybe a) #
MonadPlus Maybe # | Since: 2.1
Methods mzero :: Maybe a # mplus :: Maybe a -> Maybe a -> Maybe a #
Alternative Maybe # | Since: 2.1
Methods empty :: Maybe a # (<|>) :: Maybe a -> Maybe a -> Maybe a # some :: Maybe a -> Maybe [a] # many :: Maybe a -> Maybe [a] #
MonadZip Maybe # | Since: 4.8.0.0
Methods mzip :: Maybe a -> Maybe b -> Maybe (a, b) # mzipWith :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c # munzip :: Maybe (a, b) -> (Maybe a, Maybe b) #
Show1 Maybe # | Since: 4.9.0.0
Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Maybe a -> ShowS # liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Maybe a] -> ShowS #
Read1 Maybe # | Since: 4.9.0.0
Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Maybe a) # liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Maybe a] # liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Maybe a) # liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Maybe a] #
Ord1 Maybe # | Since: 4.9.0.0
Methods liftCompare :: (a -> b -> Ordering) -> Maybe a -> Maybe b -> Ordering #
Eq1 Maybe # | Since: 4.9.0.0
Methods liftEq :: (a -> b -> Bool) -> Maybe a -> Maybe b -> Bool #
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) #

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

toConstr :: Maybe a -> Constr #

dataTypeOf :: Maybe a -> DataType #

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

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

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

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

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

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

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

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

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

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

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
Methods readsPrec :: Int -> ReadS (Maybe a) # readList :: ReadS [Maybe a] # readPrec :: ReadPrec (Maybe a) # readListPrec :: ReadPrec [Maybe a] #
Show a => Show (Maybe a) # |
Methods showsPrec :: Int -> Maybe a -> ShowS # show :: Maybe a -> String # showList :: [Maybe a] -> ShowS #
Generic (Maybe a) # |
Associated Types type Rep (Maybe a) :: * -> * # Methods from :: Maybe a -> Rep (Maybe a) x # to :: Rep (Maybe a) x -> Maybe a #
Semigroup a => Semigroup (Maybe a) # | Since: 4.9.0.0
Methods (<>) :: Maybe a -> Maybe a -> Maybe a # sconcat :: NonEmpty (Maybe a) -> Maybe a # stimes :: Integral b => b -> Maybe a -> Maybe a #
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 # mappend :: Maybe a -> Maybe a -> Maybe a # mconcat :: [Maybe a] -> Maybe a #
Generic1 * Maybe # |
Associated Types type Rep1 Maybe (f :: Maybe -> *) :: k -> * # Methods from1 :: f a -> Rep1 Maybe f a # to1 :: Rep1 Maybe f a -> f a #
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 Rep1 * Maybe = 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) Par1)))
type (==) (Maybe k) a b # |
type (==) (Maybe k) a b

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

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 #

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 `String`s, and the `Right` constructor can be used only on `Int`s:

    >>> 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 `Int`s.

    >>> :{
        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 # liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Either a b] -> ShowS #
Read2 Either # | Since: 4.9.0.0

Methods

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

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

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

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

Ord2 Either # | Since: 4.9.0.0
Methods liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Either a c -> Either b d -> Ordering #
Eq2 Either # | Since: 4.9.0.0
Methods liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Either a c -> Either b d -> Bool #
Bifunctor Either # | Since: 4.8.0.0
Methods bimap :: (a -> b) -> (c -> d) -> Either a c -> Either b d # first :: (a -> b) -> Either a c -> Either b c # second :: (b -> c) -> Either a b -> Either a c #
Bifoldable Either # | Since: 4.10.0.0
Methods bifold :: Monoid m => Either m m -> m # bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Either a b -> m # bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Either a b -> c # bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Either a b -> c #
Bitraversable Either # | Since: 4.10.0.0
Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Either a b -> f (Either c d) #
Monad (Either e) # | Since: 4.4.0.0
Methods (>>=) :: Either e a -> (a -> Either e b) -> Either e b # (>>) :: Either e a -> Either e b -> Either e b # return :: a -> Either e a # fail :: String -> Either e a #
Functor (Either a) # | Since: 3.0
Methods fmap :: (a -> b) -> Either a a -> Either a b # (<$) :: a -> Either a b -> Either a a #
MonadFix (Either e) # | Since: 4.3.0.0
Methods mfix :: (a -> Either e a) -> Either e a #
Applicative (Either e) # | Since: 3.0
Methods pure :: a -> Either e a # (<*>) :: Either e (a -> b) -> Either e a -> Either e b # liftA2 :: (a -> b -> c) -> Either e a -> Either e b -> Either e c # (*>) :: Either e a -> Either e b -> Either e b # (<*) :: Either e a -> Either e b -> Either e a #
Foldable (Either a) # | Since: 4.7.0.0

Methods

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

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

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

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

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

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

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

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

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

null :: Either a a -> Bool #

length :: Either a a -> Int #

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

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

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

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

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

Traversable (Either a) # | Since: 4.7.0.0
Methods traverse :: Applicative f => (a -> f b) -> Either a a -> f (Either a b) # sequenceA :: Applicative f => Either a (f a) -> f (Either a a) # mapM :: Monad m => (a -> m b) -> Either a a -> m (Either a b) # sequence :: Monad m => Either a (m a) -> m (Either a a) #
Show a => Show1 (Either a) # | Since: 4.9.0.0
Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Either a a -> ShowS # liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Either a a] -> ShowS #
Read a => Read1 (Either a) # | Since: 4.9.0.0
Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Either a a) # liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Either a a] # liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Either a a) # liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Either a a] #
Ord a => Ord1 (Either a) # | Since: 4.9.0.0
Methods liftCompare :: (a -> b -> Ordering) -> Either a a -> Either a b -> Ordering #
Eq a => Eq1 (Either a) # | Since: 4.9.0.0
Methods liftEq :: (a -> b -> Bool) -> Either a a -> Either a b -> Bool #
Generic1 * (Either a) # |
Associated Types type Rep1 (Either a) (f :: Either a -> *) :: k -> * # Methods from1 :: f a -> Rep1 (Either a) f a # to1 :: Rep1 (Either a) f a -> f a #
(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) #

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

toConstr :: Either a b -> Constr #

dataTypeOf :: Either a b -> DataType #

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

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

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

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

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

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

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

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

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

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

(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) # |
Methods readsPrec :: Int -> ReadS (Either a b) # readList :: ReadS [Either a b] # readPrec :: ReadPrec (Either a b) # readListPrec :: ReadPrec [Either a b] #
(Show b, Show a) => Show (Either a b) # |
Methods showsPrec :: Int -> Either a b -> ShowS # show :: Either a b -> String # showList :: [Either a b] -> ShowS #
Generic (Either a b) # |
Associated Types type Rep (Either a b) :: * -> * # Methods from :: Either a b -> Rep (Either a b) x # to :: Rep (Either a b) x -> Either a b #
Semigroup (Either a b) # | Since: 4.9.0.0
Methods (<>) :: Either a b -> Either a b -> Either a b # sconcat :: NonEmpty (Either a b) -> Either a b # stimes :: Integral b => b -> Either a b -> Either a b #
type Rep1 * (Either a) # |
type Rep1 * (Either a) = D1 * (MetaData "Either" "Data.Either" "base" False) ((:+:) * (C1 * (MetaCons "Left" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a))) (C1 * (MetaCons "Right" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))
type Rep (Either a b) # |
type Rep (Either a b) = D1 * (MetaData "Either" "Data.Either" "base" False) ((:+:) * (C1 * (MetaCons "Left" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a))) (C1 * (MetaCons "Right" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * b))))
type (==) (Either k1 k2) a b # |
type (==) (Either k1 k2) a b

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

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
Methods minBound :: Ordering # maxBound :: Ordering #
Enum Ordering # | Since: 2.1
Methods succ :: Ordering -> Ordering # pred :: Ordering -> Ordering # toEnum :: Int -> Ordering # fromEnum :: Ordering -> Int # enumFrom :: Ordering -> [Ordering] # enumFromThen :: Ordering -> Ordering -> [Ordering] # enumFromTo :: Ordering -> Ordering -> [Ordering] # enumFromThenTo :: Ordering -> Ordering -> Ordering -> [Ordering] #
Eq Ordering |
Methods (==) :: Ordering -> Ordering -> Bool Source # (/=) :: Ordering -> Ordering -> Bool Source #
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 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Ordering #

toConstr :: Ordering -> Constr #

dataTypeOf :: Ordering -> DataType #

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

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

gmapT :: (forall b. Data b => b -> b) -> Ordering -> Ordering #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ordering -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ordering -> r #

gmapQ :: (forall d. Data d => d -> u) -> Ordering -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Ordering -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering #

Ord Ordering |
Methods compare :: Ordering -> Ordering -> Ordering Source # (<) :: Ordering -> Ordering -> Bool Source # (<=) :: Ordering -> Ordering -> Bool Source # (>) :: Ordering -> Ordering -> Bool Source # (>=) :: Ordering -> Ordering -> Bool Source # max :: Ordering -> Ordering -> Ordering Source # min :: Ordering -> Ordering -> Ordering Source #
Read Ordering # | Since: 2.1
Methods readsPrec :: Int -> ReadS Ordering # readList :: ReadS [Ordering] # readPrec :: ReadPrec Ordering # readListPrec :: ReadPrec [Ordering] #
Show Ordering # |
Methods showsPrec :: Int -> Ordering -> ShowS # show :: Ordering -> String # showList :: [Ordering] -> ShowS #
Ix Ordering # | Since: 2.1
Methods range :: (Ordering, Ordering) -> [Ordering] # index :: (Ordering, Ordering) -> Ordering -> Int # unsafeIndex :: (Ordering, Ordering) -> Ordering -> Int inRange :: (Ordering, Ordering) -> Ordering -> Bool # rangeSize :: (Ordering, Ordering) -> Int # unsafeRangeSize :: (Ordering, Ordering) -> Int
Generic Ordering # |
Associated Types type Rep Ordering :: * -> * # Methods from :: Ordering -> Rep Ordering x # to :: Rep Ordering x -> Ordering #
Semigroup Ordering # | Since: 4.9.0.0
Methods (<>) :: Ordering -> Ordering -> Ordering # sconcat :: NonEmpty Ordering -> Ordering # stimes :: Integral b => b -> Ordering -> Ordering #
Monoid Ordering # | Since: 2.1
Methods mempty :: Ordering # mappend :: Ordering -> Ordering -> Ordering # mconcat :: [Ordering] -> Ordering #
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
Methods minBound :: Char # maxBound :: Char #
Enum Char # | Since: 2.1
Methods succ :: Char -> Char # pred :: Char -> Char # toEnum :: Int -> Char # fromEnum :: Char -> Int # enumFrom :: Char -> [Char] # enumFromThen :: Char -> Char -> [Char] # enumFromTo :: Char -> Char -> [Char] # enumFromThenTo :: Char -> Char -> Char -> [Char] #
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 #

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

toConstr :: Char -> Constr #

dataTypeOf :: Char -> DataType #

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

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

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

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

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

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

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

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

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

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

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
Methods readsPrec :: Int -> ReadS Char # readList :: ReadS [Char] # readPrec :: ReadPrec Char # readListPrec :: ReadPrec [Char] #
Show Char # | Since: 2.1
Methods showsPrec :: Int -> Char -> ShowS # show :: Char -> String # showList :: [Char] -> ShowS #
Ix Char # | Since: 2.1
Methods range :: (Char, Char) -> [Char] # index :: (Char, Char) -> Char -> Int # unsafeIndex :: (Char, Char) -> Char -> Int inRange :: (Char, Char) -> Char -> Bool # rangeSize :: (Char, Char) -> Int # unsafeRangeSize :: (Char, Char) -> Int
Storable Char # | Since: 2.1
Methods sizeOf :: Char -> Int # alignment :: Char -> Int # peekElemOff :: Ptr Char -> Int -> IO Char # pokeElemOff :: Ptr Char -> Int -> Char -> IO () # peekByteOff :: Ptr b -> Int -> IO Char # pokeByteOff :: Ptr b -> Int -> Char -> IO () # peek :: Ptr Char -> IO Char # poke :: Ptr Char -> Char -> IO () #
IsChar Char # | Since: 2.1
Methods toChar :: Char -> Char # fromChar :: Char -> Char #
PrintfArg Char # | Since: 2.1
Methods formatArg :: Char -> FieldFormatter # parseFormat :: Char -> ModifierParser #
Generic1 k (URec k Char) # |
Associated Types type Rep1 (URec k Char) (f :: URec k Char -> *) :: k -> * # Methods from1 :: f a -> Rep1 (URec k Char) f a # to1 :: Rep1 (URec k Char) f a -> f a #
Functor (URec * Char) # |
Methods fmap :: (a -> b) -> URec * Char a -> URec * Char b # (<$) :: a -> URec * Char b -> URec * Char a #
Foldable (URec * Char) # |

Methods

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

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

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

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

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

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

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

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

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

null :: URec * Char a -> Bool #

length :: URec * Char a -> Int #

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

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

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

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

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

Traversable (URec * Char) # |
Methods traverse :: Applicative f => (a -> f b) -> URec * Char a -> f (URec * Char b) # sequenceA :: Applicative f => URec * Char (f a) -> f (URec * Char a) # mapM :: Monad m => (a -> m b) -> URec * Char a -> m (URec * Char b) # sequence :: Monad m => URec * Char (m a) -> m (URec * Char a) #
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 # show :: URec k Char p -> String # showList :: [URec k Char p] -> ShowS #
Generic (URec k Char p) # |
Associated Types type Rep (URec k Char p) :: * -> * # Methods from :: URec k Char p -> Rep (URec k Char p) x # to :: Rep (URec k Char p) x -> URec k Char p #
data URec k Char # | Used for marking occurrences of `Char#` Since: 4.9.0.0

data URec k Char = UChar {

- uChar# :: Char#

}

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] #

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

### Tuples

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

Extract the first component of a pair.

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

Extract the second component of a pair.

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

`curry` converts an uncurried function to a curried function.

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

`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 |
Methods (==) :: Integer -> Integer -> Bool Source # (/=) :: Integer -> Integer -> Bool Source #
Eq Natural # |
Methods (==) :: Natural -> Natural -> Bool Source # (/=) :: Natural -> Natural -> Bool Source #
Eq Ordering |
Methods (==) :: Ordering -> Ordering -> Bool Source # (/=) :: Ordering -> Ordering -> Bool Source #
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 # |
Methods (==) :: SomeTypeRep -> SomeTypeRep -> Bool Source # (/=) :: SomeTypeRep -> SomeTypeRep -> Bool Source #
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 # |
Methods (==) :: GeneralCategory -> GeneralCategory -> Bool Source # (/=) :: GeneralCategory -> GeneralCategory -> Bool Source #
Eq Number # |
Methods (==) :: Number -> Number -> Bool Source # (/=) :: Number -> Number -> Bool Source #
Eq Lexeme # |
Methods (==) :: Lexeme -> Lexeme -> Bool Source # (/=) :: Lexeme -> Lexeme -> Bool Source #
Eq Fingerprint # |
Methods (==) :: Fingerprint -> Fingerprint -> Bool Source # (/=) :: Fingerprint -> Fingerprint -> Bool Source #
Eq IOMode # |
Methods (==) :: IOMode -> IOMode -> Bool Source # (/=) :: IOMode -> IOMode -> Bool Source #
Eq IntPtr # |
Methods (==) :: IntPtr -> IntPtr -> Bool Source # (/=) :: IntPtr -> IntPtr -> Bool Source #
Eq WordPtr # |
Methods (==) :: WordPtr -> WordPtr -> Bool Source # (/=) :: WordPtr -> WordPtr -> Bool Source #
Eq CUIntMax # |
Methods (==) :: CUIntMax -> CUIntMax -> Bool Source # (/=) :: CUIntMax -> CUIntMax -> Bool Source #
Eq CIntMax # |
Methods (==) :: CIntMax -> CIntMax -> Bool Source # (/=) :: CIntMax -> CIntMax -> Bool Source #
Eq CUIntPtr # |
Methods (==) :: CUIntPtr -> CUIntPtr -> Bool Source # (/=) :: CUIntPtr -> CUIntPtr -> Bool Source #
Eq CIntPtr # |
Methods (==) :: CIntPtr -> CIntPtr -> Bool Source # (/=) :: CIntPtr -> CIntPtr -> Bool Source #
Eq CSUSeconds # |
Methods (==) :: CSUSeconds -> CSUSeconds -> Bool Source # (/=) :: CSUSeconds -> CSUSeconds -> Bool Source #
Eq CUSeconds # |
Methods (==) :: CUSeconds -> CUSeconds -> Bool Source # (/=) :: CUSeconds -> CUSeconds -> Bool Source #
Eq CTime # |
Methods (==) :: CTime -> CTime -> Bool Source # (/=) :: CTime -> CTime -> Bool Source #
Eq CClock # |
Methods (==) :: CClock -> CClock -> Bool Source # (/=) :: CClock -> CClock -> Bool Source #
Eq CSigAtomic # |
Methods (==) :: CSigAtomic -> CSigAtomic -> Bool Source # (/=) :: CSigAtomic -> CSigAtomic -> Bool Source #
Eq CWchar # |
Methods (==) :: CWchar -> CWchar -> Bool Source # (/=) :: CWchar -> CWchar -> Bool Source #
Eq CSize # |
Methods (==) :: CSize -> CSize -> Bool Source # (/=) :: CSize -> CSize -> Bool Source #
Eq CPtrdiff # |
Methods (==) :: CPtrdiff -> CPtrdiff -> Bool Source # (/=) :: CPtrdiff -> CPtrdiff -> Bool Source #
Eq CDouble # |
Methods (==) :: CDouble -> CDouble -> Bool Source # (/=) :: CDouble -> CDouble -> Bool Source #
Eq CFloat # |
Methods (==) :: CFloat -> CFloat -> Bool Source # (/=) :: CFloat -> CFloat -> Bool Source #
Eq CBool # |
Methods (==) :: CBool -> CBool -> Bool Source # (/=) :: CBool -> CBool -> Bool Source #
Eq CULLong # |
Methods (==) :: CULLong -> CULLong -> Bool Source # (/=) :: CULLong -> CULLong -> Bool Source #
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 # |
Methods (==) :: CUShort -> CUShort -> Bool Source # (/=) :: CUShort -> CUShort -> Bool Source #
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
Methods (==) :: SomeNat -> SomeNat -> Bool Source # (/=) :: SomeNat -> SomeNat -> Bool Source #
Eq SomeSymbol # | Since: 4.7.0.0
Methods (==) :: SomeSymbol -> SomeSymbol -> Bool Source # (/=) :: SomeSymbol -> SomeSymbol -> Bool Source #
Eq DecidedStrictness # |
Methods (==) :: DecidedStrictness -> DecidedStrictness -> Bool Source # (/=) :: DecidedStrictness -> DecidedStrictness -> Bool Source #
Eq SourceStrictness # |
Methods (==) :: SourceStrictness -> SourceStrictness -> Bool Source # (/=) :: SourceStrictness -> SourceStrictness -> Bool Source #
Eq SourceUnpackedness # |
Methods (==) :: SourceUnpackedness -> SourceUnpackedness -> Bool Source # (/=) :: SourceUnpackedness -> SourceUnpackedness -> Bool Source #
Eq Associativity # |
Methods (==) :: Associativity -> Associativity -> Bool Source # (/=) :: Associativity -> Associativity -> Bool Source #
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 # |
Methods (==) :: ArithException -> ArithException -> Bool Source # (/=) :: ArithException -> ArithException -> Bool Source #
Eq ErrorCall # |
Methods (==) :: ErrorCall -> ErrorCall -> Bool Source # (/=) :: ErrorCall -> ErrorCall -> Bool Source #
Eq IOException # | Since: 4.1.0.0
Methods (==) :: IOException -> IOException -> Bool Source # (/=) :: IOException -> IOException -> Bool Source #
Eq MaskingState # |
Methods (==) :: MaskingState -> MaskingState -> Bool Source # (/=) :: MaskingState -> MaskingState -> Bool Source #
Eq BufferState # |
Methods (==) :: BufferState -> BufferState -> Bool Source # (/=) :: BufferState -> BufferState -> Bool Source #
Eq CodingProgress # |
Methods (==) :: CodingProgress -> CodingProgress -> Bool Source # (/=) :: CodingProgress -> CodingProgress -> Bool Source #
Eq SeekMode # |
Methods (==) :: SeekMode -> SeekMode -> Bool Source # (/=) :: SeekMode -> SeekMode -> Bool Source #
Eq IODeviceType # |
Methods (==) :: IODeviceType -> IODeviceType -> Bool Source # (/=) :: IODeviceType -> IODeviceType -> Bool Source #
Eq NewlineMode # |
Methods (==) :: NewlineMode -> NewlineMode -> Bool Source # (/=) :: NewlineMode -> NewlineMode -> Bool Source #
Eq Newline # |
Methods (==) :: Newline -> Newline -> Bool Source # (/=) :: Newline -> Newline -> Bool Source #
Eq BufferMode # |
Methods (==) :: BufferMode -> BufferMode -> Bool Source # (/=) :: BufferMode -> BufferMode -> Bool Source #
Eq Handle # | Since: 4.1.0.0
Methods (==) :: Handle -> Handle -> Bool Source # (/=) :: Handle -> Handle -> Bool Source #
Eq IOErrorType # | Since: 4.1.0.0
Methods (==) :: IOErrorType -> IOErrorType -> Bool Source # (/=) :: IOErrorType -> IOErrorType -> Bool Source #
Eq ExitCode # |
Methods (==) :: ExitCode -> ExitCode -> Bool Source # (/=) :: ExitCode -> ExitCode -> Bool Source #
Eq ArrayException # |
Methods (==) :: ArrayException -> ArrayException -> Bool Source # (/=) :: ArrayException -> ArrayException -> Bool Source #
Eq AsyncException # |
Methods (==) :: AsyncException -> AsyncException -> Bool Source # (/=) :: AsyncException -> AsyncException -> Bool Source #
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 # |
Methods (==) :: CFsFilCnt -> CFsFilCnt -> Bool Source # (/=) :: CFsFilCnt -> CFsFilCnt -> Bool Source #
Eq CFsBlkCnt # |
Methods (==) :: CFsBlkCnt -> CFsBlkCnt -> Bool Source # (/=) :: CFsBlkCnt -> CFsBlkCnt -> Bool Source #
Eq CClockId # |
Methods (==) :: CClockId -> CClockId -> Bool Source # (/=) :: CClockId -> CClockId -> Bool Source #
Eq CBlkCnt # |
Methods (==) :: CBlkCnt -> CBlkCnt -> Bool Source # (/=) :: CBlkCnt -> CBlkCnt -> Bool Source #
Eq CBlkSize # |
Methods (==) :: CBlkSize -> CBlkSize -> Bool Source # (/=) :: CBlkSize -> CBlkSize -> Bool Source #
Eq CRLim # |
Methods (==) :: CRLim -> CRLim -> Bool Source # (/=) :: CRLim -> CRLim -> Bool Source #
Eq CTcflag # |
Methods (==) :: CTcflag -> CTcflag -> Bool Source # (/=) :: CTcflag -> CTcflag -> Bool Source #
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 # |
Methods (==) :: Lifetime -> Lifetime -> Bool Source # (/=) :: Lifetime -> Lifetime -> Bool Source #
Eq Event # |
Methods (==) :: Event -> Event -> Bool Source # (/=) :: Event -> Event -> Bool Source #
Eq ThreadStatus # |
Methods (==) :: ThreadStatus -> ThreadStatus -> Bool Source # (/=) :: ThreadStatus -> ThreadStatus -> Bool Source #
Eq BlockReason # |
Methods (==) :: BlockReason -> BlockReason -> Bool Source # (/=) :: BlockReason -> BlockReason -> Bool Source #
Eq ThreadId # | Since: 4.2.0.0
Methods (==) :: ThreadId -> ThreadId -> Bool Source # (/=) :: ThreadId -> ThreadId -> Bool Source #
Eq TimeoutKey # |
Methods (==) :: TimeoutKey -> TimeoutKey -> Bool Source # (/=) :: TimeoutKey -> TimeoutKey -> Bool Source #
Eq FdKey # |
Methods (==) :: FdKey -> FdKey -> Bool Source # (/=) :: FdKey -> FdKey -> Bool Source #
Eq HandlePosn # | Since: 4.1.0.0
Methods (==) :: HandlePosn -> HandlePosn -> Bool Source # (/=) :: HandlePosn -> HandlePosn -> Bool Source #
Eq Version # | Since: 2.1
Methods (==) :: Version -> Version -> Bool Source # (/=) :: Version -> Version -> Bool Source #
Eq Unique # |
Methods (==) :: Unique -> Unique -> Bool Source # (/=) :: Unique -> Unique -> Bool Source #
Eq Fixity # |
Methods (==) :: Fixity -> Fixity -> Bool Source # (/=) :: Fixity -> Fixity -> Bool Source #
Eq ConstrRep # |
Methods (==) :: ConstrRep -> ConstrRep -> Bool Source # (/=) :: ConstrRep -> ConstrRep -> Bool Source #
Eq DataRep # |
Methods (==) :: DataRep -> DataRep -> Bool Source # (/=) :: DataRep -> DataRep -> Bool Source #
Eq Constr # | Equality of constructors Since: 4.0.0.0
Methods (==) :: Constr -> Constr -> Bool Source # (/=) :: Constr -> Constr -> Bool Source #
Eq SpecConstrAnnotation # |
Methods (==) :: SpecConstrAnnotation -> SpecConstrAnnotation -> Bool Source # (/=) :: SpecConstrAnnotation -> SpecConstrAnnotation -> Bool Source #
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
Methods (==) :: ForeignPtr a -> ForeignPtr a -> Bool Source # (/=) :: ForeignPtr a -> ForeignPtr a -> Bool Source #
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
Methods (==) :: StableName a -> StableName a -> Bool Source # (/=) :: StableName a -> StableName a -> Bool Source #
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) # |
Methods (==) :: WrappedMonoid m -> WrappedMonoid m -> Bool Source # (/=) :: WrappedMonoid m -> WrappedMonoid m -> 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 (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 |
Methods compare :: Double -> Double -> Ordering Source # (<) :: Double -> Double -> Bool Source # (<=) :: Double -> Double -> Bool Source # (>) :: Double -> Double -> Bool Source # (>=) :: Double -> Double -> Bool Source # max :: Double -> Double -> Double Source # min :: Double -> Double -> Double Source #
Ord Float |
Methods compare :: Float -> Float -> Ordering Source # (<) :: Float -> Float -> Bool Source # (<=) :: Float -> Float -> Bool Source # (>) :: Float -> Float -> Bool Source # (>=) :: Float -> Float -> Bool Source # max :: Float -> Float -> Float Source # min :: Float -> Float -> Float Source #
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
Methods compare :: Int16 -> Int16 -> Ordering Source # (<) :: Int16 -> Int16 -> Bool Source # (<=) :: Int16 -> Int16 -> Bool Source # (>) :: Int16 -> Int16 -> Bool Source # (>=) :: Int16 -> Int16 -> Bool Source # max :: Int16 -> Int16 -> Int16 Source # min :: Int16 -> Int16 -> Int16 Source #
Ord Int32 # | Since: 2.1
Methods compare :: Int32 -> Int32 -> Ordering Source # (<) :: Int32 -> Int32 -> Bool Source # (<=) :: Int32 -> Int32 -> Bool Source # (>) :: Int32 -> Int32 -> Bool Source # (>=) :: Int32 -> Int32 -> Bool Source # max :: Int32 -> Int32 -> Int32 Source # min :: Int32 -> Int32 -> Int32 Source #
Ord Int64 # | Since: 2.1
Methods compare :: Int64 -> Int64 -> Ordering Source # (<) :: Int64 -> Int64 -> Bool Source # (<=) :: Int64 -> Int64 -> Bool Source # (>) :: Int64 -> Int64 -> Bool Source # (>=) :: Int64 -> Int64 -> Bool Source # max :: Int64 -> Int64 -> Int64 Source # min :: Int64 -> Int64 -> Int64 Source #
Ord Integer |
Methods compare :: Integer -> Integer -> Ordering Source # (<) :: Integer -> Integer -> Bool Source # (<=) :: Integer -> Integer -> Bool Source # (>) :: Integer -> Integer -> Bool Source # (>=) :: Integer -> Integer -> Bool Source # max :: Integer -> Integer -> Integer Source # min :: Integer -> Integer -> Integer Source #
Ord Natural # |
Methods compare :: Natural -> Natural -> Ordering Source # (<) :: Natural -> Natural -> Bool Source # (<=) :: Natural -> Natural -> Bool Source # (>) :: Natural -> Natural -> Bool Source # (>=) :: Natural -> Natural -> Bool Source # max :: Natural -> Natural -> Natural Source # min :: Natural -> Natural -> Natural Source #
Ord Ordering |
Methods compare :: Ordering -> Ordering -> Ordering Source # (<) :: Ordering -> Ordering -> Bool Source # (<=) :: Ordering -> Ordering -> Bool Source # (>) :: Ordering -> Ordering -> Bool Source # (>=) :: Ordering -> Ordering -> Bool Source # max :: Ordering -> Ordering -> Ordering Source # min :: Ordering -> Ordering -> Ordering Source #
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
Methods compare :: Word8 -> Word8 -> Ordering Source # (<) :: Word8 -> Word8 -> Bool Source # (<=) :: Word8 -> Word8 -> Bool Source # (>) :: Word8 -> Word8 -> Bool Source # (>=) :: Word8 -> Word8 -> Bool Source # max :: Word8 -> Word8 -> Word8 Source # min :: Word8 -> Word8 -> Word8 Source #
Ord Word16 # | Since: 2.1
Methods compare :: Word16 -> Word16 -> Ordering Source # (<) :: Word16 -> Word16 -> Bool Source # (<=) :: Word16 -> Word16 -> Bool Source # (>) :: Word16 -> Word16 -> Bool Source # (>=) :: Word16 -> Word16 -> Bool Source # max :: Word16 -> Word16 -> Word16 Source # min :: Word16 -> Word16 -> Word16 Source #
Ord Word32 # | Since: 2.1
Methods compare :: Word32 -> Word32 -> Ordering Source # (<) :: Word32 -> Word32 -> Bool Source # (<=) :: Word32 -> Word32 -> Bool Source # (>) :: Word32 -> Word32 -> Bool Source # (>=) :: Word32 -> Word32 -> Bool Source # max :: Word32 -> Word32 -> Word32 Source # min :: Word32 -> Word32 -> Word32 Source #
Ord Word64 # | Since: 2.1
Methods compare :: Word64 -> Word64 -> Ordering Source # (<) :: Word64 -> Word64 -> Bool Source # (<=) :: Word64 -> Word64 -> Bool Source # (>) :: Word64 -> Word64 -> Bool Source # (>=) :: Word64 -> Word64 -> Bool Source # max :: Word64 -> Word64 -> Word64 Source # min :: Word64 -> Word64 -> Word64 Source #
Ord SomeTypeRep # |
Methods compare :: SomeTypeRep -> SomeTypeRep -> Ordering Source # (<) :: SomeTypeRep -> SomeTypeRep -> Bool Source # (<=) :: SomeTypeRep -> SomeTypeRep -> Bool Source # (>) :: SomeTypeRep -> SomeTypeRep -> Bool Source # (>=) :: SomeTypeRep -> SomeTypeRep -> Bool Source # max :: SomeTypeRep -> SomeTypeRep -> SomeTypeRep Source # min :: SomeTypeRep -> SomeTypeRep -> SomeTypeRep Source #
Ord () |
Methods compare :: () -> () -> Ordering Source # (<) :: () -> () -> Bool Source # (<=) :: () -> () -> Bool Source # (>) :: () -> () -> Bool Source # (>=) :: () -> () -> Bool Source # max :: () -> () -> () Source # min :: () -> () -> () Source #
Ord TyCon |
Methods compare :: TyCon -> TyCon -> Ordering Source # (<) :: TyCon -> TyCon -> Bool Source # (<=) :: TyCon -> TyCon -> Bool Source # (>) :: TyCon -> TyCon -> Bool Source # (>=) :: TyCon -> TyCon -> Bool Source # max :: TyCon -> TyCon -> TyCon Source # min :: TyCon -> TyCon -> TyCon Source #
Ord BigNat |
Methods compare :: BigNat -> BigNat -> Ordering Source # (<) :: BigNat -> BigNat -> Bool Source # (<=) :: BigNat -> BigNat -> Bool Source # (>) :: BigNat -> BigNat -> Bool Source # (>=) :: BigNat -> BigNat -> Bool Source # max :: BigNat -> BigNat -> BigNat Source # min :: BigNat -> BigNat -> BigNat Source #
Ord GeneralCategory # |

Methods

compare :: GeneralCategory -> GeneralCategory -> Ordering Source #

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

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

(>) :: GeneralCategory -> GeneralCategory -> Bool Source #

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

max :: GeneralCategory -> GeneralCategory -> GeneralCategory Source #

min :: GeneralCategory -> GeneralCategory -> GeneralCategory Source #

Ord Fingerprint # |
Methods compare :: Fingerprint -> Fingerprint -> Ordering Source # (<) :: Fingerprint -> Fingerprint -> Bool Source # (<=) :: Fingerprint -> Fingerprint -> Bool Source # (>) :: Fingerprint -> Fingerprint -> Bool Source # (>=) :: Fingerprint -> Fingerprint -> Bool Source # max :: Fingerprint -> Fingerprint -> Fingerprint Source # min :: Fingerprint -> Fingerprint -> Fingerprint Source #
Ord IOMode # |
Methods compare :: IOMode -> IOMode -> Ordering Source # (<) :: IOMode -> IOMode -> Bool Source # (<=) :: IOMode -> IOMode -> Bool Source # (>) :: IOMode -> IOMode -> Bool Source # (>=) :: IOMode -> IOMode -> Bool Source # max :: IOMode -> IOMode -> IOMode Source # min :: IOMode -> IOMode -> IOMode Source #
Ord IntPtr # |
Methods compare :: IntPtr -> IntPtr -> Ordering Source # (<) :: IntPtr -> IntPtr -> Bool Source # (<=) :: IntPtr -> IntPtr -> Bool Source # (>) :: IntPtr -> IntPtr -> Bool Source # (>=) :: IntPtr -> IntPtr -> Bool Source # max :: IntPtr -> IntPtr -> IntPtr Source # min :: IntPtr -> IntPtr -> IntPtr Source #
Ord WordPtr # |
Methods compare :: WordPtr -> WordPtr -> Ordering Source # (<) :: WordPtr -> WordPtr -> Bool Source # (<=) :: WordPtr -> WordPtr -> Bool Source # (>) :: WordPtr -> WordPtr -> Bool Source # (>=) :: WordPtr -> WordPtr -> Bool Source # max :: WordPtr -> WordPtr -> WordPtr Source # min :: WordPtr -> WordPtr -> WordPtr Source #
Ord CUIntMax # |
Methods compare :: CUIntMax -> CUIntMax -> Ordering Source # (<) :: CUIntMax -> CUIntMax -> Bool Source # (<=) :: CUIntMax -> CUIntMax -> Bool Source # (>) :: CUIntMax -> CUIntMax -> Bool Source # (>=) :: CUIntMax -> CUIntMax -> Bool Source # max :: CUIntMax -> CUIntMax -> CUIntMax Source # min :: CUIntMax -> CUIntMax -> CUIntMax Source #
Ord CIntMax # |
Methods compare :: CIntMax -> CIntMax -> Ordering Source # (<) :: CIntMax -> CIntMax -> Bool Source # (<=) :: CIntMax -> CIntMax -> Bool Source # (>) :: CIntMax -> CIntMax -> Bool Source # (>=) :: CIntMax -> CIntMax -> Bool Source # max :: CIntMax -> CIntMax -> CIntMax Source # min :: CIntMax -> CIntMax -> CIntMax Source #
Ord CUIntPtr # |
Methods compare :: CUIntPtr -> CUIntPtr -> Ordering Source # (<) :: CUIntPtr -> CUIntPtr -> Bool Source # (<=) :: CUIntPtr -> CUIntPtr -> Bool Source # (>) :: CUIntPtr -> CUIntPtr -> Bool Source # (>=) :: CUIntPtr -> CUIntPtr -> Bool Source # max :: CUIntPtr -> CUIntPtr -> CUIntPtr Source # min :: CUIntPtr -> CUIntPtr -> CUIntPtr Source #
Ord CIntPtr # |
Methods compare :: CIntPtr -> CIntPtr -> Ordering Source # (<) :: CIntPtr -> CIntPtr -> Bool Source # (<=) :: CIntPtr -> CIntPtr -> Bool Source # (>) :: CIntPtr -> CIntPtr -> Bool Source # (>=) :: CIntPtr -> CIntPtr -> Bool Source # max :: CIntPtr -> CIntPtr -> CIntPtr Source # min :: CIntPtr -> CIntPtr -> CIntPtr Source #
Ord CSUSeconds # |
Methods compare :: CSUSeconds -> CSUSeconds -> Ordering Source # (<) :: CSUSeconds -> CSUSeconds -> Bool Source # (<=) :: CSUSeconds -> CSUSeconds -> Bool Source # (>) :: CSUSeconds -> CSUSeconds -> Bool Source # (>=) :: CSUSeconds -> CSUSeconds -> Bool Source # max :: CSUSeconds -> CSUSeconds -> CSUSeconds Source # min :: CSUSeconds -> CSUSeconds -> CSUSeconds Source #
Ord CUSeconds # |
Methods compare :: CUSeconds -> CUSeconds -> Ordering Source # (<) :: CUSeconds -> CUSeconds -> Bool Source # (<=) :: CUSeconds -> CUSeconds -> Bool Source # (>) :: CUSeconds -> CUSeconds -> Bool Source # (>=) :: CUSeconds -> CUSeconds -> Bool Source # max :: CUSeconds -> CUSeconds -> CUSeconds Source # min :: CUSeconds -> CUSeconds -> CUSeconds Source #
Ord CTime # |
Methods compare :: CTime -> CTime -> Ordering Source # (<) :: CTime -> CTime -> Bool Source # (<=) :: CTime -> CTime -> Bool Source # (>) :: CTime -> CTime -> Bool Source # (>=) :: CTime -> CTime -> Bool Source # max :: CTime -> CTime -> CTime Source # min :: CTime -> CTime -> CTime Source #
Ord CClock # |
Methods compare :: CClock -> CClock -> Ordering Source # (<) :: CClock -> CClock -> Bool Source # (<=) :: CClock -> CClock -> Bool Source # (>) :: CClock -> CClock -> Bool Source # (>=) :: CClock -> CClock -> Bool Source # max :: CClock -> CClock -> CClock Source # min :: CClock -> CClock -> CClock Source #
Ord CSigAtomic # |
Methods compare :: CSigAtomic -> CSigAtomic -> Ordering Source # (<) :: CSigAtomic -> CSigAtomic -> Bool Source # (<=) :: CSigAtomic -> CSigAtomic -> Bool Source # (>) :: CSigAtomic -> CSigAtomic -> Bool Source # (>=) :: CSigAtomic -> CSigAtomic -> Bool Source # max :: CSigAtomic -> CSigAtomic -> CSigAtomic Source # min :: CSigAtomic -> CSigAtomic -> CSigAtomic Source #
Ord CWchar # |
Methods compare :: CWchar -> CWchar -> Ordering Source # (<) :: CWchar -> CWchar -> Bool Source # (<=) :: CWchar -> CWchar -> Bool Source # (>) :: CWchar -> CWchar -> Bool Source # (>=) :: CWchar -> CWchar -> Bool Source # max :: CWchar -> CWchar -> CWchar Source # min :: CWchar -> CWchar -> CWchar Source #
Ord CSize # |
Methods compare :: CSize -> CSize -> Ordering Source # (<) :: CSize -> CSize -> Bool Source # (<=) :: CSize -> CSize -> Bool Source # (>) :: CSize -> CSize -> Bool Source # (>=) :: CSize -> CSize -> Bool Source # max :: CSize -> CSize -> CSize Source # min :: CSize -> CSize -> CSize Source #
Ord CPtrdiff # |
Methods compare :: CPtrdiff -> CPtrdiff -> Ordering Source # (<) :: CPtrdiff -> CPtrdiff -> Bool Source # (<=) :: CPtrdiff -> CPtrdiff -> Bool Source # (>) :: CPtrdiff -> CPtrdiff -> Bool Source # (>=) :: CPtrdiff -> CPtrdiff -> Bool Source # max :: CPtrdiff -> CPtrdiff -> CPtrdiff Source # min :: CPtrdiff -> CPtrdiff -> CPtrdiff Source #
Ord CDouble # |
Methods compare :: CDouble -> CDouble -> Ordering Source # (<) :: CDouble -> CDouble -> Bool Source # (<=) :: CDouble -> CDouble -> Bool Source # (>) :: CDouble -> CDouble -> Bool Source # (>=) :: CDouble -> CDouble -> Bool Source # max :: CDouble -> CDouble -> CDouble Source # min :: CDouble -> CDouble -> CDouble Source #
Ord CFloat # |
Methods compare :: CFloat -> CFloat -> Ordering Source # (<) :: CFloat -> CFloat -> Bool Source # (<=) :: CFloat -> CFloat -> Bool Source # (>) :: CFloat -> CFloat -> Bool Source # (>=) :: CFloat -> CFloat -> Bool Source # max :: CFloat -> CFloat -> CFloat Source # min :: CFloat -> CFloat -> CFloat Source #
Ord CBool # |
Methods compare :: CBool -> CBool -> Ordering Source # (<) :: CBool -> CBool -> Bool Source # (<=) :: CBool -> CBool -> Bool Source # (>) :: CBool -> CBool -> Bool Source # (>=) :: CBool -> CBool -> Bool Source # max :: CBool -> CBool -> CBool Source # min :: CBool -> CBool -> CBool Source #
Ord CULLong # |
Methods compare :: CULLong -> CULLong -> Ordering Source # (<) :: CULLong -> CULLong -> Bool Source # (<=) :: CULLong -> CULLong -> Bool Source # (>) :: CULLong -> CULLong -> Bool Source # (>=) :: CULLong -> CULLong -> Bool Source # max :: CULLong -> CULLong -> CULLong Source # min :: CULLong -> CULLong -> CULLong Source #
Ord CLLong # |
Methods compare :: CLLong -> CLLong -> Ordering Source # (<) :: CLLong -> CLLong -> Bool Source # (<=) :: CLLong -> CLLong -> Bool Source # (>) :: CLLong -> CLLong -> Bool Source # (>=) :: CLLong -> CLLong -> Bool Source # max :: CLLong -> CLLong -> CLLong Source # min :: CLLong -> CLLong -> CLLong Source #
Ord CULong # |
Methods compare :: CULong -> CULong -> Ordering Source # (<) :: CULong -> CULong -> Bool Source # (<=) :: CULong -> CULong -> Bool Source # (>) :: CULong -> CULong -> Bool Source # (>=) :: CULong -> CULong -> Bool Source # max :: CULong -> CULong -> CULong Source # min :: CULong -> CULong -> CULong Source #
Ord CLong # |
Methods compare :: CLong -> CLong -> Ordering Source # (<) :: CLong -> CLong -> Bool Source # (<=) :: CLong -> CLong -> Bool Source # (>) :: CLong -> CLong -> Bool Source # (>=) :: CLong -> CLong -> Bool Source # max :: CLong -> CLong -> CLong Source # min :: CLong -> CLong -> CLong Source #
Ord CUInt # |
Methods compare :: CUInt -> CUInt -> Ordering Source # (<) :: CUInt -> CUInt -> Bool Source # (<=) :: CUInt -> CUInt -> Bool Source # (>) :: CUInt -> CUInt -> Bool Source # (>=) :: CUInt -> CUInt -> Bool Source # max :: CUInt -> CUInt -> CUInt Source # min :: CUInt -> CUInt -> CUInt Source #
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 # |
Methods compare :: CUShort -> CUShort -> Ordering Source # (<) :: CUShort -> CUShort -> Bool Source # (<=) :: CUShort -> CUShort -> Bool Source # (>) :: CUShort -> CUShort -> Bool Source # (>=) :: CUShort -> CUShort -> Bool Source # max :: CUShort -> CUShort -> CUShort Source # min :: CUShort -> CUShort -> CUShort Source #
Ord CShort # |
Methods compare :: CShort -> CShort -> Ordering Source # (<) :: CShort -> CShort -> Bool Source # (<=) :: CShort -> CShort -> Bool Source # (>) :: CShort -> CShort -> Bool Source # (>=) :: CShort -> CShort -> Bool Source # max :: CShort -> CShort -> CShort Source # min :: CShort -> CShort -> CShort Source #
Ord CUChar # |
Methods compare :: CUChar -> CUChar -> Ordering Source # (<) :: CUChar -> CUChar -> Bool Source # (<=) :: CUChar -> CUChar -> Bool Source # (>) :: CUChar -> CUChar -> Bool Source # (>=) :: CUChar -> CUChar -> Bool Source # max :: CUChar -> CUChar -> CUChar Source # min :: CUChar -> CUChar -> CUChar Source #
Ord CSChar # |
Methods compare :: CSChar -> CSChar -> Ordering Source # (<) :: CSChar -> CSChar -> Bool Source # (<=) :: CSChar -> CSChar -> Bool Source # (>) :: CSChar -> CSChar -> Bool Source # (>=) :: CSChar -> CSChar -> Bool Source # max :: CSChar -> CSChar -> CSChar Source # min :: CSChar -> CSChar -> CSChar Source #
Ord CChar # |
Methods compare :: CChar -> CChar -> Ordering Source # (<) :: CChar -> CChar -> Bool Source # (<=) :: CChar -> CChar -> Bool Source # (>) :: CChar -> CChar -> Bool Source # (>=) :: CChar -> CChar -> Bool Source # max :: CChar -> CChar -> CChar Source # min :: CChar -> CChar -> CChar Source #
Ord SomeNat # | Since: 4.7.0.0
Methods compare :: SomeNat -> SomeNat -> Ordering Source # (<) :: SomeNat -> SomeNat -> Bool Source # (<=) :: SomeNat -> SomeNat -> Bool Source # (>) :: SomeNat -> SomeNat -> Bool Source # (>=) :: SomeNat -> SomeNat -> Bool Source # max :: SomeNat -> SomeNat -> SomeNat Source # min :: SomeNat -> SomeNat -> SomeNat Source #
Ord SomeSymbol # | Since: 4.7.0.0
Methods compare :: SomeSymbol -> SomeSymbol -> Ordering Source # (<) :: SomeSymbol -> SomeSymbol -> Bool Source # (<=) :: SomeSymbol -> SomeSymbol -> Bool Source # (>) :: SomeSymbol -> SomeSymbol -> Bool Source # (>=) :: SomeSymbol -> SomeSymbol -> Bool Source # max :: SomeSymbol -> SomeSymbol -> SomeSymbol Source # min :: SomeSymbol -> SomeSymbol -> SomeSymbol Source #
Ord DecidedStrictness # |

Methods

compare :: DecidedStrictness -> DecidedStrictness -> Ordering Source #

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

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

(>) :: DecidedStrictness -> DecidedStrictness -> Bool Source #

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

max :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness Source #

min :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness Source #

Ord SourceStrictness # |

Methods

compare :: SourceStrictness -> SourceStrictness -> Ordering Source #

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

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

(>) :: SourceStrictness -> SourceStrictness -> Bool Source #

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

max :: SourceStrictness -> SourceStrictness -> SourceStrictness Source #

min :: SourceStrictness -> SourceStrictness -> SourceStrictness Source #

Ord SourceUnpackedness # |

Methods

compare :: SourceUnpackedness -> SourceUnpackedness -> Ordering Source #

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

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

(>) :: SourceUnpackedness -> SourceUnpackedness -> Bool Source #

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

max :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness Source #

min :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness Source #

Ord Associativity # |

Methods

compare :: Associativity -> Associativity -> Ordering Source #

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

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

(>) :: Associativity -> Associativity -> Bool Source #

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

max :: Associativity -> Associativity -> Associativity Source #

min :: Associativity -> Associativity -> Associativity Source #

Ord Fixity # |
Methods compare :: Fixity -> Fixity -> Ordering Source # (<) :: Fixity -> Fixity -> Bool Source # (<=) :: Fixity -> Fixity -> Bool Source # (>) :: Fixity -> Fixity -> Bool Source # (>=) :: Fixity -> Fixity -> Bool Source # max :: Fixity -> Fixity -> Fixity Source # min :: Fixity -> Fixity -> Fixity Source #
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 # |

Methods

compare :: ArithException -> ArithException -> Ordering Source #

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

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

(>) :: ArithException -> ArithException -> Bool Source #

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

max :: ArithException -> ArithException -> ArithException Source #

min :: ArithException -> ArithException -> ArithException Source #

Ord ErrorCall # |
Methods compare :: ErrorCall -> ErrorCall -> Ordering Source # (<) :: ErrorCall -> ErrorCall -> Bool Source # (<=) :: ErrorCall -> ErrorCall -> Bool Source # (>) :: ErrorCall -> ErrorCall -> Bool Source # (>=) :: ErrorCall -> ErrorCall -> Bool Source # max :: ErrorCall -> ErrorCall -> ErrorCall Source # min :: ErrorCall -> ErrorCall -> ErrorCall Source #
Ord SeekMode # |
Methods compare :: SeekMode -> SeekMode -> Ordering Source # (<) :: SeekMode -> SeekMode -> Bool Source # (<=) :: SeekMode -> SeekMode -> Bool Source # (>) :: SeekMode -> SeekMode -> Bool Source # (>=) :: SeekMode -> SeekMode -> Bool Source # max :: SeekMode -> SeekMode -> SeekMode Source # min :: SeekMode -> SeekMode -> SeekMode Source #
Ord NewlineMode # |
Methods compare :: NewlineMode -> NewlineMode -> Ordering Source # (<) :: NewlineMode -> NewlineMode -> Bool Source # (<=) :: NewlineMode -> NewlineMode -> Bool Source # (>) :: NewlineMode -> NewlineMode -> Bool Source # (>=) :: NewlineMode -> NewlineMode -> Bool Source # max :: NewlineMode -> NewlineMode -> NewlineMode Source # min :: NewlineMode -> NewlineMode -> NewlineMode Source #
Ord Newline # |
Methods compare :: Newline -> Newline -> Ordering Source # (<) :: Newline -> Newline -> Bool Source # (<=) :: Newline -> Newline -> Bool Source # (>) :: Newline -> Newline -> Bool Source # (>=) :: Newline -> Newline -> Bool Source # max :: Newline -> Newline -> Newline Source # min :: Newline -> Newline -> Newline Source #
Ord BufferMode # |
Methods compare :: BufferMode -> BufferMode -> Ordering Source # (<) :: BufferMode -> BufferMode -> Bool Source # (<=) :: BufferMode -> BufferMode -> Bool Source # (>) :: BufferMode -> BufferMode -> Bool Source # (>=) :: BufferMode -> BufferMode -> Bool Source # max :: BufferMode -> BufferMode -> BufferMode Source # min :: BufferMode -> BufferMode -> BufferMode Source #
Ord ExitCode # |
Methods compare :: ExitCode -> ExitCode -> Ordering Source # (<) :: ExitCode -> ExitCode -> Bool Source # (<=) :: ExitCode -> ExitCode -> Bool Source # (>) :: ExitCode -> ExitCode -> Bool Source # (>=) :: ExitCode -> ExitCode -> Bool Source # max :: ExitCode -> ExitCode -> ExitCode Source # min :: ExitCode -> ExitCode -> ExitCode Source #
Ord ArrayException # |

Methods

compare :: ArrayException -> ArrayException -> Ordering Source #

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

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

(>) :: ArrayException -> ArrayException -> Bool Source #

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

max :: ArrayException -> ArrayException -> ArrayException Source #

min :: ArrayException -> ArrayException -> ArrayException Source #

Ord AsyncException # |

Methods

compare :: AsyncException -> AsyncException -> Ordering Source #

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

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

(>) :: AsyncException -> AsyncException -> Bool Source #

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

max :: AsyncException -> AsyncException -> AsyncException Source #

min :: AsyncException -> AsyncException -> AsyncException Source #

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 # |
Methods compare :: CTimer -> CTimer -> Ordering Source # (<) :: CTimer -> CTimer -> Bool Source # (<=) :: CTimer -> CTimer -> Bool Source # (>) :: CTimer -> CTimer -> Bool Source # (>=) :: CTimer -> CTimer -> Bool Source # max :: CTimer -> CTimer -> CTimer Source # min :: CTimer -> CTimer -> CTimer Source #
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 # |
Methods compare :: CFsFilCnt -> CFsFilCnt -> Ordering Source # (<) :: CFsFilCnt -> CFsFilCnt -> Bool Source # (<=) :: CFsFilCnt -> CFsFilCnt -> Bool Source # (>) :: CFsFilCnt -> CFsFilCnt -> Bool Source # (>=) :: CFsFilCnt -> CFsFilCnt -> Bool Source # max :: CFsFilCnt -> CFsFilCnt -> CFsFilCnt Source # min :: CFsFilCnt -> CFsFilCnt -> CFsFilCnt Source #
Ord CFsBlkCnt # |
Methods compare :: CFsBlkCnt -> CFsBlkCnt -> Ordering Source # (<) :: CFsBlkCnt -> CFsBlkCnt -> Bool Source # (<=) :: CFsBlkCnt -> CFsBlkCnt -> Bool Source # (>) :: CFsBlkCnt -> CFsBlkCnt -> Bool Source # (>=) :: CFsBlkCnt -> CFsBlkCnt -> Bool Source # max :: CFsBlkCnt -> CFsBlkCnt -> CFsBlkCnt Source # min :: CFsBlkCnt -> CFsBlkCnt -> CFsBlkCnt Source #
Ord CClockId # |
Methods compare :: CClockId -> CClockId -> Ordering Source # (<) :: CClockId -> CClockId -> Bool Source # (<=) :: CClockId -> CClockId -> Bool Source # (>) :: CClockId -> CClockId -> Bool Source # (>=) :: CClockId -> CClockId -> Bool Source # max :: CClockId -> CClockId -> CClockId Source # min :: CClockId -> CClockId -> CClockId Source #
Ord CBlkCnt # |
Methods compare :: CBlkCnt -> CBlkCnt -> Ordering Source # (<) :: CBlkCnt -> CBlkCnt -> Bool Source # (<=) :: CBlkCnt -> CBlkCnt -> Bool Source # (>) :: CBlkCnt -> CBlkCnt -> Bool Source # (>=) :: CBlkCnt -> CBlkCnt -> Bool Source # max :: CBlkCnt -> CBlkCnt -> CBlkCnt Source # min :: CBlkCnt -> CBlkCnt -> CBlkCnt Source #
Ord CBlkSize # |
Methods compare :: CBlkSize -> CBlkSize -> Ordering Source # (<) :: CBlkSize -> CBlkSize -> Bool Source # (<=) :: CBlkSize -> CBlkSize -> Bool Source # (>) :: CBlkSize -> CBlkSize -> Bool Source # (>=) :: CBlkSize -> CBlkSize -> Bool Source # max :: CBlkSize -> CBlkSize -> CBlkSize Source # min :: CBlkSize -> CBlkSize -> CBlkSize Source #
Ord CRLim # |
Methods compare :: CRLim -> CRLim -> Ordering Source # (<) :: CRLim -> CRLim -> Bool Source # (<=) :: CRLim -> CRLim -> Bool Source # (>) :: CRLim -> CRLim -> Bool Source # (>=) :: CRLim -> CRLim -> Bool Source # max :: CRLim -> CRLim -> CRLim Source # min :: CRLim -> CRLim -> CRLim Source #
Ord CTcflag # |
Methods compare :: CTcflag -> CTcflag -> Ordering Source # (<) :: CTcflag -> CTcflag -> Bool Source # (<=) :: CTcflag -> CTcflag -> Bool Source # (>) :: CTcflag -> CTcflag -> Bool Source # (>=) :: CTcflag -> CTcflag -> Bool Source # max :: CTcflag -> CTcflag -> CTcflag Source # min :: CTcflag -> CTcflag -> CTcflag Source #
Ord CSpeed # |
Methods compare :: CSpeed -> CSpeed -> Ordering Source # (<) :: CSpeed -> CSpeed -> Bool Source # (<=) :: CSpeed -> CSpeed -> Bool Source # (>) :: CSpeed -> CSpeed -> Bool Source # (>=) :: CSpeed -> CSpeed -> Bool Source # max :: CSpeed -> CSpeed -> CSpeed Source # min :: CSpeed -> CSpeed -> CSpeed Source #
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 # |
Methods compare :: CNlink -> CNlink -> Ordering Source # (<) :: CNlink -> CNlink -> Bool Source # (<=) :: CNlink -> CNlink -> Bool Source # (>) :: CNlink -> CNlink -> Bool Source # (>=) :: CNlink -> CNlink -> Bool Source # max :: CNlink -> CNlink -> CNlink Source # min :: CNlink -> CNlink -> CNlink Source #
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 # |
Methods compare :: CSsize -> CSsize -> Ordering Source # (<) :: CSsize -> CSsize -> Bool Source # (<=) :: CSsize -> CSsize -> Bool Source # (>) :: CSsize -> CSsize -> Bool Source # (>=) :: CSsize -> CSsize -> Bool Source # max :: CSsize -> CSsize -> CSsize Source # min :: CSsize -> CSsize -> CSsize Source #
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 # |
Methods compare :: CMode -> CMode -> Ordering Source # (<) :: CMode -> CMode -> Bool Source # (<=) :: CMode -> CMode -> Bool Source # (>) :: CMode -> CMode -> Bool Source # (>=) :: CMode -> CMode -> Bool Source # max :: CMode -> CMode -> CMode Source # min :: CMode -> CMode -> CMode Source #
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 # |

Methods

compare :: ThreadStatus -> ThreadStatus -> Ordering Source #

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

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

(>) :: ThreadStatus -> ThreadStatus -> Bool Source #

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

max :: ThreadStatus -> ThreadStatus -> ThreadStatus Source #

min :: ThreadStatus -> ThreadStatus -> ThreadStatus Source #

Ord BlockReason # |
Methods compare :: BlockReason -> BlockReason -> Ordering Source # (<) :: BlockReason -> BlockReason -> Bool Source # (<=) :: BlockReason -> BlockReason -> Bool Source # (>) :: BlockReason -> BlockReason -> Bool Source # (>=) :: BlockReason -> BlockReason -> Bool Source # max :: BlockReason -> BlockReason -> BlockReason Source # min :: BlockReason -> BlockReason -> BlockReason Source #
Ord ThreadId # | Since: 4.2.0.0
Methods compare :: ThreadId -> ThreadId -> Ordering Source # (<) :: ThreadId -> ThreadId -> Bool Source # (<=) :: ThreadId -> ThreadId -> Bool Source # (>) :: ThreadId -> ThreadId -> Bool Source # (>=) :: ThreadId -> ThreadId -> Bool Source # max :: ThreadId -> ThreadId -> ThreadId Source # min :: ThreadId -> ThreadId -> ThreadId Source #
Ord Version # | Since: 2.1
Methods compare :: Version -> Version -> Ordering Source # (<) :: Version -> Version -> Bool Source # (<=) :: Version -> Version -> Bool Source # (>) :: Version -> Version -> Bool Source # (>=) :: Version -> Version -> Bool Source # max :: Version -> Version -> Version Source # min :: Version -> Version -> Version Source #
Ord Unique # |
Methods compare :: Unique -> Unique -> Ordering Source # (<) :: Unique -> Unique -> Bool Source # (<=) :: Unique -> Unique -> Bool Source # (>) :: Unique -> Unique -> Bool Source # (>=) :: Unique -> Unique -> Bool Source # max :: Unique -> Unique -> Unique Source # min :: Unique -> Unique -> Unique Source #
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

Methods

compare :: ForeignPtr a -> ForeignPtr a -> Ordering Source #

(<) :: ForeignPtr a -> ForeignPtr a -> Bool Source #

(<=) :: ForeignPtr a -> ForeignPtr a -> Bool Source #

(>) :: ForeignPtr a -> ForeignPtr a -> Bool Source #

(>=) :: ForeignPtr a -> ForeignPtr a -> Bool Source #

max :: ForeignPtr a -> ForeignPtr a -> ForeignPtr a Source #

min :: ForeignPtr a -> ForeignPtr a -> ForeignPtr a Source #

Ord a => Ord (Identity a) # |
Methods compare :: Identity a -> Identity a -> Ordering Source # (<) :: Identity a -> Identity a -> Bool Source # (<=) :: Identity a -> Identity a -> Bool Source # (>) :: Identity a -> Identity a -> Bool Source # (>=) :: Identity a -> Identity a -> Bool Source # max :: Identity a -> Identity a -> Identity a Source # min :: Identity a -> Identity a -> Identity a Source #
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) # |
Methods compare :: NonEmpty a -> NonEmpty a -> Ordering Source # (<) :: NonEmpty a -> NonEmpty a -> Bool Source # (<=) :: NonEmpty a -> NonEmpty a -> Bool Source # (>) :: NonEmpty a -> NonEmpty a -> Bool Source # (>=) :: NonEmpty a -> NonEmpty a -> Bool Source # max :: NonEmpty a -> NonEmpty a -> NonEmpty a Source # min :: NonEmpty a -> NonEmpty a -> NonEmpty a Source #
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) # |

Methods

compare :: WrappedMonoid m -> WrappedMonoid m -> Ordering Source #

(<) :: WrappedMonoid m -> WrappedMonoid m -> Bool Source #

(<=) :: WrappedMonoid m -> WrappedMonoid m -> Bool Source #

(>) :: WrappedMonoid m -> WrappedMonoid m -> Bool Source #

(>=) :: WrappedMonoid m -> WrappedMonoid m -> Bool Source #

max :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m Source #

min :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m Source #

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 #

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:

- The calls ``succ` `maxBound`` and ``pred` `minBound`` should result in a runtime error.
- `fromEnum` and `toEnum` should give a runtime error if the result value is not representable in the result type. For example, ``toEnum` 7 :: `Bool`` is an error.
- `enumFrom` and `enumFromThen` should be defined with an implicit bound, thus:

       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 #

the successor of a value. For numeric types, `succ` adds 1.

pred :: a -> a #

the predecessor of a value. For numeric types, `pred` subtracts 1.

toEnum :: Int -> a #

Convert from an `Int`.

fromEnum :: a -> Int #

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] #

Used in Haskell's translation of `[n..]`.

enumFromThen :: a -> a -> [a] #

Used in Haskell's translation of `[n,n'..]`.

enumFromTo :: a -> a -> [a] #

Used in Haskell's translation of `[n..m]`.

enumFromThenTo :: a -> a -> a -> [a] #

Used in Haskell's translation of `[n,n'..m]`.

Instances

Enum Bool # | Since: 2.1
Methods succ :: Bool -> Bool # pred :: Bool -> Bool # toEnum :: Int -> Bool # fromEnum :: Bool -> Int # enumFrom :: Bool -> [Bool] # enumFromThen :: Bool -> Bool -> [Bool] # enumFromTo :: Bool -> Bool -> [Bool] # enumFromThenTo :: Bool -> Bool -> Bool -> [Bool] #
Enum Char # | Since: 2.1
Methods succ :: Char -> Char # pred :: Char -> Char # toEnum :: Int -> Char # fromEnum :: Char -> Int # enumFrom :: Char -> [Char] # enumFromThen :: Char -> Char -> [Char] # enumFromTo :: Char -> Char -> [Char] # enumFromThenTo :: Char -> Char -> Char -> [Char] #
Enum Int # | Since: 2.1
Methods succ :: Int -> Int # pred :: Int -> Int # toEnum :: Int -> Int # fromEnum :: Int -> Int # enumFrom :: Int -> [Int] # enumFromThen :: Int -> Int -> [Int] # enumFromTo :: Int -> Int -> [Int] # enumFromThenTo :: Int -> Int -> Int -> [Int] #
Enum Int8 # | Since: 2.1
Methods succ :: Int8 -> Int8 # pred :: Int8 -> Int8 # toEnum :: Int -> Int8 # fromEnum :: Int8 -> Int # enumFrom :: Int8 -> [Int8] # enumFromThen :: Int8 -> Int8 -> [Int8] # enumFromTo :: Int8 -> Int8 -> [Int8] # enumFromThenTo :: Int8 -> Int8 -> Int8 -> [Int8] #
Enum Int16 # | Since: 2.1
Methods succ :: Int16 -> Int16 # pred :: Int16 -> Int16 # toEnum :: Int -> Int16 # fromEnum :: Int16 -> Int # enumFrom :: Int16 -> [Int16] # enumFromThen :: Int16 -> Int16 -> [Int16] # enumFromTo :: Int16 -> Int16 -> [Int16] # enumFromThenTo :: Int16 -> Int16 -> Int16 -> [Int16] #
Enum Int32 # | Since: 2.1
Methods succ :: Int32 -> Int32 # pred :: Int32 -> Int32 # toEnum :: Int -> Int32 # fromEnum :: Int32 -> Int # enumFrom :: Int32 -> [Int32] # enumFromThen :: Int32 -> Int32 -> [Int32] # enumFromTo :: Int32 -> Int32 -> [Int32] # enumFromThenTo :: Int32 -> Int32 -> Int32 -> [Int32] #
Enum Int64 # | Since: 2.1
Methods succ :: Int64 -> Int64 # pred :: Int64 -> Int64 # toEnum :: Int -> Int64 # fromEnum :: Int64 -> Int # enumFrom :: Int64 -> [Int64] # enumFromThen :: Int64 -> Int64 -> [Int64] # enumFromTo :: Int64 -> Int64 -> [Int64] # enumFromThenTo :: Int64 -> Int64 -> Int64 -> [Int64] #
Enum Integer # | Since: 2.1
Methods succ :: Integer -> Integer # pred :: Integer -> Integer # toEnum :: Int -> Integer # fromEnum :: Integer -> Int # enumFrom :: Integer -> [Integer] # enumFromThen :: Integer -> Integer -> [Integer] # enumFromTo :: Integer -> Integer -> [Integer] # enumFromThenTo :: Integer -> Integer -> Integer -> [Integer] #
Enum Natural # | Since: 4.8.0.0
Methods succ :: Natural -> Natural # pred :: Natural -> Natural # toEnum :: Int -> Natural # fromEnum :: Natural -> Int # enumFrom :: Natural -> [Natural] # enumFromThen :: Natural -> Natural -> [Natural] # enumFromTo :: Natural -> Natural -> [Natural] # enumFromThenTo :: Natural -> Natural -> Natural -> [Natural] #
Enum Ordering # | Since: 2.1
Methods succ :: Ordering -> Ordering # pred :: Ordering -> Ordering # toEnum :: Int -> Ordering # fromEnum :: Ordering -> Int # enumFrom :: Ordering -> [Ordering] # enumFromThen :: Ordering -> Ordering -> [Ordering] # enumFromTo :: Ordering -> Ordering -> [Ordering] # enumFromThenTo :: Ordering -> Ordering -> Ordering -> [Ordering] #
Enum Word # | Since: 2.1
Methods succ :: Word -> Word # pred :: Word -> Word # toEnum :: Int -> Word # fromEnum :: Word -> Int # enumFrom :: Word -> [Word] # enumFromThen :: Word -> Word -> [Word] # enumFromTo :: Word -> Word -> [Word] # enumFromThenTo :: Word -> Word -> Word -> [Word] #
Enum Word8 # | Since: 2.1
Methods succ :: Word8 -> Word8 # pred :: Word8 -> Word8 # toEnum :: Int -> Word8 # fromEnum :: Word8 -> Int # enumFrom :: Word8 -> [Word8] # enumFromThen :: Word8 -> Word8 -> [Word8] # enumFromTo :: Word8 -> Word8 -> [Word8] # enumFromThenTo :: Word8 -> Word8 -> Word8 -> [Word8] #
Enum Word16 # | Since: 2.1
Methods succ :: Word16 -> Word16 # pred :: Word16 -> Word16 # toEnum :: Int -> Word16 # fromEnum :: Word16 -> Int # enumFrom :: Word16 -> [Word16] # enumFromThen :: Word16 -> Word16 -> [Word16] # enumFromTo :: Word16 -> Word16 -> [Word16] # enumFromThenTo :: Word16 -> Word16 -> Word16 -> [Word16] #
Enum Word32 # | Since: 2.1
Methods succ :: Word32 -> Word32 # pred :: Word32 -> Word32 # toEnum :: Int -> Word32 # fromEnum :: Word32 -> Int # enumFrom :: Word32 -> [Word32] # enumFromThen :: Word32 -> Word32 -> [Word32] # enumFromTo :: Word32 -> Word32 -> [Word32] # enumFromThenTo :: Word32 -> Word32 -> Word32 -> [Word32] #
Enum Word64 # | Since: 2.1
Methods succ :: Word64 -> Word64 # pred :: Word64 -> Word64 # toEnum :: Int -> Word64 # fromEnum :: Word64 -> Int # enumFrom :: Word64 -> [Word64] # enumFromThen :: Word64 -> Word64 -> [Word64] # enumFromTo :: Word64 -> Word64 -> [Word64] # enumFromThenTo :: Word64 -> Word64 -> Word64 -> [Word64] #
Enum VecCount # | Since: 4.10.0.0
Methods succ :: VecCount -> VecCount # pred :: VecCount -> VecCount # toEnum :: Int -> VecCount # fromEnum :: VecCount -> Int # enumFrom :: VecCount -> [VecCount] # enumFromThen :: VecCount -> VecCount -> [VecCount] # enumFromTo :: VecCount -> VecCount -> [VecCount] # enumFromThenTo :: VecCount -> VecCount -> VecCount -> [VecCount] #
Enum VecElem # | Since: 4.10.0.0
Methods succ :: VecElem -> VecElem # pred :: VecElem -> VecElem # toEnum :: Int -> VecElem # fromEnum :: VecElem -> Int # enumFrom :: VecElem -> [VecElem] # enumFromThen :: VecElem -> VecElem -> [VecElem] # enumFromTo :: VecElem -> VecElem -> [VecElem] # enumFromThenTo :: VecElem -> VecElem -> VecElem -> [VecElem] #
Enum () # | Since: 2.1
Methods succ :: () -> () # pred :: () -> () # toEnum :: Int -> () # fromEnum :: () -> Int # enumFrom :: () -> [()] # enumFromThen :: () -> () -> [()] # enumFromTo :: () -> () -> [()] # enumFromThenTo :: () -> () -> () -> [()] #
Enum GeneralCategory # |

Methods

succ :: GeneralCategory -> GeneralCategory #

pred :: GeneralCategory -> GeneralCategory #

toEnum :: Int -> GeneralCategory #

fromEnum :: GeneralCategory -> Int #

enumFrom :: GeneralCategory -> [GeneralCategory] #

enumFromThen :: GeneralCategory -> GeneralCategory -> [GeneralCategory] #

enumFromTo :: GeneralCategory -> GeneralCategory -> [GeneralCategory] #

enumFromThenTo :: GeneralCategory -> GeneralCategory -> GeneralCategory -> [GeneralCategory] #

Enum IOMode # |
Methods succ :: IOMode -> IOMode # pred :: IOMode -> IOMode # toEnum :: Int -> IOMode # fromEnum :: IOMode -> Int # enumFrom :: IOMode -> [IOMode] # enumFromThen :: IOMode -> IOMode -> [IOMode] # enumFromTo :: IOMode -> IOMode -> [IOMode] # enumFromThenTo :: IOMode -> IOMode -> IOMode -> [IOMode] #
Enum IntPtr # |
Methods succ :: IntPtr -> IntPtr # pred :: IntPtr -> IntPtr # toEnum :: Int -> IntPtr # fromEnum :: IntPtr -> Int # enumFrom :: IntPtr -> [IntPtr] # enumFromThen :: IntPtr -> IntPtr -> [IntPtr] # enumFromTo :: IntPtr -> IntPtr -> [IntPtr] # enumFromThenTo :: IntPtr -> IntPtr -> IntPtr -> [IntPtr] #
Enum WordPtr # |
Methods succ :: WordPtr -> WordPtr # pred :: WordPtr -> WordPtr # toEnum :: Int -> WordPtr # fromEnum :: WordPtr -> Int # enumFrom :: WordPtr -> [WordPtr] # enumFromThen :: WordPtr -> WordPtr -> [WordPtr] # enumFromTo :: WordPtr -> WordPtr -> [WordPtr] # enumFromThenTo :: WordPtr -> WordPtr -> WordPtr -> [WordPtr] #
Enum CUIntMax # |
Methods succ :: CUIntMax -> CUIntMax # pred :: CUIntMax -> CUIntMax # toEnum :: Int -> CUIntMax # fromEnum :: CUIntMax -> Int # enumFrom :: CUIntMax -> [CUIntMax] # enumFromThen :: CUIntMax -> CUIntMax -> [CUIntMax] # enumFromTo :: CUIntMax -> CUIntMax -> [CUIntMax] # enumFromThenTo :: CUIntMax -> CUIntMax -> CUIntMax -> [CUIntMax] #
Enum CIntMax # |
Methods succ :: CIntMax -> CIntMax # pred :: CIntMax -> CIntMax # toEnum :: Int -> CIntMax # fromEnum :: CIntMax -> Int # enumFrom :: CIntMax -> [CIntMax] # enumFromThen :: CIntMax -> CIntMax -> [CIntMax] # enumFromTo :: CIntMax -> CIntMax -> [CIntMax] # enumFromThenTo :: CIntMax -> CIntMax -> CIntMax -> [CIntMax] #
Enum CUIntPtr # |
Methods succ :: CUIntPtr -> CUIntPtr # pred :: CUIntPtr -> CUIntPtr # toEnum :: Int -> CUIntPtr # fromEnum :: CUIntPtr -> Int # enumFrom :: CUIntPtr -> [CUIntPtr] # enumFromThen :: CUIntPtr -> CUIntPtr -> [CUIntPtr] # enumFromTo :: CUIntPtr -> CUIntPtr -> [CUIntPtr] # enumFromThenTo :: CUIntPtr -> CUIntPtr -> CUIntPtr -> [CUIntPtr] #
Enum CIntPtr # |
Methods succ :: CIntPtr -> CIntPtr # pred :: CIntPtr -> CIntPtr # toEnum :: Int -> CIntPtr # fromEnum :: CIntPtr -> Int # enumFrom :: CIntPtr -> [CIntPtr] # enumFromThen :: CIntPtr -> CIntPtr -> [CIntPtr] # enumFromTo :: CIntPtr -> CIntPtr -> [CIntPtr] # enumFromThenTo :: CIntPtr -> CIntPtr -> CIntPtr -> [CIntPtr] #
Enum CSUSeconds # |
Methods succ :: CSUSeconds -> CSUSeconds # pred :: CSUSeconds -> CSUSeconds # toEnum :: Int -> CSUSeconds # fromEnum :: CSUSeconds -> Int # enumFrom :: CSUSeconds -> [CSUSeconds] # enumFromThen :: CSUSeconds -> CSUSeconds -> [CSUSeconds] # enumFromTo :: CSUSeconds -> CSUSeconds -> [CSUSeconds] # enumFromThenTo :: CSUSeconds -> CSUSeconds -> CSUSeconds -> [CSUSeconds] #
Enum CUSeconds # |
Methods succ :: CUSeconds -> CUSeconds # pred :: CUSeconds -> CUSeconds # toEnum :: Int -> CUSeconds # fromEnum :: CUSeconds -> Int # enumFrom :: CUSeconds -> [CUSeconds] # enumFromThen :: CUSeconds -> CUSeconds -> [CUSeconds] # enumFromTo :: CUSeconds -> CUSeconds -> [CUSeconds] # enumFromThenTo :: CUSeconds -> CUSeconds -> CUSeconds -> [CUSeconds] #
Enum CTime # |
Methods succ :: CTime -> CTime # pred :: CTime -> CTime # toEnum :: Int -> CTime # fromEnum :: CTime -> Int # enumFrom :: CTime -> [CTime] # enumFromThen :: CTime -> CTime -> [CTime] # enumFromTo :: CTime -> CTime -> [CTime] # enumFromThenTo :: CTime -> CTime -> CTime -> [CTime] #
Enum CClock # |
Methods succ :: CClock -> CClock # pred :: CClock -> CClock # toEnum :: Int -> CClock # fromEnum :: CClock -> Int # enumFrom :: CClock -> [CClock] # enumFromThen :: CClock -> CClock -> [CClock] # enumFromTo :: CClock -> CClock -> [CClock] # enumFromThenTo :: CClock -> CClock -> CClock -> [CClock] #
Enum CSigAtomic # |
Methods succ :: CSigAtomic -> CSigAtomic # pred :: CSigAtomic -> CSigAtomic # toEnum :: Int -> CSigAtomic # fromEnum :: CSigAtomic -> Int # enumFrom :: CSigAtomic -> [CSigAtomic] # enumFromThen :: CSigAtomic -> CSigAtomic -> [CSigAtomic] # enumFromTo :: CSigAtomic -> CSigAtomic -> [CSigAtomic] # enumFromThenTo :: CSigAtomic -> CSigAtomic -> CSigAtomic -> [CSigAtomic] #
Enum CWchar # |
Methods succ :: CWchar -> CWchar # pred :: CWchar -> CWchar # toEnum :: Int -> CWchar # fromEnum :: CWchar -> Int # enumFrom :: CWchar -> [CWchar] # enumFromThen :: CWchar -> CWchar -> [CWchar] # enumFromTo :: CWchar -> CWchar -> [CWchar] # enumFromThenTo :: CWchar -> CWchar -> CWchar -> [CWchar] #
Enum CSize # |
Methods succ :: CSize -> CSize # pred :: CSize -> CSize # toEnum :: Int -> CSize # fromEnum :: CSize -> Int # enumFrom :: CSize -> [CSize] # enumFromThen :: CSize -> CSize -> [CSize] # enumFromTo :: CSize -> CSize -> [CSize] # enumFromThenTo :: CSize -> CSize -> CSize -> [CSize] #
Enum CPtrdiff # |
Methods succ :: CPtrdiff -> CPtrdiff # pred :: CPtrdiff -> CPtrdiff # toEnum :: Int -> CPtrdiff # fromEnum :: CPtrdiff -> Int # enumFrom :: CPtrdiff -> [CPtrdiff] # enumFromThen :: CPtrdiff -> CPtrdiff -> [CPtrdiff] # enumFromTo :: CPtrdiff -> CPtrdiff -> [CPtrdiff] # enumFromThenTo :: CPtrdiff -> CPtrdiff -> CPtrdiff -> [CPtrdiff] #
Enum CDouble # |
Methods succ :: CDouble -> CDouble # pred :: CDouble -> CDouble # toEnum :: Int -> CDouble # fromEnum :: CDouble -> Int # enumFrom :: CDouble -> [CDouble] # enumFromThen :: CDouble -> CDouble -> [CDouble] # enumFromTo :: CDouble -> CDouble -> [CDouble] # enumFromThenTo :: CDouble -> CDouble -> CDouble -> [CDouble] #
Enum CFloat # |
Methods succ :: CFloat -> CFloat # pred :: CFloat -> CFloat # toEnum :: Int -> CFloat # fromEnum :: CFloat -> Int # enumFrom :: CFloat -> [CFloat] # enumFromThen :: CFloat -> CFloat -> [CFloat] # enumFromTo :: CFloat -> CFloat -> [CFloat] # enumFromThenTo :: CFloat -> CFloat -> CFloat -> [CFloat] #
Enum CBool # |
Methods succ :: CBool -> CBool # pred :: CBool -> CBool # toEnum :: Int -> CBool # fromEnum :: CBool -> Int # enumFrom :: CBool -> [CBool] # enumFromThen :: CBool -> CBool -> [CBool] # enumFromTo :: CBool -> CBool -> [CBool] # enumFromThenTo :: CBool -> CBool -> CBool -> [CBool] #
Enum CULLong # |
Methods succ :: CULLong -> CULLong # pred :: CULLong -> CULLong # toEnum :: Int -> CULLong # fromEnum :: CULLong -> Int # enumFrom :: CULLong -> [CULLong] # enumFromThen :: CULLong -> CULLong -> [CULLong] # enumFromTo :: CULLong -> CULLong -> [CULLong] # enumFromThenTo :: CULLong -> CULLong -> CULLong -> [CULLong] #
Enum CLLong # |
Methods succ :: CLLong -> CLLong # pred :: CLLong -> CLLong # toEnum :: Int -> CLLong # fromEnum :: CLLong -> Int # enumFrom :: CLLong -> [CLLong] # enumFromThen :: CLLong -> CLLong -> [CLLong] # enumFromTo :: CLLong -> CLLong -> [CLLong] # enumFromThenTo :: CLLong -> CLLong -> CLLong -> [CLLong] #
Enum CULong # |
Methods succ :: CULong -> CULong # pred :: CULong -> CULong # toEnum :: Int -> CULong # fromEnum :: CULong -> Int # enumFrom :: CULong -> [CULong] # enumFromThen :: CULong -> CULong -> [CULong] # enumFromTo :: CULong -> CULong -> [CULong] # enumFromThenTo :: CULong -> CULong -> CULong -> [CULong] #
Enum CLong # |
Methods succ :: CLong -> CLong # pred :: CLong -> CLong # toEnum :: Int -> CLong # fromEnum :: CLong -> Int # enumFrom :: CLong -> [CLong] # enumFromThen :: CLong -> CLong -> [CLong] # enumFromTo :: CLong -> CLong -> [CLong] # enumFromThenTo :: CLong -> CLong -> CLong -> [CLong] #
Enum CUInt # |
Methods succ :: CUInt -> CUInt # pred :: CUInt -> CUInt # toEnum :: Int -> CUInt # fromEnum :: CUInt -> Int # enumFrom :: CUInt -> [CUInt] # enumFromThen :: CUInt -> CUInt -> [CUInt] # enumFromTo :: CUInt -> CUInt -> [CUInt] # enumFromThenTo :: CUInt -> CUInt -> CUInt -> [CUInt] #
Enum CInt # |
Methods succ :: CInt -> CInt # pred :: CInt -> CInt # toEnum :: Int -> CInt # fromEnum :: CInt -> Int # enumFrom :: CInt -> [CInt] # enumFromThen :: CInt -> CInt -> [CInt] # enumFromTo :: CInt -> CInt -> [CInt] # enumFromThenTo :: CInt -> CInt -> CInt -> [CInt] #
Enum CUShort # |
Methods succ :: CUShort -> CUShort # pred :: CUShort -> CUShort # toEnum :: Int -> CUShort # fromEnum :: CUShort -> Int # enumFrom :: CUShort -> [CUShort] # enumFromThen :: CUShort -> CUShort -> [CUShort] # enumFromTo :: CUShort -> CUShort -> [CUShort] # enumFromThenTo :: CUShort -> CUShort -> CUShort -> [CUShort] #
Enum CShort # |
Methods succ :: CShort -> CShort # pred :: CShort -> CShort # toEnum :: Int -> CShort # fromEnum :: CShort -> Int # enumFrom :: CShort -> [CShort] # enumFromThen :: CShort -> CShort -> [CShort] # enumFromTo :: CShort -> CShort -> [CShort] # enumFromThenTo :: CShort -> CShort -> CShort -> [CShort] #
Enum CUChar # |
Methods succ :: CUChar -> CUChar # pred :: CUChar -> CUChar # toEnum :: Int -> CUChar # fromEnum :: CUChar -> Int # enumFrom :: CUChar -> [CUChar] # enumFromThen :: CUChar -> CUChar -> [CUChar] # enumFromTo :: CUChar -> CUChar -> [CUChar] # enumFromThenTo :: CUChar -> CUChar -> CUChar -> [CUChar] #
Enum CSChar # |
Methods succ :: CSChar -> CSChar # pred :: CSChar -> CSChar # toEnum :: Int -> CSChar # fromEnum :: CSChar -> Int # enumFrom :: CSChar -> [CSChar] # enumFromThen :: CSChar -> CSChar -> [CSChar] # enumFromTo :: CSChar -> CSChar -> [CSChar] # enumFromThenTo :: CSChar -> CSChar -> CSChar -> [CSChar] #
Enum CChar # |
Methods succ :: CChar -> CChar # pred :: CChar -> CChar # toEnum :: Int -> CChar # fromEnum :: CChar -> Int # enumFrom :: CChar -> [CChar] # enumFromThen :: CChar -> CChar -> [CChar] # enumFromTo :: CChar -> CChar -> [CChar] # enumFromThenTo :: CChar -> CChar -> CChar -> [CChar] #
Enum DecidedStrictness # |

Methods

succ :: DecidedStrictness -> DecidedStrictness #

pred :: DecidedStrictness -> DecidedStrictness #

toEnum :: Int -> DecidedStrictness #

fromEnum :: DecidedStrictness -> Int #

enumFrom :: DecidedStrictness -> [DecidedStrictness] #

enumFromThen :: DecidedStrictness -> DecidedStrictness -> [DecidedStrictness] #

enumFromTo :: DecidedStrictness -> DecidedStrictness -> [DecidedStrictness] #

enumFromThenTo :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness -> [DecidedStrictness] #

Enum SourceStrictness # |

Methods

succ :: SourceStrictness -> SourceStrictness #

pred :: SourceStrictness -> SourceStrictness #

toEnum :: Int -> SourceStrictness #

fromEnum :: SourceStrictness -> Int #

enumFrom :: SourceStrictness -> [SourceStrictness] #

enumFromThen :: SourceStrictness -> SourceStrictness -> [SourceStrictness] #

enumFromTo :: SourceStrictness -> SourceStrictness -> [SourceStrictness] #

enumFromThenTo :: SourceStrictness -> SourceStrictness -> SourceStrictness -> [SourceStrictness] #

Enum SourceUnpackedness # |

Methods

succ :: SourceUnpackedness -> SourceUnpackedness #

pred :: SourceUnpackedness -> SourceUnpackedness #

toEnum :: Int -> SourceUnpackedness #

fromEnum :: SourceUnpackedness -> Int #

enumFrom :: SourceUnpackedness -> [SourceUnpackedness] #

enumFromThen :: SourceUnpackedness -> SourceUnpackedness -> [SourceUnpackedness] #

enumFromTo :: SourceUnpackedness -> SourceUnpackedness -> [SourceUnpackedness] #

enumFromThenTo :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness -> [SourceUnpackedness] #

Enum Associativity # |

Methods

succ :: Associativity -> Associativity #

pred :: Associativity -> Associativity #

toEnum :: Int -> Associativity #

fromEnum :: Associativity -> Int #

enumFrom :: Associativity -> [Associativity] #

enumFromThen :: Associativity -> Associativity -> [Associativity] #

enumFromTo :: Associativity -> Associativity -> [Associativity] #

enumFromThenTo :: Associativity -> Associativity -> Associativity -> [Associativity] #

Enum SeekMode # |
Methods succ :: SeekMode -> SeekMode # pred :: SeekMode -> SeekMode # toEnum :: Int -> SeekMode # fromEnum :: SeekMode -> Int # enumFrom :: SeekMode -> [SeekMode] # enumFromThen :: SeekMode -> SeekMode -> [SeekMode] # enumFromTo :: SeekMode -> SeekMode -> [SeekMode] # enumFromThenTo :: SeekMode -> SeekMode -> SeekMode -> [SeekMode] #
Enum Fd # |
Methods succ :: Fd -> Fd # pred :: Fd -> Fd # toEnum :: Int -> Fd # fromEnum :: Fd -> Int # enumFrom :: Fd -> [Fd] # enumFromThen :: Fd -> Fd -> [Fd] # enumFromTo :: Fd -> Fd -> [Fd] # enumFromThenTo :: Fd -> Fd -> Fd -> [Fd] #
Enum CKey # |
Methods succ :: CKey -> CKey # pred :: CKey -> CKey # toEnum :: Int -> CKey # fromEnum :: CKey -> Int # enumFrom :: CKey -> [CKey] # enumFromThen :: CKey -> CKey -> [CKey] # enumFromTo :: CKey -> CKey -> [CKey] # enumFromThenTo :: CKey -> CKey -> CKey -> [CKey] #
Enum CId # |
Methods succ :: CId -> CId # pred :: CId -> CId # toEnum :: Int -> CId # fromEnum :: CId -> Int # enumFrom :: CId -> [CId] # enumFromThen :: CId -> CId -> [CId] # enumFromTo :: CId -> CId -> [CId] # enumFromThenTo :: CId -> CId -> CId -> [CId] #
Enum CFsFilCnt # |
Methods succ :: CFsFilCnt -> CFsFilCnt # pred :: CFsFilCnt -> CFsFilCnt # toEnum :: Int -> CFsFilCnt # fromEnum :: CFsFilCnt -> Int # enumFrom :: CFsFilCnt -> [CFsFilCnt] # enumFromThen :: CFsFilCnt -> CFsFilCnt -> [CFsFilCnt] # enumFromTo :: CFsFilCnt -> CFsFilCnt -> [CFsFilCnt] # enumFromThenTo :: CFsFilCnt -> CFsFilCnt -> CFsFilCnt -> [CFsFilCnt] #
Enum CFsBlkCnt # |
Methods succ :: CFsBlkCnt -> CFsBlkCnt # pred :: CFsBlkCnt -> CFsBlkCnt # toEnum :: Int -> CFsBlkCnt # fromEnum :: CFsBlkCnt -> Int # enumFrom :: CFsBlkCnt -> [CFsBlkCnt] # enumFromThen :: CFsBlkCnt -> CFsBlkCnt -> [CFsBlkCnt] # enumFromTo :: CFsBlkCnt -> CFsBlkCnt -> [CFsBlkCnt] # enumFromThenTo :: CFsBlkCnt -> CFsBlkCnt -> CFsBlkCnt -> [CFsBlkCnt] #
Enum CClockId # |
Methods succ :: CClockId -> CClockId # pred :: CClockId -> CClockId # toEnum :: Int -> CClockId # fromEnum :: CClockId -> Int # enumFrom :: CClockId -> [CClockId] # enumFromThen :: CClockId -> CClockId -> [CClockId] # enumFromTo :: CClockId -> CClockId -> [CClockId] # enumFromThenTo :: CClockId -> CClockId -> CClockId -> [CClockId] #
Enum CBlkCnt # |
Methods succ :: CBlkCnt -> CBlkCnt # pred :: CBlkCnt -> CBlkCnt # toEnum :: Int -> CBlkCnt # fromEnum :: CBlkCnt -> Int # enumFrom :: CBlkCnt -> [CBlkCnt] # enumFromThen :: CBlkCnt -> CBlkCnt -> [CBlkCnt] # enumFromTo :: CBlkCnt -> CBlkCnt -> [CBlkCnt] # enumFromThenTo :: CBlkCnt -> CBlkCnt -> CBlkCnt -> [CBlkCnt] #
Enum CBlkSize # |
Methods succ :: CBlkSize -> CBlkSize # pred :: CBlkSize -> CBlkSize # toEnum :: Int -> CBlkSize # fromEnum :: CBlkSize -> Int # enumFrom :: CBlkSize -> [CBlkSize] # enumFromThen :: CBlkSize -> CBlkSize -> [CBlkSize] # enumFromTo :: CBlkSize -> CBlkSize -> [CBlkSize] # enumFromThenTo :: CBlkSize -> CBlkSize -> CBlkSize -> [CBlkSize] #
Enum CRLim # |
Methods succ :: CRLim -> CRLim # pred :: CRLim -> CRLim # toEnum :: Int -> CRLim # fromEnum :: CRLim -> Int # enumFrom :: CRLim -> [CRLim] # enumFromThen :: CRLim -> CRLim -> [CRLim] # enumFromTo :: CRLim -> CRLim -> [CRLim] # enumFromThenTo :: CRLim -> CRLim -> CRLim -> [CRLim] #
Enum CTcflag # |
Methods succ :: CTcflag -> CTcflag # pred :: CTcflag -> CTcflag # toEnum :: Int -> CTcflag # fromEnum :: CTcflag -> Int # enumFrom :: CTcflag -> [CTcflag] # enumFromThen :: CTcflag -> CTcflag -> [CTcflag] # enumFromTo :: CTcflag -> CTcflag -> [CTcflag] # enumFromThenTo :: CTcflag -> CTcflag -> CTcflag -> [CTcflag] #
Enum CSpeed # |
Methods succ :: CSpeed -> CSpeed # pred :: CSpeed -> CSpeed # toEnum :: Int -> CSpeed # fromEnum :: CSpeed -> Int # enumFrom :: CSpeed -> [CSpeed] # enumFromThen :: CSpeed -> CSpeed -> [CSpeed] # enumFromTo :: CSpeed -> CSpeed -> [CSpeed] # enumFromThenTo :: CSpeed -> CSpeed -> CSpeed -> [CSpeed] #
Enum CCc # |
Methods succ :: CCc -> CCc # pred :: CCc -> CCc # toEnum :: Int -> CCc # fromEnum :: CCc -> Int # enumFrom :: CCc -> [CCc] # enumFromThen :: CCc -> CCc -> [CCc] # enumFromTo :: CCc -> CCc -> [CCc] # enumFromThenTo :: CCc -> CCc -> CCc -> [CCc] #
Enum CUid # |
Methods succ :: CUid -> CUid # pred :: CUid -> CUid # toEnum :: Int -> CUid # fromEnum :: CUid -> Int # enumFrom :: CUid -> [CUid] # enumFromThen :: CUid -> CUid -> [CUid] # enumFromTo :: CUid -> CUid -> [CUid] # enumFromThenTo :: CUid -> CUid -> CUid -> [CUid] #
Enum CNlink # |
Methods succ :: CNlink -> CNlink # pred :: CNlink -> CNlink # toEnum :: Int -> CNlink # fromEnum :: CNlink -> Int # enumFrom :: CNlink -> [CNlink] # enumFromThen :: CNlink -> CNlink -> [CNlink] # enumFromTo :: CNlink -> CNlink -> [CNlink] # enumFromThenTo :: CNlink -> CNlink -> CNlink -> [CNlink] #
Enum CGid # |
Methods succ :: CGid -> CGid # pred :: CGid -> CGid # toEnum :: Int -> CGid # fromEnum :: CGid -> Int # enumFrom :: CGid -> [CGid] # enumFromThen :: CGid -> CGid -> [CGid] # enumFromTo :: CGid -> CGid -> [CGid] # enumFromThenTo :: CGid -> CGid -> CGid -> [CGid] #
Enum CSsize # |
Methods succ :: CSsize -> CSsize # pred :: CSsize -> CSsize # toEnum :: Int -> CSsize # fromEnum :: CSsize -> Int # enumFrom :: CSsize -> [CSsize] # enumFromThen :: CSsize -> CSsize -> [CSsize] # enumFromTo :: CSsize -> CSsize -> [CSsize] # enumFromThenTo :: CSsize -> CSsize -> CSsize -> [CSsize] #
Enum CPid # |
Methods succ :: CPid -> CPid # pred :: CPid -> CPid # toEnum :: Int -> CPid # fromEnum :: CPid -> Int # enumFrom :: CPid -> [CPid] # enumFromThen :: CPid -> CPid -> [CPid] # enumFromTo :: CPid -> CPid -> [CPid] # enumFromThenTo :: CPid -> CPid -> CPid -> [CPid] #
Enum COff # |
Methods succ :: COff -> COff # pred :: COff -> COff # toEnum :: Int -> COff # fromEnum :: COff -> Int # enumFrom :: COff -> [COff] # enumFromThen :: COff -> COff -> [COff] # enumFromTo :: COff -> COff -> [COff] # enumFromThenTo :: COff -> COff -> COff -> [COff] #
Enum CMode # |
Methods succ :: CMode -> CMode # pred :: CMode -> CMode # toEnum :: Int -> CMode # fromEnum :: CMode -> Int # enumFrom :: CMode -> [CMode] # enumFromThen :: CMode -> CMode -> [CMode] # enumFromTo :: CMode -> CMode -> [CMode] # enumFromThenTo :: CMode -> CMode -> CMode -> [CMode] #
Enum CIno # |
Methods succ :: CIno -> CIno # pred :: CIno -> CIno # toEnum :: Int -> CIno # fromEnum :: CIno -> Int # enumFrom :: CIno -> [CIno] # enumFromThen :: CIno -> CIno -> [CIno] # enumFromTo :: CIno -> CIno -> [CIno] # enumFromThenTo :: CIno -> CIno -> CIno -> [CIno] #
Enum CDev # |
Methods succ :: CDev -> CDev # pred :: CDev -> CDev # toEnum :: Int -> CDev # fromEnum :: CDev -> Int # enumFrom :: CDev -> [CDev] # enumFromThen :: CDev -> CDev -> [CDev] # enumFromTo :: CDev -> CDev -> [CDev] # enumFromThenTo :: CDev -> CDev -> CDev -> [CDev] #
Enum DoTrace # | Since: 4.8.0.0
Methods succ :: DoTrace -> DoTrace # pred :: DoTrace -> DoTrace # toEnum :: Int -> DoTrace # fromEnum :: DoTrace -> Int # enumFrom :: DoTrace -> [DoTrace] # enumFromThen :: DoTrace -> DoTrace -> [DoTrace] # enumFromTo :: DoTrace -> DoTrace -> [DoTrace] # enumFromThenTo :: DoTrace -> DoTrace -> DoTrace -> [DoTrace] #
Enum DoHeapProfile # | Since: 4.8.0.0

Methods

succ :: DoHeapProfile -> DoHeapProfile #

pred :: DoHeapProfile -> DoHeapProfile #

toEnum :: Int -> DoHeapProfile #

fromEnum :: DoHeapProfile -> Int #

enumFrom :: DoHeapProfile -> [DoHeapProfile] #

enumFromThen :: DoHeapProfile -> DoHeapProfile -> [DoHeapProfile] #

enumFromTo :: DoHeapProfile -> DoHeapProfile -> [DoHeapProfile] #

enumFromThenTo :: DoHeapProfile -> DoHeapProfile -> DoHeapProfile -> [DoHeapProfile] #

Enum DoCostCentres # | Since: 4.8.0.0

Methods

succ :: DoCostCentres -> DoCostCentres #

pred :: DoCostCentres -> DoCostCentres #

toEnum :: Int -> DoCostCentres #

fromEnum :: DoCostCentres -> Int #

enumFrom :: DoCostCentres -> [DoCostCentres] #

enumFromThen :: DoCostCentres -> DoCostCentres -> [DoCostCentres] #

enumFromTo :: DoCostCentres -> DoCostCentres -> [DoCostCentres] #

enumFromThenTo :: DoCostCentres -> DoCostCentres -> DoCostCentres -> [DoCostCentres] #

Enum GiveGCStats # | Since: 4.8.0.0
Methods succ :: GiveGCStats -> GiveGCStats # pred :: GiveGCStats -> GiveGCStats # toEnum :: Int -> GiveGCStats # fromEnum :: GiveGCStats -> Int # enumFrom :: GiveGCStats -> [GiveGCStats] # enumFromThen :: GiveGCStats -> GiveGCStats -> [GiveGCStats] # enumFromTo :: GiveGCStats -> GiveGCStats -> [GiveGCStats] # enumFromThenTo :: GiveGCStats -> GiveGCStats -> GiveGCStats -> [GiveGCStats] #
Integral a => Enum (Ratio a) # | Since: 2.0.1
Methods succ :: Ratio a -> Ratio a # pred :: Ratio a -> Ratio a # toEnum :: Int -> Ratio a # fromEnum :: Ratio a -> Int # enumFrom :: Ratio a -> [Ratio a] # enumFromThen :: Ratio a -> Ratio a -> [Ratio a] # enumFromTo :: Ratio a -> Ratio a -> [Ratio a] # enumFromThenTo :: Ratio a -> Ratio a -> Ratio a -> [Ratio a] #
Enum a => Enum (Identity a) # |
Methods succ :: Identity a -> Identity a # pred :: Identity a -> Identity a # toEnum :: Int -> Identity a # fromEnum :: Identity a -> Int # enumFrom :: Identity a -> [Identity a] # enumFromThen :: Identity a -> Identity a -> [Identity a] # enumFromTo :: Identity a -> Identity a -> [Identity a] # enumFromThenTo :: Identity a -> Identity a -> Identity a -> [Identity a] #
Enum a => Enum (WrappedMonoid a) # | Since: 4.9.0.0

Methods

succ :: WrappedMonoid a -> WrappedMonoid a #

pred :: WrappedMonoid a -> WrappedMonoid a #

toEnum :: Int -> WrappedMonoid a #

fromEnum :: WrappedMonoid a -> Int #

enumFrom :: WrappedMonoid a -> [WrappedMonoid a] #

enumFromThen :: WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] #

enumFromTo :: WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] #

enumFromThenTo :: WrappedMonoid a -> WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] #

Enum a => Enum (Last a) # | Since: 4.9.0.0
Methods succ :: Last a -> Last a # pred :: Last a -> Last a # toEnum :: Int -> Last a # fromEnum :: Last a -> Int # enumFrom :: Last a -> [Last a] # enumFromThen :: Last a -> Last a -> [Last a] # enumFromTo :: Last a -> Last a -> [Last a] # enumFromThenTo :: Last a -> Last a -> Last a -> [Last a] #
Enum a => Enum (First a) # | Since: 4.9.0.0
Methods succ :: First a -> First a # pred :: First a -> First a # toEnum :: Int -> First a # fromEnum :: First a -> Int # enumFrom :: First a -> [First a] # enumFromThen :: First a -> First a -> [First a] # enumFromTo :: First a -> First a -> [First a] # enumFromThenTo :: First a -> First a -> First a -> [First a] #
Enum a => Enum (Max a) # | Since: 4.9.0.0
Methods succ :: Max a -> Max a # pred :: Max a -> Max a # toEnum :: Int -> Max a # fromEnum :: Max a -> Int # enumFrom :: Max a -> [Max a] # enumFromThen :: Max a -> Max a -> [Max a] # enumFromTo :: Max a -> Max a -> [Max a] # enumFromThenTo :: Max a -> Max a -> Max a -> [Max a] #
Enum a => Enum (Min a) # | Since: 4.9.0.0
Methods succ :: Min a -> Min a # pred :: Min a -> Min a # toEnum :: Int -> Min a # fromEnum :: Min a -> Int # enumFrom :: Min a -> [Min a] # enumFromThen :: Min a -> Min a -> [Min a] # enumFromTo :: Min a -> Min a -> [Min a] # enumFromThenTo :: Min a -> Min a -> Min a -> [Min a] #
Enum (Fixed a) # | Since: 2.1
Methods succ :: Fixed a -> Fixed a # pred :: Fixed a -> Fixed a # toEnum :: Int -> Fixed a # fromEnum :: Fixed a -> Int # enumFrom :: Fixed a -> [Fixed a] # enumFromThen :: Fixed a -> Fixed a -> [Fixed a] # enumFromTo :: Fixed a -> Fixed a -> [Fixed a] # enumFromThenTo :: Fixed a -> Fixed a -> Fixed a -> [Fixed a] #
Enum (Proxy k s) # | Since: 4.7.0.0
Methods succ :: Proxy k s -> Proxy k s # pred :: Proxy k s -> Proxy k s # toEnum :: Int -> Proxy k s # fromEnum :: Proxy k s -> Int # enumFrom :: Proxy k s -> [Proxy k s] # enumFromThen :: Proxy k s -> Proxy k s -> [Proxy k s] # enumFromTo :: Proxy k s -> Proxy k s -> [Proxy k s] # enumFromThenTo :: Proxy k s -> Proxy k s -> Proxy k s -> [Proxy k s] #
(~) k a b => Enum ((:~:) k a b) # | Since: 4.7.0.0
Methods succ :: (k :~: a) b -> (k :~: a) b # pred :: (k :~: a) b -> (k :~: a) b # toEnum :: Int -> (k :~: a) b # fromEnum :: (k :~: a) b -> Int # enumFrom :: (k :~: a) b -> [(k :~: a) b] # enumFromThen :: (k :~: a) b -> (k :~: a) b -> [(k :~: a) b] # enumFromTo :: (k :~: a) b -> (k :~: a) b -> [(k :~: a) b] # enumFromThenTo :: (k :~: a) b -> (k :~: a) b -> (k :~: a) b -> [(k :~: a) b] #
Coercible k a b => Enum (Coercion k a b) # | Since: 4.7.0.0

Methods

succ :: Coercion k a b -> Coercion k a b #

pred :: Coercion k a b -> Coercion k a b #

toEnum :: Int -> Coercion k a b #

fromEnum :: Coercion k a b -> Int #

enumFrom :: Coercion k a b -> [Coercion k a b] #

enumFromThen :: Coercion k a b -> Coercion k a b -> [Coercion k a b] #

enumFromTo :: Coercion k a b -> Coercion k a b -> [Coercion k a b] #

enumFromThenTo :: Coercion k a b -> Coercion k a b -> Coercion k a b -> [Coercion k a b] #

Enum (f a) => Enum (Alt k f a) # |
Methods succ :: Alt k f a -> Alt k f a # pred :: Alt k f a -> Alt k f a # toEnum :: Int -> Alt k f a # fromEnum :: Alt k f a -> Int # enumFrom :: Alt k f a -> [Alt k f a] # enumFromThen :: Alt k f a -> Alt k f a -> [Alt k f a] # enumFromTo :: Alt k f a -> Alt k f a -> [Alt k f a] # enumFromThenTo :: Alt k f a -> Alt k f a -> Alt k f a -> [Alt k f a] #
Enum a => Enum (Const k a b) # |
Methods succ :: Const k a b -> Const k a b # pred :: Const k a b -> Const k a b # toEnum :: Int -> Const k a b # fromEnum :: Const k a b -> Int # enumFrom :: Const k a b -> [Const k a b] # enumFromThen :: Const k a b -> Const k a b -> [Const k a b] # enumFromTo :: Const k a b -> Const k a b -> [Const k a b] # enumFromThenTo :: Const k a b -> Const k a b -> Const k a b -> [Const k a b] #
(~~) k1 k2 a b => Enum ((:~~:) k1 k2 a b) # | Since: 4.10.0.0

Methods

succ :: (k1 :~~: k2) a b -> (k1 :~~: k2) a b #

pred :: (k1 :~~: k2) a b -> (k1 :~~: k2) a b #

toEnum :: Int -> (k1 :~~: k2) a b #

fromEnum :: (k1 :~~: k2) a b -> Int #

enumFrom :: (k1 :~~: k2) a b -> [(k1 :~~: k2) a b] #

enumFromThen :: (k1 :~~: k2) a b -> (k1 :~~: k2) a b -> [(k1 :~~: k2) a b] #

enumFromTo :: (k1 :~~: k2) a b -> (k1 :~~: k2) a b -> [(k1 :~~: k2) a b] #

enumFromThenTo :: (k1 :~~: k2) a b -> (k1 :~~: k2) a b -> (k1 :~~: k2) a b -> [(k1 :~~: k2) a b] #

class Bounded a where #

The `Bounded` class is used to name the upper and lower limits of a type. `Ord` is not a superclass of `Bounded` since types that are not totally ordered may also have upper and lower bounds.

The `Bounded` class may be derived for any enumeration type; `minBound` is the first constructor listed in the `data` declaration and `maxBound` is the last. `Bounded` may also be derived for single-constructor datatypes whose constituent types are in `Bounded`.

Minimal complete definition

minBound, maxBound

Methods

minBound, maxBound :: a #

Instances

Bounded Bool # | Since: 2.1
Methods minBound :: Bool # maxBound :: Bool #
Bounded Char # | Since: 2.1
Methods minBound :: Char # maxBound :: Char #
Bounded Int # | Since: 2.1
Methods minBound :: Int # maxBound :: Int #
Bounded Int8 # | Since: 2.1
Methods minBound :: Int8 # maxBound :: Int8 #
Bounded Int16 # | Since: 2.1
Methods minBound :: Int16 # maxBound :: Int16 #
Bounded Int32 # | Since: 2.1
Methods minBound :: Int32 # maxBound :: Int32 #
Bounded Int64 # | Since: 2.1
Methods minBound :: Int64 # maxBound :: Int64 #
Bounded Ordering # | Since: 2.1
Methods minBound :: Ordering # maxBound :: Ordering #
Bounded Word # | Since: 2.1
Methods minBound :: Word # maxBound :: Word #
Bounded Word8 # | Since: 2.1
Methods minBound :: Word8 # maxBound :: Word8 #
Bounded Word16 # | Since: 2.1
Methods minBound :: Word16 # maxBound :: Word16 #
Bounded Word32 # | Since: 2.1
Methods minBound :: Word32 # maxBound :: Word32 #
Bounded Word64 # | Since: 2.1
Methods minBound :: Word64 # maxBound :: Word64 #
Bounded VecCount # | Since: 4.10.0.0
Methods minBound :: VecCount # maxBound :: VecCount #
Bounded VecElem # | Since: 4.10.0.0
Methods minBound :: VecElem # maxBound :: VecElem #
Bounded () # | Since: 2.1
Methods minBound :: () # maxBound :: () #
Bounded GeneralCategory # |
Methods minBound :: GeneralCategory # maxBound :: GeneralCategory #
Bounded IntPtr # |
Methods minBound :: IntPtr # maxBound :: IntPtr #
Bounded WordPtr # |
Methods minBound :: WordPtr # maxBound :: WordPtr #
Bounded CUIntMax # |
Methods minBound :: CUIntMax # maxBound :: CUIntMax #
Bounded CIntMax # |
Methods minBound :: CIntMax # maxBound :: CIntMax #
Bounded CUIntPtr # |
Methods minBound :: CUIntPtr # maxBound :: CUIntPtr #
Bounded CIntPtr # |
Methods minBound :: CIntPtr # maxBound :: CIntPtr #
Bounded CSigAtomic # |
Methods minBound :: CSigAtomic # maxBound :: CSigAtomic #
Bounded CWchar # |
Methods minBound :: CWchar # maxBound :: CWchar #
Bounded CSize # |
Methods minBound :: CSize # maxBound :: CSize #
Bounded CPtrdiff # |
Methods minBound :: CPtrdiff # maxBound :: CPtrdiff #
Bounded CBool # |
Methods minBound :: CBool # maxBound :: CBool #
Bounded CULLong # |
Methods minBound :: CULLong # maxBound :: CULLong #
Bounded CLLong # |
Methods minBound :: CLLong # maxBound :: CLLong #
Bounded CULong # |
Methods minBound :: CULong # maxBound :: CULong #
Bounded CLong # |
Methods minBound :: CLong # maxBound :: CLong #
Bounded CUInt # |
Methods minBound :: CUInt # maxBound :: CUInt #
Bounded CInt # |
Methods minBound :: CInt # maxBound :: CInt #
Bounded CUShort # |
Methods minBound :: CUShort # maxBound :: CUShort #
Bounded CShort # |
Methods minBound :: CShort # maxBound :: CShort #
Bounded CUChar # |
Methods minBound :: CUChar # maxBound :: CUChar #
Bounded CSChar # |
Methods minBound :: CSChar # maxBound :: CSChar #
Bounded CChar # |
Methods minBound :: CChar # maxBound :: CChar #
Bounded DecidedStrictness # |
Methods minBound :: DecidedStrictness # maxBound :: DecidedStrictness #
Bounded SourceStrictness # |
Methods minBound :: SourceStrictness # maxBound :: SourceStrictness #
Bounded SourceUnpackedness # |
Methods minBound :: SourceUnpackedness # maxBound :: SourceUnpackedness #
Bounded Associativity # |
Methods minBound :: Associativity # maxBound :: Associativity #
Bounded Any # |
Methods minBound :: Any # maxBound :: Any #
Bounded All # |
Methods minBound :: All # maxBound :: All #
Bounded Fd # |
Methods minBound :: Fd # maxBound :: Fd #
Bounded CKey # |
Methods minBound :: CKey # maxBound :: CKey #
Bounded CId # |
Methods minBound :: CId # maxBound :: CId #
Bounded CFsFilCnt # |
Methods minBound :: CFsFilCnt # maxBound :: CFsFilCnt #
Bounded CFsBlkCnt # |
Methods minBound :: CFsBlkCnt # maxBound :: CFsBlkCnt #
Bounded CClockId # |
Methods minBound :: CClockId # maxBound :: CClockId #
Bounded CBlkCnt # |
Methods minBound :: CBlkCnt # maxBound :: CBlkCnt #
Bounded CBlkSize # |
Methods minBound :: CBlkSize # maxBound :: CBlkSize #
Bounded CRLim # |
Methods minBound :: CRLim # maxBound :: CRLim #
Bounded CTcflag # |
Methods minBound :: CTcflag # maxBound :: CTcflag #
Bounded CUid # |
Methods minBound :: CUid # maxBound :: CUid #
Bounded CNlink # |
Methods minBound :: CNlink # maxBound :: CNlink #
Bounded CGid # |
Methods minBound :: CGid # maxBound :: CGid #
Bounded CSsize # |
Methods minBound :: CSsize # maxBound :: CSsize #
Bounded CPid # |
Methods minBound :: CPid # maxBound :: CPid #
Bounded COff # |
Methods minBound :: COff # maxBound :: COff #
Bounded CMode # |
Methods minBound :: CMode # maxBound :: CMode #
Bounded CIno # |
Methods minBound :: CIno # maxBound :: CIno #
Bounded CDev # |
Methods minBound :: CDev # maxBound :: CDev #
Bounded a => Bounded (Product a) # |
Methods minBound :: Product a # maxBound :: Product a #
Bounded a => Bounded (Sum a) # |
Methods minBound :: Sum a # maxBound :: Sum a #
Bounded a => Bounded (Dual a) # |
Methods minBound :: Dual a # maxBound :: Dual a #
Bounded a => Bounded (Identity a) # |
Methods minBound :: Identity a # maxBound :: Identity a #
Bounded m => Bounded (WrappedMonoid m) # |
Methods minBound :: WrappedMonoid m # maxBound :: WrappedMonoid m #
Bounded a => Bounded (Last a) # |
Methods minBound :: Last a # maxBound :: Last a #
Bounded a => Bounded (First a) # |
Methods minBound :: First a # maxBound :: First a #
Bounded a => Bounded (Max a) # |
Methods minBound :: Max a # maxBound :: Max a #
Bounded a => Bounded (Min a) # |
Methods minBound :: Min a # maxBound :: Min a #
(Bounded a, Bounded b) => Bounded (a, b) # | Since: 2.1
Methods minBound :: (a, b) # maxBound :: (a, b) #
Bounded (Proxy k t) # |
Methods minBound :: Proxy k t # maxBound :: Proxy k t #
(Bounded a, Bounded b, Bounded c) => Bounded (a, b, c) # | Since: 2.1
Methods minBound :: (a, b, c) # maxBound :: (a, b, c) #
(~) k a b => Bounded ((:~:) k a b) # | Since: 4.7.0.0
Methods minBound :: (k :~: a) b # maxBound :: (k :~: a) b #
Coercible k a b => Bounded (Coercion k a b) # | Since: 4.7.0.0
Methods minBound :: Coercion k a b # maxBound :: Coercion k a b #
Bounded a => Bounded (Const k a b) # |
Methods minBound :: Const k a b # maxBound :: Const k a b #
(Bounded a, Bounded b, Bounded c, Bounded d) => Bounded (a, b, c, d) # | Since: 2.1
Methods minBound :: (a, b, c, d) # maxBound :: (a, b, c, d) #
(~~) k1 k2 a b => Bounded ((:~~:) k1 k2 a b) # | Since: 4.10.0.0
Methods minBound :: (k1 :~~: k2) a b # maxBound :: (k1 :~~: k2) a b #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e) => Bounded (a, b, c, d, e) # | Since: 2.1
Methods minBound :: (a, b, c, d, e) # maxBound :: (a, b, c, d, e) #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f) => Bounded (a, b, c, d, e, f) # | Since: 2.1
Methods minBound :: (a, b, c, d, e, f) # maxBound :: (a, b, c, d, e, f) #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g) => Bounded (a, b, c, d, e, f, g) # | Since: 2.1
Methods minBound :: (a, b, c, d, e, f, g) # maxBound :: (a, b, c, d, e, f, g) #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h) => Bounded (a, b, c, d, e, f, g, h) # | Since: 2.1
Methods minBound :: (a, b, c, d, e, f, g, h) # maxBound :: (a, b, c, d, e, f, g, h) #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i) => Bounded (a, b, c, d, e, f, g, h, i) # | Since: 2.1
Methods minBound :: (a, b, c, d, e, f, g, h, i) # maxBound :: (a, b, c, d, e, f, g, h, i) #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j) => Bounded (a, b, c, d, e, f, g, h, i, j) # | Since: 2.1
Methods minBound :: (a, b, c, d, e, f, g, h, i, j) # maxBound :: (a, b, c, d, e, f, g, h, i, j) #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k) => Bounded (a, b, c, d, e, f, g, h, i, j, k) # | Since: 2.1
Methods minBound :: (a, b, c, d, e, f, g, h, i, j, k) # maxBound :: (a, b, c, d, e, f, g, h, i, j, k) #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l) # | Since: 2.1
Methods minBound :: (a, b, c, d, e, f, g, h, i, j, k, l) # maxBound :: (a, b, c, d, e, f, g, h, i, j, k, l) #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l, Bounded m) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l, m) # | Since: 2.1
Methods minBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m) # maxBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m) #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l, Bounded m, Bounded n) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l, m, n) # | Since: 2.1
Methods minBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) # maxBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l, Bounded m, Bounded n, Bounded o) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) # | Since: 2.1
Methods minBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) # maxBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #

## Numbers

### Numeric types

data Int :: * Source #

A fixed-precision integer type with at least the range `[-2^29 .. 2^29-1]`. The exact range for a given implementation can be determined by using `minBound` and `maxBound` from the `Bounded` class.

Instances

Bounded Int # | Since: 2.1
Methods minBound :: Int # maxBound :: Int #
Enum Int # | Since: 2.1
Methods succ :: Int -> Int # pred :: Int -> Int # toEnum :: Int -> Int # fromEnum :: Int -> Int # enumFrom :: Int -> [Int] # enumFromThen :: Int -> Int -> [Int] # enumFromTo :: Int -> Int -> [Int] # enumFromThenTo :: Int -> Int -> Int -> [Int] #
Eq Int |
Methods (==) :: Int -> Int -> Bool Source # (/=) :: Int -> Int -> Bool Source #
Integral Int # | Since: 2.0.1
Methods quot :: Int -> Int -> Int # rem :: Int -> Int -> Int # div :: Int -> Int -> Int # mod :: Int -> Int -> Int # quotRem :: Int -> Int -> (Int, Int) # divMod :: Int -> Int -> (Int, Int) # toInteger :: Int -> Integer #
Data Int # | Since: 4.0.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int -> c Int #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int #

toConstr :: Int -> Constr #

dataTypeOf :: Int -> DataType #

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

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

gmapT :: (forall b. Data b => b -> b) -> Int -> Int #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int -> r #

gmapQ :: (forall d. Data d => d -> u) -> Int -> [u] #

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

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int -> m Int #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int -> m Int #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int -> m Int #

Num Int # | Since: 2.1
Methods (+) :: Int -> Int -> Int # (-) :: Int -> Int -> Int # (*) :: Int -> Int -> Int # negate :: Int -> Int # abs :: Int -> Int # signum :: Int -> Int # fromInteger :: Integer -> Int #
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 #
Read Int # | Since: 2.1
Methods readsPrec :: Int -> ReadS Int # readList :: ReadS [Int] # readPrec :: ReadPrec Int # readListPrec :: ReadPrec [Int] #
Real Int # | Since: 2.0.1
Methods toRational :: Int -> Rational #
Show Int # | Since: 2.1
Methods showsPrec :: Int -> Int -> ShowS # show :: Int -> String # showList :: [Int] -> ShowS #
Ix Int # | Since: 2.1
Methods range :: (Int, Int) -> [Int] # index :: (Int, Int) -> Int -> Int # unsafeIndex :: (Int, Int) -> Int -> Int inRange :: (Int, Int) -> Int -> Bool # rangeSize :: (Int, Int) -> Int # unsafeRangeSize :: (Int, Int) -> Int
FiniteBits Int # | Since: 4.6.0.0
Methods finiteBitSize :: Int -> Int # countLeadingZeros :: Int -> Int # countTrailingZeros :: Int -> Int #
Bits Int # | Since: 2.1

Methods

(.&.) :: Int -> Int -> Int #

(.|.) :: Int -> Int -> Int #

xor :: Int -> Int -> Int #

complement :: Int -> Int #

shift :: Int -> Int -> Int #

rotate :: Int -> Int -> Int #

zeroBits :: Int #

bit :: Int -> Int #

setBit :: Int -> Int -> Int #

clearBit :: Int -> Int -> Int #

complementBit :: Int -> Int -> Int #

testBit :: Int -> Int -> Bool #

bitSizeMaybe :: Int -> Maybe Int #

bitSize :: Int -> Int #

isSigned :: Int -> Bool #

shiftL :: Int -> Int -> Int #

unsafeShiftL :: Int -> Int -> Int #

shiftR :: Int -> Int -> Int #

unsafeShiftR :: Int -> Int -> Int #

rotateL :: Int -> Int -> Int #

rotateR :: Int -> Int -> Int #

popCount :: Int -> Int #

Storable Int # | Since: 2.1
Methods sizeOf :: Int -> Int # alignment :: Int -> Int # peekElemOff :: Ptr Int -> Int -> IO Int # pokeElemOff :: Ptr Int -> Int -> Int -> IO () # peekByteOff :: Ptr b -> Int -> IO Int # pokeByteOff :: Ptr b -> Int -> Int -> IO () # peek :: Ptr Int -> IO Int # poke :: Ptr Int -> Int -> IO () #
PrintfArg Int # | Since: 2.1
Methods formatArg :: Int -> FieldFormatter # parseFormat :: Int -> ModifierParser #
Generic1 k (URec k Int) # |
Associated Types type Rep1 (URec k Int) (f :: URec k Int -> *) :: k -> * # Methods from1 :: f a -> Rep1 (URec k Int) f a # to1 :: Rep1 (URec k Int) f a -> f a #
Functor (URec * Int) # |
Methods fmap :: (a -> b) -> URec * Int a -> URec * Int b # (<$) :: a -> URec * Int b -> URec * Int a #
Foldable (URec * Int) # |

Methods

fold :: Monoid m => URec * Int m -> m #

foldMap :: Monoid m => (a -> m) -> URec * Int a -> m #

foldr :: (a -> b -> b) -> b -> URec * Int a -> b #

foldr' :: (a -> b -> b) -> b -> URec * Int a -> b #

foldl :: (b -> a -> b) -> b -> URec * Int a -> b #

foldl' :: (b -> a -> b) -> b -> URec * Int a -> b #

foldr1 :: (a -> a -> a) -> URec * Int a -> a #

foldl1 :: (a -> a -> a) -> URec * Int a -> a #

toList :: URec * Int a -> [a] #

null :: URec * Int a -> Bool #

length :: URec * Int a -> Int #

elem :: Eq a => a -> URec * Int a -> Bool #

maximum :: Ord a => URec * Int a -> a #

minimum :: Ord a => URec * Int a -> a #

sum :: Num a => URec * Int a -> a #

product :: Num a => URec * Int a -> a #

Traversable (URec * Int) # |
Methods traverse :: Applicative f => (a -> f b) -> URec * Int a -> f (URec * Int b) # sequenceA :: Applicative f => URec * Int (f a) -> f (URec * Int a) # mapM :: Monad m => (a -> m b) -> URec * Int a -> m (URec * Int b) # sequence :: Monad m => URec * Int (m a) -> m (URec * Int a) #
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 #
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 #

Show (URec k Int p) # |
Methods showsPrec :: Int -> URec k Int p -> ShowS # show :: URec k Int p -> String # showList :: [URec k Int p] -> ShowS #
Generic (URec k Int p) # |
Associated Types type Rep (URec k Int p) :: * -> * # Methods from :: URec k Int p -> Rep (URec k Int p) x # to :: Rep (URec k Int p) x -> URec k Int p #
data URec k Int # | Used for marking occurrences of `Int#` Since: 4.9.0.0

data URec k Int = UInt {

- uInt# :: Int#

}

type Rep1 k (URec k Int) # |
type Rep1 k (URec k Int) = D1 k (MetaData "URec" "GHC.Generics" "base" False) (C1 k (MetaCons "UInt" PrefixI True) (S1 k (MetaSel (Just Symbol "uInt#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UInt k)))
type Rep (URec k Int p) # |
type Rep (URec k Int p) = D1 * (MetaData "URec" "GHC.Generics" "base" False) (C1 * (MetaCons "UInt" PrefixI True) (S1 * (MetaSel (Just Symbol "uInt#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UInt *)))

data Integer :: * Source #

Invariant: `Jn#` and `Jp#` are used iff value doesn't fit in `S#`

Useful properties resulting from the invariants:

-     abs (S# _) <= abs (Jp# _)

-     abs (S# _) <  abs (Jn# _)

Instances

Enum Integer # | Since: 2.1
Methods succ :: Integer -> Integer # pred :: Integer -> Integer # toEnum :: Int -> Integer # fromEnum :: Integer -> Int # enumFrom :: Integer -> [Integer] # enumFromThen :: Integer -> Integer -> [Integer] # enumFromTo :: Integer -> Integer -> [Integer] # enumFromThenTo :: Integer -> Integer -> Integer -> [Integer] #
Eq Integer |
Methods (==) :: Integer -> Integer -> Bool Source # (/=) :: Integer -> Integer -> Bool Source #
Integral Integer # | Since: 2.0.1
Methods quot :: Integer -> Integer -> Integer # rem :: Integer -> Integer -> Integer # div :: Integer -> Integer -> Integer # mod :: Integer -> Integer -> Integer # quotRem :: Integer -> Integer -> (Integer, Integer) # divMod :: Integer -> Integer -> (Integer, Integer) # toInteger :: Integer -> Integer #
Data Integer # | Since: 4.0.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Integer -> c Integer #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Integer #

toConstr :: Integer -> Constr #

dataTypeOf :: Integer -> DataType #

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

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

gmapT :: (forall b. Data b => b -> b) -> Integer -> Integer #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Integer -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Integer -> r #

gmapQ :: (forall d. Data d => d -> u) -> Integer -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Integer -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Integer -> m Integer #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Integer -> m Integer #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Integer -> m Integer #

Num Integer # | Since: 2.1
Methods (+) :: Integer -> Integer -> Integer # (-) :: Integer -> Integer -> Integer # (*) :: Integer -> Integer -> Integer # negate :: Integer -> Integer # abs :: Integer -> Integer # signum :: Integer -> Integer # fromInteger :: Integer -> Integer #
Ord Integer |
Methods compare :: Integer -> Integer -> Ordering Source # (<) :: Integer -> Integer -> Bool Source # (<=) :: Integer -> Integer -> Bool Source # (>) :: Integer -> Integer -> Bool Source # (>=) :: Integer -> Integer -> Bool Source # max :: Integer -> Integer -> Integer Source # min :: Integer -> Integer -> Integer Source #
Read Integer # | Since: 2.1
Methods readsPrec :: Int -> ReadS Integer # readList :: ReadS [Integer] # readPrec :: ReadPrec Integer # readListPrec :: ReadPrec [Integer] #
Real Integer # | Since: 2.0.1
Methods toRational :: Integer -> Rational #
Show Integer # | Since: 2.1
Methods showsPrec :: Int -> Integer -> ShowS # show :: Integer -> String # showList :: [Integer] -> ShowS #
Ix Integer # | Since: 2.1
Methods range :: (Integer, Integer) -> [Integer] # index :: (Integer, Integer) -> Integer -> Int # unsafeIndex :: (Integer, Integer) -> Integer -> Int inRange :: (Integer, Integer) -> Integer -> Bool # rangeSize :: (Integer, Integer) -> Int # unsafeRangeSize :: (Integer, Integer) -> Int
Bits Integer # | Since: 2.1

Methods

(.&.) :: Integer -> Integer -> Integer #

(.|.) :: Integer -> Integer -> Integer #

xor :: Integer -> Integer -> Integer #

complement :: Integer -> Integer #

shift :: Integer -> Int -> Integer #

rotate :: Integer -> Int -> Integer #

zeroBits :: Integer #

bit :: Int -> Integer #

setBit :: Integer -> Int -> Integer #

clearBit :: Integer -> Int -> Integer #

complementBit :: Integer -> Int -> Integer #

testBit :: Integer -> Int -> Bool #

bitSizeMaybe :: Integer -> Maybe Int #

bitSize :: Integer -> Int #

isSigned :: Integer -> Bool #

shiftL :: Integer -> Int -> Integer #

unsafeShiftL :: Integer -> Int -> Integer #

shiftR :: Integer -> Int -> Integer #

unsafeShiftR :: Integer -> Int -> Integer #

rotateL :: Integer -> Int -> Integer #

rotateR :: Integer -> Int -> Integer #

popCount :: Integer -> Int #

PrintfArg Integer # | Since: 2.1
Methods formatArg :: Integer -> FieldFormatter # parseFormat :: Integer -> ModifierParser #

data Float :: * Source #

Single-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE single-precision type.

Instances

Eq Float |
Methods (==) :: Float -> Float -> Bool Source # (/=) :: Float -> Float -> Bool Source #
Floating Float # | Since: 2.1

Methods

pi :: Float #

exp :: Float -> Float #

log :: Float -> Float #

sqrt :: Float -> Float #

(**) :: Float -> Float -> Float #

logBase :: Float -> Float -> Float #

sin :: Float -> Float #

cos :: Float -> Float #

tan :: Float -> Float #

asin :: Float -> Float #

acos :: Float -> Float #

atan :: Float -> Float #

sinh :: Float -> Float #

cosh :: Float -> Float #

tanh :: Float -> Float #

asinh :: Float -> Float #

acosh :: Float -> Float #

atanh :: Float -> Float #

log1p :: Float -> Float #

expm1 :: Float -> Float #

log1pexp :: Float -> Float #

log1mexp :: Float -> Float #

Data Float # | Since: 4.0.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Float -> c Float #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Float #

toConstr :: Float -> Constr #

dataTypeOf :: Float -> DataType #

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

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

gmapT :: (forall b. Data b => b -> b) -> Float -> Float #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Float -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Float -> r #

gmapQ :: (forall d. Data d => d -> u) -> Float -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Float -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Float -> m Float #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Float -> m Float #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Float -> m Float #

Ord Float |
Methods compare :: Float -> Float -> Ordering Source # (<) :: Float -> Float -> Bool Source # (<=) :: Float -> Float -> Bool Source # (>) :: Float -> Float -> Bool Source # (>=) :: Float -> Float -> Bool Source # max :: Float -> Float -> Float Source # min :: Float -> Float -> Float Source #
Read Float # | Since: 2.1
Methods readsPrec :: Int -> ReadS Float # readList :: ReadS [Float] # readPrec :: ReadPrec Float # readListPrec :: ReadPrec [Float] #
RealFloat Float # | Since: 2.1

Methods

floatRadix :: Float -> Integer #

floatDigits :: Float -> Int #

floatRange :: Float -> (Int, Int) #

decodeFloat :: Float -> (Integer, Int) #

encodeFloat :: Integer -> Int -> Float #

exponent :: Float -> Int #

significand :: Float -> Float #

scaleFloat :: Int -> Float -> Float #

isNaN :: Float -> Bool #

isInfinite :: Float -> Bool #

isDenormalized :: Float -> Bool #

isNegativeZero :: Float -> Bool #

isIEEE :: Float -> Bool #

atan2 :: Float -> Float -> Float #

Storable Float # | Since: 2.1
Methods sizeOf :: Float -> Int # alignment :: Float -> Int # peekElemOff :: Ptr Float -> Int -> IO Float # pokeElemOff :: Ptr Float -> Int -> Float -> IO () # peekByteOff :: Ptr b -> Int -> IO Float # pokeByteOff :: Ptr b -> Int -> Float -> IO () # peek :: Ptr Float -> IO Float # poke :: Ptr Float -> Float -> IO () #
PrintfArg Float # | Since: 2.1
Methods formatArg :: Float -> FieldFormatter # parseFormat :: Float -> ModifierParser #
Generic1 k (URec k Float) # |
Associated Types type Rep1 (URec k Float) (f :: URec k Float -> *) :: k -> * # Methods from1 :: f a -> Rep1 (URec k Float) f a # to1 :: Rep1 (URec k Float) f a -> f a #
Functor (URec * Float) # |
Methods fmap :: (a -> b) -> URec * Float a -> URec * Float b # (<$) :: a -> URec * Float b -> URec * Float a #
Foldable (URec * Float) # |

Methods

fold :: Monoid m => URec * Float m -> m #

foldMap :: Monoid m => (a -> m) -> URec * Float a -> m #

foldr :: (a -> b -> b) -> b -> URec * Float a -> b #

foldr' :: (a -> b -> b) -> b -> URec * Float a -> b #

foldl :: (b -> a -> b) -> b -> URec * Float a -> b #

foldl' :: (b -> a -> b) -> b -> URec * Float a -> b #

foldr1 :: (a -> a -> a) -> URec * Float a -> a #

foldl1 :: (a -> a -> a) -> URec * Float a -> a #

toList :: URec * Float a -> [a] #

null :: URec * Float a -> Bool #

length :: URec * Float a -> Int #

elem :: Eq a => a -> URec * Float a -> Bool #

maximum :: Ord a => URec * Float a -> a #

minimum :: Ord a => URec * Float a -> a #

sum :: Num a => URec * Float a -> a #

product :: Num a => URec * Float a -> a #

Traversable (URec * Float) # |
Methods traverse :: Applicative f => (a -> f b) -> URec * Float a -> f (URec * Float b) # sequenceA :: Applicative f => URec * Float (f a) -> f (URec * Float a) # mapM :: Monad m => (a -> m b) -> URec * Float a -> m (URec * Float b) # sequence :: Monad m => URec * Float (m a) -> m (URec * Float a) #
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 #
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 #

Show (URec k Float p) # |
Methods showsPrec :: Int -> URec k Float p -> ShowS # show :: URec k Float p -> String # showList :: [URec k Float p] -> ShowS #
Generic (URec k Float p) # |
Associated Types type Rep (URec k Float p) :: * -> * # Methods from :: URec k Float p -> Rep (URec k Float p) x # to :: Rep (URec k Float p) x -> URec k Float p #
data URec k Float # | Used for marking occurrences of `Float#` Since: 4.9.0.0

data URec k Float = UFloat {

- uFloat# :: Float#

}

type Rep1 k (URec k Float) # |
type Rep1 k (URec k Float) = D1 k (MetaData "URec" "GHC.Generics" "base" False) (C1 k (MetaCons "UFloat" PrefixI True) (S1 k (MetaSel (Just Symbol "uFloat#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UFloat k)))
type Rep (URec k Float p) # |
type Rep (URec k Float p) = D1 * (MetaData "URec" "GHC.Generics" "base" False) (C1 * (MetaCons "UFloat" PrefixI True) (S1 * (MetaSel (Just Symbol "uFloat#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UFloat *)))

data Double :: * Source #

Double-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE double-precision type.

Instances

Eq Double |
Methods (==) :: Double -> Double -> Bool Source # (/=) :: Double -> Double -> Bool Source #
Floating Double # | Since: 2.1

Methods

pi :: Double #

exp :: Double -> Double #

log :: Double -> Double #

sqrt :: Double -> Double #

(**) :: Double -> Double -> Double #

logBase :: Double -> Double -> Double #

sin :: Double -> Double #

cos :: Double -> Double #

tan :: Double -> Double #

asin :: Double -> Double #

acos :: Double -> Double #

atan :: Double -> Double #

sinh :: Double -> Double #

cosh :: Double -> Double #

tanh :: Double -> Double #

asinh :: Double -> Double #

acosh :: Double -> Double #

atanh :: Double -> Double #

log1p :: Double -> Double #

expm1 :: Double -> Double #

log1pexp :: Double -> Double #

log1mexp :: Double -> Double #

Data Double # | Since: 4.0.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Double -> c Double #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Double #

toConstr :: Double -> Constr #

dataTypeOf :: Double -> DataType #

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

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

gmapT :: (forall b. Data b => b -> b) -> Double -> Double #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Double -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Double -> r #

gmapQ :: (forall d. Data d => d -> u) -> Double -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Double -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Double -> m Double #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Double -> m Double #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Double -> m Double #

Ord Double |
Methods compare :: Double -> Double -> Ordering Source # (<) :: Double -> Double -> Bool Source # (<=) :: Double -> Double -> Bool Source # (>) :: Double -> Double -> Bool Source # (>=) :: Double -> Double -> Bool Source # max :: Double -> Double -> Double Source # min :: Double -> Double -> Double Source #
Read Double # | Since: 2.1
Methods readsPrec :: Int -> ReadS Double # readList :: ReadS [Double] # readPrec :: ReadPrec Double # readListPrec :: ReadPrec [Double] #
RealFloat Double # | Since: 2.1

Methods

floatRadix :: Double -> Integer #

floatDigits :: Double -> Int #

floatRange :: Double -> (Int, Int) #

decodeFloat :: Double -> (Integer, Int) #

encodeFloat :: Integer -> Int -> Double #

exponent :: Double -> Int #

significand :: Double -> Double #

scaleFloat :: Int -> Double -> Double #

isNaN :: Double -> Bool #

isInfinite :: Double -> Bool #

isDenormalized :: Double -> Bool #

isNegativeZero :: Double -> Bool #

isIEEE :: Double -> Bool #

atan2 :: Double -> Double -> Double #

Storable Double # | Since: 2.1
Methods sizeOf :: Double -> Int # alignment :: Double -> Int # peekElemOff :: Ptr Double -> Int -> IO Double # pokeElemOff :: Ptr Double -> Int -> Double -> IO () # peekByteOff :: Ptr b -> Int -> IO Double # pokeByteOff :: Ptr b -> Int -> Double -> IO () # peek :: Ptr Double -> IO Double # poke :: Ptr Double -> Double -> IO () #
PrintfArg Double # | Since: 2.1
Methods formatArg :: Double -> FieldFormatter # parseFormat :: Double -> ModifierParser #
Generic1 k (URec k Double) # |
Associated Types type Rep1 (URec k Double) (f :: URec k Double -> *) :: k -> * # Methods from1 :: f a -> Rep1 (URec k Double) f a # to1 :: Rep1 (URec k Double) f a -> f a #
Functor (URec * Double) # |
Methods fmap :: (a -> b) -> URec * Double a -> URec * Double b # (<$) :: a -> URec * Double b -> URec * Double a #
Foldable (URec * Double) # |

Methods

fold :: Monoid m => URec * Double m -> m #

foldMap :: Monoid m => (a -> m) -> URec * Double a -> m #

foldr :: (a -> b -> b) -> b -> URec * Double a -> b #

foldr' :: (a -> b -> b) -> b -> URec * Double a -> b #

foldl :: (b -> a -> b) -> b -> URec * Double a -> b #

foldl' :: (b -> a -> b) -> b -> URec * Double a -> b #

foldr1 :: (a -> a -> a) -> URec * Double a -> a #

foldl1 :: (a -> a -> a) -> URec * Double a -> a #

toList :: URec * Double a -> [a] #

null :: URec * Double a -> Bool #

length :: URec * Double a -> Int #

elem :: Eq a => a -> URec * Double a -> Bool #

maximum :: Ord a => URec * Double a -> a #

minimum :: Ord a => URec * Double a -> a #

sum :: Num a => URec * Double a -> a #

product :: Num a => URec * Double a -> a #

Traversable (URec * Double) # |
Methods traverse :: Applicative f => (a -> f b) -> URec * Double a -> f (URec * Double b) # sequenceA :: Applicative f => URec * Double (f a) -> f (URec * Double a) # mapM :: Monad m => (a -> m b) -> URec * Double a -> m (URec * Double b) # sequence :: Monad m => URec * Double (m a) -> m (URec * Double a) #
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 #
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 #

Show (URec k Double p) # |
Methods showsPrec :: Int -> URec k Double p -> ShowS # show :: URec k Double p -> String # showList :: [URec k Double p] -> ShowS #
Generic (URec k Double p) # |
Associated Types type Rep (URec k Double p) :: * -> * # Methods from :: URec k Double p -> Rep (URec k Double p) x # to :: Rep (URec k Double p) x -> URec k Double p #
data URec k Double # | Used for marking occurrences of `Double#` Since: 4.9.0.0

data URec k Double = UDouble {

- uDouble# :: Double#

}

type Rep1 k (URec k Double) # |
type Rep1 k (URec k Double) = D1 k (MetaData "URec" "GHC.Generics" "base" False) (C1 k (MetaCons "UDouble" PrefixI True) (S1 k (MetaSel (Just Symbol "uDouble#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UDouble k)))
type Rep (URec k Double p) # |
type Rep (URec k Double p) = D1 * (MetaData "URec" "GHC.Generics" "base" False) (C1 * (MetaCons "UDouble" PrefixI True) (S1 * (MetaSel (Just Symbol "uDouble#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UDouble *)))

type Rational = Ratio Integer #

Arbitrary-precision rational numbers, represented as a ratio of two `Integer` values. A rational number may be constructed using the `%` operator.

data Word :: * Source #

A `Word` is an unsigned integral type, with the same size as `Int`.

Instances

Bounded Word # | Since: 2.1
Methods minBound :: Word # maxBound :: Word #
Enum Word # | Since: 2.1
Methods succ :: Word -> Word # pred :: Word -> Word # toEnum :: Int -> Word # fromEnum :: Word -> Int # enumFrom :: Word -> [Word] # enumFromThen :: Word -> Word -> [Word] # enumFromTo :: Word -> Word -> [Word] # enumFromThenTo :: Word -> Word -> Word -> [Word] #
Eq Word |
Methods (==) :: Word -> Word -> Bool Source # (/=) :: Word -> Word -> Bool Source #
Integral Word # | Since: 2.1
Methods quot :: Word -> Word -> Word # rem :: Word -> Word -> Word # div :: Word -> Word -> Word # mod :: Word -> Word -> Word # quotRem :: Word -> Word -> (Word, Word) # divMod :: Word -> Word -> (Word, Word) # toInteger :: Word -> Integer #
Data Word # | Since: 4.0.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word -> c Word #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word #

toConstr :: Word -> Constr #

dataTypeOf :: Word -> DataType #

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

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

gmapT :: (forall b. Data b => b -> b) -> Word -> Word #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word -> r #

gmapQ :: (forall d. Data d => d -> u) -> Word -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Word -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word -> m Word #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word -> m Word #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word -> m Word #

Num Word # | Since: 2.1
Methods (+) :: Word -> Word -> Word # (-) :: Word -> Word -> Word # (*) :: Word -> Word -> Word # negate :: Word -> Word # abs :: Word -> Word # signum :: Word -> Word # fromInteger :: Integer -> Word #
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 #
Read Word # | Since: 4.5.0.0
Methods readsPrec :: Int -> ReadS Word # readList :: ReadS [Word] # readPrec :: ReadPrec Word # readListPrec :: ReadPrec [Word] #
Real Word # | Since: 2.1
Methods toRational :: Word -> Rational #
Show Word # | Since: 2.1
Methods showsPrec :: Int -> Word -> ShowS # show :: Word -> String # showList :: [Word] -> ShowS #
Ix Word # | Since: 4.6.0.0
Methods range :: (Word, Word) -> [Word] # index :: (Word, Word) -> Word -> Int # unsafeIndex :: (Word, Word) -> Word -> Int inRange :: (Word, Word) -> Word -> Bool # rangeSize :: (Word, Word) -> Int # unsafeRangeSize :: (Word, Word) -> Int
FiniteBits Word # | Since: 4.6.0.0
Methods finiteBitSize :: Word -> Int # countLeadingZeros :: Word -> Int # countTrailingZeros :: Word -> Int #
Bits Word # | Since: 2.1

Methods

(.&.) :: Word -> Word -> Word #

(.|.) :: Word -> Word -> Word #

xor :: Word -> Word -> Word #

complement :: Word -> Word #

shift :: Word -> Int -> Word #

rotate :: Word -> Int -> Word #

zeroBits :: Word #

bit :: Int -> Word #

setBit :: Word -> Int -> Word #

clearBit :: Word -> Int -> Word #

complementBit :: Word -> Int -> Word #

testBit :: Word -> Int -> Bool #

bitSizeMaybe :: Word -> Maybe Int #

bitSize :: Word -> Int #

isSigned :: Word -> Bool #

shiftL :: Word -> Int -> Word #

unsafeShiftL :: Word -> Int -> Word #

shiftR :: Word -> Int -> Word #

unsafeShiftR :: Word -> Int -> Word #

rotateL :: Word -> Int -> Word #

rotateR :: Word -> Int -> Word #

popCount :: Word -> Int #

Storable Word # | Since: 2.1
Methods sizeOf :: Word -> Int # alignment :: Word -> Int # peekElemOff :: Ptr Word -> Int -> IO Word # pokeElemOff :: Ptr Word -> Int -> Word -> IO () # peekByteOff :: Ptr b -> Int -> IO Word # pokeByteOff :: Ptr b -> Int -> Word -> IO () # peek :: Ptr Word -> IO Word # poke :: Ptr Word -> Word -> IO () #
PrintfArg Word # | Since: 2.1
Methods formatArg :: Word -> FieldFormatter # parseFormat :: Word -> ModifierParser #
Generic1 k (URec k Word) # |
Associated Types type Rep1 (URec k Word) (f :: URec k Word -> *) :: k -> * # Methods from1 :: f a -> Rep1 (URec k Word) f a # to1 :: Rep1 (URec k Word) f a -> f a #
Functor (URec * Word) # |
Methods fmap :: (a -> b) -> URec * Word a -> URec * Word b # (<$) :: a -> URec * Word b -> URec * Word a #
Foldable (URec * Word) # |

Methods

fold :: Monoid m => URec * Word m -> m #

foldMap :: Monoid m => (a -> m) -> URec * Word a -> m #

foldr :: (a -> b -> b) -> b -> URec * Word a -> b #

foldr' :: (a -> b -> b) -> b -> URec * Word a -> b #

foldl :: (b -> a -> b) -> b -> URec * Word a -> b #

foldl' :: (b -> a -> b) -> b -> URec * Word a -> b #

foldr1 :: (a -> a -> a) -> URec * Word a -> a #

foldl1 :: (a -> a -> a) -> URec * Word a -> a #

toList :: URec * Word a -> [a] #

null :: URec * Word a -> Bool #

length :: URec * Word a -> Int #

elem :: Eq a => a -> URec * Word a -> Bool #

maximum :: Ord a => URec * Word a -> a #

minimum :: Ord a => URec * Word a -> a #

sum :: Num a => URec * Word a -> a #

product :: Num a => URec * Word a -> a #

Traversable (URec * Word) # |
Methods traverse :: Applicative f => (a -> f b) -> URec * Word a -> f (URec * Word b) # sequenceA :: Applicative f => URec * Word (f a) -> f (URec * Word a) # mapM :: Monad m => (a -> m b) -> URec * Word a -> m (URec * Word b) # sequence :: Monad m => URec * Word (m a) -> m (URec * Word a) #
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 #
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 #

Show (URec k Word p) # |
Methods showsPrec :: Int -> URec k Word p -> ShowS # show :: URec k Word p -> String # showList :: [URec k Word p] -> ShowS #
Generic (URec k Word p) # |
Associated Types type Rep (URec k Word p) :: * -> * # Methods from :: URec k Word p -> Rep (URec k Word p) x # to :: Rep (URec k Word p) x -> URec k Word p #
data URec k Word # | Used for marking occurrences of `Word#` Since: 4.9.0.0

data URec k Word = UWord {

- uWord# :: Word#

}

type Rep1 k (URec k Word) # |
type Rep1 k (URec k Word) = D1 k (MetaData "URec" "GHC.Generics" "base" False) (C1 k (MetaCons "UWord" PrefixI True) (S1 k (MetaSel (Just Symbol "uWord#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UWord k)))
type Rep (URec k Word p) # |
type Rep (URec k Word p) = D1 * (MetaData "URec" "GHC.Generics" "base" False) (C1 * (MetaCons "UWord" PrefixI True) (S1 * (MetaSel (Just Symbol "uWord#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UWord *)))

### Numeric type classes

class Num a where #

Basic numeric class.

Minimal complete definition

(+), (*), abs, signum, fromInteger, (negate | (-))

Methods

(+), (-), (*) :: a -> a -> a infixl 7 *infixl 6 +, - #

negate :: a -> a #

Unary negation.

abs :: a -> a #

Absolute value.

signum :: a -> a #

Sign of a number. The functions `abs` and `signum` should satisfy the law:

    abs x * signum x == x

For real numbers, the `signum` is either `-1` (negative), `0` (zero) or `1` (positive).

fromInteger :: Integer -> a #

Conversion from an `Integer`. An integer literal represents the application of the function `fromInteger` to the appropriate value of type `Integer`, so such literals have type `(`Num` a) => a`.

Instances

Num Int # | Since: 2.1
Methods (+) :: Int -> Int -> Int # (-) :: Int -> Int -> Int # (*) :: Int -> Int -> Int # negate :: Int -> Int # abs :: Int -> Int # signum :: Int -> Int # fromInteger :: Integer -> Int #
Num Int8 # | Since: 2.1
Methods (+) :: Int8 -> Int8 -> Int8 # (-) :: Int8 -> Int8 -> Int8 # (*) :: Int8 -> Int8 -> Int8 # negate :: Int8 -> Int8 # abs :: Int8 -> Int8 # signum :: Int8 -> Int8 # fromInteger :: Integer -> Int8 #
Num Int16 # | Since: 2.1
Methods (+) :: Int16 -> Int16 -> Int16 # (-) :: Int16 -> Int16 -> Int16 # (*) :: Int16 -> Int16 -> Int16 # negate :: Int16 -> Int16 # abs :: Int16 -> Int16 # signum :: Int16 -> Int16 # fromInteger :: Integer -> Int16 #
Num Int32 # | Since: 2.1
Methods (+) :: Int32 -> Int32 -> Int32 # (-) :: Int32 -> Int32 -> Int32 # (*) :: Int32 -> Int32 -> Int32 # negate :: Int32 -> Int32 # abs :: Int32 -> Int32 # signum :: Int32 -> Int32 # fromInteger :: Integer -> Int32 #
Num Int64 # | Since: 2.1
Methods (+) :: Int64 -> Int64 -> Int64 # (-) :: Int64 -> Int64 -> Int64 # (*) :: Int64 -> Int64 -> Int64 # negate :: Int64 -> Int64 # abs :: Int64 -> Int64 # signum :: Int64 -> Int64 # fromInteger :: Integer -> Int64 #
Num Integer # | Since: 2.1
Methods (+) :: Integer -> Integer -> Integer # (-) :: Integer -> Integer -> Integer # (*) :: Integer -> Integer -> Integer # negate :: Integer -> Integer # abs :: Integer -> Integer # signum :: Integer -> Integer # fromInteger :: Integer -> Integer #
Num Natural # | Since: 4.8.0.0
Methods (+) :: Natural -> Natural -> Natural # (-) :: Natural -> Natural -> Natural # (*) :: Natural -> Natural -> Natural # negate :: Natural -> Natural # abs :: Natural -> Natural # signum :: Natural -> Natural # fromInteger :: Integer -> Natural #
Num Word # | Since: 2.1
Methods (+) :: Word -> Word -> Word # (-) :: Word -> Word -> Word # (*) :: Word -> Word -> Word # negate :: Word -> Word # abs :: Word -> Word # signum :: Word -> Word # fromInteger :: Integer -> Word #
Num Word8 # | Since: 2.1
Methods (+) :: Word8 -> Word8 -> Word8 # (-) :: Word8 -> Word8 -> Word8 # (*) :: Word8 -> Word8 -> Word8 # negate :: Word8 -> Word8 # abs :: Word8 -> Word8 # signum :: Word8 -> Word8 # fromInteger :: Integer -> Word8 #
Num Word16 # | Since: 2.1
Methods (+) :: Word16 -> Word16 -> Word16 # (-) :: Word16 -> Word16 -> Word16 # (*) :: Word16 -> Word16 -> Word16 # negate :: Word16 -> Word16 # abs :: Word16 -> Word16 # signum :: Word16 -> Word16 # fromInteger :: Integer -> Word16 #
Num Word32 # | Since: 2.1
Methods (+) :: Word32 -> Word32 -> Word32 # (-) :: Word32 -> Word32 -> Word32 # (*) :: Word32 -> Word32 -> Word32 # negate :: Word32 -> Word32 # abs :: Word32 -> Word32 # signum :: Word32 -> Word32 # fromInteger :: Integer -> Word32 #
Num Word64 # | Since: 2.1
Methods (+) :: Word64 -> Word64 -> Word64 # (-) :: Word64 -> Word64 -> Word64 # (*) :: Word64 -> Word64 -> Word64 # negate :: Word64 -> Word64 # abs :: Word64 -> Word64 # signum :: Word64 -> Word64 # fromInteger :: Integer -> Word64 #
Num IntPtr # |
Methods (+) :: IntPtr -> IntPtr -> IntPtr # (-) :: IntPtr -> IntPtr -> IntPtr # (*) :: IntPtr -> IntPtr -> IntPtr # negate :: IntPtr -> IntPtr # abs :: IntPtr -> IntPtr # signum :: IntPtr -> IntPtr # fromInteger :: Integer -> IntPtr #
Num WordPtr # |
Methods (+) :: WordPtr -> WordPtr -> WordPtr # (-) :: WordPtr -> WordPtr -> WordPtr # (*) :: WordPtr -> WordPtr -> WordPtr # negate :: WordPtr -> WordPtr # abs :: WordPtr -> WordPtr # signum :: WordPtr -> WordPtr # fromInteger :: Integer -> WordPtr #
Num CUIntMax # |
Methods (+) :: CUIntMax -> CUIntMax -> CUIntMax # (-) :: CUIntMax -> CUIntMax -> CUIntMax # (*) :: CUIntMax -> CUIntMax -> CUIntMax # negate :: CUIntMax -> CUIntMax # abs :: CUIntMax -> CUIntMax # signum :: CUIntMax -> CUIntMax # fromInteger :: Integer -> CUIntMax #
Num CIntMax # |
Methods (+) :: CIntMax -> CIntMax -> CIntMax # (-) :: CIntMax -> CIntMax -> CIntMax # (*) :: CIntMax -> CIntMax -> CIntMax # negate :: CIntMax -> CIntMax # abs :: CIntMax -> CIntMax # signum :: CIntMax -> CIntMax # fromInteger :: Integer -> CIntMax #
Num CUIntPtr # |
Methods (+) :: CUIntPtr -> CUIntPtr -> CUIntPtr # (-) :: CUIntPtr -> CUIntPtr -> CUIntPtr # (*) :: CUIntPtr -> CUIntPtr -> CUIntPtr # negate :: CUIntPtr -> CUIntPtr # abs :: CUIntPtr -> CUIntPtr # signum :: CUIntPtr -> CUIntPtr # fromInteger :: Integer -> CUIntPtr #
Num CIntPtr # |
Methods (+) :: CIntPtr -> CIntPtr -> CIntPtr # (-) :: CIntPtr -> CIntPtr -> CIntPtr # (*) :: CIntPtr -> CIntPtr -> CIntPtr # negate :: CIntPtr -> CIntPtr # abs :: CIntPtr -> CIntPtr # signum :: CIntPtr -> CIntPtr # fromInteger :: Integer -> CIntPtr #
Num CSUSeconds # |
Methods (+) :: CSUSeconds -> CSUSeconds -> CSUSeconds # (-) :: CSUSeconds -> CSUSeconds -> CSUSeconds # (*) :: CSUSeconds -> CSUSeconds -> CSUSeconds # negate :: CSUSeconds -> CSUSeconds # abs :: CSUSeconds -> CSUSeconds # signum :: CSUSeconds -> CSUSeconds # fromInteger :: Integer -> CSUSeconds #
Num CUSeconds # |
Methods (+) :: CUSeconds -> CUSeconds -> CUSeconds # (-) :: CUSeconds -> CUSeconds -> CUSeconds # (*) :: CUSeconds -> CUSeconds -> CUSeconds # negate :: CUSeconds -> CUSeconds # abs :: CUSeconds -> CUSeconds # signum :: CUSeconds -> CUSeconds # fromInteger :: Integer -> CUSeconds #
Num CTime # |
Methods (+) :: CTime -> CTime -> CTime # (-) :: CTime -> CTime -> CTime # (*) :: CTime -> CTime -> CTime # negate :: CTime -> CTime # abs :: CTime -> CTime # signum :: CTime -> CTime # fromInteger :: Integer -> CTime #
Num CClock # |
Methods (+) :: CClock -> CClock -> CClock # (-) :: CClock -> CClock -> CClock # (*) :: CClock -> CClock -> CClock # negate :: CClock -> CClock # abs :: CClock -> CClock # signum :: CClock -> CClock # fromInteger :: Integer -> CClock #
Num CSigAtomic # |
Methods (+) :: CSigAtomic -> CSigAtomic -> CSigAtomic # (-) :: CSigAtomic -> CSigAtomic -> CSigAtomic # (*) :: CSigAtomic -> CSigAtomic -> CSigAtomic # negate :: CSigAtomic -> CSigAtomic # abs :: CSigAtomic -> CSigAtomic # signum :: CSigAtomic -> CSigAtomic # fromInteger :: Integer -> CSigAtomic #
Num CWchar # |
Methods (+) :: CWchar -> CWchar -> CWchar # (-) :: CWchar -> CWchar -> CWchar # (*) :: CWchar -> CWchar -> CWchar # negate :: CWchar -> CWchar # abs :: CWchar -> CWchar # signum :: CWchar -> CWchar # fromInteger :: Integer -> CWchar #
Num CSize # |
Methods (+) :: CSize -> CSize -> CSize # (-) :: CSize -> CSize -> CSize # (*) :: CSize -> CSize -> CSize # negate :: CSize -> CSize # abs :: CSize -> CSize # signum :: CSize -> CSize # fromInteger :: Integer -> CSize #
Num CPtrdiff # |
Methods (+) :: CPtrdiff -> CPtrdiff -> CPtrdiff # (-) :: CPtrdiff -> CPtrdiff -> CPtrdiff # (*) :: CPtrdiff -> CPtrdiff -> CPtrdiff # negate :: CPtrdiff -> CPtrdiff # abs :: CPtrdiff -> CPtrdiff # signum :: CPtrdiff -> CPtrdiff # fromInteger :: Integer -> CPtrdiff #
Num CDouble # |
Methods (+) :: CDouble -> CDouble -> CDouble # (-) :: CDouble -> CDouble -> CDouble # (*) :: CDouble -> CDouble -> CDouble # negate :: CDouble -> CDouble # abs :: CDouble -> CDouble # signum :: CDouble -> CDouble # fromInteger :: Integer -> CDouble #
Num CFloat # |
Methods (+) :: CFloat -> CFloat -> CFloat # (-) :: CFloat -> CFloat -> CFloat # (*) :: CFloat -> CFloat -> CFloat # negate :: CFloat -> CFloat # abs :: CFloat -> CFloat # signum :: CFloat -> CFloat # fromInteger :: Integer -> CFloat #
Num CBool # |
Methods (+) :: CBool -> CBool -> CBool # (-) :: CBool -> CBool -> CBool # (*) :: CBool -> CBool -> CBool # negate :: CBool -> CBool # abs :: CBool -> CBool # signum :: CBool -> CBool # fromInteger :: Integer -> CBool #
Num CULLong # |
Methods (+) :: CULLong -> CULLong -> CULLong # (-) :: CULLong -> CULLong -> CULLong # (*) :: CULLong -> CULLong -> CULLong # negate :: CULLong -> CULLong # abs :: CULLong -> CULLong # signum :: CULLong -> CULLong # fromInteger :: Integer -> CULLong #
Num CLLong # |
Methods (+) :: CLLong -> CLLong -> CLLong # (-) :: CLLong -> CLLong -> CLLong # (*) :: CLLong -> CLLong -> CLLong # negate :: CLLong -> CLLong # abs :: CLLong -> CLLong # signum :: CLLong -> CLLong # fromInteger :: Integer -> CLLong #
Num CULong # |
Methods (+) :: CULong -> CULong -> CULong # (-) :: CULong -> CULong -> CULong # (*) :: CULong -> CULong -> CULong # negate :: CULong -> CULong # abs :: CULong -> CULong # signum :: CULong -> CULong # fromInteger :: Integer -> CULong #
Num CLong # |
Methods (+) :: CLong -> CLong -> CLong # (-) :: CLong -> CLong -> CLong # (*) :: CLong -> CLong -> CLong # negate :: CLong -> CLong # abs :: CLong -> CLong # signum :: CLong -> CLong # fromInteger :: Integer -> CLong #
Num CUInt # |
Methods (+) :: CUInt -> CUInt -> CUInt # (-) :: CUInt -> CUInt -> CUInt # (*) :: CUInt -> CUInt -> CUInt # negate :: CUInt -> CUInt # abs :: CUInt -> CUInt # signum :: CUInt -> CUInt # fromInteger :: Integer -> CUInt #
Num CInt # |
Methods (+) :: CInt -> CInt -> CInt # (-) :: CInt -> CInt -> CInt # (*) :: CInt -> CInt -> CInt # negate :: CInt -> CInt # abs :: CInt -> CInt # signum :: CInt -> CInt # fromInteger :: Integer -> CInt #
Num CUShort # |
Methods (+) :: CUShort -> CUShort -> CUShort # (-) :: CUShort -> CUShort -> CUShort # (*) :: CUShort -> CUShort -> CUShort # negate :: CUShort -> CUShort # abs :: CUShort -> CUShort # signum :: CUShort -> CUShort # fromInteger :: Integer -> CUShort #
Num CShort # |
Methods (+) :: CShort -> CShort -> CShort # (-) :: CShort -> CShort -> CShort # (*) :: CShort -> CShort -> CShort # negate :: CShort -> CShort # abs :: CShort -> CShort # signum :: CShort -> CShort # fromInteger :: Integer -> CShort #
Num CUChar # |
Methods (+) :: CUChar -> CUChar -> CUChar # (-) :: CUChar -> CUChar -> CUChar # (*) :: CUChar -> CUChar -> CUChar # negate :: CUChar -> CUChar # abs :: CUChar -> CUChar # signum :: CUChar -> CUChar # fromInteger :: Integer -> CUChar #
Num CSChar # |
Methods (+) :: CSChar -> CSChar -> CSChar # (-) :: CSChar -> CSChar -> CSChar # (*) :: CSChar -> CSChar -> CSChar # negate :: CSChar -> CSChar # abs :: CSChar -> CSChar # signum :: CSChar -> CSChar # fromInteger :: Integer -> CSChar #
Num CChar # |
Methods (+) :: CChar -> CChar -> CChar # (-) :: CChar -> CChar -> CChar # (*) :: CChar -> CChar -> CChar # negate :: CChar -> CChar # abs :: CChar -> CChar # signum :: CChar -> CChar # fromInteger :: Integer -> CChar #
Num Fd # |
Methods (+) :: Fd -> Fd -> Fd # (-) :: Fd -> Fd -> Fd # (*) :: Fd -> Fd -> Fd # negate :: Fd -> Fd # abs :: Fd -> Fd # signum :: Fd -> Fd # fromInteger :: Integer -> Fd #
Num CKey # |
Methods (+) :: CKey -> CKey -> CKey # (-) :: CKey -> CKey -> CKey # (*) :: CKey -> CKey -> CKey # negate :: CKey -> CKey # abs :: CKey -> CKey # signum :: CKey -> CKey # fromInteger :: Integer -> CKey #
Num CId # |
Methods (+) :: CId -> CId -> CId # (-) :: CId -> CId -> CId # (*) :: CId -> CId -> CId # negate :: CId -> CId # abs :: CId -> CId # signum :: CId -> CId # fromInteger :: Integer -> CId #
Num CFsFilCnt # |
Methods (+) :: CFsFilCnt -> CFsFilCnt -> CFsFilCnt # (-) :: CFsFilCnt -> CFsFilCnt -> CFsFilCnt # (*) :: CFsFilCnt -> CFsFilCnt -> CFsFilCnt # negate :: CFsFilCnt -> CFsFilCnt # abs :: CFsFilCnt -> CFsFilCnt # signum :: CFsFilCnt -> CFsFilCnt # fromInteger :: Integer -> CFsFilCnt #
Num CFsBlkCnt # |
Methods (+) :: CFsBlkCnt -> CFsBlkCnt -> CFsBlkCnt # (-) :: CFsBlkCnt -> CFsBlkCnt -> CFsBlkCnt # (*) :: CFsBlkCnt -> CFsBlkCnt -> CFsBlkCnt # negate :: CFsBlkCnt -> CFsBlkCnt # abs :: CFsBlkCnt -> CFsBlkCnt # signum :: CFsBlkCnt -> CFsBlkCnt # fromInteger :: Integer -> CFsBlkCnt #
Num CClockId # |
Methods (+) :: CClockId -> CClockId -> CClockId # (-) :: CClockId -> CClockId -> CClockId # (*) :: CClockId -> CClockId -> CClockId # negate :: CClockId -> CClockId # abs :: CClockId -> CClockId # signum :: CClockId -> CClockId # fromInteger :: Integer -> CClockId #
Num CBlkCnt # |
Methods (+) :: CBlkCnt -> CBlkCnt -> CBlkCnt # (-) :: CBlkCnt -> CBlkCnt -> CBlkCnt # (*) :: CBlkCnt -> CBlkCnt -> CBlkCnt # negate :: CBlkCnt -> CBlkCnt # abs :: CBlkCnt -> CBlkCnt # signum :: CBlkCnt -> CBlkCnt # fromInteger :: Integer -> CBlkCnt #
Num CBlkSize # |
Methods (+) :: CBlkSize -> CBlkSize -> CBlkSize # (-) :: CBlkSize -> CBlkSize -> CBlkSize # (*) :: CBlkSize -> CBlkSize -> CBlkSize # negate :: CBlkSize -> CBlkSize # abs :: CBlkSize -> CBlkSize # signum :: CBlkSize -> CBlkSize # fromInteger :: Integer -> CBlkSize #
Num CRLim # |
Methods (+) :: CRLim -> CRLim -> CRLim # (-) :: CRLim -> CRLim -> CRLim # (*) :: CRLim -> CRLim -> CRLim # negate :: CRLim -> CRLim # abs :: CRLim -> CRLim # signum :: CRLim -> CRLim # fromInteger :: Integer -> CRLim #
Num CTcflag # |
Methods (+) :: CTcflag -> CTcflag -> CTcflag # (-) :: CTcflag -> CTcflag -> CTcflag # (*) :: CTcflag -> CTcflag -> CTcflag # negate :: CTcflag -> CTcflag # abs :: CTcflag -> CTcflag # signum :: CTcflag -> CTcflag # fromInteger :: Integer -> CTcflag #
Num CSpeed # |
Methods (+) :: CSpeed -> CSpeed -> CSpeed # (-) :: CSpeed -> CSpeed -> CSpeed # (*) :: CSpeed -> CSpeed -> CSpeed # negate :: CSpeed -> CSpeed # abs :: CSpeed -> CSpeed # signum :: CSpeed -> CSpeed # fromInteger :: Integer -> CSpeed #
Num CCc # |
Methods (+) :: CCc -> CCc -> CCc # (-) :: CCc -> CCc -> CCc # (*) :: CCc -> CCc -> CCc # negate :: CCc -> CCc # abs :: CCc -> CCc # signum :: CCc -> CCc # fromInteger :: Integer -> CCc #
Num CUid # |
Methods (+) :: CUid -> CUid -> CUid # (-) :: CUid -> CUid -> CUid # (*) :: CUid -> CUid -> CUid # negate :: CUid -> CUid # abs :: CUid -> CUid # signum :: CUid -> CUid # fromInteger :: Integer -> CUid #
Num CNlink # |
Methods (+) :: CNlink -> CNlink -> CNlink # (-) :: CNlink -> CNlink -> CNlink # (*) :: CNlink -> CNlink -> CNlink # negate :: CNlink -> CNlink # abs :: CNlink -> CNlink # signum :: CNlink -> CNlink # fromInteger :: Integer -> CNlink #
Num CGid # |
Methods (+) :: CGid -> CGid -> CGid # (-) :: CGid -> CGid -> CGid # (*) :: CGid -> CGid -> CGid # negate :: CGid -> CGid # abs :: CGid -> CGid # signum :: CGid -> CGid # fromInteger :: Integer -> CGid #
Num CSsize # |
Methods (+) :: CSsize -> CSsize -> CSsize # (-) :: CSsize -> CSsize -> CSsize # (*) :: CSsize -> CSsize -> CSsize # negate :: CSsize -> CSsize # abs :: CSsize -> CSsize # signum :: CSsize -> CSsize # fromInteger :: Integer -> CSsize #
Num CPid # |
Methods (+) :: CPid -> CPid -> CPid # (-) :: CPid -> CPid -> CPid # (*) :: CPid -> CPid -> CPid # negate :: CPid -> CPid # abs :: CPid -> CPid # signum :: CPid -> CPid # fromInteger :: Integer -> CPid #
Num COff # |
Methods (+) :: COff -> COff -> COff # (-) :: COff -> COff -> COff # (*) :: COff -> COff -> COff # negate :: COff -> COff # abs :: COff -> COff # signum :: COff -> COff # fromInteger :: Integer -> COff #
Num CMode # |
Methods (+) :: CMode -> CMode -> CMode # (-) :: CMode -> CMode -> CMode # (*) :: CMode -> CMode -> CMode # negate :: CMode -> CMode # abs :: CMode -> CMode # signum :: CMode -> CMode # fromInteger :: Integer -> CMode #
Num CIno # |
Methods (+) :: CIno -> CIno -> CIno # (-) :: CIno -> CIno -> CIno # (*) :: CIno -> CIno -> CIno # negate :: CIno -> CIno # abs :: CIno -> CIno # signum :: CIno -> CIno # fromInteger :: Integer -> CIno #
Num CDev # |
Methods (+) :: CDev -> CDev -> CDev # (-) :: CDev -> CDev -> CDev # (*) :: CDev -> CDev -> CDev # negate :: CDev -> CDev # abs :: CDev -> CDev # signum :: CDev -> CDev # fromInteger :: Integer -> CDev #
Integral a => Num (Ratio a) # | Since: 2.0.1
Methods (+) :: Ratio a -> Ratio a -> Ratio a # (-) :: Ratio a -> Ratio a -> Ratio a # (*) :: Ratio a -> Ratio a -> Ratio a # negate :: Ratio a -> Ratio a # abs :: Ratio a -> Ratio a # signum :: Ratio a -> Ratio a # fromInteger :: Integer -> Ratio a #
Num a => Num (Product a) # |
Methods (+) :: Product a -> Product a -> Product a # (-) :: Product a -> Product a -> Product a # (*) :: Product a -> Product a -> Product a # negate :: Product a -> Product a # abs :: Product a -> Product a # signum :: Product a -> Product a # fromInteger :: Integer -> Product a #
Num a => Num (Sum a) # |
Methods (+) :: Sum a -> Sum a -> Sum a # (-) :: Sum a -> Sum a -> Sum a # (*) :: Sum a -> Sum a -> Sum a # negate :: Sum a -> Sum a # abs :: Sum a -> Sum a # signum :: Sum a -> Sum a # fromInteger :: Integer -> Sum a #
Num a => Num (Identity a) # |
Methods (+) :: Identity a -> Identity a -> Identity a # (-) :: Identity a -> Identity a -> Identity a # (*) :: Identity a -> Identity a -> Identity a # negate :: Identity a -> Identity a # abs :: Identity a -> Identity a # signum :: Identity a -> Identity a # fromInteger :: Integer -> Identity a #
Num a => Num (Max a) # | Since: 4.9.0.0
Methods (+) :: Max a -> Max a -> Max a # (-) :: Max a -> Max a -> Max a # (*) :: Max a -> Max a -> Max a # negate :: Max a -> Max a # abs :: Max a -> Max a # signum :: Max a -> Max a # fromInteger :: Integer -> Max a #
Num a => Num (Min a) # | Since: 4.9.0.0
Methods (+) :: Min a -> Min a -> Min a # (-) :: Min a -> Min a -> Min a # (*) :: Min a -> Min a -> Min a # negate :: Min a -> Min a # abs :: Min a -> Min a # signum :: Min a -> Min a # fromInteger :: Integer -> Min a #
HasResolution a => Num (Fixed a) # | Since: 2.1
Methods (+) :: Fixed a -> Fixed a -> Fixed a # (-) :: Fixed a -> Fixed a -> Fixed a # (*) :: Fixed a -> Fixed a -> Fixed a # negate :: Fixed a -> Fixed a # abs :: Fixed a -> Fixed a # signum :: Fixed a -> Fixed a # fromInteger :: Integer -> Fixed a #
RealFloat a => Num (Complex a) # | Since: 2.1
Methods (+) :: Complex a -> Complex a -> Complex a # (-) :: Complex a -> Complex a -> Complex a # (*) :: Complex a -> Complex a -> Complex a # negate :: Complex a -> Complex a # abs :: Complex a -> Complex a # signum :: Complex a -> Complex a # fromInteger :: Integer -> Complex a #
Num (f a) => Num (Alt k f a) # |
Methods (+) :: Alt k f a -> Alt k f a -> Alt k f a # (-) :: Alt k f a -> Alt k f a -> Alt k f a # (*) :: Alt k f a -> Alt k f a -> Alt k f a # negate :: Alt k f a -> Alt k f a # abs :: Alt k f a -> Alt k f a # signum :: Alt k f a -> Alt k f a # fromInteger :: Integer -> Alt k f a #
Num a => Num (Const k a b) # |
Methods (+) :: Const k a b -> Const k a b -> Const k a b # (-) :: Const k a b -> Const k a b -> Const k a b # (*) :: Const k a b -> Const k a b -> Const k a b # negate :: Const k a b -> Const k a b # abs :: Const k a b -> Const k a b # signum :: Const k a b -> Const k a b # fromInteger :: Integer -> Const k a b #

class (Num a, Ord a) => Real a where #

Minimal complete definition

toRational

Methods

toRational :: a -> Rational #

the rational equivalent of its real argument with full precision

Instances

Real Int # | Since: 2.0.1
Methods toRational :: Int -> Rational #
Real Int8 # | Since: 2.1
Methods toRational :: Int8 -> Rational #
Real Int16 # | Since: 2.1
Methods toRational :: Int16 -> Rational #
Real Int32 # | Since: 2.1
Methods toRational :: Int32 -> Rational #
Real Int64 # | Since: 2.1
Methods toRational :: Int64 -> Rational #
Real Integer # | Since: 2.0.1
Methods toRational :: Integer -> Rational #
Real Natural # | Since: 4.8.0.0
Methods toRational :: Natural -> Rational #
Real Word # | Since: 2.1
Methods toRational :: Word -> Rational #
Real Word8 # | Since: 2.1
Methods toRational :: Word8 -> Rational #
Real Word16 # | Since: 2.1
Methods toRational :: Word16 -> Rational #
Real Word32 # | Since: 2.1
Methods toRational :: Word32 -> Rational #
Real Word64 # | Since: 2.1
Methods toRational :: Word64 -> Rational #
Real IntPtr # |
Methods toRational :: IntPtr -> Rational #
Real WordPtr # |
Methods toRational :: WordPtr -> Rational #
Real CUIntMax # |
Methods toRational :: CUIntMax -> Rational #
Real CIntMax # |
Methods toRational :: CIntMax -> Rational #
Real CUIntPtr # |
Methods toRational :: CUIntPtr -> Rational #
Real CIntPtr # |
Methods toRational :: CIntPtr -> Rational #
Real CSUSeconds # |
Methods toRational :: CSUSeconds -> Rational #
Real CUSeconds # |
Methods toRational :: CUSeconds -> Rational #
Real CTime # |
Methods toRational :: CTime -> Rational #
Real CClock # |
Methods toRational :: CClock -> Rational #
Real CSigAtomic # |
Methods toRational :: CSigAtomic -> Rational #
Real CWchar # |
Methods toRational :: CWchar -> Rational #
Real CSize # |
Methods toRational :: CSize -> Rational #
Real CPtrdiff # |
Methods toRational :: CPtrdiff -> Rational #
Real CDouble # |
Methods toRational :: CDouble -> Rational #
Real CFloat # |
Methods toRational :: CFloat -> Rational #
Real CBool # |
Methods toRational :: CBool -> Rational #
Real CULLong # |
Methods toRational :: CULLong -> Rational #
Real CLLong # |
Methods toRational :: CLLong -> Rational #
Real CULong # |
Methods toRational :: CULong -> Rational #
Real CLong # |
Methods toRational :: CLong -> Rational #
Real CUInt # |
Methods toRational :: CUInt -> Rational #
Real CInt # |
Methods toRational :: CInt -> Rational #
Real CUShort # |
Methods toRational :: CUShort -> Rational #
Real CShort # |
Methods toRational :: CShort -> Rational #
Real CUChar # |
Methods toRational :: CUChar -> Rational #
Real CSChar # |
Methods toRational :: CSChar -> Rational #
Real CChar # |
Methods toRational :: CChar -> Rational #
Real Fd # |
Methods toRational :: Fd -> Rational #
Real CKey # |
Methods toRational :: CKey -> Rational #
Real CId # |
Methods toRational :: CId -> Rational #
Real CFsFilCnt # |
Methods toRational :: CFsFilCnt -> Rational #
Real CFsBlkCnt # |
Methods toRational :: CFsBlkCnt -> Rational #
Real CClockId # |
Methods toRational :: CClockId -> Rational #
Real CBlkCnt # |
Methods toRational :: CBlkCnt -> Rational #
Real CBlkSize # |
Methods toRational :: CBlkSize -> Rational #
Real CRLim # |
Methods toRational :: CRLim -> Rational #
Real CTcflag # |
Methods toRational :: CTcflag -> Rational #
Real CSpeed # |
Methods toRational :: CSpeed -> Rational #
Real CCc # |
Methods toRational :: CCc -> Rational #
Real CUid # |
Methods toRational :: CUid -> Rational #
Real CNlink # |
Methods toRational :: CNlink -> Rational #
Real CGid # |
Methods toRational :: CGid -> Rational #
Real CSsize # |
Methods toRational :: CSsize -> Rational #
Real CPid # |
Methods toRational :: CPid -> Rational #
Real COff # |
Methods toRational :: COff -> Rational #
Real CMode # |
Methods toRational :: CMode -> Rational #
Real CIno # |
Methods toRational :: CIno -> Rational #
Real CDev # |
Methods toRational :: CDev -> Rational #
Integral a => Real (Ratio a) # | Since: 2.0.1
Methods toRational :: Ratio a -> Rational #
Real a => Real (Identity a) # |
Methods toRational :: Identity a -> Rational #
HasResolution a => Real (Fixed a) # | Since: 2.1
Methods toRational :: Fixed a -> Rational #
Real a => Real (Const k a b) # |
Methods toRational :: Const k a b -> Rational #

class (Real a, Enum a) => Integral a where #

Integral numbers, supporting integer division.

Minimal complete definition

quotRem, toInteger

Methods

quot :: a -> a -> a infixl 7 #

integer division truncated toward zero

rem :: a -> a -> a infixl 7 #

integer remainder, satisfying

    (x `quot` y)*y + (x `rem` y) == x

div :: a -> a -> a infixl 7 #

integer division truncated toward negative infinity

mod :: a -> a -> a infixl 7 #

integer modulus, satisfying

    (x `div` y)*y + (x `mod` y) == x

quotRem :: a -> a -> (a, a) #

simultaneous `quot` and `rem`

divMod :: a -> a -> (a, a) #

simultaneous `div` and `mod`

toInteger :: a -> Integer #

conversion to `Integer`

Instances

Integral Int # | Since: 2.0.1
Methods quot :: Int -> Int -> Int # rem :: Int -> Int -> Int # div :: Int -> Int -> Int # mod :: Int -> Int -> Int # quotRem :: Int -> Int -> (Int, Int) # divMod :: Int -> Int -> (Int, Int) # toInteger :: Int -> Integer #
Integral Int8 # | Since: 2.1
Methods quot :: Int8 -> Int8 -> Int8 # rem :: Int8 -> Int8 -> Int8 # div :: Int8 -> Int8 -> Int8 # mod :: Int8 -> Int8 -> Int8 # quotRem :: Int8 -> Int8 -> (Int8, Int8) # divMod :: Int8 -> Int8 -> (Int8, Int8) # toInteger :: Int8 -> Integer #
Integral Int16 # | Since: 2.1
Methods quot :: Int16 -> Int16 -> Int16 # rem :: Int16 -> Int16 -> Int16 # div :: Int16 -> Int16 -> Int16 # mod :: Int16 -> Int16 -> Int16 # quotRem :: Int16 -> Int16 -> (Int16, Int16) # divMod :: Int16 -> Int16 -> (Int16, Int16) # toInteger :: Int16 -> Integer #
Integral Int32 # | Since: 2.1
Methods quot :: Int32 -> Int32 -> Int32 # rem :: Int32 -> Int32 -> Int32 # div :: Int32 -> Int32 -> Int32 # mod :: Int32 -> Int32 -> Int32 # quotRem :: Int32 -> Int32 -> (Int32, Int32) # divMod :: Int32 -> Int32 -> (Int32, Int32) # toInteger :: Int32 -> Integer #
Integral Int64 # | Since: 2.1
Methods quot :: Int64 -> Int64 -> Int64 # rem :: Int64 -> Int64 -> Int64 # div :: Int64 -> Int64 -> Int64 # mod :: Int64 -> Int64 -> Int64 # quotRem :: Int64 -> Int64 -> (Int64, Int64) # divMod :: Int64 -> Int64 -> (Int64, Int64) # toInteger :: Int64 -> Integer #
Integral Integer # | Since: 2.0.1
Methods quot :: Integer -> Integer -> Integer # rem :: Integer -> Integer -> Integer # div :: Integer -> Integer -> Integer # mod :: Integer -> Integer -> Integer # quotRem :: Integer -> Integer -> (Integer, Integer) # divMod :: Integer -> Integer -> (Integer, Integer) # toInteger :: Integer -> Integer #
Integral Natural # | Since: 4.8.0.0
Methods quot :: Natural -> Natural -> Natural # rem :: Natural -> Natural -> Natural # div :: Natural -> Natural -> Natural # mod :: Natural -> Natural -> Natural # quotRem :: Natural -> Natural -> (Natural, Natural) # divMod :: Natural -> Natural -> (Natural, Natural) # toInteger :: Natural -> Integer #
Integral Word # | Since: 2.1
Methods quot :: Word -> Word -> Word # rem :: Word -> Word -> Word # div :: Word -> Word -> Word # mod :: Word -> Word -> Word # quotRem :: Word -> Word -> (Word, Word) # divMod :: Word -> Word -> (Word, Word) # toInteger :: Word -> Integer #
Integral Word8 # | Since: 2.1
Methods quot :: Word8 -> Word8 -> Word8 # rem :: Word8 -> Word8 -> Word8 # div :: Word8 -> Word8 -> Word8 # mod :: Word8 -> Word8 -> Word8 # quotRem :: Word8 -> Word8 -> (Word8, Word8) # divMod :: Word8 -> Word8 -> (Word8, Word8) # toInteger :: Word8 -> Integer #
Integral Word16 # | Since: 2.1
Methods quot :: Word16 -> Word16 -> Word16 # rem :: Word16 -> Word16 -> Word16 # div :: Word16 -> Word16 -> Word16 # mod :: Word16 -> Word16 -> Word16 # quotRem :: Word16 -> Word16 -> (Word16, Word16) # divMod :: Word16 -> Word16 -> (Word16, Word16) # toInteger :: Word16 -> Integer #
Integral Word32 # | Since: 2.1
Methods quot :: Word32 -> Word32 -> Word32 # rem :: Word32 -> Word32 -> Word32 # div :: Word32 -> Word32 -> Word32 # mod :: Word32 -> Word32 -> Word32 # quotRem :: Word32 -> Word32 -> (Word32, Word32) # divMod :: Word32 -> Word32 -> (Word32, Word32) # toInteger :: Word32 -> Integer #
Integral Word64 # | Since: 2.1
Methods quot :: Word64 -> Word64 -> Word64 # rem :: Word64 -> Word64 -> Word64 # div :: Word64 -> Word64 -> Word64 # mod :: Word64 -> Word64 -> Word64 # quotRem :: Word64 -> Word64 -> (Word64, Word64) # divMod :: Word64 -> Word64 -> (Word64, Word64) # toInteger :: Word64 -> Integer #
Integral IntPtr # |
Methods quot :: IntPtr -> IntPtr -> IntPtr # rem :: IntPtr -> IntPtr -> IntPtr # div :: IntPtr -> IntPtr -> IntPtr # mod :: IntPtr -> IntPtr -> IntPtr # quotRem :: IntPtr -> IntPtr -> (IntPtr, IntPtr) # divMod :: IntPtr -> IntPtr -> (IntPtr, IntPtr) # toInteger :: IntPtr -> Integer #
Integral WordPtr # |
Methods quot :: WordPtr -> WordPtr -> WordPtr # rem :: WordPtr -> WordPtr -> WordPtr # div :: WordPtr -> WordPtr -> WordPtr # mod :: WordPtr -> WordPtr -> WordPtr # quotRem :: WordPtr -> WordPtr -> (WordPtr, WordPtr) # divMod :: WordPtr -> WordPtr -> (WordPtr, WordPtr) # toInteger :: WordPtr -> Integer #
Integral CUIntMax # |
Methods quot :: CUIntMax -> CUIntMax -> CUIntMax # rem :: CUIntMax -> CUIntMax -> CUIntMax # div :: CUIntMax -> CUIntMax -> CUIntMax # mod :: CUIntMax -> CUIntMax -> CUIntMax # quotRem :: CUIntMax -> CUIntMax -> (CUIntMax, CUIntMax) # divMod :: CUIntMax -> CUIntMax -> (CUIntMax, CUIntMax) # toInteger :: CUIntMax -> Integer #
Integral CIntMax # |
Methods quot :: CIntMax -> CIntMax -> CIntMax # rem :: CIntMax -> CIntMax -> CIntMax # div :: CIntMax -> CIntMax -> CIntMax # mod :: CIntMax -> CIntMax -> CIntMax # quotRem :: CIntMax -> CIntMax -> (CIntMax, CIntMax) # divMod :: CIntMax -> CIntMax -> (CIntMax, CIntMax) # toInteger :: CIntMax -> Integer #
Integral CUIntPtr # |
Methods quot :: CUIntPtr -> CUIntPtr -> CUIntPtr # rem :: CUIntPtr -> CUIntPtr -> CUIntPtr # div :: CUIntPtr -> CUIntPtr -> CUIntPtr # mod :: CUIntPtr -> CUIntPtr -> CUIntPtr # quotRem :: CUIntPtr -> CUIntPtr -> (CUIntPtr, CUIntPtr) # divMod :: CUIntPtr -> CUIntPtr -> (CUIntPtr, CUIntPtr) # toInteger :: CUIntPtr -> Integer #
Integral CIntPtr # |
Methods quot :: CIntPtr -> CIntPtr -> CIntPtr # rem :: CIntPtr -> CIntPtr -> CIntPtr # div :: CIntPtr -> CIntPtr -> CIntPtr # mod :: CIntPtr -> CIntPtr -> CIntPtr # quotRem :: CIntPtr -> CIntPtr -> (CIntPtr, CIntPtr) # divMod :: CIntPtr -> CIntPtr -> (CIntPtr, CIntPtr) # toInteger :: CIntPtr -> Integer #
Integral CSigAtomic # |
Methods quot :: CSigAtomic -> CSigAtomic -> CSigAtomic # rem :: CSigAtomic -> CSigAtomic -> CSigAtomic # div :: CSigAtomic -> CSigAtomic -> CSigAtomic # mod :: CSigAtomic -> CSigAtomic -> CSigAtomic # quotRem :: CSigAtomic -> CSigAtomic -> (CSigAtomic, CSigAtomic) # divMod :: CSigAtomic -> CSigAtomic -> (CSigAtomic, CSigAtomic) # toInteger :: CSigAtomic -> Integer #
Integral CWchar # |
Methods quot :: CWchar -> CWchar -> CWchar # rem :: CWchar -> CWchar -> CWchar # div :: CWchar -> CWchar -> CWchar # mod :: CWchar -> CWchar -> CWchar # quotRem :: CWchar -> CWchar -> (CWchar, CWchar) # divMod :: CWchar -> CWchar -> (CWchar, CWchar) # toInteger :: CWchar -> Integer #
Integral CSize # |
Methods quot :: CSize -> CSize -> CSize # rem :: CSize -> CSize -> CSize # div :: CSize -> CSize -> CSize # mod :: CSize -> CSize -> CSize # quotRem :: CSize -> CSize -> (CSize, CSize) # divMod :: CSize -> CSize -> (CSize, CSize) # toInteger :: CSize -> Integer #
Integral CPtrdiff # |
Methods quot :: CPtrdiff -> CPtrdiff -> CPtrdiff # rem :: CPtrdiff -> CPtrdiff -> CPtrdiff # div :: CPtrdiff -> CPtrdiff -> CPtrdiff # mod :: CPtrdiff -> CPtrdiff -> CPtrdiff # quotRem :: CPtrdiff -> CPtrdiff -> (CPtrdiff, CPtrdiff) # divMod :: CPtrdiff -> CPtrdiff -> (CPtrdiff, CPtrdiff) # toInteger :: CPtrdiff -> Integer #
Integral CBool # |
Methods quot :: CBool -> CBool -> CBool # rem :: CBool -> CBool -> CBool # div :: CBool -> CBool -> CBool # mod :: CBool -> CBool -> CBool # quotRem :: CBool -> CBool -> (CBool, CBool) # divMod :: CBool -> CBool -> (CBool, CBool) # toInteger :: CBool -> Integer #
Integral CULLong # |
Methods quot :: CULLong -> CULLong -> CULLong # rem :: CULLong -> CULLong -> CULLong # div :: CULLong -> CULLong -> CULLong # mod :: CULLong -> CULLong -> CULLong # quotRem :: CULLong -> CULLong -> (CULLong, CULLong) # divMod :: CULLong -> CULLong -> (CULLong, CULLong) # toInteger :: CULLong -> Integer #
Integral CLLong # |
Methods quot :: CLLong -> CLLong -> CLLong # rem :: CLLong -> CLLong -> CLLong # div :: CLLong -> CLLong -> CLLong # mod :: CLLong -> CLLong -> CLLong # quotRem :: CLLong -> CLLong -> (CLLong, CLLong) # divMod :: CLLong -> CLLong -> (CLLong, CLLong) # toInteger :: CLLong -> Integer #
Integral CULong # |
Methods quot :: CULong -> CULong -> CULong # rem :: CULong -> CULong -> CULong # div :: CULong -> CULong -> CULong # mod :: CULong -> CULong -> CULong # quotRem :: CULong -> CULong -> (CULong, CULong) # divMod :: CULong -> CULong -> (CULong, CULong) # toInteger :: CULong -> Integer #
Integral CLong # |
Methods quot :: CLong -> CLong -> CLong # rem :: CLong -> CLong -> CLong # div :: CLong -> CLong -> CLong # mod :: CLong -> CLong -> CLong # quotRem :: CLong -> CLong -> (CLong, CLong) # divMod :: CLong -> CLong -> (CLong, CLong) # toInteger :: CLong -> Integer #
Integral CUInt # |
Methods quot :: CUInt -> CUInt -> CUInt # rem :: CUInt -> CUInt -> CUInt # div :: CUInt -> CUInt -> CUInt # mod :: CUInt -> CUInt -> CUInt # quotRem :: CUInt -> CUInt -> (CUInt, CUInt) # divMod :: CUInt -> CUInt -> (CUInt, CUInt) # toInteger :: CUInt -> Integer #
Integral CInt # |
Methods quot :: CInt -> CInt -> CInt # rem :: CInt -> CInt -> CInt # div :: CInt -> CInt -> CInt # mod :: CInt -> CInt -> CInt # quotRem :: CInt -> CInt -> (CInt, CInt) # divMod :: CInt -> CInt -> (CInt, CInt) # toInteger :: CInt -> Integer #
Integral CUShort # |
Methods quot :: CUShort -> CUShort -> CUShort # rem :: CUShort -> CUShort -> CUShort # div :: CUShort -> CUShort -> CUShort # mod :: CUShort -> CUShort -> CUShort # quotRem :: CUShort -> CUShort -> (CUShort, CUShort) # divMod :: CUShort -> CUShort -> (CUShort, CUShort) # toInteger :: CUShort -> Integer #
Integral CShort # |
Methods quot :: CShort -> CShort -> CShort # rem :: CShort -> CShort -> CShort # div :: CShort -> CShort -> CShort # mod :: CShort -> CShort -> CShort # quotRem :: CShort -> CShort -> (CShort, CShort) # divMod :: CShort -> CShort -> (CShort, CShort) # toInteger :: CShort -> Integer #
Integral CUChar # |
Methods quot :: CUChar -> CUChar -> CUChar # rem :: CUChar -> CUChar -> CUChar # div :: CUChar -> CUChar -> CUChar # mod :: CUChar -> CUChar -> CUChar # quotRem :: CUChar -> CUChar -> (CUChar, CUChar) # divMod :: CUChar -> CUChar -> (CUChar, CUChar) # toInteger :: CUChar -> Integer #
Integral CSChar # |
Methods quot :: CSChar -> CSChar -> CSChar # rem :: CSChar -> CSChar -> CSChar # div :: CSChar -> CSChar -> CSChar # mod :: CSChar -> CSChar -> CSChar # quotRem :: CSChar -> CSChar -> (CSChar, CSChar) # divMod :: CSChar -> CSChar -> (CSChar, CSChar) # toInteger :: CSChar -> Integer #
Integral CChar # |
Methods quot :: CChar -> CChar -> CChar # rem :: CChar -> CChar -> CChar # div :: CChar -> CChar -> CChar # mod :: CChar -> CChar -> CChar # quotRem :: CChar -> CChar -> (CChar, CChar) # divMod :: CChar -> CChar -> (CChar, CChar) # toInteger :: CChar -> Integer #
Integral Fd # |
Methods quot :: Fd -> Fd -> Fd # rem :: Fd -> Fd -> Fd # div :: Fd -> Fd -> Fd # mod :: Fd -> Fd -> Fd # quotRem :: Fd -> Fd -> (Fd, Fd) # divMod :: Fd -> Fd -> (Fd, Fd) # toInteger :: Fd -> Integer #
Integral CKey # |
Methods quot :: CKey -> CKey -> CKey # rem :: CKey -> CKey -> CKey # div :: CKey -> CKey -> CKey # mod :: CKey -> CKey -> CKey # quotRem :: CKey -> CKey -> (CKey, CKey) # divMod :: CKey -> CKey -> (CKey, CKey) # toInteger :: CKey -> Integer #
Integral CId # |
Methods quot :: CId -> CId -> CId # rem :: CId -> CId -> CId # div :: CId -> CId -> CId # mod :: CId -> CId -> CId # quotRem :: CId -> CId -> (CId, CId) # divMod :: CId -> CId -> (CId, CId) # toInteger :: CId -> Integer #
Integral CFsFilCnt # |
Methods quot :: CFsFilCnt -> CFsFilCnt -> CFsFilCnt # rem :: CFsFilCnt -> CFsFilCnt -> CFsFilCnt # div :: CFsFilCnt -> CFsFilCnt -> CFsFilCnt # mod :: CFsFilCnt -> CFsFilCnt -> CFsFilCnt # quotRem :: CFsFilCnt -> CFsFilCnt -> (CFsFilCnt, CFsFilCnt) # divMod :: CFsFilCnt -> CFsFilCnt -> (CFsFilCnt, CFsFilCnt) # toInteger :: CFsFilCnt -> Integer #
Integral CFsBlkCnt # |
Methods quot :: CFsBlkCnt -> CFsBlkCnt -> CFsBlkCnt # rem :: CFsBlkCnt -> CFsBlkCnt -> CFsBlkCnt # div :: CFsBlkCnt -> CFsBlkCnt -> CFsBlkCnt # mod :: CFsBlkCnt -> CFsBlkCnt -> CFsBlkCnt # quotRem :: CFsBlkCnt -> CFsBlkCnt -> (CFsBlkCnt, CFsBlkCnt) # divMod :: CFsBlkCnt -> CFsBlkCnt -> (CFsBlkCnt, CFsBlkCnt) # toInteger :: CFsBlkCnt -> Integer #
Integral CClockId # |
Methods quot :: CClockId -> CClockId -> CClockId # rem :: CClockId -> CClockId -> CClockId # div :: CClockId -> CClockId -> CClockId # mod :: CClockId -> CClockId -> CClockId # quotRem :: CClockId -> CClockId -> (CClockId, CClockId) # divMod :: CClockId -> CClockId -> (CClockId, CClockId) # toInteger :: CClockId -> Integer #
Integral CBlkCnt # |
Methods quot :: CBlkCnt -> CBlkCnt -> CBlkCnt # rem :: CBlkCnt -> CBlkCnt -> CBlkCnt # div :: CBlkCnt -> CBlkCnt -> CBlkCnt # mod :: CBlkCnt -> CBlkCnt -> CBlkCnt # quotRem :: CBlkCnt -> CBlkCnt -> (CBlkCnt, CBlkCnt) # divMod :: CBlkCnt -> CBlkCnt -> (CBlkCnt, CBlkCnt) # toInteger :: CBlkCnt -> Integer #
Integral CBlkSize # |
Methods quot :: CBlkSize -> CBlkSize -> CBlkSize # rem :: CBlkSize -> CBlkSize -> CBlkSize # div :: CBlkSize -> CBlkSize -> CBlkSize # mod :: CBlkSize -> CBlkSize -> CBlkSize # quotRem :: CBlkSize -> CBlkSize -> (CBlkSize, CBlkSize) # divMod :: CBlkSize -> CBlkSize -> (CBlkSize, CBlkSize) # toInteger :: CBlkSize -> Integer #
Integral CRLim # |
Methods quot :: CRLim -> CRLim -> CRLim # rem :: CRLim -> CRLim -> CRLim # div :: CRLim -> CRLim -> CRLim # mod :: CRLim -> CRLim -> CRLim # quotRem :: CRLim -> CRLim -> (CRLim, CRLim) # divMod :: CRLim -> CRLim -> (CRLim, CRLim) # toInteger :: CRLim -> Integer #
Integral CTcflag # |
Methods quot :: CTcflag -> CTcflag -> CTcflag # rem :: CTcflag -> CTcflag -> CTcflag # div :: CTcflag -> CTcflag -> CTcflag # mod :: CTcflag -> CTcflag -> CTcflag # quotRem :: CTcflag -> CTcflag -> (CTcflag, CTcflag) # divMod :: CTcflag -> CTcflag -> (CTcflag, CTcflag) # toInteger :: CTcflag -> Integer #
Integral CUid # |
Methods quot :: CUid -> CUid -> CUid # rem :: CUid -> CUid -> CUid # div :: CUid -> CUid -> CUid # mod :: CUid -> CUid -> CUid # quotRem :: CUid -> CUid -> (CUid, CUid) # divMod :: CUid -> CUid -> (CUid, CUid) # toInteger :: CUid -> Integer #
Integral CNlink # |
Methods quot :: CNlink -> CNlink -> CNlink # rem :: CNlink -> CNlink -> CNlink # div :: CNlink -> CNlink -> CNlink # mod :: CNlink -> CNlink -> CNlink # quotRem :: CNlink -> CNlink -> (CNlink, CNlink) # divMod :: CNlink -> CNlink -> (CNlink, CNlink) # toInteger :: CNlink -> Integer #
Integral CGid # |
Methods quot :: CGid -> CGid -> CGid # rem :: CGid -> CGid -> CGid # div :: CGid -> CGid -> CGid # mod :: CGid -> CGid -> CGid # quotRem :: CGid -> CGid -> (CGid, CGid) # divMod :: CGid -> CGid -> (CGid, CGid) # toInteger :: CGid -> Integer #
Integral CSsize # |
Methods quot :: CSsize -> CSsize -> CSsize # rem :: CSsize -> CSsize -> CSsize # div :: CSsize -> CSsize -> CSsize # mod :: CSsize -> CSsize -> CSsize # quotRem :: CSsize -> CSsize -> (CSsize, CSsize) # divMod :: CSsize -> CSsize -> (CSsize, CSsize) # toInteger :: CSsize -> Integer #
Integral CPid # |
Methods quot :: CPid -> CPid -> CPid # rem :: CPid -> CPid -> CPid # div :: CPid -> CPid -> CPid # mod :: CPid -> CPid -> CPid # quotRem :: CPid -> CPid -> (CPid, CPid) # divMod :: CPid -> CPid -> (CPid, CPid) # toInteger :: CPid -> Integer #
Integral COff # |
Methods quot :: COff -> COff -> COff # rem :: COff -> COff -> COff # div :: COff -> COff -> COff # mod :: COff -> COff -> COff # quotRem :: COff -> COff -> (COff, COff) # divMod :: COff -> COff -> (COff, COff) # toInteger :: COff -> Integer #
Integral CMode # |
Methods quot :: CMode -> CMode -> CMode # rem :: CMode -> CMode -> CMode # div :: CMode -> CMode -> CMode # mod :: CMode -> CMode -> CMode # quotRem :: CMode -> CMode -> (CMode, CMode) # divMod :: CMode -> CMode -> (CMode, CMode) # toInteger :: CMode -> Integer #
Integral CIno # |
Methods quot :: CIno -> CIno -> CIno # rem :: CIno -> CIno -> CIno # div :: CIno -> CIno -> CIno # mod :: CIno -> CIno -> CIno # quotRem :: CIno -> CIno -> (CIno, CIno) # divMod :: CIno -> CIno -> (CIno, CIno) # toInteger :: CIno -> Integer #
Integral CDev # |
Methods quot :: CDev -> CDev -> CDev # rem :: CDev -> CDev -> CDev # div :: CDev -> CDev -> CDev # mod :: CDev -> CDev -> CDev # quotRem :: CDev -> CDev -> (CDev, CDev) # divMod :: CDev -> CDev -> (CDev, CDev) # toInteger :: CDev -> Integer #
Integral a => Integral (Identity a) # |
Methods quot :: Identity a -> Identity a -> Identity a # rem :: Identity a -> Identity a -> Identity a # div :: Identity a -> Identity a -> Identity a # mod :: Identity a -> Identity a -> Identity a # quotRem :: Identity a -> Identity a -> (Identity a, Identity a) # divMod :: Identity a -> Identity a -> (Identity a, Identity a) # toInteger :: Identity a -> Integer #
Integral a => Integral (Const k a b) # |
Methods quot :: Const k a b -> Const k a b -> Const k a b # rem :: Const k a b -> Const k a b -> Const k a b # div :: Const k a b -> Const k a b -> Const k a b # mod :: Const k a b -> Const k a b -> Const k a b # quotRem :: Const k a b -> Const k a b -> (Const k a b, Const k a b) # divMod :: Const k a b -> Const k a b -> (Const k a b, Const k a b) # toInteger :: Const k a b -> Integer #

class Num a => Fractional a where #

Fractional numbers, supporting real division.

Minimal complete definition

fromRational, (recip | (/))

Methods

(/) :: a -> a -> a infixl 7 #

fractional division

recip :: a -> a #

reciprocal fraction

fromRational :: Rational -> a #

Conversion from a `Rational` (that is ``Ratio` `Integer``). A floating literal stands for an application of `fromRational` to a value of type `Rational`, so such literals have type `(`Fractional` a) => a`.

Instances

Fractional CDouble # |
Methods (/) :: CDouble -> CDouble -> CDouble # recip :: CDouble -> CDouble # fromRational :: Rational -> CDouble #
Fractional CFloat # |
Methods (/) :: CFloat -> CFloat -> CFloat # recip :: CFloat -> CFloat # fromRational :: Rational -> CFloat #
Integral a => Fractional (Ratio a) # | Since: 2.0.1
Methods (/) :: Ratio a -> Ratio a -> Ratio a # recip :: Ratio a -> Ratio a # fromRational :: Rational -> Ratio a #
Fractional a => Fractional (Identity a) # |
Methods (/) :: Identity a -> Identity a -> Identity a # recip :: Identity a -> Identity a # fromRational :: Rational -> Identity a #
HasResolution a => Fractional (Fixed a) # | Since: 2.1
Methods (/) :: Fixed a -> Fixed a -> Fixed a # recip :: Fixed a -> Fixed a # fromRational :: Rational -> Fixed a #
RealFloat a => Fractional (Complex a) # | Since: 2.1
Methods (/) :: Complex a -> Complex a -> Complex a # recip :: Complex a -> Complex a # fromRational :: Rational -> Complex a #
Fractional a => Fractional (Const k a b) # |
Methods (/) :: Const k a b -> Const k a b -> Const k a b # recip :: Const k a b -> Const k a b # fromRational :: Rational -> Const k a b #

class Fractional a => Floating a where #

Trigonometric and hyperbolic functions and related functions.

Minimal complete definition

pi, exp, log, sin, cos, asin, acos, atan, sinh, cosh, asinh, acosh, atanh

Methods

pi :: a #

exp, log, sqrt :: a -> a #

(**), logBase :: a -> a -> a infixr 8 #

sin, cos, tan :: a -> a #

asin, acos, atan :: a -> a #

sinh, cosh, tanh :: a -> a #

asinh, acosh, atanh :: a -> a #

Instances

Floating Double # | Since: 2.1

Methods

pi :: Double #

exp :: Double -> Double #

log :: Double -> Double #

sqrt :: Double -> Double #

(**) :: Double -> Double -> Double #

logBase :: Double -> Double -> Double #

sin :: Double -> Double #

cos :: Double -> Double #

tan :: Double -> Double #

asin :: Double -> Double #

acos :: Double -> Double #

atan :: Double -> Double #

sinh :: Double -> Double #

cosh :: Double -> Double #

tanh :: Double -> Double #

asinh :: Double -> Double #

acosh :: Double -> Double #

atanh :: Double -> Double #

log1p :: Double -> Double #

expm1 :: Double -> Double #

log1pexp :: Double -> Double #

log1mexp :: Double -> Double #

Floating Float # | Since: 2.1

Methods

pi :: Float #

exp :: Float -> Float #

log :: Float -> Float #

sqrt :: Float -> Float #

(**) :: Float -> Float -> Float #

logBase :: Float -> Float -> Float #

sin :: Float -> Float #

cos :: Float -> Float #

tan :: Float -> Float #

asin :: Float -> Float #

acos :: Float -> Float #

atan :: Float -> Float #

sinh :: Float -> Float #

cosh :: Float -> Float #

tanh :: Float -> Float #

asinh :: Float -> Float #

acosh :: Float -> Float #

atanh :: Float -> Float #

log1p :: Float -> Float #

expm1 :: Float -> Float #

log1pexp :: Float -> Float #

log1mexp :: Float -> Float #

Floating CDouble # |

Methods

pi :: CDouble #

exp :: CDouble -> CDouble #

log :: CDouble -> CDouble #

sqrt :: CDouble -> CDouble #

(**) :: CDouble -> CDouble -> CDouble #

logBase :: CDouble -> CDouble -> CDouble #

sin :: CDouble -> CDouble #

cos :: CDouble -> CDouble #

tan :: CDouble -> CDouble #

asin :: CDouble -> CDouble #

acos :: CDouble -> CDouble #

atan :: CDouble -> CDouble #

sinh :: CDouble -> CDouble #

cosh :: CDouble -> CDouble #

tanh :: CDouble -> CDouble #

asinh :: CDouble -> CDouble #

acosh :: CDouble -> CDouble #

atanh :: CDouble -> CDouble #

log1p :: CDouble -> CDouble #

expm1 :: CDouble -> CDouble #

log1pexp :: CDouble -> CDouble #

log1mexp :: CDouble -> CDouble #

Floating CFloat # |

Methods

pi :: CFloat #

exp :: CFloat -> CFloat #

log :: CFloat -> CFloat #

sqrt :: CFloat -> CFloat #

(**) :: CFloat -> CFloat -> CFloat #

logBase :: CFloat -> CFloat -> CFloat #

sin :: CFloat -> CFloat #

cos :: CFloat -> CFloat #

tan :: CFloat -> CFloat #

asin :: CFloat -> CFloat #

acos :: CFloat -> CFloat #

atan :: CFloat -> CFloat #

sinh :: CFloat -> CFloat #

cosh :: CFloat -> CFloat #

tanh :: CFloat -> CFloat #

asinh :: CFloat -> CFloat #

acosh :: CFloat -> CFloat #

atanh :: CFloat -> CFloat #

log1p :: CFloat -> CFloat #

expm1 :: CFloat -> CFloat #

log1pexp :: CFloat -> CFloat #

log1mexp :: CFloat -> CFloat #

Floating a => Floating (Identity a) # |

Methods

pi :: Identity a #

exp :: Identity a -> Identity a #

log :: Identity a -> Identity a #

sqrt :: Identity a -> Identity a #

(**) :: Identity a -> Identity a -> Identity a #

logBase :: Identity a -> Identity a -> Identity a #

sin :: Identity a -> Identity a #

cos :: Identity a -> Identity a #

tan :: Identity a -> Identity a #

asin :: Identity a -> Identity a #

acos :: Identity a -> Identity a #

atan :: Identity a -> Identity a #

sinh :: Identity a -> Identity a #

cosh :: Identity a -> Identity a #

tanh :: Identity a -> Identity a #

asinh :: Identity a -> Identity a #

acosh :: Identity a -> Identity a #

atanh :: Identity a -> Identity a #

log1p :: Identity a -> Identity a #

expm1 :: Identity a -> Identity a #

log1pexp :: Identity a -> Identity a #

log1mexp :: Identity a -> Identity a #

RealFloat a => Floating (Complex a) # | Since: 2.1

Methods

pi :: Complex a #

exp :: Complex a -> Complex a #

log :: Complex a -> Complex a #

sqrt :: Complex a -> Complex a #

(**) :: Complex a -> Complex a -> Complex a #

logBase :: Complex a -> Complex a -> Complex a #

sin :: Complex a -> Complex a #

cos :: Complex a -> Complex a #

tan :: Complex a -> Complex a #

asin :: Complex a -> Complex a #

acos :: Complex a -> Complex a #

atan :: Complex a -> Complex a #

sinh :: Complex a -> Complex a #

cosh :: Complex a -> Complex a #

tanh :: Complex a -> Complex a #

asinh :: Complex a -> Complex a #

acosh :: Complex a -> Complex a #

atanh :: Complex a -> Complex a #

log1p :: Complex a -> Complex a #

expm1 :: Complex a -> Complex a #

log1pexp :: Complex a -> Complex a #

log1mexp :: Complex a -> Complex a #

Floating a => Floating (Const k a b) # |

Methods

pi :: Const k a b #

exp :: Const k a b -> Const k a b #

log :: Const k a b -> Const k a b #

sqrt :: Const k a b -> Const k a b #

(**) :: Const k a b -> Const k a b -> Const k a b #

logBase :: Const k a b -> Const k a b -> Const k a b #

sin :: Const k a b -> Const k a b #

cos :: Const k a b -> Const k a b #

tan :: Const k a b -> Const k a b #

asin :: Const k a b -> Const k a b #

acos :: Const k a b -> Const k a b #

atan :: Const k a b -> Const k a b #

sinh :: Const k a b -> Const k a b #

cosh :: Const k a b -> Const k a b #

tanh :: Const k a b -> Const k a b #

asinh :: Const k a b -> Const k a b #

acosh :: Const k a b -> Const k a b #

atanh :: Const k a b -> Const k a b #

log1p :: Const k a b -> Const k a b #

expm1 :: Const k a b -> Const k a b #

log1pexp :: Const k a b -> Const k a b #

log1mexp :: Const k a b -> Const k a b #

class (Real a, Fractional a) => RealFrac a where #

Extracting components of fractions.

Minimal complete definition

properFraction

Methods

properFraction :: Integral b => a -> (b, a) #

The function `properFraction` takes a real fractional number `x` and returns a pair `(n,f)` such that `x = n+f`, and:

- `n` is an integral number with the same sign as `x`; and
- `f` is a fraction with the same type and sign as `x`, and with absolute value less than `1`.

The default definitions of the `ceiling`, `floor`, `truncate` and `round` functions are in terms of `properFraction`.

truncate :: Integral b => a -> b #

``truncate` x` returns the integer nearest `x` between zero and `x`

round :: Integral b => a -> b #

``round` x` returns the nearest integer to `x`; the even integer if `x` is equidistant between two integers

ceiling :: Integral b => a -> b #

``ceiling` x` returns the least integer not less than `x`

floor :: Integral b => a -> b #

``floor` x` returns the greatest integer not greater than `x`

Instances

RealFrac CDouble # |
Methods properFraction :: Integral b => CDouble -> (b, CDouble) # truncate :: Integral b => CDouble -> b # round :: Integral b => CDouble -> b # ceiling :: Integral b => CDouble -> b # floor :: Integral b => CDouble -> b #
RealFrac CFloat # |
Methods properFraction :: Integral b => CFloat -> (b, CFloat) # truncate :: Integral b => CFloat -> b # round :: Integral b => CFloat -> b # ceiling :: Integral b => CFloat -> b # floor :: Integral b => CFloat -> b #
Integral a => RealFrac (Ratio a) # | Since: 2.0.1
Methods properFraction :: Integral b => Ratio a -> (b, Ratio a) # truncate :: Integral b => Ratio a -> b # round :: Integral b => Ratio a -> b # ceiling :: Integral b => Ratio a -> b # floor :: Integral b => Ratio a -> b #
RealFrac a => RealFrac (Identity a) # |
Methods properFraction :: Integral b => Identity a -> (b, Identity a) # truncate :: Integral b => Identity a -> b # round :: Integral b => Identity a -> b # ceiling :: Integral b => Identity a -> b # floor :: Integral b => Identity a -> b #
HasResolution a => RealFrac (Fixed a) # | Since: 2.1
Methods properFraction :: Integral b => Fixed a -> (b, Fixed a) # truncate :: Integral b => Fixed a -> b # round :: Integral b => Fixed a -> b # ceiling :: Integral b => Fixed a -> b # floor :: Integral b => Fixed a -> b #
RealFrac a => RealFrac (Const k a b) # |
Methods properFraction :: Integral b => Const k a b -> (b, Const k a b) # truncate :: Integral b => Const k a b -> b # round :: Integral b => Const k a b -> b # ceiling :: Integral b => Const k a b -> b # floor :: Integral b => Const k a b -> b #

class (RealFrac a, Floating a) => RealFloat a where #

Efficient, machine-independent access to the components of a floating-point number.

Minimal complete definition

floatRadix, floatDigits, floatRange, decodeFloat, encodeFloat, isNaN, isInfinite, isDenormalized, isNegativeZero, isIEEE

Methods

floatRadix :: a -> Integer #

a constant function, returning the radix of the representation (often `2`)

floatDigits :: a -> Int #

a constant function, returning the number of digits of `floatRadix` in the significand

floatRange :: a -> (Int, Int) #

a constant function, returning the lowest and highest values the exponent may assume

decodeFloat :: a -> (Integer, Int) #

The function `decodeFloat` applied to a real floating-point number returns the significand expressed as an `Integer` and an appropriately scaled exponent (an `Int`). If ``decodeFloat` x` yields `(m,n)`, then `x` is equal in value to `m*b^^n`, where `b` is the floating-point radix, and furthermore, either `m` and `n` are both zero or else `b^(d-1) <= `abs` m < b^d`, where `d` is the value of ``floatDigits` x`. In particular, ``decodeFloat` 0 = (0,0)`. If the type contains a negative zero, also ``decodeFloat` (-0.0) = (0,0)`. The result of ``decodeFloat` x` is unspecified if either of ``isNaN` x` or ``isInfinite` x` is `True`.

encodeFloat :: Integer -> Int -> a #

`encodeFloat` performs the inverse of `decodeFloat` in the sense that for finite `x` with the exception of `-0.0`, ``uncurry` `encodeFloat` (`decodeFloat` x) = x`. ``encodeFloat` m n` is one of the two closest representable floating-point numbers to `m*b^^n` (or `±Infinity` if overflow occurs); usually the closer, but if `m` contains too many bits, the result may be rounded in the wrong direction.

exponent :: a -> Int #

`exponent` corresponds to the second component of `decodeFloat`. ``exponent` 0 = 0` and for finite nonzero `x`, ``exponent` x = snd (`decodeFloat` x) + `floatDigits` x`. If `x` is a finite floating-point number, it is equal in value to ``significand` x * b ^^ `exponent` x`, where `b` is the floating-point radix. The behaviour is unspecified on infinite or `NaN` values.

significand :: a -> a #

The first component of `decodeFloat`, scaled to lie in the open interval (`-1`,`1`), either `0.0` or of absolute value `>= 1/b`, where `b` is the floating-point radix. The behaviour is unspecified on infinite or `NaN` values.

scaleFloat :: Int -> a -> a #

multiplies a floating-point number by an integer power of the radix

isNaN :: a -> Bool #

`True` if the argument is an IEEE "not-a-number" (NaN) value

isInfinite :: a -> Bool #

`True` if the argument is an IEEE infinity or negative infinity

isDenormalized :: a -> Bool #

`True` if the argument is too small to be represented in normalized format

isNegativeZero :: a -> Bool #

`True` if the argument is an IEEE negative zero

isIEEE :: a -> Bool #

`True` if the argument is an IEEE floating point number

atan2 :: a -> a -> a #

a version of arctangent taking two real floating-point arguments. For real floating `x` and `y`, ``atan2` y x` computes the angle (from the positive x-axis) of the vector from the origin to the point `(x,y)`. ``atan2` y x` returns a value in the range [`-pi`, `pi`]. It follows the Common Lisp semantics for the origin when signed zeroes are supported. ``atan2` y 1`, with `y` in a type that is `RealFloat`, should return the same value as ``atan` y`. A default definition of `atan2` is provided, but implementors can provide a more accurate implementation.

Instances

RealFloat Double # | Since: 2.1

Methods

floatRadix :: Double -> Integer #

floatDigits :: Double -> Int #

floatRange :: Double -> (Int, Int) #

decodeFloat :: Double -> (Integer, Int) #

encodeFloat :: Integer -> Int -> Double #

exponent :: Double -> Int #

significand :: Double -> Double #

scaleFloat :: Int -> Double -> Double #

isNaN :: Double -> Bool #

isInfinite :: Double -> Bool #

isDenormalized :: Double -> Bool #

isNegativeZero :: Double -> Bool #

isIEEE :: Double -> Bool #

atan2 :: Double -> Double -> Double #

RealFloat Float # | Since: 2.1

Methods

floatRadix :: Float -> Integer #

floatDigits :: Float -> Int #

floatRange :: Float -> (Int, Int) #

decodeFloat :: Float -> (Integer, Int) #

encodeFloat :: Integer -> Int -> Float #

exponent :: Float -> Int #

significand :: Float -> Float #

scaleFloat :: Int -> Float -> Float #

isNaN :: Float -> Bool #

isInfinite :: Float -> Bool #

isDenormalized :: Float -> Bool #

isNegativeZero :: Float -> Bool #

isIEEE :: Float -> Bool #

atan2 :: Float -> Float -> Float #

RealFloat CDouble # |

Methods

floatRadix :: CDouble -> Integer #

floatDigits :: CDouble -> Int #

floatRange :: CDouble -> (Int, Int) #

decodeFloat :: CDouble -> (Integer, Int) #

encodeFloat :: Integer -> Int -> CDouble #

exponent :: CDouble -> Int #

significand :: CDouble -> CDouble #

scaleFloat :: Int -> CDouble -> CDouble #

isNaN :: CDouble -> Bool #

isInfinite :: CDouble -> Bool #

isDenormalized :: CDouble -> Bool #

isNegativeZero :: CDouble -> Bool #

isIEEE :: CDouble -> Bool #

atan2 :: CDouble -> CDouble -> CDouble #

RealFloat CFloat # |

Methods

floatRadix :: CFloat -> Integer #

floatDigits :: CFloat -> Int #

floatRange :: CFloat -> (Int, Int) #

decodeFloat :: CFloat -> (Integer, Int) #

encodeFloat :: Integer -> Int -> CFloat #

exponent :: CFloat -> Int #

significand :: CFloat -> CFloat #

scaleFloat :: Int -> CFloat -> CFloat #

isNaN :: CFloat -> Bool #

isInfinite :: CFloat -> Bool #

isDenormalized :: CFloat -> Bool #

isNegativeZero :: CFloat -> Bool #

isIEEE :: CFloat -> Bool #

atan2 :: CFloat -> CFloat -> CFloat #

RealFloat a => RealFloat (Identity a) # |

Methods

floatRadix :: Identity a -> Integer #

floatDigits :: Identity a -> Int #

floatRange :: Identity a -> (Int, Int) #

decodeFloat :: Identity a -> (Integer, Int) #

encodeFloat :: Integer -> Int -> Identity a #

exponent :: Identity a -> Int #

significand :: Identity a -> Identity a #

scaleFloat :: Int -> Identity a -> Identity a #

isNaN :: Identity a -> Bool #

isInfinite :: Identity a -> Bool #

isDenormalized :: Identity a -> Bool #

isNegativeZero :: Identity a -> Bool #

isIEEE :: Identity a -> Bool #

atan2 :: Identity a -> Identity a -> Identity a #

RealFloat a => RealFloat (Const k a b) # |

Methods

floatRadix :: Const k a b -> Integer #

floatDigits :: Const k a b -> Int #

floatRange :: Const k a b -> (Int, Int) #

decodeFloat :: Const k a b -> (Integer, Int) #

encodeFloat :: Integer -> Int -> Const k a b #

exponent :: Const k a b -> Int #

significand :: Const k a b -> Const k a b #

scaleFloat :: Int -> Const k a b -> Const k a b #

isNaN :: Const k a b -> Bool #

isInfinite :: Const k a b -> Bool #

isDenormalized :: Const k a b -> Bool #

isNegativeZero :: Const k a b -> Bool #

isIEEE :: Const k a b -> Bool #

atan2 :: Const k a b -> Const k a b -> Const k a b #

### Numeric functions

subtract :: Num a => a -> a -> a #

the same as ``flip` (`-`)`.

Because `-` is treated specially in the Haskell grammar, `(-` e`)` is not a section, but an application of prefix negation. However, `(`subtract`` exp`)` is equivalent to the disallowed section.

even :: Integral a => a -> Bool #

odd :: Integral a => a -> Bool #

gcd :: Integral a => a -> a -> a #

``gcd` x y` is the non-negative factor of both `x` and `y` of which every common factor of `x` and `y` is also a factor; for example ``gcd` 4 2 = 2`, ``gcd` (-4) 6 = 2`, ``gcd` 0 4` = `4`. ``gcd` 0 0` = `0`. (That is, the common divisor that is "greatest" in the divisibility preordering.)

Note: Since for signed fixed-width integer types, ``abs` `minBound` < 0`, the result may be negative if one of the arguments is ``minBound`` (and necessarily is if the other is `0` or ``minBound``) for such types.

lcm :: Integral a => a -> a -> a #

``lcm` x y` is the smallest positive integer that both `x` and `y` divide.

(^) :: (Num a, Integral b) => a -> b -> a infixr 8 #

raise a number to a non-negative integral power

(^^) :: (Fractional a, Integral b) => a -> b -> a infixr 8 #

raise a number to an integral power

fromIntegral :: (Integral a, Num b) => a -> b #

general coercion from integral types

realToFrac :: (Real a, Fractional b) => a -> b #

general coercion to fractional types

## Monoids

class Monoid a where #

The class of monoids (types with an associative binary operation that has an identity). Instances should satisfy the following laws:

-     mappend mempty x = x

-     mappend x mempty = x

-     mappend x (mappend y z) = mappend (mappend x y) z

-     mconcat = foldr mappend mempty

The method names refer to the monoid of lists under concatenation, but there are many other instances.

Some types can be viewed as a monoid in more than one way, e.g. both addition and multiplication on numbers. In such cases we often define `newtype`s and make those instances of `Monoid`, e.g. `Sum` and `Product`.

Minimal complete definition

mempty, mappend

Methods

mempty :: a #

Identity of `mappend`

mappend :: a -> a -> a #

An associative operation

mconcat :: [a] -> a #

Fold a list using the monoid. For most types, the default definition for `mconcat` will be used, but the function is included in the class definition so that an optimized version can be provided for specific types.

Instances

Monoid Ordering # | Since: 2.1
Methods mempty :: Ordering # mappend :: Ordering -> Ordering -> Ordering # mconcat :: [Ordering] -> Ordering #
Monoid () # | Since: 2.1
Methods mempty :: () # mappend :: () -> () -> () # mconcat :: [()] -> () #
Monoid Any # | Since: 2.1
Methods mempty :: Any # mappend :: Any -> Any -> Any # mconcat :: [Any] -> Any #
Monoid All # | Since: 2.1
Methods mempty :: All # mappend :: All -> All -> All # mconcat :: [All] -> All #
Monoid Lifetime # | `mappend` takes the longer of two lifetimes. Since: 4.8.0.0
Methods mempty :: Lifetime # mappend :: Lifetime -> Lifetime -> Lifetime # mconcat :: [Lifetime] -> Lifetime #
Monoid Event # | Since: 4.3.1.0
Methods mempty :: Event # mappend :: Event -> Event -> Event # mconcat :: [Event] -> Event #
Monoid [a] # | Since: 2.1
Methods mempty :: [a] # mappend :: [a] -> [a] -> [a] # mconcat :: [[a]] -> [a] #
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 # mappend :: Maybe a -> Maybe a -> Maybe a # mconcat :: [Maybe a] -> Maybe a #
Monoid a => Monoid (IO a) # | Since: 4.9.0.0
Methods mempty :: IO a # mappend :: IO a -> IO a -> IO a # mconcat :: [IO a] -> IO a #
Monoid (Last a) # | Since: 2.1
Methods mempty :: Last a # mappend :: Last a -> Last a -> Last a # mconcat :: [Last a] -> Last a #
Monoid (First a) # | Since: 2.1
Methods mempty :: First a # mappend :: First a -> First a -> First a # mconcat :: [First a] -> First a #
Num a => Monoid (Product a) # | Since: 2.1
Methods mempty :: Product a # mappend :: Product a -> Product a -> Product a # mconcat :: [Product a] -> Product a #
Num a => Monoid (Sum a) # | Since: 2.1
Methods mempty :: Sum a # mappend :: Sum a -> Sum a -> Sum a # mconcat :: [Sum a] -> Sum a #
Monoid (Endo a) # | Since: 2.1
Methods mempty :: Endo a # mappend :: Endo a -> Endo a -> Endo a # mconcat :: [Endo a] -> Endo a #
Monoid a => Monoid (Dual a) # | Since: 2.1
Methods mempty :: Dual a # mappend :: Dual a -> Dual a -> Dual a # mconcat :: [Dual a] -> Dual a #
Monoid a => Monoid (Identity a) # |
Methods mempty :: Identity a # mappend :: Identity a -> Identity a -> Identity a # mconcat :: [Identity a] -> Identity a #
Semigroup a => Monoid (Option a) # | Since: 4.9.0.0
Methods mempty :: Option a # mappend :: Option a -> Option a -> Option a # mconcat :: [Option a] -> Option a #
Monoid m => Monoid (WrappedMonoid m) # | Since: 4.9.0.0
Methods mempty :: WrappedMonoid m # mappend :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m # mconcat :: [WrappedMonoid m] -> WrappedMonoid m #
(Ord a, Bounded a) => Monoid (Max a) # | Since: 4.9.0.0
Methods mempty :: Max a # mappend :: Max a -> Max a -> Max a # mconcat :: [Max a] -> Max a #
(Ord a, Bounded a) => Monoid (Min a) # | Since: 4.9.0.0
Methods mempty :: Min a # mappend :: Min a -> Min a -> Min a # mconcat :: [Min a] -> Min a #
Monoid b => Monoid (a -> b) # | Since: 2.1
Methods mempty :: a -> b # mappend :: (a -> b) -> (a -> b) -> a -> b # mconcat :: [a -> b] -> a -> b #
(Monoid a, Monoid b) => Monoid (a, b) # | Since: 2.1
Methods mempty :: (a, b) # mappend :: (a, b) -> (a, b) -> (a, b) # mconcat :: [(a, b)] -> (a, b) #
Monoid (Proxy k s) # | Since: 4.7.0.0
Methods mempty :: Proxy k s # mappend :: Proxy k s -> Proxy k s -> Proxy k s # mconcat :: [Proxy k s] -> Proxy k s #
(Monoid a, Monoid b, Monoid c) => Monoid (a, b, c) # | Since: 2.1
Methods mempty :: (a, b, c) # mappend :: (a, b, c) -> (a, b, c) -> (a, b, c) # mconcat :: [(a, b, c)] -> (a, b, c) #
Alternative f => Monoid (Alt * f a) # | Since: 4.8.0.0
Methods mempty :: Alt * f a # mappend :: Alt * f a -> Alt * f a -> Alt * f a # mconcat :: [Alt * f a] -> Alt * f a #
Monoid a => Monoid (Const k a b) # |
Methods mempty :: Const k a b # mappend :: Const k a b -> Const k a b -> Const k a b # mconcat :: [Const k a b] -> Const k a b #
(Monoid a, Monoid b, Monoid c, Monoid d) => Monoid (a, b, c, d) # | Since: 2.1
Methods mempty :: (a, b, c, d) # mappend :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) # mconcat :: [(a, b, c, d)] -> (a, b, c, d) #
(Monoid a, Monoid b, Monoid c, Monoid d, Monoid e) => Monoid (a, b, c, d, e) # | Since: 2.1
Methods mempty :: (a, b, c, d, e) # mappend :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) # mconcat :: [(a, b, c, d, e)] -> (a, b, c, d, e) #

## Monads and functors

class Functor f where #

The `Functor` class is used for types that can be mapped over. Instances of `Functor` should satisfy the following laws:

    fmap id  ==  id
    fmap (f . g)  ==  fmap f . fmap g

The instances of `Functor` for lists, `Maybe` and `IO` satisfy these laws.

Minimal complete definition

fmap

Methods

fmap :: (a -> b) -> f a -> f b #

(<$) :: a -> f b -> f a infixl 4 #

Replace all locations in the input with the same value. The default definition is ``fmap` . `const``, but this may be overridden with a more efficient version.

Instances

Functor [] # | Since: 2.1
Methods fmap :: (a -> b) -> [a] -> [b] # (<$) :: a -> [b] -> [a] #
Functor Maybe # | Since: 2.1
Methods fmap :: (a -> b) -> Maybe a -> Maybe b # (<$) :: a -> Maybe b -> Maybe a #
Functor IO # | Since: 2.1
Methods fmap :: (a -> b) -> IO a -> IO b # (<$) :: a -> IO b -> IO a #
Functor Par1 # |
Methods fmap :: (a -> b) -> Par1 a -> Par1 b # (<$) :: a -> Par1 b -> Par1 a #
Functor ReadP # | Since: 2.1
Methods fmap :: (a -> b) -> ReadP a -> ReadP b # (<$) :: a -> ReadP b -> ReadP a #
Functor ReadPrec # | Since: 2.1
Methods fmap :: (a -> b) -> ReadPrec a -> ReadPrec b # (<$) :: a -> ReadPrec b -> ReadPrec a #
Functor Last # |
Methods fmap :: (a -> b) -> Last a -> Last b # (<$) :: a -> Last b -> Last a #
Functor First # |
Methods fmap :: (a -> b) -> First a -> First b # (<$) :: a -> First b -> First a #
Functor Product # | Since: 4.8.0.0
Methods fmap :: (a -> b) -> Product a -> Product b # (<$) :: a -> Product b -> Product a #
Functor Sum # | Since: 4.8.0.0
Methods fmap :: (a -> b) -> Sum a -> Sum b # (<$) :: a -> Sum b -> Sum a #
Functor Dual # | Since: 4.8.0.0
Methods fmap :: (a -> b) -> Dual a -> Dual b # (<$) :: a -> Dual b -> Dual a #
Functor STM # | Since: 4.3.0.0
Methods fmap :: (a -> b) -> STM a -> STM b # (<$) :: a -> STM b -> STM a #
Functor Handler # | Since: 4.6.0.0
Methods fmap :: (a -> b) -> Handler a -> Handler b # (<$) :: a -> Handler b -> Handler a #
Functor Identity # | Since: 4.8.0.0
Methods fmap :: (a -> b) -> Identity a -> Identity b # (<$) :: a -> Identity b -> Identity a #
Functor ZipList # |
Methods fmap :: (a -> b) -> ZipList a -> ZipList b # (<$) :: a -> ZipList b -> ZipList a #
Functor ArgDescr # | Since: 4.6.0.0
Methods fmap :: (a -> b) -> ArgDescr a -> ArgDescr b # (<$) :: a -> ArgDescr b -> ArgDescr a #
Functor OptDescr # | Since: 4.6.0.0
Methods fmap :: (a -> b) -> OptDescr a -> OptDescr b # (<$) :: a -> OptDescr b -> OptDescr a #
Functor ArgOrder # | Since: 4.6.0.0
Methods fmap :: (a -> b) -> ArgOrder a -> ArgOrder b # (<$) :: a -> ArgOrder b -> ArgOrder a #
Functor NonEmpty # | Since: 4.9.0.0
Methods fmap :: (a -> b) -> NonEmpty a -> NonEmpty b # (<$) :: a -> NonEmpty b -> NonEmpty a #
Functor Option # | Since: 4.9.0.0
Methods fmap :: (a -> b) -> Option a -> Option b # (<$) :: a -> Option b -> Option a #
Functor Last # | Since: 4.9.0.0
Methods fmap :: (a -> b) -> Last a -> Last b # (<$) :: a -> Last b -> Last a #
Functor First # | Since: 4.9.0.0
Methods fmap :: (a -> b) -> First a -> First b # (<$) :: a -> First b -> First a #
Functor Max # | Since: 4.9.0.0
Methods fmap :: (a -> b) -> Max a -> Max b # (<$) :: a -> Max b -> Max a #
Functor Min # | Since: 4.9.0.0
Methods fmap :: (a -> b) -> Min a -> Min b # (<$) :: a -> Min b -> Min a #
Functor Complex # |
Methods fmap :: (a -> b) -> Complex a -> Complex b # (<$) :: a -> Complex b -> Complex a #
Functor (Either a) # | Since: 3.0
Methods fmap :: (a -> b) -> Either a a -> Either a b # (<$) :: a -> Either a b -> Either a a #
Functor (V1 *) # |
Methods fmap :: (a -> b) -> V1 * a -> V1 * b # (<$) :: a -> V1 * b -> V1 * a #
Functor (U1 *) # | Since: 4.9.0.0
Methods fmap :: (a -> b) -> U1 * a -> U1 * b # (<$) :: a -> U1 * b -> U1 * a #
Functor ((,) a) # | Since: 2.1
Methods fmap :: (a -> b) -> (a, a) -> (a, b) # (<$) :: a -> (a, b) -> (a, a) #
Functor (ST s) # | Since: 2.1
Methods fmap :: (a -> b) -> ST s a -> ST s b # (<$) :: a -> ST s b -> ST s a #
Functor (Proxy *) # | Since: 4.7.0.0
Methods fmap :: (a -> b) -> Proxy * a -> Proxy * b # (<$) :: a -> Proxy * b -> Proxy * a #
Arrow a => Functor (ArrowMonad a) # | Since: 4.6.0.0
Methods fmap :: (a -> b) -> ArrowMonad a a -> ArrowMonad a b # (<$) :: a -> ArrowMonad a b -> ArrowMonad a a #
Monad m => Functor (WrappedMonad m) # | Since: 2.1
Methods fmap :: (a -> b) -> WrappedMonad m a -> WrappedMonad m b # (<$) :: a -> WrappedMonad m b -> WrappedMonad m a #
Functor (ST s) # | Since: 2.1
Methods fmap :: (a -> b) -> ST s a -> ST s b # (<$) :: a -> ST s b -> ST s a #
Functor (Arg a) # | Since: 4.9.0.0
Methods fmap :: (a -> b) -> Arg a a -> Arg a b # (<$) :: a -> Arg a b -> Arg a a #
Functor f => Functor (Rec1 * f) # |
Methods fmap :: (a -> b) -> Rec1 * f a -> Rec1 * f b # (<$) :: a -> Rec1 * f b -> Rec1 * f a #
Functor (URec * Char) # |
Methods fmap :: (a -> b) -> URec * Char a -> URec * Char b # (<$) :: a -> URec * Char b -> URec * Char a #
Functor (URec * Double) # |
Methods fmap :: (a -> b) -> URec * Double a -> URec * Double b # (<$) :: a -> URec * Double b -> URec * Double a #
Functor (URec * Float) # |
Methods fmap :: (a -> b) -> URec * Float a -> URec * Float b # (<$) :: a -> URec * Float b -> URec * Float a #
Functor (URec * Int) # |
Methods fmap :: (a -> b) -> URec * Int a -> URec * Int b # (<$) :: a -> URec * Int b -> URec * Int a #
Functor (URec * Word) # |
Methods fmap :: (a -> b) -> URec * Word a -> URec * Word b # (<$) :: a -> URec * Word b -> URec * Word a #
Functor (URec * (Ptr ())) # |
Methods fmap :: (a -> b) -> URec * (Ptr ()) a -> URec * (Ptr ()) b # (<$) :: a -> URec * (Ptr ()) b -> URec * (Ptr ()) a #
Functor f => Functor (Alt * f) # |
Methods fmap :: (a -> b) -> Alt * f a -> Alt * f b # (<$) :: a -> Alt * f b -> Alt * f a #
Functor (Const * m) # | Since: 2.1
Methods fmap :: (a -> b) -> Const * m a -> Const * m b # (<$) :: a -> Const * m b -> Const * m a #
Arrow a => Functor (WrappedArrow a b) # | Since: 2.1
Methods fmap :: (a -> b) -> WrappedArrow a b a -> WrappedArrow a b b # (<$) :: a -> WrappedArrow a b b -> WrappedArrow a b a #
Functor ((->) LiftedRep LiftedRep r) # | Since: 2.1
Methods fmap :: (a -> b) -> (LiftedRep -> LiftedRep) r a -> (LiftedRep -> LiftedRep) r b # (<$) :: a -> (LiftedRep -> LiftedRep) r b -> (LiftedRep -> LiftedRep) r a #
Functor (K1 * i c) # |
Methods fmap :: (a -> b) -> K1 * i c a -> K1 * i c b # (<$) :: a -> K1 * i c b -> K1 * i c a #
(Functor g, Functor f) => Functor ((:+:) * f g) # |
Methods fmap :: (a -> b) -> (* :+: f) g a -> (* :+: f) g b # (<$) :: a -> (* :+: f) g b -> (* :+: f) g a #
(Functor g, Functor f) => Functor ((:*:) * f g) # |
Methods fmap :: (a -> b) -> (* :*: f) g a -> (* :*: f) g b # (<$) :: a -> (* :*: f) g b -> (* :*: f) g a #
(Functor f, Functor g) => Functor (Sum * f g) # | Since: 4.9.0.0
Methods fmap :: (a -> b) -> Sum * f g a -> Sum * f g b # (<$) :: a -> Sum * f g b -> Sum * f g a #
(Functor f, Functor g) => Functor (Product * f g) # | Since: 4.9.0.0
Methods fmap :: (a -> b) -> Product * f g a -> Product * f g b # (<$) :: a -> Product * f g b -> Product * f g a #
Functor f => Functor (M1 * i c f) # |
Methods fmap :: (a -> b) -> M1 * i c f a -> M1 * i c f b # (<$) :: a -> M1 * i c f b -> M1 * i c f a #
(Functor g, Functor f) => Functor ((:.:) * * f g) # |
Methods fmap :: (a -> b) -> (* :.: *) f g a -> (* :.: *) f g b # (<$) :: a -> (* :.: *) f g b -> (* :.: *) f g a #
(Functor f, Functor g) => Functor (Compose * * f g) # | Since: 4.9.0.0
Methods fmap :: (a -> b) -> Compose * * f g a -> Compose * * f g b # (<$) :: a -> Compose * * f g b -> Compose * * f g a #

(<$>) :: Functor f => (a -> b) -> f a -> f b infixl 4 #

An infix synonym for `fmap`.

The name of this operator is an allusion to `$`. Note the similarities between their types:

     ($)  ::              (a -> b) ->   a ->   b
    (<$>) :: Functor f => (a -> b) -> f a -> f b

Whereas `$` is function application, `<$>` is function application lifted over a `Functor`.

#### Examples

Convert from a ``Maybe` `Int`` to a ``Maybe` `String`` using `show`:

    >>> show <$> Nothing
    Nothing
    >>> show <$> Just 3
    Just "3"

Convert from an ``Either` `Int` `Int`` to an ``Either` `Int`` `String` using `show`:

    >>> show <$> Left 17
    Left 17
    >>> show <$> Right 17
    Right "17"

Double each element of a list:

    >>> (*2) <$> [1,2,3]
    [2,4,6]

Apply `even` to the second element of a pair:

    >>> even <$> (2,2)
    (2,True)

class Functor f => Applicative f where #

A functor with application, providing operations to

- embed pure expressions (`pure`), and
- sequence computations and combine their results (`<*>` and `liftA2`).

A minimal complete definition must include implementations of `pure` and of either `<*>` or `liftA2`. If it defines both, then they must behave the same as their default definitions:

`(`<*>`) = `liftA2` `id`` ``liftA2` f x y = f `<$>` x `<*>` y`

Further, any definition must satisfy the following:

identity

      pure id <*> v = v

composition

      pure (.) <*> u <*> v <*> w = u <*> (v <*> w)

homomorphism

      pure f <*> pure x = pure (f x)

interchange

      u <*> pure y = pure ($ y) <*> u

The other methods have the following default definitions, which may be overridden with equivalent specialized implementations:

-     u *> v = (id <$ u) <*> v

-     u <* v = liftA2 const u v

As a consequence of these laws, the `Functor` instance for `f` will satisfy

-     fmap f x = pure f <*> x

It may be useful to note that supposing

    forall x y. p (q x y) = f x . g y

it follows from the above that

    liftA2 p (liftA2 q u v) = liftA2 f u . liftA2 g v

If `f` is also a `Monad`, it should satisfy

-     pure = return

-     (<*>) = ap

(which implies that `pure` and `<*>` satisfy the applicative functor laws).

Minimal complete definition

pure, ((<*>) | liftA2)

Methods

pure :: a -> f a #

Lift a value.

(<*>) :: f (a -> b) -> f a -> f b infixl 4 #

Sequential application.

A few functors support an implementation of `<*>` that is more efficient than the default one.

(*>) :: f a -> f b -> f b infixl 4 #

Sequence actions, discarding the value of the first argument.

(<*) :: f a -> f b -> f a infixl 4 #

Sequence actions, discarding the value of the second argument.

Instances

Applicative [] # | Since: 2.1
Methods pure :: a -> [a] # (<*>) :: [a -> b] -> [a] -> [b] # liftA2 :: (a -> b -> c) -> [a] -> [b] -> [c] # (*>) :: [a] -> [b] -> [b] # (<*) :: [a] -> [b] -> [a] #
Applicative Maybe # | Since: 2.1
Methods pure :: a -> Maybe a # (<*>) :: Maybe (a -> b) -> Maybe a -> Maybe b # liftA2 :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c # (*>) :: Maybe a -> Maybe b -> Maybe b # (<*) :: Maybe a -> Maybe b -> Maybe a #
Applicative IO # | Since: 2.1
Methods pure :: a -> IO a # (<*>) :: IO (a -> b) -> IO a -> IO b # liftA2 :: (a -> b -> c) -> IO a -> IO b -> IO c # (*>) :: IO a -> IO b -> IO b # (<*) :: IO a -> IO b -> IO a #
Applicative Par1 # | Since: 4.9.0.0
Methods pure :: a -> Par1 a # (<*>) :: Par1 (a -> b) -> Par1 a -> Par1 b # liftA2 :: (a -> b -> c) -> Par1 a -> Par1 b -> Par1 c # (*>) :: Par1 a -> Par1 b -> Par1 b # (<*) :: Par1 a -> Par1 b -> Par1 a #
Applicative ReadP # | Since: 4.6.0.0
Methods pure :: a -> ReadP a # (<*>) :: ReadP (a -> b) -> ReadP a -> ReadP b # liftA2 :: (a -> b -> c) -> ReadP a -> ReadP b -> ReadP c # (*>) :: ReadP a -> ReadP b -> ReadP b # (<*) :: ReadP a -> ReadP b -> ReadP a #
Applicative ReadPrec # | Since: 4.6.0.0
Methods pure :: a -> ReadPrec a # (<*>) :: ReadPrec (a -> b) -> ReadPrec a -> ReadPrec b # liftA2 :: (a -> b -> c) -> ReadPrec a -> ReadPrec b -> ReadPrec c # (*>) :: ReadPrec a -> ReadPrec b -> ReadPrec b # (<*) :: ReadPrec a -> ReadPrec b -> ReadPrec a #
Applicative Last # |
Methods pure :: a -> Last a # (<*>) :: Last (a -> b) -> Last a -> Last b # liftA2 :: (a -> b -> c) -> Last a -> Last b -> Last c # (*>) :: Last a -> Last b -> Last b # (<*) :: Last a -> Last b -> Last a #
Applicative First # |
Methods pure :: a -> First a # (<*>) :: First (a -> b) -> First a -> First b # liftA2 :: (a -> b -> c) -> First a -> First b -> First c # (*>) :: First a -> First b -> First b # (<*) :: First a -> First b -> First a #
Applicative Product # | Since: 4.8.0.0
Methods pure :: a -> Product a # (<*>) :: Product (a -> b) -> Product a -> Product b # liftA2 :: (a -> b -> c) -> Product a -> Product b -> Product c # (*>) :: Product a -> Product b -> Product b # (<*) :: Product a -> Product b -> Product a #
Applicative Sum # | Since: 4.8.0.0
Methods pure :: a -> Sum a # (<*>) :: Sum (a -> b) -> Sum a -> Sum b # liftA2 :: (a -> b -> c) -> Sum a -> Sum b -> Sum c # (*>) :: Sum a -> Sum b -> Sum b # (<*) :: Sum a -> Sum b -> Sum a #
Applicative Dual # | Since: 4.8.0.0
Methods pure :: a -> Dual a # (<*>) :: Dual (a -> b) -> Dual a -> Dual b # liftA2 :: (a -> b -> c) -> Dual a -> Dual b -> Dual c # (*>) :: Dual a -> Dual b -> Dual b # (<*) :: Dual a -> Dual b -> Dual a #
Applicative STM # | Since: 4.8.0.0
Methods pure :: a -> STM a # (<*>) :: STM (a -> b) -> STM a -> STM b # liftA2 :: (a -> b -> c) -> STM a -> STM b -> STM c # (*>) :: STM a -> STM b -> STM b # (<*) :: STM a -> STM b -> STM a #
Applicative Identity # | Since: 4.8.0.0
Methods pure :: a -> Identity a # (<*>) :: Identity (a -> b) -> Identity a -> Identity b # liftA2 :: (a -> b -> c) -> Identity a -> Identity b -> Identity c # (*>) :: Identity a -> Identity b -> Identity b # (<*) :: Identity a -> Identity b -> Identity a #

Applicative ZipList #

    f '<$>' 'ZipList' xs1 '<*>' ... '<*>' 'ZipList' xsN

# `ZipList` (zipWithN f xs1 ... xsN)

where `zipWithN` refers to the `zipWith` function of the appropriate arity (`zipWith`, `zipWith3`, `zipWith4`, ...). For example:

    (\a b c -> stimes c [a, b]) <$> ZipList "abcd" <*> ZipList "567" <*> ZipList [1..]
        = ZipList (zipWith3 (\a b c -> stimes c [a, b]) "abcd" "567" [1..])
        = ZipList {getZipList = ["a5","b6b6","c7c7c7"]}

Since: 2.1

Methods pure :: a -> ZipList a # (<*>) :: ZipList (a -> b) -> ZipList a -> ZipList b # liftA2 :: (a -> b -> c) -> ZipList a -> ZipList b -> ZipList c # (*>) :: ZipList a -> ZipList b -> ZipList b # (<*) :: ZipList a -> ZipList b -> ZipList a #
Applicative NonEmpty # | Since: 4.9.0.0
Methods pure :: a -> NonEmpty a # (<*>) :: NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b # liftA2 :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c # (*>) :: NonEmpty a -> NonEmpty b -> NonEmpty b # (<*) :: NonEmpty a -> NonEmpty b -> NonEmpty a #
Applicative Option # | Since: 4.9.0.0
Methods pure :: a -> Option a # (<*>) :: Option (a -> b) -> Option a -> Option b # liftA2 :: (a -> b -> c) -> Option a -> Option b -> Option c # (*>) :: Option a -> Option b -> Option b # (<*) :: Option a -> Option b -> Option a #
Applicative Last # | Since: 4.9.0.0
Methods pure :: a -> Last a # (<*>) :: Last (a -> b) -> Last a -> Last b # liftA2 :: (a -> b -> c) -> Last a -> Last b -> Last c # (*>) :: Last a -> Last b -> Last b # (<*) :: Last a -> Last b -> Last a #
Applicative First # | Since: 4.9.0.0
Methods pure :: a -> First a # (<*>) :: First (a -> b) -> First a -> First b # liftA2 :: (a -> b -> c) -> First a -> First b -> First c # (*>) :: First a -> First b -> First b # (<*) :: First a -> First b -> First a #
Applicative Max # | Since: 4.9.0.0
Methods pure :: a -> Max a # (<*>) :: Max (a -> b) -> Max a -> Max b # liftA2 :: (a -> b -> c) -> Max a -> Max b -> Max c # (*>) :: Max a -> Max b -> Max b # (<*) :: Max a -> Max b -> Max a #
Applicative Min # | Since: 4.9.0.0
Methods pure :: a -> Min a # (<*>) :: Min (a -> b) -> Min a -> Min b # liftA2 :: (a -> b -> c) -> Min a -> Min b -> Min c # (*>) :: Min a -> Min b -> Min b # (<*) :: Min a -> Min b -> Min a #
Applicative Complex # | Since: 4.9.0.0
Methods pure :: a -> Complex a # (<*>) :: Complex (a -> b) -> Complex a -> Complex b # liftA2 :: (a -> b -> c) -> Complex a -> Complex b -> Complex c # (*>) :: Complex a -> Complex b -> Complex b # (<*) :: Complex a -> Complex b -> Complex a #
Applicative (Either e) # | Since: 3.0
Methods pure :: a -> Either e a # (<*>) :: Either e (a -> b) -> Either e a -> Either e b # liftA2 :: (a -> b -> c) -> Either e a -> Either e b -> Either e c # (*>) :: Either e a -> Either e b -> Either e b # (<*) :: Either e a -> Either e b -> Either e a #
Applicative (U1 *) # | Since: 4.9.0.0
Methods pure :: a -> U1 * a # (<*>) :: U1 * (a -> b) -> U1 * a -> U1 * b # liftA2 :: (a -> b -> c) -> U1 * a -> U1 * b -> U1 * c # (*>) :: U1 * a -> U1 * b -> U1 * b # (<*) :: U1 * a -> U1 * b -> U1 * a #

Monoid a => Applicative ((,) a) #

For tuples, the `Monoid` constraint on `a` determines how the first values merge. For example, `String`s concatenate:

    ("hello ", (+15)) <*> ("world!", 2002)
    ("hello world!",2017)

Since: 2.1

Methods pure :: a -> (a, a) # (<*>) :: (a, a -> b) -> (a, a) -> (a, b) # liftA2 :: (a -> b -> c) -> (a, a) -> (a, b) -> (a, c) # (*>) :: (a, a) -> (a, b) -> (a, b) # (<*) :: (a, a) -> (a, b) -> (a, a) #
Applicative (ST s) # | Since: 4.4.0.0
Methods pure :: a -> ST s a # (<*>) :: ST s (a -> b) -> ST s a -> ST s b # liftA2 :: (a -> b -> c) -> ST s a -> ST s b -> ST s c # (*>) :: ST s a -> ST s b -> ST s b # (<*) :: ST s a -> ST s b -> ST s a #
Applicative (Proxy *) # | Since: 4.7.0.0
Methods pure :: a -> Proxy * a # (<*>) :: Proxy * (a -> b) -> Proxy * a -> Proxy * b # liftA2 :: (a -> b -> c) -> Proxy * a -> Proxy * b -> Proxy * c # (*>) :: Proxy * a -> Proxy * b -> Proxy * b # (<*) :: Proxy * a -> Proxy * b -> Proxy * a #
Arrow a => Applicative (ArrowMonad a) # | Since: 4.6.0.0
Methods pure :: a -> ArrowMonad a a # (<*>) :: ArrowMonad a (a -> b) -> ArrowMonad a a -> ArrowMonad a b # liftA2 :: (a -> b -> c) -> ArrowMonad a a -> ArrowMonad a b -> ArrowMonad a c # (*>) :: ArrowMonad a a -> ArrowMonad a b -> ArrowMonad a b # (<*) :: ArrowMonad a a -> ArrowMonad a b -> ArrowMonad a a #
Monad m => Applicative (WrappedMonad m) # | Since: 2.1
Methods pure :: a -> WrappedMonad m a # (<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b # liftA2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c # (*>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b # (<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a #
Applicative (ST s) # | Since: 2.1
Methods pure :: a -> ST s a # (<*>) :: ST s (a -> b) -> ST s a -> ST s b # liftA2 :: (a -> b -> c) -> ST s a -> ST s b -> ST s c # (*>) :: ST s a -> ST s b -> ST s b # (<*) :: ST s a -> ST s b -> ST s a #
Applicative f => Applicative (Rec1 * f) # | Since: 4.9.0.0
Methods pure :: a -> Rec1 * f a # (<*>) :: Rec1 * f (a -> b) -> Rec1 * f a -> Rec1 * f b # liftA2 :: (a -> b -> c) -> Rec1 * f a -> Rec1 * f b -> Rec1 * f c # (*>) :: Rec1 * f a -> Rec1 * f b -> Rec1 * f b # (<*) :: Rec1 * f a -> Rec1 * f b -> Rec1 * f a #
Applicative f => Applicative (Alt * f) # |
Methods pure :: a -> Alt * f a # (<*>) :: Alt * f (a -> b) -> Alt * f a -> Alt * f b # liftA2 :: (a -> b -> c) -> Alt * f a -> Alt * f b -> Alt * f c # (*>) :: Alt * f a -> Alt * f b -> Alt * f b # (<*) :: Alt * f a -> Alt * f b -> Alt * f a #
Monoid m => Applicative (Const * m) # | Since: 2.0.1
Methods pure :: a -> Const * m a # (<*>) :: Const * m (a -> b) -> Const * m a -> Const * m b # liftA2 :: (a -> b -> c) -> Const * m a -> Const * m b -> Const * m c # (*>) :: Const * m a -> Const * m b -> Const * m b # (<*) :: Const * m a -> Const * m b -> Const * m a #
Arrow a => Applicative (WrappedArrow a b) # | Since: 2.1
Methods pure :: a -> WrappedArrow a b a # (<*>) :: WrappedArrow a b (a -> b) -> WrappedArrow a b a -> WrappedArrow a b b # liftA2 :: (a -> b -> c) -> WrappedArrow a b a -> WrappedArrow a b b -> WrappedArrow a b c # (*>) :: WrappedArrow a b a -> WrappedArrow a b b -> WrappedArrow a b b # (<*) :: WrappedArrow a b a -> WrappedArrow a b b -> WrappedArrow a b a #
Applicative ((->) LiftedRep LiftedRep a) # | Since: 2.1

Methods

pure :: a -> (LiftedRep -> LiftedRep) a a #

(<*>) :: (LiftedRep -> LiftedRep) a (a -> b) -> (LiftedRep -> LiftedRep) a a -> (LiftedRep -> LiftedRep) a b #

liftA2 :: (a -> b -> c) -> (LiftedRep -> LiftedRep) a a -> (LiftedRep -> LiftedRep) a b -> (LiftedRep -> LiftedRep) a c #

(*>) :: (LiftedRep -> LiftedRep) a a -> (LiftedRep -> LiftedRep) a b -> (LiftedRep -> LiftedRep) a b #

(<*) :: (LiftedRep -> LiftedRep) a a -> (LiftedRep -> LiftedRep) a b -> (LiftedRep -> LiftedRep) a a #

(Applicative f, Applicative g) => Applicative ((:*:) * f g) # | Since: 4.9.0.0
Methods pure :: a -> (* :*: f) g a # (<*>) :: (* :*: f) g (a -> b) -> (* :*: f) g a -> (* :*: f) g b # liftA2 :: (a -> b -> c) -> (* :*: f) g a -> (* :*: f) g b -> (* :*: f) g c # (*>) :: (* :*: f) g a -> (* :*: f) g b -> (* :*: f) g b # (<*) :: (* :*: f) g a -> (* :*: f) g b -> (* :*: f) g a #
(Applicative f, Applicative g) => Applicative (Product * f g) # | Since: 4.9.0.0
Methods pure :: a -> Product * f g a # (<*>) :: Product * f g (a -> b) -> Product * f g a -> Product * f g b # liftA2 :: (a -> b -> c) -> Product * f g a -> Product * f g b -> Product * f g c # (*>) :: Product * f g a -> Product * f g b -> Product * f g b # (<*) :: Product * f g a -> Product * f g b -> Product * f g a #
Applicative f => Applicative (M1 * i c f) # | Since: 4.9.0.0
Methods pure :: a -> M1 * i c f a # (<*>) :: M1 * i c f (a -> b) -> M1 * i c f a -> M1 * i c f b # liftA2 :: (a -> b -> c) -> M1 * i c f a -> M1 * i c f b -> M1 * i c f c # (*>) :: M1 * i c f a -> M1 * i c f b -> M1 * i c f b # (<*) :: M1 * i c f a -> M1 * i c f b -> M1 * i c f a #
(Applicative f, Applicative g) => Applicative ((:.:) * * f g) # | Since: 4.9.0.0
Methods pure :: a -> (* :.: *) f g a # (<*>) :: (* :.: *) f g (a -> b) -> (* :.: *) f g a -> (* :.: *) f g b # liftA2 :: (a -> b -> c) -> (* :.: *) f g a -> (* :.: *) f g b -> (* :.: *) f g c # (*>) :: (* :.: *) f g a -> (* :.: *) f g b -> (* :.: *) f g b # (<*) :: (* :.: *) f g a -> (* :.: *) f g b -> (* :.: *) f g a #
(Applicative f, Applicative g) => Applicative (Compose * * f g) # | Since: 4.9.0.0
Methods pure :: a -> Compose * * f g a # (<*>) :: Compose * * f g (a -> b) -> Compose * * f g a -> Compose * * f g b # liftA2 :: (a -> b -> c) -> Compose * * f g a -> Compose * * f g b -> Compose * * f g c # (*>) :: Compose * * f g a -> Compose * * f g b -> Compose * * f g b # (<*) :: Compose * * f g a -> Compose * * f g b -> Compose * * f g a #

class Applicative m => Monad m where #

The `Monad` class defines the basic operations over a monad, a concept from a branch of mathematics known as category theory. From the perspective of a Haskell programmer, however, it is best to think of a monad as an abstract datatype of actions. Haskell's `do` expressions provide a convenient syntax for writing monadic expressions.

Instances of `Monad` should satisfy the following laws:

-     return a >>= k  =  k a

-     m >>= return  =  m

-     m >>= (\x -> k x >>= h)  =  (m >>= k) >>= h

Furthermore, the `Monad` and `Applicative` operations should relate as follows:

-     pure = return

-     (<*>) = ap

The above laws imply:

-     fmap f xs  =  xs >>= return . f

-     (>>) = (*>)

and that `pure` and (`<*>`) satisfy the applicative functor laws.

The instances of `Monad` for lists, `Maybe` and `IO` defined in the Prelude satisfy these laws.

Minimal complete definition

(>>=)

Methods

(>>=) :: forall a b. m a -> (a -> m b) -> m b infixl 1 #

Sequentially compose two actions, passing any value produced by the first as an argument to the second.

(>>) :: forall a b. m a -> m b -> m b infixl 1 #

Sequentially compose two actions, discarding any value produced by the first, like sequencing operators (such as the semicolon) in imperative languages.

return :: a -> m a #

Inject a value into the monadic type.

fail :: String -> m a #

Fail with a message. This operation is not part of the mathematical definition of a monad, but is invoked on pattern-match failure in a `do` expression.

As part of the MonadFail proposal (MFP), this function is moved to its own class `MonadFail` (see Control.Monad.Fail for more details). The definition here will be removed in a future release.

Instances

Monad [] # | Since: 2.1
Methods (>>=) :: [a] -> (a -> [b]) -> [b] # (>>) :: [a] -> [b] -> [b] # return :: a -> [a] # fail :: String -> [a] #
Monad Maybe # | Since: 2.1
Methods (>>=) :: Maybe a -> (a -> Maybe b) -> Maybe b # (>>) :: Maybe a -> Maybe b -> Maybe b # return :: a -> Maybe a # fail :: String -> Maybe a #
Monad IO # | Since: 2.1
Methods (>>=) :: IO a -> (a -> IO b) -> IO b # (>>) :: IO a -> IO b -> IO b # return :: a -> IO a # fail :: String -> IO a #
Monad Par1 # | Since: 4.9.0.0
Methods (>>=) :: Par1 a -> (a -> Par1 b) -> Par1 b # (>>) :: Par1 a -> Par1 b -> Par1 b # return :: a -> Par1 a # fail :: String -> Par1 a #
Monad ReadP # | Since: 2.1
Methods (>>=) :: ReadP a -> (a -> ReadP b) -> ReadP b # (>>) :: ReadP a -> ReadP b -> ReadP b # return :: a -> ReadP a # fail :: String -> ReadP a #
Monad ReadPrec # | Since: 2.1
Methods (>>=) :: ReadPrec a -> (a -> ReadPrec b) -> ReadPrec b # (>>) :: ReadPrec a -> ReadPrec b -> ReadPrec b # return :: a -> ReadPrec a # fail :: String -> ReadPrec a #
Monad Last # |
Methods (>>=) :: Last a -> (a -> Last b) -> Last b # (>>) :: Last a -> Last b -> Last b # return :: a -> Last a # fail :: String -> Last a #
Monad First # |
Methods (>>=) :: First a -> (a -> First b) -> First b # (>>) :: First a -> First b -> First b # return :: a -> First a # fail :: String -> First a #
Monad Product # | Since: 4.8.0.0
Methods (>>=) :: Product a -> (a -> Product b) -> Product b # (>>) :: Product a -> Product b -> Product b # return :: a -> Product a # fail :: String -> Product a #
Monad Sum # | Since: 4.8.0.0
Methods (>>=) :: Sum a -> (a -> Sum b) -> Sum b # (>>) :: Sum a -> Sum b -> Sum b # return :: a -> Sum a # fail :: String -> Sum a #
Monad Dual # | Since: 4.8.0.0
Methods (>>=) :: Dual a -> (a -> Dual b) -> Dual b # (>>) :: Dual a -> Dual b -> Dual b # return :: a -> Dual a # fail :: String -> Dual a #
Monad STM # | Since: 4.3.0.0
Methods (>>=) :: STM a -> (a -> STM b) -> STM b # (>>) :: STM a -> STM b -> STM b # return :: a -> STM a # fail :: String -> STM a #
Monad Identity # | Since: 4.8.0.0
Methods (>>=) :: Identity a -> (a -> Identity b) -> Identity b # (>>) :: Identity a -> Identity b -> Identity b # return :: a -> Identity a # fail :: String -> Identity a #
Monad NonEmpty # | Since: 4.9.0.0
Methods (>>=) :: NonEmpty a -> (a -> NonEmpty b) -> NonEmpty b # (>>) :: NonEmpty a -> NonEmpty b -> NonEmpty b # return :: a -> NonEmpty a # fail :: String -> NonEmpty a #
Monad Option # | Since: 4.9.0.0
Methods (>>=) :: Option a -> (a -> Option b) -> Option b # (>>) :: Option a -> Option b -> Option b # return :: a -> Option a # fail :: String -> Option a #
Monad Last # | Since: 4.9.0.0
Methods (>>=) :: Last a -> (a -> Last b) -> Last b # (>>) :: Last a -> Last b -> Last b # return :: a -> Last a # fail :: String -> Last a #
Monad First # | Since: 4.9.0.0
Methods (>>=) :: First a -> (a -> First b) -> First b # (>>) :: First a -> First b -> First b # return :: a -> First a # fail :: String -> First a #
Monad Max # | Since: 4.9.0.0
Methods (>>=) :: Max a -> (a -> Max b) -> Max b # (>>) :: Max a -> Max b -> Max b # return :: a -> Max a # fail :: String -> Max a #
Monad Min # | Since: 4.9.0.0
Methods (>>=) :: Min a -> (a -> Min b) -> Min b # (>>) :: Min a -> Min b -> Min b # return :: a -> Min a # fail :: String -> Min a #
Monad Complex # | Since: 4.9.0.0
Methods (>>=) :: Complex a -> (a -> Complex b) -> Complex b # (>>) :: Complex a -> Complex b -> Complex b # return :: a -> Complex a # fail :: String -> Complex a #
Monad (Either e) # | Since: 4.4.0.0
Methods (>>=) :: Either e a -> (a -> Either e b) -> Either e b # (>>) :: Either e a -> Either e b -> Either e b # return :: a -> Either e a # fail :: String -> Either e a #
Monad (U1 *) # | Since: 4.9.0.0
Methods (>>=) :: U1 * a -> (a -> U1 * b) -> U1 * b # (>>) :: U1 * a -> U1 * b -> U1 * b # return :: a -> U1 * a # fail :: String -> U1 * a #
Monoid a => Monad ((,) a) # | Since: 4.9.0.0
Methods (>>=) :: (a, a) -> (a -> (a, b)) -> (a, b) # (>>) :: (a, a) -> (a, b) -> (a, b) # return :: a -> (a, a) # fail :: String -> (a, a) #
Monad (ST s) # | Since: 2.1
Methods (>>=) :: ST s a -> (a -> ST s b) -> ST s b # (>>) :: ST s a -> ST s b -> ST s b # return :: a -> ST s a # fail :: String -> ST s a #
Monad (Proxy *) # | Since: 4.7.0.0
Methods (>>=) :: Proxy * a -> (a -> Proxy * b) -> Proxy * b # (>>) :: Proxy * a -> Proxy * b -> Proxy * b # return :: a -> Proxy * a # fail :: String -> Proxy * a #
ArrowApply a => Monad (ArrowMonad a) # | Since: 2.1
Methods (>>=) :: ArrowMonad a a -> (a -> ArrowMonad a b) -> ArrowMonad a b # (>>) :: ArrowMonad a a -> ArrowMonad a b -> ArrowMonad a b # return :: a -> ArrowMonad a a # fail :: String -> ArrowMonad a a #
Monad m => Monad (WrappedMonad m) # |
Methods (>>=) :: WrappedMonad m a -> (a -> WrappedMonad m b) -> WrappedMonad m b # (>>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b # return :: a -> WrappedMonad m a # fail :: String -> WrappedMonad m a #
Monad (ST s) # | Since: 2.1
Methods (>>=) :: ST s a -> (a -> ST s b) -> ST s b # (>>) :: ST s a -> ST s b -> ST s b # return :: a -> ST s a # fail :: String -> ST s a #
Monad f => Monad (Rec1 * f) # | Since: 4.9.0.0
Methods (>>=) :: Rec1 * f a -> (a -> Rec1 * f b) -> Rec1 * f b # (>>) :: Rec1 * f a -> Rec1 * f b -> Rec1 * f b # return :: a -> Rec1 * f a # fail :: String -> Rec1 * f a #
Monad f => Monad (Alt * f) # |
Methods (>>=) :: Alt * f a -> (a -> Alt * f b) -> Alt * f b # (>>) :: Alt * f a -> Alt * f b -> Alt * f b # return :: a -> Alt * f a # fail :: String -> Alt * f a #
Monad ((->) LiftedRep LiftedRep r) # | Since: 2.1
Methods (>>=) :: (LiftedRep -> LiftedRep) r a -> (a -> (LiftedRep -> LiftedRep) r b) -> (LiftedRep -> LiftedRep) r b # (>>) :: (LiftedRep -> LiftedRep) r a -> (LiftedRep -> LiftedRep) r b -> (LiftedRep -> LiftedRep) r b # return :: a -> (LiftedRep -> LiftedRep) r a # fail :: String -> (LiftedRep -> LiftedRep) r a #
(Monad f, Monad g) => Monad ((:*:) * f g) # | Since: 4.9.0.0
Methods (>>=) :: (* :*: f) g a -> (a -> (* :*: f) g b) -> (* :*: f) g b # (>>) :: (* :*: f) g a -> (* :*: f) g b -> (* :*: f) g b # return :: a -> (* :*: f) g a # fail :: String -> (* :*: f) g a #
(Monad f, Monad g) => Monad (Product * f g) # | Since: 4.9.0.0
Methods (>>=) :: Product * f g a -> (a -> Product * f g b) -> Product * f g b # (>>) :: Product * f g a -> Product * f g b -> Product * f g b # return :: a -> Product * f g a # fail :: String -> Product * f g a #
Monad f => Monad (M1 * i c f) # | Since: 4.9.0.0
Methods (>>=) :: M1 * i c f a -> (a -> M1 * i c f b) -> M1 * i c f b # (>>) :: M1 * i c f a -> M1 * i c f b -> M1 * i c f b # return :: a -> M1 * i c f a # fail :: String -> M1 * i c f a #

mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m () #

Map each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see `mapM`.

As of base 4.8.0.0, `mapM_` is just `traverse_`, specialized to `Monad`.

sequence_ :: (Foldable t, Monad m) => t (m a) -> m () #

Evaluate each monadic action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see `sequence`.

As of base 4.8.0.0, `sequence_` is just `sequenceA_`, specialized to `Monad`.

(=<<) :: Monad m => (a -> m b) -> m a -> m b infixr 1 #

Same as `>>=`, but with the arguments interchanged.

## Folds and traversals

class Foldable t where #

Data structures that can be folded.

For example, given a data type

    data Tree a = Empty | Leaf a | Node (Tree a) a (Tree a)

a suitable instance would be

    instance Foldable Tree where
       foldMap f Empty = mempty
       foldMap f (Leaf x) = f x
       foldMap f (Node l k r) = foldMap f l `mappend` f k `mappend` foldMap f r

This is suitable even for abstract types, as the monoid is assumed to satisfy the monoid laws. Alternatively, one could define `foldr`:

    instance Foldable Tree where
       foldr f z Empty = z
       foldr f z (Leaf x) = f x z
       foldr f z (Node l k r) = foldr f (f k (foldr f z r)) l

`Foldable` instances are expected to satisfy the following laws:

    foldr f z t = appEndo (foldMap (Endo . f) t ) z

    foldl f z t = appEndo (getDual (foldMap (Dual . Endo . flip f) t)) z

    fold = foldMap id

`sum`, `product`, `maximum`, and `minimum` should all be essentially equivalent to `foldMap` forms, such as

    sum = getSum . foldMap Sum

but may be less defined.

If the type is also a `Functor` instance, it should satisfy

    foldMap f = fold . fmap f

which implies that

    foldMap f . fmap g = foldMap (f . g)

Minimal complete definition

foldMap | foldr

Methods

foldMap :: Monoid m => (a -> m) -> t a -> m #

Map each element of the structure to a monoid, and combine the results.

foldr :: (a -> b -> b) -> b -> t a -> b #

Right-associative fold of a structure.

In the case of lists, `foldr`, when applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left:

    foldr f z [x1, x2, ..., xn] == x1 `f` (x2 `f` ... (xn `f` z)...)

Note that, since the head of the resulting expression is produced by an application of the operator to the first element of the list, `foldr` can produce a terminating expression from an infinite list.

For a general `Foldable` structure this should be semantically identical to,

    foldr f z = foldr f z . toList

foldl :: (b -> a -> b) -> b -> t a -> b #

Left-associative fold of a structure.

In the case of lists, `foldl`, when applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right:

    foldl f z [x1, x2, ..., xn] == (...((z `f` x1) `f` x2) `f`...) `f` xn

Note that to produce the outermost application of the operator the entire input list must be traversed. This means that `foldl'` will diverge if given an infinite list.

Also note that if you want an efficient left-fold, you probably want to use `foldl'` instead of `foldl`. The reason for this is that latter does not force the "inner" results (e.g. `z `f` x1` in the above example) before applying them to the operator (e.g. to `(`f` x2)`). This results in a thunk chain `O(n)` elements long, which then must be evaluated from the outside-in.

For a general `Foldable` structure this should be semantically identical to,

    foldl f z = foldl f z . toList

foldr1 :: (a -> a -> a) -> t a -> a #

A variant of `foldr` that has no base case, and thus may only be applied to non-empty structures.

    foldr1 f = foldr1 f . toList

foldl1 :: (a -> a -> a) -> t a -> a #

A variant of `foldl` that has no base case, and thus may only be applied to non-empty structures.

    foldl1 f = foldl1 f . toList

null :: t a -> Bool #

Test whether the structure is empty. The default implementation is optimized for structures that are similar to cons-lists, because there is no general way to do better.

length :: t a -> Int #

Returns the size/length of a finite structure as an `Int`. The default implementation is optimized for structures that are similar to cons-lists, because there is no general way to do better.

elem :: Eq a => a -> t a -> Bool infix 4 #

Does the element occur in the structure?

maximum :: forall a. Ord a => t a -> a #

The largest element of a non-empty structure.

minimum :: forall a. Ord a => t a -> a #

The least element of a non-empty structure.

sum :: Num a => t a -> a #

The `sum` function computes the sum of the numbers of a structure.

product :: Num a => t a -> a #

The `product` function computes the product of the numbers of a structure.

Instances

Foldable [] # | Since: 2.1

Methods

fold :: Monoid m => [m] -> m #

foldMap :: Monoid m => (a -> m) -> [a] -> m #

foldr :: (a -> b -> b) -> b -> [a] -> b #

foldr' :: (a -> b -> b) -> b -> [a] -> b #

foldl :: (b -> a -> b) -> b -> [a] -> b #

foldl' :: (b -> a -> b) -> b -> [a] -> b #

foldr1 :: (a -> a -> a) -> [a] -> a #

foldl1 :: (a -> a -> a) -> [a] -> a #

toList :: [a] -> [a] #

null :: [a] -> Bool #

length :: [a] -> Int #

elem :: Eq a => a -> [a] -> Bool #

maximum :: Ord a => [a] -> a #

minimum :: Ord a => [a] -> a #

sum :: Num a => [a] -> a #

product :: Num a => [a] -> a #

Foldable Maybe # | Since: 2.1

Methods

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

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

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

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

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

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

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

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

toList :: Maybe a -> [a] #

null :: Maybe a -> Bool #

length :: Maybe a -> Int #

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

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

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

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

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

Foldable Par1 # |

Methods

fold :: Monoid m => Par1 m -> m #

foldMap :: Monoid m => (a -> m) -> Par1 a -> m #

foldr :: (a -> b -> b) -> b -> Par1 a -> b #

foldr' :: (a -> b -> b) -> b -> Par1 a -> b #

foldl :: (b -> a -> b) -> b -> Par1 a -> b #

foldl' :: (b -> a -> b) -> b -> Par1 a -> b #

foldr1 :: (a -> a -> a) -> Par1 a -> a #

foldl1 :: (a -> a -> a) -> Par1 a -> a #

toList :: Par1 a -> [a] #

null :: Par1 a -> Bool #

length :: Par1 a -> Int #

elem :: Eq a => a -> Par1 a -> Bool #

maximum :: Ord a => Par1 a -> a #

minimum :: Ord a => Par1 a -> a #

sum :: Num a => Par1 a -> a #

product :: Num a => Par1 a -> a #

Foldable Last # | Since: 4.8.0.0

Methods

fold :: Monoid m => Last m -> m #

foldMap :: Monoid m => (a -> m) -> Last a -> m #

foldr :: (a -> b -> b) -> b -> Last a -> b #

foldr' :: (a -> b -> b) -> b -> Last a -> b #

foldl :: (b -> a -> b) -> b -> Last a -> b #

foldl' :: (b -> a -> b) -> b -> Last a -> b #

foldr1 :: (a -> a -> a) -> Last a -> a #

foldl1 :: (a -> a -> a) -> Last a -> a #

toList :: Last a -> [a] #

null :: Last a -> Bool #

length :: Last a -> Int #

elem :: Eq a => a -> Last a -> Bool #

maximum :: Ord a => Last a -> a #

minimum :: Ord a => Last a -> a #

sum :: Num a => Last a -> a #

product :: Num a => Last a -> a #

Foldable First # | Since: 4.8.0.0

Methods

fold :: Monoid m => First m -> m #

foldMap :: Monoid m => (a -> m) -> First a -> m #

foldr :: (a -> b -> b) -> b -> First a -> b #

foldr' :: (a -> b -> b) -> b -> First a -> b #

foldl :: (b -> a -> b) -> b -> First a -> b #

foldl' :: (b -> a -> b) -> b -> First a -> b #

foldr1 :: (a -> a -> a) -> First a -> a #

foldl1 :: (a -> a -> a) -> First a -> a #

toList :: First a -> [a] #

null :: First a -> Bool #

length :: First a -> Int #

elem :: Eq a => a -> First a -> Bool #

maximum :: Ord a => First a -> a #

minimum :: Ord a => First a -> a #

sum :: Num a => First a -> a #

product :: Num a => First a -> a #

Foldable Product # | Since: 4.8.0.0

Methods

fold :: Monoid m => Product m -> m #

foldMap :: Monoid m => (a -> m) -> Product a -> m #

foldr :: (a -> b -> b) -> b -> Product a -> b #

foldr' :: (a -> b -> b) -> b -> Product a -> b #

foldl :: (b -> a -> b) -> b -> Product a -> b #

foldl' :: (b -> a -> b) -> b -> Product a -> b #

foldr1 :: (a -> a -> a) -> Product a -> a #

foldl1 :: (a -> a -> a) -> Product a -> a #

toList :: Product a -> [a] #

null :: Product a -> Bool #

length :: Product a -> Int #

elem :: Eq a => a -> Product a -> Bool #

maximum :: Ord a => Product a -> a #

minimum :: Ord a => Product a -> a #

sum :: Num a => Product a -> a #

product :: Num a => Product a -> a #

Foldable Sum # | Since: 4.8.0.0

Methods

fold :: Monoid m => Sum m -> m #

foldMap :: Monoid m => (a -> m) -> Sum a -> m #

foldr :: (a -> b -> b) -> b -> Sum a -> b #

foldr' :: (a -> b -> b) -> b -> Sum a -> b #

foldl :: (b -> a -> b) -> b -> Sum a -> b #

foldl' :: (b -> a -> b) -> b -> Sum a -> b #

foldr1 :: (a -> a -> a) -> Sum a -> a #

foldl1 :: (a -> a -> a) -> Sum a -> a #

toList :: Sum a -> [a] #

null :: Sum a -> Bool #

length :: Sum a -> Int #

elem :: Eq a => a -> Sum a -> Bool #

maximum :: Ord a => Sum a -> a #

minimum :: Ord a => Sum a -> a #

sum :: Num a => Sum a -> a #

product :: Num a => Sum a -> a #

Foldable Dual # | Since: 4.8.0.0

Methods

fold :: Monoid m => Dual m -> m #

foldMap :: Monoid m => (a -> m) -> Dual a -> m #

foldr :: (a -> b -> b) -> b -> Dual a -> b #

foldr' :: (a -> b -> b) -> b -> Dual a -> b #

foldl :: (b -> a -> b) -> b -> Dual a -> b #

foldl' :: (b -> a -> b) -> b -> Dual a -> b #

foldr1 :: (a -> a -> a) -> Dual a -> a #

foldl1 :: (a -> a -> a) -> Dual a -> a #

toList :: Dual a -> [a] #

null :: Dual a -> Bool #

length :: Dual a -> Int #

elem :: Eq a => a -> Dual a -> Bool #

maximum :: Ord a => Dual a -> a #

minimum :: Ord a => Dual a -> a #

sum :: Num a => Dual a -> a #

product :: Num a => Dual a -> a #

Foldable Identity # | Since: 4.8.0.0

Methods

fold :: Monoid m => Identity m -> m #

foldMap :: Monoid m => (a -> m) -> Identity a -> m #

foldr :: (a -> b -> b) -> b -> Identity a -> b #

foldr' :: (a -> b -> b) -> b -> Identity a -> b #

foldl :: (b -> a -> b) -> b -> Identity a -> b #

foldl' :: (b -> a -> b) -> b -> Identity a -> b #

foldr1 :: (a -> a -> a) -> Identity a -> a #

foldl1 :: (a -> a -> a) -> Identity a -> a #

toList :: Identity a -> [a] #

null :: Identity a -> Bool #

length :: Identity a -> Int #

elem :: Eq a => a -> Identity a -> Bool #

maximum :: Ord a => Identity a -> a #

minimum :: Ord a => Identity a -> a #

sum :: Num a => Identity a -> a #

product :: Num a => Identity a -> a #

Foldable ZipList # |

Methods

fold :: Monoid m => ZipList m -> m #

foldMap :: Monoid m => (a -> m) -> ZipList a -> m #

foldr :: (a -> b -> b) -> b -> ZipList a -> b #

foldr' :: (a -> b -> b) -> b -> ZipList a -> b #

foldl :: (b -> a -> b) -> b -> ZipList a -> b #

foldl' :: (b -> a -> b) -> b -> ZipList a -> b #

foldr1 :: (a -> a -> a) -> ZipList a -> a #

foldl1 :: (a -> a -> a) -> ZipList a -> a #

toList :: ZipList a -> [a] #

null :: ZipList a -> Bool #

length :: ZipList a -> Int #

elem :: Eq a => a -> ZipList a -> Bool #

maximum :: Ord a => ZipList a -> a #

minimum :: Ord a => ZipList a -> a #

sum :: Num a => ZipList a -> a #

product :: Num a => ZipList a -> a #

Foldable NonEmpty # | Since: 4.9.0.0

Methods

fold :: Monoid m => NonEmpty m -> m #

foldMap :: Monoid m => (a -> m) -> NonEmpty a -> m #

foldr :: (a -> b -> b) -> b -> NonEmpty a -> b #

foldr' :: (a -> b -> b) -> b -> NonEmpty a -> b #

foldl :: (b -> a -> b) -> b -> NonEmpty a -> b #

foldl' :: (b -> a -> b) -> b -> NonEmpty a -> b #

foldr1 :: (a -> a -> a) -> NonEmpty a -> a #

foldl1 :: (a -> a -> a) -> NonEmpty a -> a #

toList :: NonEmpty a -> [a] #

null :: NonEmpty a -> Bool #

length :: NonEmpty a -> Int #

elem :: Eq a => a -> NonEmpty a -> Bool #

maximum :: Ord a => NonEmpty a -> a #

minimum :: Ord a => NonEmpty a -> a #

sum :: Num a => NonEmpty a -> a #

product :: Num a => NonEmpty a -> a #

Foldable Option # | Since: 4.9.0.0

Methods

fold :: Monoid m => Option m -> m #

foldMap :: Monoid m => (a -> m) -> Option a -> m #

foldr :: (a -> b -> b) -> b -> Option a -> b #

foldr' :: (a -> b -> b) -> b -> Option a -> b #

foldl :: (b -> a -> b) -> b -> Option a -> b #

foldl' :: (b -> a -> b) -> b -> Option a -> b #

foldr1 :: (a -> a -> a) -> Option a -> a #

foldl1 :: (a -> a -> a) -> Option a -> a #

toList :: Option a -> [a] #

null :: Option a -> Bool #

length :: Option a -> Int #

elem :: Eq a => a -> Option a -> Bool #

maximum :: Ord a => Option a -> a #

minimum :: Ord a => Option a -> a #

sum :: Num a => Option a -> a #

product :: Num a => Option a -> a #

Foldable Last # | Since: 4.9.0.0

Methods

fold :: Monoid m => Last m -> m #

foldMap :: Monoid m => (a -> m) -> Last a -> m #

foldr :: (a -> b -> b) -> b -> Last a -> b #

foldr' :: (a -> b -> b) -> b -> Last a -> b #

foldl :: (b -> a -> b) -> b -> Last a -> b #

foldl' :: (b -> a -> b) -> b -> Last a -> b #

foldr1 :: (a -> a -> a) -> Last a -> a #

foldl1 :: (a -> a -> a) -> Last a -> a #

toList :: Last a -> [a] #

null :: Last a -> Bool #

length :: Last a -> Int #

elem :: Eq a => a -> Last a -> Bool #

maximum :: Ord a => Last a -> a #

minimum :: Ord a => Last a -> a #

sum :: Num a => Last a -> a #

product :: Num a => Last a -> a #

Foldable First # | Since: 4.9.0.0

Methods

fold :: Monoid m => First m -> m #

foldMap :: Monoid m => (a -> m) -> First a -> m #

foldr :: (a -> b -> b) -> b -> First a -> b #

foldr' :: (a -> b -> b) -> b -> First a -> b #

foldl :: (b -> a -> b) -> b -> First a -> b #

foldl' :: (b -> a -> b) -> b -> First a -> b #

foldr1 :: (a -> a -> a) -> First a -> a #

foldl1 :: (a -> a -> a) -> First a -> a #

toList :: First a -> [a] #

null :: First a -> Bool #

length :: First a -> Int #

elem :: Eq a => a -> First a -> Bool #

maximum :: Ord a => First a -> a #

minimum :: Ord a => First a -> a #

sum :: Num a => First a -> a #

product :: Num a => First a -> a #

Foldable Max # | Since: 4.9.0.0

Methods

fold :: Monoid m => Max m -> m #

foldMap :: Monoid m => (a -> m) -> Max a -> m #

foldr :: (a -> b -> b) -> b -> Max a -> b #

foldr' :: (a -> b -> b) -> b -> Max a -> b #

foldl :: (b -> a -> b) -> b -> Max a -> b #

foldl' :: (b -> a -> b) -> b -> Max a -> b #

foldr1 :: (a -> a -> a) -> Max a -> a #

foldl1 :: (a -> a -> a) -> Max a -> a #

toList :: Max a -> [a] #

null :: Max a -> Bool #

length :: Max a -> Int #

elem :: Eq a => a -> Max a -> Bool #

maximum :: Ord a => Max a -> a #

minimum :: Ord a => Max a -> a #

sum :: Num a => Max a -> a #

product :: Num a => Max a -> a #

Foldable Min # | Since: 4.9.0.0

Methods

fold :: Monoid m => Min m -> m #

foldMap :: Monoid m => (a -> m) -> Min a -> m #

foldr :: (a -> b -> b) -> b -> Min a -> b #

foldr' :: (a -> b -> b) -> b -> Min a -> b #

foldl :: (b -> a -> b) -> b -> Min a -> b #

foldl' :: (b -> a -> b) -> b -> Min a -> b #

foldr1 :: (a -> a -> a) -> Min a -> a #

foldl1 :: (a -> a -> a) -> Min a -> a #

toList :: Min a -> [a] #

null :: Min a -> Bool #

length :: Min a -> Int #

elem :: Eq a => a -> Min a -> Bool #

maximum :: Ord a => Min a -> a #

minimum :: Ord a => Min a -> a #

sum :: Num a => Min a -> a #

product :: Num a => Min a -> a #

Foldable Complex # |

Methods

fold :: Monoid m => Complex m -> m #

foldMap :: Monoid m => (a -> m) -> Complex a -> m #

foldr :: (a -> b -> b) -> b -> Complex a -> b #

foldr' :: (a -> b -> b) -> b -> Complex a -> b #

foldl :: (b -> a -> b) -> b -> Complex a -> b #

foldl' :: (b -> a -> b) -> b -> Complex a -> b #

foldr1 :: (a -> a -> a) -> Complex a -> a #

foldl1 :: (a -> a -> a) -> Complex a -> a #

toList :: Complex a -> [a] #

null :: Complex a -> Bool #

length :: Complex a -> Int #

elem :: Eq a => a -> Complex a -> Bool #

maximum :: Ord a => Complex a -> a #

minimum :: Ord a => Complex a -> a #

sum :: Num a => Complex a -> a #

product :: Num a => Complex a -> a #

Foldable (Either a) # | Since: 4.7.0.0

Methods

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

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

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

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

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

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

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

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

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

null :: Either a a -> Bool #

length :: Either a a -> Int #

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

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

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

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

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

Foldable (V1 *) # |

Methods

fold :: Monoid m => V1 * m -> m #

foldMap :: Monoid m => (a -> m) -> V1 * a -> m #

foldr :: (a -> b -> b) -> b -> V1 * a -> b #

foldr' :: (a -> b -> b) -> b -> V1 * a -> b #

foldl :: (b -> a -> b) -> b -> V1 * a -> b #

foldl' :: (b -> a -> b) -> b -> V1 * a -> b #

foldr1 :: (a -> a -> a) -> V1 * a -> a #

foldl1 :: (a -> a -> a) -> V1 * a -> a #

toList :: V1 * a -> [a] #

null :: V1 * a -> Bool #

length :: V1 * a -> Int #

elem :: Eq a => a -> V1 * a -> Bool #

maximum :: Ord a => V1 * a -> a #

minimum :: Ord a => V1 * a -> a #

sum :: Num a => V1 * a -> a #

product :: Num a => V1 * a -> a #

Foldable (U1 *) # | Since: 4.9.0.0

Methods

fold :: Monoid m => U1 * m -> m #

foldMap :: Monoid m => (a -> m) -> U1 * a -> m #

foldr :: (a -> b -> b) -> b -> U1 * a -> b #

foldr' :: (a -> b -> b) -> b -> U1 * a -> b #

foldl :: (b -> a -> b) -> b -> U1 * a -> b #

foldl' :: (b -> a -> b) -> b -> U1 * a -> b #

foldr1 :: (a -> a -> a) -> U1 * a -> a #

foldl1 :: (a -> a -> a) -> U1 * a -> a #

toList :: U1 * a -> [a] #

null :: U1 * a -> Bool #

length :: U1 * a -> Int #

elem :: Eq a => a -> U1 * a -> Bool #

maximum :: Ord a => U1 * a -> a #

minimum :: Ord a => U1 * a -> a #

sum :: Num a => U1 * a -> a #

product :: Num a => U1 * a -> a #

Foldable ((,) a) # | Since: 4.7.0.0

Methods

fold :: Monoid m => (a, m) -> m #

foldMap :: Monoid m => (a -> m) -> (a, a) -> m #

foldr :: (a -> b -> b) -> b -> (a, a) -> b #

foldr' :: (a -> b -> b) -> b -> (a, a) -> b #

foldl :: (b -> a -> b) -> b -> (a, a) -> b #

foldl' :: (b -> a -> b) -> b -> (a, a) -> b #

foldr1 :: (a -> a -> a) -> (a, a) -> a #

foldl1 :: (a -> a -> a) -> (a, a) -> a #

toList :: (a, a) -> [a] #

null :: (a, a) -> Bool #

length :: (a, a) -> Int #

elem :: Eq a => a -> (a, a) -> Bool #

maximum :: Ord a => (a, a) -> a #

minimum :: Ord a => (a, a) -> a #

sum :: Num a => (a, a) -> a #

product :: Num a => (a, a) -> a #

Foldable (Proxy *) # | Since: 4.7.0.0

Methods

fold :: Monoid m => Proxy * m -> m #

foldMap :: Monoid m => (a -> m) -> Proxy * a -> m #

foldr :: (a -> b -> b) -> b -> Proxy * a -> b #

foldr' :: (a -> b -> b) -> b -> Proxy * a -> b #

foldl :: (b -> a -> b) -> b -> Proxy * a -> b #

foldl' :: (b -> a -> b) -> b -> Proxy * a -> b #

foldr1 :: (a -> a -> a) -> Proxy * a -> a #

foldl1 :: (a -> a -> a) -> Proxy * a -> a #

toList :: Proxy * a -> [a] #

null :: Proxy * a -> Bool #

length :: Proxy * a -> Int #

elem :: Eq a => a -> Proxy * a -> Bool #

maximum :: Ord a => Proxy * a -> a #

minimum :: Ord a => Proxy * a -> a #

sum :: Num a => Proxy * a -> a #

product :: Num a => Proxy * a -> a #

Foldable (Arg a) # | Since: 4.9.0.0

Methods

fold :: Monoid m => Arg a m -> m #

foldMap :: Monoid m => (a -> m) -> Arg a a -> m #

foldr :: (a -> b -> b) -> b -> Arg a a -> b #

foldr' :: (a -> b -> b) -> b -> Arg a a -> b #

foldl :: (b -> a -> b) -> b -> Arg a a -> b #

foldl' :: (b -> a -> b) -> b -> Arg a a -> b #

foldr1 :: (a -> a -> a) -> Arg a a -> a #

foldl1 :: (a -> a -> a) -> Arg a a -> a #

toList :: Arg a a -> [a] #

null :: Arg a a -> Bool #

length :: Arg a a -> Int #

elem :: Eq a => a -> Arg a a -> Bool #

maximum :: Ord a => Arg a a -> a #

minimum :: Ord a => Arg a a -> a #

sum :: Num a => Arg a a -> a #

product :: Num a => Arg a a -> a #

Foldable f => Foldable (Rec1 * f) # |

Methods

fold :: Monoid m => Rec1 * f m -> m #

foldMap :: Monoid m => (a -> m) -> Rec1 * f a -> m #

foldr :: (a -> b -> b) -> b -> Rec1 * f a -> b #

foldr' :: (a -> b -> b) -> b -> Rec1 * f a -> b #

foldl :: (b -> a -> b) -> b -> Rec1 * f a -> b #

foldl' :: (b -> a -> b) -> b -> Rec1 * f a -> b #

foldr1 :: (a -> a -> a) -> Rec1 * f a -> a #

foldl1 :: (a -> a -> a) -> Rec1 * f a -> a #

toList :: Rec1 * f a -> [a] #

null :: Rec1 * f a -> Bool #

length :: Rec1 * f a -> Int #

elem :: Eq a => a -> Rec1 * f a -> Bool #

maximum :: Ord a => Rec1 * f a -> a #

minimum :: Ord a => Rec1 * f a -> a #

sum :: Num a => Rec1 * f a -> a #

product :: Num a => Rec1 * f a -> a #

Foldable (URec * Char) # |

Methods

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

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

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

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

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

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

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

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

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

null :: URec * Char a -> Bool #

length :: URec * Char a -> Int #

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

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

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

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

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

Foldable (URec * Double) # |

Methods

fold :: Monoid m => URec * Double m -> m #

foldMap :: Monoid m => (a -> m) -> URec * Double a -> m #

foldr :: (a -> b -> b) -> b -> URec * Double a -> b #

foldr' :: (a -> b -> b) -> b -> URec * Double a -> b #

foldl :: (b -> a -> b) -> b -> URec * Double a -> b #

foldl' :: (b -> a -> b) -> b -> URec * Double a -> b #

foldr1 :: (a -> a -> a) -> URec * Double a -> a #

foldl1 :: (a -> a -> a) -> URec * Double a -> a #

toList :: URec * Double a -> [a] #

null :: URec * Double a -> Bool #

length :: URec * Double a -> Int #

elem :: Eq a => a -> URec * Double a -> Bool #

maximum :: Ord a => URec * Double a -> a #

minimum :: Ord a => URec * Double a -> a #

sum :: Num a => URec * Double a -> a #

product :: Num a => URec * Double a -> a #

Foldable (URec * Float) # |

Methods

fold :: Monoid m => URec * Float m -> m #

foldMap :: Monoid m => (a -> m) -> URec * Float a -> m #

foldr :: (a -> b -> b) -> b -> URec * Float a -> b #

foldr' :: (a -> b -> b) -> b -> URec * Float a -> b #

foldl :: (b -> a -> b) -> b -> URec * Float a -> b #

foldl' :: (b -> a -> b) -> b -> URec * Float a -> b #

foldr1 :: (a -> a -> a) -> URec * Float a -> a #

foldl1 :: (a -> a -> a) -> URec * Float a -> a #

toList :: URec * Float a -> [a] #

null :: URec * Float a -> Bool #

length :: URec * Float a -> Int #

elem :: Eq a => a -> URec * Float a -> Bool #

maximum :: Ord a => URec * Float a -> a #

minimum :: Ord a => URec * Float a -> a #

sum :: Num a => URec * Float a -> a #

product :: Num a => URec * Float a -> a #

Foldable (URec * Int) # |

Methods

fold :: Monoid m => URec * Int m -> m #

foldMap :: Monoid m => (a -> m) -> URec * Int a -> m #

foldr :: (a -> b -> b) -> b -> URec * Int a -> b #

foldr' :: (a -> b -> b) -> b -> URec * Int a -> b #

foldl :: (b -> a -> b) -> b -> URec * Int a -> b #

foldl' :: (b -> a -> b) -> b -> URec * Int a -> b #

foldr1 :: (a -> a -> a) -> URec * Int a -> a #

foldl1 :: (a -> a -> a) -> URec * Int a -> a #

toList :: URec * Int a -> [a] #

null :: URec * Int a -> Bool #

length :: URec * Int a -> Int #

elem :: Eq a => a -> URec * Int a -> Bool #

maximum :: Ord a => URec * Int a -> a #

minimum :: Ord a => URec * Int a -> a #

sum :: Num a => URec * Int a -> a #

product :: Num a => URec * Int a -> a #

Foldable (URec * Word) # |

Methods

fold :: Monoid m => URec * Word m -> m #

foldMap :: Monoid m => (a -> m) -> URec * Word a -> m #

foldr :: (a -> b -> b) -> b -> URec * Word a -> b #

foldr' :: (a -> b -> b) -> b -> URec * Word a -> b #

foldl :: (b -> a -> b) -> b -> URec * Word a -> b #

foldl' :: (b -> a -> b) -> b -> URec * Word a -> b #

foldr1 :: (a -> a -> a) -> URec * Word a -> a #

foldl1 :: (a -> a -> a) -> URec * Word a -> a #

toList :: URec * Word a -> [a] #

null :: URec * Word a -> Bool #

length :: URec * Word a -> Int #

elem :: Eq a => a -> URec * Word a -> Bool #

maximum :: Ord a => URec * Word a -> a #

minimum :: Ord a => URec * Word a -> a #

sum :: Num a => URec * Word a -> a #

product :: Num a => URec * Word a -> a #

Foldable (URec * (Ptr ())) # |

Methods

fold :: Monoid m => URec * (Ptr ()) m -> m #

foldMap :: Monoid m => (a -> m) -> URec * (Ptr ()) a -> m #

foldr :: (a -> b -> b) -> b -> URec * (Ptr ()) a -> b #

foldr' :: (a -> b -> b) -> b -> URec * (Ptr ()) a -> b #

foldl :: (b -> a -> b) -> b -> URec * (Ptr ()) a -> b #

foldl' :: (b -> a -> b) -> b -> URec * (Ptr ()) a -> b #

foldr1 :: (a -> a -> a) -> URec * (Ptr ()) a -> a #

foldl1 :: (a -> a -> a) -> URec * (Ptr ()) a -> a #

toList :: URec * (Ptr ()) a -> [a] #

null :: URec * (Ptr ()) a -> Bool #

length :: URec * (Ptr ()) a -> Int #

elem :: Eq a => a -> URec * (Ptr ()) a -> Bool #

maximum :: Ord a => URec * (Ptr ()) a -> a #

minimum :: Ord a => URec * (Ptr ()) a -> a #

sum :: Num a => URec * (Ptr ()) a -> a #

product :: Num a => URec * (Ptr ()) a -> a #

Foldable (Const * m) # | Since: 4.7.0.0

Methods

fold :: Monoid m => Const * m m -> m #

foldMap :: Monoid m => (a -> m) -> Const * m a -> m #

foldr :: (a -> b -> b) -> b -> Const * m a -> b #

foldr' :: (a -> b -> b) -> b -> Const * m a -> b #

foldl :: (b -> a -> b) -> b -> Const * m a -> b #

foldl' :: (b -> a -> b) -> b -> Const * m a -> b #

foldr1 :: (a -> a -> a) -> Const * m a -> a #

foldl1 :: (a -> a -> a) -> Const * m a -> a #

toList :: Const * m a -> [a] #

null :: Const * m a -> Bool #

length :: Const * m a -> Int #

elem :: Eq a => a -> Const * m a -> Bool #

maximum :: Ord a => Const * m a -> a #

minimum :: Ord a => Const * m a -> a #

sum :: Num a => Const * m a -> a #

product :: Num a => Const * m a -> a #

Foldable (K1 * i c) # |

Methods

fold :: Monoid m => K1 * i c m -> m #

foldMap :: Monoid m => (a -> m) -> K1 * i c a -> m #

foldr :: (a -> b -> b) -> b -> K1 * i c a -> b #

foldr' :: (a -> b -> b) -> b -> K1 * i c a -> b #

foldl :: (b -> a -> b) -> b -> K1 * i c a -> b #

foldl' :: (b -> a -> b) -> b -> K1 * i c a -> b #

foldr1 :: (a -> a -> a) -> K1 * i c a -> a #

foldl1 :: (a -> a -> a) -> K1 * i c a -> a #

toList :: K1 * i c a -> [a] #

null :: K1 * i c a -> Bool #

length :: K1 * i c a -> Int #

elem :: Eq a => a -> K1 * i c a -> Bool #

maximum :: Ord a => K1 * i c a -> a #

minimum :: Ord a => K1 * i c a -> a #

sum :: Num a => K1 * i c a -> a #

product :: Num a => K1 * i c a -> a #

(Foldable f, Foldable g) => Foldable ((:+:) * f g) # |

Methods

fold :: Monoid m => (* :+: f) g m -> m #

foldMap :: Monoid m => (a -> m) -> (* :+: f) g a -> m #

foldr :: (a -> b -> b) -> b -> (* :+: f) g a -> b #

foldr' :: (a -> b -> b) -> b -> (* :+: f) g a -> b #

foldl :: (b -> a -> b) -> b -> (* :+: f) g a -> b #

foldl' :: (b -> a -> b) -> b -> (* :+: f) g a -> b #

foldr1 :: (a -> a -> a) -> (* :+: f) g a -> a #

foldl1 :: (a -> a -> a) -> (* :+: f) g a -> a #

toList :: (* :+: f) g a -> [a] #

null :: (* :+: f) g a -> Bool #

length :: (* :+: f) g a -> Int #

elem :: Eq a => a -> (* :+: f) g a -> Bool #

maximum :: Ord a => (* :+: f) g a -> a #

minimum :: Ord a => (* :+: f) g a -> a #

sum :: Num a => (* :+: f) g a -> a #

product :: Num a => (* :+: f) g a -> a #

(Foldable f, Foldable g) => Foldable ((:*:) * f g) # |

Methods

fold :: Monoid m => (* :*: f) g m -> m #

foldMap :: Monoid m => (a -> m) -> (* :*: f) g a -> m #

foldr :: (a -> b -> b) -> b -> (* :*: f) g a -> b #

foldr' :: (a -> b -> b) -> b -> (* :*: f) g a -> b #

foldl :: (b -> a -> b) -> b -> (* :*: f) g a -> b #

foldl' :: (b -> a -> b) -> b -> (* :*: f) g a -> b #

foldr1 :: (a -> a -> a) -> (* :*: f) g a -> a #

foldl1 :: (a -> a -> a) -> (* :*: f) g a -> a #

toList :: (* :*: f) g a -> [a] #

null :: (* :*: f) g a -> Bool #

length :: (* :*: f) g a -> Int #

elem :: Eq a => a -> (* :*: f) g a -> Bool #

maximum :: Ord a => (* :*: f) g a -> a #

minimum :: Ord a => (* :*: f) g a -> a #

sum :: Num a => (* :*: f) g a -> a #

product :: Num a => (* :*: f) g a -> a #

(Foldable f, Foldable g) => Foldable (Sum * f g) # | Since: 4.9.0.0

Methods

fold :: Monoid m => Sum * f g m -> m #

foldMap :: Monoid m => (a -> m) -> Sum * f g a -> m #

foldr :: (a -> b -> b) -> b -> Sum * f g a -> b #

foldr' :: (a -> b -> b) -> b -> Sum * f g a -> b #

foldl :: (b -> a -> b) -> b -> Sum * f g a -> b #

foldl' :: (b -> a -> b) -> b -> Sum * f g a -> b #

foldr1 :: (a -> a -> a) -> Sum * f g a -> a #

foldl1 :: (a -> a -> a) -> Sum * f g a -> a #

toList :: Sum * f g a -> [a] #

null :: Sum * f g a -> Bool #

length :: Sum * f g a -> Int #

elem :: Eq a => a -> Sum * f g a -> Bool #

maximum :: Ord a => Sum * f g a -> a #

minimum :: Ord a => Sum * f g a -> a #

sum :: Num a => Sum * f g a -> a #

product :: Num a => Sum * f g a -> a #

(Foldable f, Foldable g) => Foldable (Product * f g) # | Since: 4.9.0.0

Methods

fold :: Monoid m => Product * f g m -> m #

foldMap :: Monoid m => (a -> m) -> Product * f g a -> m #

foldr :: (a -> b -> b) -> b -> Product * f g a -> b #

foldr' :: (a -> b -> b) -> b -> Product * f g a -> b #

foldl :: (b -> a -> b) -> b -> Product * f g a -> b #

foldl' :: (b -> a -> b) -> b -> Product * f g a -> b #

foldr1 :: (a -> a -> a) -> Product * f g a -> a #

foldl1 :: (a -> a -> a) -> Product * f g a -> a #

toList :: Product * f g a -> [a] #

null :: Product * f g a -> Bool #

length :: Product * f g a -> Int #

elem :: Eq a => a -> Product * f g a -> Bool #

maximum :: Ord a => Product * f g a -> a #

minimum :: Ord a => Product * f g a -> a #

sum :: Num a => Product * f g a -> a #

product :: Num a => Product * f g a -> a #

Foldable f => Foldable (M1 * i c f) # |

Methods

fold :: Monoid m => M1 * i c f m -> m #

foldMap :: Monoid m => (a -> m) -> M1 * i c f a -> m #

foldr :: (a -> b -> b) -> b -> M1 * i c f a -> b #

foldr' :: (a -> b -> b) -> b -> M1 * i c f a -> b #

foldl :: (b -> a -> b) -> b -> M1 * i c f a -> b #

foldl' :: (b -> a -> b) -> b -> M1 * i c f a -> b #

foldr1 :: (a -> a -> a) -> M1 * i c f a -> a #

foldl1 :: (a -> a -> a) -> M1 * i c f a -> a #

toList :: M1 * i c f a -> [a] #

null :: M1 * i c f a -> Bool #

length :: M1 * i c f a -> Int #

elem :: Eq a => a -> M1 * i c f a -> Bool #

maximum :: Ord a => M1 * i c f a -> a #

minimum :: Ord a => M1 * i c f a -> a #

sum :: Num a => M1 * i c f a -> a #

product :: Num a => M1 * i c f a -> a #

(Foldable f, Foldable g) => Foldable ((:.:) * * f g) # |

Methods

fold :: Monoid m => (* :.: *) f g m -> m #

foldMap :: Monoid m => (a -> m) -> (* :.: *) f g a -> m #

foldr :: (a -> b -> b) -> b -> (* :.: *) f g a -> b #

foldr' :: (a -> b -> b) -> b -> (* :.: *) f g a -> b #

foldl :: (b -> a -> b) -> b -> (* :.: *) f g a -> b #

foldl' :: (b -> a -> b) -> b -> (* :.: *) f g a -> b #

foldr1 :: (a -> a -> a) -> (* :.: *) f g a -> a #

foldl1 :: (a -> a -> a) -> (* :.: *) f g a -> a #

toList :: (* :.: *) f g a -> [a] #

null :: (* :.: *) f g a -> Bool #

length :: (* :.: *) f g a -> Int #

elem :: Eq a => a -> (* :.: *) f g a -> Bool #

maximum :: Ord a => (* :.: *) f g a -> a #

minimum :: Ord a => (* :.: *) f g a -> a #

sum :: Num a => (* :.: *) f g a -> a #

product :: Num a => (* :.: *) f g a -> a #

(Foldable f, Foldable g) => Foldable (Compose * * f g) # | Since: 4.9.0.0

Methods

fold :: Monoid m => Compose * * f g m -> m #

foldMap :: Monoid m => (a -> m) -> Compose * * f g a -> m #

foldr :: (a -> b -> b) -> b -> Compose * * f g a -> b #

foldr' :: (a -> b -> b) -> b -> Compose * * f g a -> b #

foldl :: (b -> a -> b) -> b -> Compose * * f g a -> b #

foldl' :: (b -> a -> b) -> b -> Compose * * f g a -> b #

foldr1 :: (a -> a -> a) -> Compose * * f g a -> a #

foldl1 :: (a -> a -> a) -> Compose * * f g a -> a #

toList :: Compose * * f g a -> [a] #

null :: Compose * * f g a -> Bool #

length :: Compose * * f g a -> Int #

elem :: Eq a => a -> Compose * * f g a -> Bool #

maximum :: Ord a => Compose * * f g a -> a #

minimum :: Ord a => Compose * * f g a -> a #

sum :: Num a => Compose * * f g a -> a #

product :: Num a => Compose * * f g a -> a #

class (Functor t, Foldable t) => Traversable t where #

Functors representing data structures that can be traversed from left to right.

A definition of `traverse` must satisfy the following laws:

naturality
  `t . `traverse` f = `traverse` (t . f)` for every applicative transformation `t`
identity
  ``traverse` Identity = Identity`
composition
  ``traverse` (Compose . `fmap` g . f) = Compose . `fmap` (`traverse` g) . `traverse` f`

A definition of `sequenceA` must satisfy the following laws:

naturality
  `t . `sequenceA` = `sequenceA` . `fmap` t` for every applicative transformation `t`
identity
  ``sequenceA` . `fmap` Identity = Identity`
composition
  ``sequenceA` . `fmap` Compose = Compose . `fmap` `sequenceA` . `sequenceA``

where an applicative transformation is a function

    t :: (Applicative f, Applicative g) => f a -> g a

preserving the `Applicative` operations, i.e.

-     t (pure x) = pure x

-     t (x <*> y) = t x <*> t y

and the identity functor `Identity` and composition of functors `Compose` are defined as

      newtype Identity a = Identity a

      instance Functor Identity where
        fmap f (Identity x) = Identity (f x)

      instance Applicative Identity where
        pure x = Identity x
        Identity f <*> Identity x = Identity (f x)

      newtype Compose f g a = Compose (f (g a))

      instance (Functor f, Functor g) => Functor (Compose f g) where
        fmap f (Compose x) = Compose (fmap (fmap f) x)

      instance (Applicative f, Applicative g) => Applicative (Compose f g) where
        pure x = Compose (pure (pure x))
        Compose f <*> Compose x = Compose ((<*>) <$> f <*> x)

(The naturality law is implied by parametricity.)

Instances are similar to `Functor`, e.g. given a data type

    data Tree a = Empty | Leaf a | Node (Tree a) a (Tree a)

a suitable instance would be

    instance Traversable Tree where
       traverse f Empty = pure Empty
       traverse f (Leaf x) = Leaf <$> f x
       traverse f (Node l k r) = Node <$> traverse f l <*> f k <*> traverse f r

This is suitable even for abstract types, as the laws for `<*>` imply a form of associativity.

The superclass instances should satisfy the following:

- In the `Functor` instance, `fmap` should be equivalent to traversal with the identity applicative functor (`fmapDefault`).
- In the `Foldable` instance, `foldMap` should be equivalent to traversal with a constant applicative functor (`foldMapDefault`).

Minimal complete definition

traverse | sequenceA

Methods

traverse :: Applicative f => (a -> f b) -> t a -> f (t b) #

Map each element of a structure to an action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see `traverse_`.

sequenceA :: Applicative f => t (f a) -> f (t a) #

Evaluate each action in the structure from left to right, and and collect the results. For a version that ignores the results see `sequenceA_`.

mapM :: Monad m => (a -> m b) -> t a -> m (t b) #

Map each element of a structure to a monadic action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see `mapM_`.

sequence :: Monad m => t (m a) -> m (t a) #

Evaluate each monadic action in the structure from left to right, and collect the results. For a version that ignores the results see `sequence_`.

Instances

Traversable [] # | Since: 2.1
Methods traverse :: Applicative f => (a -> f b) -> [a] -> f [b] # sequenceA :: Applicative f => [f a] -> f [a] # mapM :: Monad m => (a -> m b) -> [a] -> m [b] # sequence :: Monad m => [m a] -> m [a] #
Traversable Maybe # | Since: 2.1
Methods traverse :: Applicative f => (a -> f b) -> Maybe a -> f (Maybe b) # sequenceA :: Applicative f => Maybe (f a) -> f (Maybe a) # mapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b) # sequence :: Monad m => Maybe (m a) -> m (Maybe a) #
Traversable Par1 # |
Methods traverse :: Applicative f => (a -> f b) -> Par1 a -> f (Par1 b) # sequenceA :: Applicative f => Par1 (f a) -> f (Par1 a) # mapM :: Monad m => (a -> m b) -> Par1 a -> m (Par1 b) # sequence :: Monad m => Par1 (m a) -> m (Par1 a) #
Traversable Last # | Since: 4.8.0.0
Methods traverse :: Applicative f => (a -> f b) -> Last a -> f (Last b) # sequenceA :: Applicative f => Last (f a) -> f (Last a) # mapM :: Monad m => (a -> m b) -> Last a -> m (Last b) # sequence :: Monad m => Last (m a) -> m (Last a) #
Traversable First # | Since: 4.8.0.0
Methods traverse :: Applicative f => (a -> f b) -> First a -> f (First b) # sequenceA :: Applicative f => First (f a) -> f (First a) # mapM :: Monad m => (a -> m b) -> First a -> m (First b) # sequence :: Monad m => First (m a) -> m (First a) #
Traversable Product # | Since: 4.8.0.0
Methods traverse :: Applicative f => (a -> f b) -> Product a -> f (Product b) # sequenceA :: Applicative f => Product (f a) -> f (Product a) # mapM :: Monad m => (a -> m b) -> Product a -> m (Product b) # sequence :: Monad m => Product (m a) -> m (Product a) #
Traversable Sum # | Since: 4.8.0.0
Methods traverse :: Applicative f => (a -> f b) -> Sum a -> f (Sum b) # sequenceA :: Applicative f => Sum (f a) -> f (Sum a) # mapM :: Monad m => (a -> m b) -> Sum a -> m (Sum b) # sequence :: Monad m => Sum (m a) -> m (Sum a) #
Traversable Dual # | Since: 4.8.0.0
Methods traverse :: Applicative f => (a -> f b) -> Dual a -> f (Dual b) # sequenceA :: Applicative f => Dual (f a) -> f (Dual a) # mapM :: Monad m => (a -> m b) -> Dual a -> m (Dual b) # sequence :: Monad m => Dual (m a) -> m (Dual a) #
Traversable Identity # |
Methods traverse :: Applicative f => (a -> f b) -> Identity a -> f (Identity b) # sequenceA :: Applicative f => Identity (f a) -> f (Identity a) # mapM :: Monad m => (a -> m b) -> Identity a -> m (Identity b) # sequence :: Monad m => Identity (m a) -> m (Identity a) #
Traversable ZipList # | Since: 4.9.0.0
Methods traverse :: Applicative f => (a -> f b) -> ZipList a -> f (ZipList b) # sequenceA :: Applicative f => ZipList (f a) -> f (ZipList a) # mapM :: Monad m => (a -> m b) -> ZipList a -> m (ZipList b) # sequence :: Monad m => ZipList (m a) -> m (ZipList a) #
Traversable NonEmpty # | Since: 4.9.0.0
Methods traverse :: Applicative f => (a -> f b) -> NonEmpty a -> f (NonEmpty b) # sequenceA :: Applicative f => NonEmpty (f a) -> f (NonEmpty a) # mapM :: Monad m => (a -> m b) -> NonEmpty a -> m (NonEmpty b) # sequence :: Monad m => NonEmpty (m a) -> m (NonEmpty a) #
Traversable Option # | Since: 4.9.0.0
Methods traverse :: Applicative f => (a -> f b) -> Option a -> f (Option b) # sequenceA :: Applicative f => Option (f a) -> f (Option a) # mapM :: Monad m => (a -> m b) -> Option a -> m (Option b) # sequence :: Monad m => Option (m a) -> m (Option a) #
Traversable Last # | Since: 4.9.0.0
Methods traverse :: Applicative f => (a -> f b) -> Last a -> f (Last b) # sequenceA :: Applicative f => Last (f a) -> f (Last a) # mapM :: Monad m => (a -> m b) -> Last a -> m (Last b) # sequence :: Monad m => Last (m a) -> m (Last a) #
Traversable First # | Since: 4.9.0.0
Methods traverse :: Applicative f => (a -> f b) -> First a -> f (First b) # sequenceA :: Applicative f => First (f a) -> f (First a) # mapM :: Monad m => (a -> m b) -> First a -> m (First b) # sequence :: Monad m => First (m a) -> m (First a) #
Traversable Max # | Since: 4.9.0.0
Methods traverse :: Applicative f => (a -> f b) -> Max a -> f (Max b) # sequenceA :: Applicative f => Max (f a) -> f (Max a) # mapM :: Monad m => (a -> m b) -> Max a -> m (Max b) # sequence :: Monad m => Max (m a) -> m (Max a) #
Traversable Min # | Since: 4.9.0.0
Methods traverse :: Applicative f => (a -> f b) -> Min a -> f (Min b) # sequenceA :: Applicative f => Min (f a) -> f (Min a) # mapM :: Monad m => (a -> m b) -> Min a -> m (Min b) # sequence :: Monad m => Min (m a) -> m (Min a) #
Traversable Complex # |
Methods traverse :: Applicative f => (a -> f b) -> Complex a -> f (Complex b) # sequenceA :: Applicative f => Complex (f a) -> f (Complex a) # mapM :: Monad m => (a -> m b) -> Complex a -> m (Complex b) # sequence :: Monad m => Complex (m a) -> m (Complex a) #
Traversable (Either a) # | Since: 4.7.0.0
Methods traverse :: Applicative f => (a -> f b) -> Either a a -> f (Either a b) # sequenceA :: Applicative f => Either a (f a) -> f (Either a a) # mapM :: Monad m => (a -> m b) -> Either a a -> m (Either a b) # sequence :: Monad m => Either a (m a) -> m (Either a a) #
Traversable (V1 *) # |
Methods traverse :: Applicative f => (a -> f b) -> V1 * a -> f (V1 * b) # sequenceA :: Applicative f => V1 * (f a) -> f (V1 * a) # mapM :: Monad m => (a -> m b) -> V1 * a -> m (V1 * b) # sequence :: Monad m => V1 * (m a) -> m (V1 * a) #
Traversable (U1 *) # | Since: 4.9.0.0
Methods traverse :: Applicative f => (a -> f b) -> U1 * a -> f (U1 * b) # sequenceA :: Applicative f => U1 * (f a) -> f (U1 * a) # mapM :: Monad m => (a -> m b) -> U1 * a -> m (U1 * b) # sequence :: Monad m => U1 * (m a) -> m (U1 * a) #
Traversable ((,) a) # | Since: 4.7.0.0
Methods traverse :: Applicative f => (a -> f b) -> (a, a) -> f (a, b) # sequenceA :: Applicative f => (a, f a) -> f (a, a) # mapM :: Monad m => (a -> m b) -> (a, a) -> m (a, b) # sequence :: Monad m => (a, m a) -> m (a, a) #
Traversable (Proxy *) # | Since: 4.7.0.0
Methods traverse :: Applicative f => (a -> f b) -> Proxy * a -> f (Proxy * b) # sequenceA :: Applicative f => Proxy * (f a) -> f (Proxy * a) # mapM :: Monad m => (a -> m b) -> Proxy * a -> m (Proxy * b) # sequence :: Monad m => Proxy * (m a) -> m (Proxy * a) #
Traversable (Arg a) # | Since: 4.9.0.0
Methods traverse :: Applicative f => (a -> f b) -> Arg a a -> f (Arg a b) # sequenceA :: Applicative f => Arg a (f a) -> f (Arg a a) # mapM :: Monad m => (a -> m b) -> Arg a a -> m (Arg a b) # sequence :: Monad m => Arg a (m a) -> m (Arg a a) #
Traversable f => Traversable (Rec1 * f) # |
Methods traverse :: Applicative f => (a -> f b) -> Rec1 * f a -> f (Rec1 * f b) # sequenceA :: Applicative f => Rec1 * f (f a) -> f (Rec1 * f a) # mapM :: Monad m => (a -> m b) -> Rec1 * f a -> m (Rec1 * f b) # sequence :: Monad m => Rec1 * f (m a) -> m (Rec1 * f a) #
Traversable (URec * Char) # |
Methods traverse :: Applicative f => (a -> f b) -> URec * Char a -> f (URec * Char b) # sequenceA :: Applicative f => URec * Char (f a) -> f (URec * Char a) # mapM :: Monad m => (a -> m b) -> URec * Char a -> m (URec * Char b) # sequence :: Monad m => URec * Char (m a) -> m (URec * Char a) #
Traversable (URec * Double) # |
Methods traverse :: Applicative f => (a -> f b) -> URec * Double a -> f (URec * Double b) # sequenceA :: Applicative f => URec * Double (f a) -> f (URec * Double a) # mapM :: Monad m => (a -> m b) -> URec * Double a -> m (URec * Double b) # sequence :: Monad m => URec * Double (m a) -> m (URec * Double a) #
Traversable (URec * Float) # |
Methods traverse :: Applicative f => (a -> f b) -> URec * Float a -> f (URec * Float b) # sequenceA :: Applicative f => URec * Float (f a) -> f (URec * Float a) # mapM :: Monad m => (a -> m b) -> URec * Float a -> m (URec * Float b) # sequence :: Monad m => URec * Float (m a) -> m (URec * Float a) #
Traversable (URec * Int) # |
Methods traverse :: Applicative f => (a -> f b) -> URec * Int a -> f (URec * Int b) # sequenceA :: Applicative f => URec * Int (f a) -> f (URec * Int a) # mapM :: Monad m => (a -> m b) -> URec * Int a -> m (URec * Int b) # sequence :: Monad m => URec * Int (m a) -> m (URec * Int a) #
Traversable (URec * Word) # |
Methods traverse :: Applicative f => (a -> f b) -> URec * Word a -> f (URec * Word b) # sequenceA :: Applicative f => URec * Word (f a) -> f (URec * Word a) # mapM :: Monad m => (a -> m b) -> URec * Word a -> m (URec * Word b) # sequence :: Monad m => URec * Word (m a) -> m (URec * Word a) #
Traversable (URec * (Ptr ())) # |
Methods traverse :: Applicative f => (a -> f b) -> URec * (Ptr ()) a -> f (URec * (Ptr ()) b) # sequenceA :: Applicative f => URec * (Ptr ()) (f a) -> f (URec * (Ptr ()) a) # mapM :: Monad m => (a -> m b) -> URec * (Ptr ()) a -> m (URec * (Ptr ()) b) # sequence :: Monad m => URec * (Ptr ()) (m a) -> m (URec * (Ptr ()) a) #
Traversable (Const * m) # | Since: 4.7.0.0
Methods traverse :: Applicative f => (a -> f b) -> Const * m a -> f (Const * m b) # sequenceA :: Applicative f => Const * m (f a) -> f (Const * m a) # mapM :: Monad m => (a -> m b) -> Const * m a -> m (Const * m b) # sequence :: Monad m => Const * m (m a) -> m (Const * m a) #
Traversable (K1 * i c) # |
Methods traverse :: Applicative f => (a -> f b) -> K1 * i c a -> f (K1 * i c b) # sequenceA :: Applicative f => K1 * i c (f a) -> f (K1 * i c a) # mapM :: Monad m => (a -> m b) -> K1 * i c a -> m (K1 * i c b) # sequence :: Monad m => K1 * i c (m a) -> m (K1 * i c a) #
(Traversable f, Traversable g) => Traversable ((:+:) * f g) # |
Methods traverse :: Applicative f => (a -> f b) -> (* :+: f) g a -> f ((* :+: f) g b) # sequenceA :: Applicative f => (* :+: f) g (f a) -> f ((* :+: f) g a) # mapM :: Monad m => (a -> m b) -> (* :+: f) g a -> m ((* :+: f) g b) # sequence :: Monad m => (* :+: f) g (m a) -> m ((* :+: f) g a) #
(Traversable f, Traversable g) => Traversable ((:*:) * f g) # |
Methods traverse :: Applicative f => (a -> f b) -> (* :*: f) g a -> f ((* :*: f) g b) # sequenceA :: Applicative f => (* :*: f) g (f a) -> f ((* :*: f) g a) # mapM :: Monad m => (a -> m b) -> (* :*: f) g a -> m ((* :*: f) g b) # sequence :: Monad m => (* :*: f) g (m a) -> m ((* :*: f) g a) #
(Traversable f, Traversable g) => Traversable (Sum * f g) # | Since: 4.9.0.0
Methods traverse :: Applicative f => (a -> f b) -> Sum * f g a -> f (Sum * f g b) # sequenceA :: Applicative f => Sum * f g (f a) -> f (Sum * f g a) # mapM :: Monad m => (a -> m b) -> Sum * f g a -> m (Sum * f g b) # sequence :: Monad m => Sum * f g (m a) -> m (Sum * f g a) #
(Traversable f, Traversable g) => Traversable (Product * f g) # | Since: 4.9.0.0
Methods traverse :: Applicative f => (a -> f b) -> Product * f g a -> f (Product * f g b) # sequenceA :: Applicative f => Product * f g (f a) -> f (Product * f g a) # mapM :: Monad m => (a -> m b) -> Product * f g a -> m (Product * f g b) # sequence :: Monad m => Product * f g (m a) -> m (Product * f g a) #
Traversable f => Traversable (M1 * i c f) # |
Methods traverse :: Applicative f => (a -> f b) -> M1 * i c f a -> f (M1 * i c f b) # sequenceA :: Applicative f => M1 * i c f (f a) -> f (M1 * i c f a) # mapM :: Monad m => (a -> m b) -> M1 * i c f a -> m (M1 * i c f b) # sequence :: Monad m => M1 * i c f (m a) -> m (M1 * i c f a) #
(Traversable f, Traversable g) => Traversable ((:.:) * * f g) # |
Methods traverse :: Applicative f => (a -> f b) -> (* :.: *) f g a -> f ((* :.: *) f g b) # sequenceA :: Applicative f => (* :.: *) f g (f a) -> f ((* :.: *) f g a) # mapM :: Monad m => (a -> m b) -> (* :.: *) f g a -> m ((* :.: *) f g b) # sequence :: Monad m => (* :.: *) f g (m a) -> m ((* :.: *) f g a) #
(Traversable f, Traversable g) => Traversable (Compose * * f g) # | Since: 4.9.0.0
Methods traverse :: Applicative f => (a -> f b) -> Compose * * f g a -> f (Compose * * f g b) # sequenceA :: Applicative f => Compose * * f g (f a) -> f (Compose * * f g a) # mapM :: Monad m => (a -> m b) -> Compose * * f g a -> m (Compose * * f g b) # sequence :: Monad m => Compose * * f g (m a) -> m (Compose * * f g a) #

## Miscellaneous functions

id :: a -> a #

Identity function.

const :: a -> b -> a #

`const x` is a unary function which evaluates to `x` for all inputs.

For instance,

    >>> map (const 42) [0..3]
    [42,42,42,42]

(.) :: (b -> c) -> (a -> b) -> a -> c infixr 9 #

Function composition.

flip :: (a -> b -> c) -> b -> a -> c #

``flip` f` takes its (first) two arguments in the reverse order of `f`.

($) :: (a -> b) -> a -> b infixr 0 #

Application operator. This operator is redundant, since ordinary application `(f x)` means the same as `(f `$` x)`. However, `$` has low, right-associative binding precedence, so it sometimes allows parentheses to be omitted; for example:

        f $ g $ h x  =  f (g (h x))

It is also useful in higher-order situations, such as ``map` (`$` 0) xs`, or ``zipWith` (`$`) fs xs`.

until :: (a -> Bool) -> (a -> a) -> a -> a #

``until` p f` yields the result of applying `f` until `p` holds.

asTypeOf :: a -> a -> a #

`asTypeOf` is a type-restricted version of `const`. It is usually used as an infix operator, and its typing forces its first argument (which is usually overloaded) to have the same type as the second.

error :: forall (r :: RuntimeRep). forall (a :: TYPE r). HasCallStack => [Char] -> a #

`error` stops execution and displays an error message.

errorWithoutStackTrace :: forall (r :: RuntimeRep). forall (a :: TYPE r). [Char] -> a #

A variant of `error` that does not produce a stack trace.

Since: 4.9.0.0

undefined :: forall (r :: RuntimeRep). forall (a :: TYPE r). HasCallStack => a #

A special case of `error`. It is expected that compilers will recognize this and insert error messages which are more appropriate to the context in which `undefined` appears.

seq :: a -> b -> b Source #

The value of `seq a b` is bottom if `a` is bottom, and otherwise equal to `b`. `seq` is usually introduced to improve performance by avoiding unneeded laziness.

A note on evaluation order: the expression `seq a b` does not guarantee that `a` will be evaluated before `b`. The only guarantee given by `seq` is that the both `a` and `b` will be evaluated before `seq` returns a value. In particular, this means that `b` may be evaluated before `a`. If you need to guarantee a specific order of evaluation, you must use the function `pseq` from the "parallel" package.

($!) :: (a -> b) -> a -> b infixr 0 #

Strict (call-by-value) application operator. It takes a function and an argument, evaluates the argument to weak head normal form (WHNF), then calls the function with that value.

# List operations

map :: (a -> b) -> [a] -> [b] #

`map` `f xs` is the list obtained by applying `f` to each element of `xs`, i.e.,

    map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn]
    map f [x1, x2, ...] == [f x1, f x2, ...]

(++) :: [a] -> [a] -> [a] infixr 5 #

Append two lists, i.e.,

    [x1, ..., xm] ++ [y1, ..., yn] == [x1, ..., xm, y1, ..., yn]
    [x1, ..., xm] ++ [y1, ...] == [x1, ..., xm, y1, ...]

If the first list is not finite, the result is the first list.

filter :: (a -> Bool) -> [a] -> [a] #

`filter`, applied to a predicate and a list, returns the list of those elements that satisfy the predicate; i.e.,

    filter p xs = [ x | x <- xs, p x]

head :: [a] -> a #

Extract the first element of a list, which must be non-empty.

last :: [a] -> a #

Extract the last element of a list, which must be finite and non-empty.

tail :: [a] -> [a] #

Extract the elements after the head of a list, which must be non-empty.

init :: [a] -> [a] #

Return all the elements of a list except the last one. The list must be non-empty.

null :: Foldable t => t a -> Bool #

Test whether the structure is empty. The default implementation is optimized for structures that are similar to cons-lists, because there is no general way to do better.

length :: Foldable t => t a -> Int #

Returns the size/length of a finite structure as an `Int`. The default implementation is optimized for structures that are similar to cons-lists, because there is no general way to do better.

(!!) :: [a] -> Int -> a infixl 9 #

List index (subscript) operator, starting from 0. It is an instance of the more general `genericIndex`, which takes an index of any integral type.

reverse :: [a] -> [a] #

`reverse` `xs` returns the elements of `xs` in reverse order. `xs` must be finite.

### Special folds

and :: Foldable t => t Bool -> Bool #

`and` returns the conjunction of a container of Bools. For the result to be `True`, the container must be finite; `False`, however, results from a `False` value finitely far from the left end.

or :: Foldable t => t Bool -> Bool #

`or` returns the disjunction of a container of Bools. For the result to be `False`, the container must be finite; `True`, however, results from a `True` value finitely far from the left end.

any :: Foldable t => (a -> Bool) -> t a -> Bool #

Determines whether any element of the structure satisfies the predicate.

all :: Foldable t => (a -> Bool) -> t a -> Bool #

Determines whether all elements of the structure satisfy the predicate.

concat :: Foldable t => t [a] -> [a] #

The concatenation of all the elements of a container of lists.

concatMap :: Foldable t => (a -> [b]) -> t a -> [b] #

Map a function over all the elements of a container and concatenate the resulting lists.

## Building lists

### Scans

scanl :: (b -> a -> b) -> b -> [a] -> [b] #

`scanl` is similar to `foldl`, but returns a list of successive reduced values from the left:

    scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...]

Note that

    last (scanl f z xs) == foldl f z xs.

scanl1 :: (a -> a -> a) -> [a] -> [a] #

`scanl1` is a variant of `scanl` that has no starting value argument:

    scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...]

scanr :: (a -> b -> b) -> b -> [a] -> [b] #

`scanr` is the right-to-left dual of `scanl`. Note that

    head (scanr f z xs) == foldr f z xs.

scanr1 :: (a -> a -> a) -> [a] -> [a] #

`scanr1` is a variant of `scanr` that has no starting value argument.

### Infinite lists

iterate :: (a -> a) -> a -> [a] #

`iterate` `f x` returns an infinite list of repeated applications of `f` to `x`:

    iterate f x == [x, f x, f (f x), ...]

repeat :: a -> [a] #

`repeat` `x` is an infinite list, with `x` the value of every element.

replicate :: Int -> a -> [a] #

`replicate` `n x` is a list of length `n` with `x` the value of every element. It is an instance of the more general `genericReplicate`, in which `n` may be of any integral type.

cycle :: [a] -> [a] #

`cycle` ties a finite list into a circular one, or equivalently, the infinite repetition of the original list. It is the identity on infinite lists.

## Sublists

take :: Int -> [a] -> [a] #

`take` `n`, applied to a list `xs`, returns the prefix of `xs` of length `n`, or `xs` itself if `n > `length` xs`:

    take 5 "Hello World!" == "Hello"
    take 3 [1,2,3,4,5] == [1,2,3]
    take 3 [1,2] == [1,2]
    take 3 [] == []
    take (-1) [1,2] == []
    take 0 [1,2] == []

It is an instance of the more general `genericTake`, in which `n` may be of any integral type.

drop :: Int -> [a] -> [a] #

`drop` `n xs` returns the suffix of `xs` after the first `n` elements, or `[]` if `n > `length` xs`:

    drop 6 "Hello World!" == "World!"
    drop 3 [1,2,3,4,5] == [4,5]
    drop 3 [1,2] == []
    drop 3 [] == []
    drop (-1) [1,2] == [1,2]
    drop 0 [1,2] == [1,2]

It is an instance of the more general `genericDrop`, in which `n` may be of any integral type.

splitAt :: Int -> [a] -> ([a], [a]) #

`splitAt` `n xs` returns a tuple where first element is `xs` prefix of length `n` and second element is the remainder of the list:

    splitAt 6 "Hello World!" == ("Hello ","World!")
    splitAt 3 [1,2,3,4,5] == ([1,2,3],[4,5])
    splitAt 1 [1,2,3] == ([1],[2,3])
    splitAt 3 [1,2,3] == ([1,2,3],[])
    splitAt 4 [1,2,3] == ([1,2,3],[])
    splitAt 0 [1,2,3] == ([],[1,2,3])
    splitAt (-1) [1,2,3] == ([],[1,2,3])

It is equivalent to `(`take` n xs, `drop` n xs)` when `n` is not `_|_` (`splitAt _|_ xs = _|_`). `splitAt` is an instance of the more general `genericSplitAt`, in which `n` may be of any integral type.

takeWhile :: (a -> Bool) -> [a] -> [a] #

`takeWhile`, applied to a predicate `p` and a list `xs`, returns the longest prefix (possibly empty) of `xs` of elements that satisfy `p`:

    takeWhile (< 3) [1,2,3,4,1,2,3,4] == [1,2]
    takeWhile (< 9) [1,2,3] == [1,2,3]
    takeWhile (< 0) [1,2,3] == []

dropWhile :: (a -> Bool) -> [a] -> [a] #

`dropWhile` `p xs` returns the suffix remaining after `takeWhile` `p xs`:

    dropWhile (< 3) [1,2,3,4,5,1,2,3] == [3,4,5,1,2,3]
    dropWhile (< 9) [1,2,3] == []
    dropWhile (< 0) [1,2,3] == [1,2,3]

span :: (a -> Bool) -> [a] -> ([a], [a]) #

`span`, applied to a predicate `p` and a list `xs`, returns a tuple where first element is longest prefix (possibly empty) of `xs` of elements that satisfy `p` and second element is the remainder of the list:

    span (< 3) [1,2,3,4,1,2,3,4] == ([1,2],[3,4,1,2,3,4])
    span (< 9) [1,2,3] == ([1,2,3],[])
    span (< 0) [1,2,3] == ([],[1,2,3])

`span` `p xs` is equivalent to `(`takeWhile` p xs, `dropWhile` p xs)`

break :: (a -> Bool) -> [a] -> ([a], [a]) #

`break`, applied to a predicate `p` and a list `xs`, returns a tuple where first element is longest prefix (possibly empty) of `xs` of elements that do not satisfy `p` and second element is the remainder of the list:

    break (> 3) [1,2,3,4,1,2,3,4] == ([1,2,3],[4,1,2,3,4])
    break (< 9) [1,2,3] == ([],[1,2,3])
    break (> 9) [1,2,3] == ([1,2,3],[])

`break` `p` is equivalent to ``span` (`not` . p)`.

## Searching lists

notElem :: (Foldable t, Eq a) => a -> t a -> Bool infix 4 #

`notElem` is the negation of `elem`.

lookup :: Eq a => a -> [(a, b)] -> Maybe b #

`lookup` `key assocs` looks up a key in an association list.

## Zipping and unzipping lists

zip :: [a] -> [b] -> [(a, b)] #

`zip` takes two lists and returns a list of corresponding pairs. If one input list is short, excess elements of the longer list are discarded.

`zip` is right-lazy:

    zip [] _|_ = []

zip3 :: [a] -> [b] -> [c] -> [(a, b, c)] #

`zip3` takes three lists and returns a list of triples, analogous to `zip`.

zipWith :: (a -> b -> c) -> [a] -> [b] -> [c] #

`zipWith` generalises `zip` by zipping with the function given as the first argument, instead of a tupling function. For example, ``zipWith` (+)` is applied to two lists to produce the list of corresponding sums.

`zipWith` is right-lazy:

    zipWith f [] _|_ = []

zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d] #

The `zipWith3` function takes a function which combines three elements, as well as three lists and returns a list of their point-wise combination, analogous to `zipWith`.

unzip :: [(a, b)] -> ([a], [b]) #

`unzip` transforms a list of pairs into a list of first components and a list of second components.

unzip3 :: [(a, b, c)] -> ([a], [b], [c]) #

The `unzip3` function takes a list of triples and returns three lists, analogous to `unzip`.

## Functions on strings

lines :: String -> [String] #

`lines` breaks a string up into a list of strings at newline characters. The resulting strings do not contain newlines.

Note that after splitting the string at newline characters, the last part of the string is considered a line even if it doesn't end with a newline. For example,

    lines "" == []
    lines "\n" == [""]
    lines "one" == ["one"]
    lines "one\n" == ["one"]
    lines "one\n\n" == ["one",""]
    lines "one\ntwo" == ["one","two"]
    lines "one\ntwo\n" == ["one","two"]

Thus ``lines` s` contains at least as many elements as newlines in `s`.

words :: String -> [String] #

`words` breaks a string up into a list of words, which were delimited by white space.

unlines :: [String] -> String #

`unlines` is an inverse operation to `lines`. It joins lines, after appending a terminating newline to each.

unwords :: [String] -> String #

`unwords` is an inverse operation to `words`. It joins words with separating spaces.

# Converting to and from `String`

## Converting to `String`

type ShowS = String -> String #

The `shows` functions return a function that prepends the output `String` to an existing `String`. This allows constant-time concatenation of results using function composition.

class Show a where #

Conversion of values to readable `String`s.

Derived instances of `Show` have the following properties, which are compatible with derived instances of `Read`:

- The result of `show` is a syntactically correct Haskell expression containing only constants, given the fixity declarations in force at the point where the type is declared. It contains only the constructor names defined in the data type, parentheses, and spaces. When labelled constructor fields are used, braces, commas, field names, and equal signs are also used.
- If the constructor is defined to be an infix operator, then `showsPrec` will produce infix applications of the constructor.
- the representation will be enclosed in parentheses if the precedence of the top-level constructor in `x` is less than `d` (associativity is ignored). Thus, if `d` is `0` then the result is never surrounded in parentheses; if `d` is `11` it is always surrounded in parentheses, unless it is an atomic expression.
- If the constructor is defined using record syntax, then `show` will produce the record-syntax form, with the fields given in the same order as the original declaration.

For example, given the declarations

    infixr 5 :^:
    data Tree a =  Leaf a  |  Tree a :^: Tree a

the derived instance of `Show` is equivalent to

    instance (Show a) => Show (Tree a) where

           showsPrec d (Leaf m) = showParen (d > app_prec) $
                showString "Leaf " . showsPrec (app_prec+1) m
             where app_prec = 10

           showsPrec d (u :^: v) = showParen (d > up_prec) $
                showsPrec (up_prec+1) u .
                showString " :^: "      .
                showsPrec (up_prec+1) v
             where up_prec = 5

Note that right-associativity of `:^:` is ignored. For example,

- ``show` (Leaf 1 :^: Leaf 2 :^: Leaf 3)` produces the string `"Leaf 1 :^: (Leaf 2 :^: Leaf 3)"`.

Minimal complete definition

showsPrec | show

Methods

showsPrec #

Arguments

:: Int | the operator precedence of the enclosing context (a number from `0` to `11`). Function application has precedence `10`.
-> a | the value to be converted to a `String`
-> ShowS |

Convert a value to a readable `String`.

`showsPrec` should satisfy the law

    showsPrec d x r ++ s  ==  showsPrec d x (r ++ s)

Derived instances of `Read` and `Show` satisfy the following:

- `(x,"")` is an element of `(`readsPrec` d (`showsPrec` d x ""))`.

That is, `readsPrec` parses the string produced by `showsPrec`, and delivers the value that `showsPrec` started with.

show :: a -> String #

A specialised variant of `showsPrec`, using precedence context zero, and returning an ordinary `String`.

showList :: [a] -> ShowS #

The method `showList` is provided to allow the programmer to give a specialised way of showing lists of values. For example, this is used by the predefined `Show` instance of the `Char` type, where values of type `String` should be shown in double quotes, rather than between square brackets.

Instances

Show Bool # |
Methods showsPrec :: Int -> Bool -> ShowS # show :: Bool -> String # showList :: [Bool] -> ShowS #
Show Char # | Since: 2.1
Methods showsPrec :: Int -> Char -> ShowS # show :: Char -> String # showList :: [Char] -> ShowS #
Show Int # | Since: 2.1
Methods showsPrec :: Int -> Int -> ShowS # show :: Int -> String # showList :: [Int] -> ShowS #
Show Int8 # | Since: 2.1
Methods showsPrec :: Int -> Int8 -> ShowS # show :: Int8 -> String # showList :: [Int8] -> ShowS #
Show Int16 # | Since: 2.1
Methods showsPrec :: Int -> Int16 -> ShowS # show :: Int16 -> String # showList :: [Int16] -> ShowS #
Show Int32 # | Since: 2.1
Methods showsPrec :: Int -> Int32 -> ShowS # show :: Int32 -> String # showList :: [Int32] -> ShowS #
Show Int64 # | Since: 2.1
Methods showsPrec :: Int -> Int64 -> ShowS # show :: Int64 -> String # showList :: [Int64] -> ShowS #
Show Integer # | Since: 2.1
Methods showsPrec :: Int -> Integer -> ShowS # show :: Integer -> String # showList :: [Integer] -> ShowS #
Show Natural # | Since: 4.8.0.0
Methods showsPrec :: Int -> Natural -> ShowS # show :: Natural -> String # showList :: [Natural] -> ShowS #
Show Ordering # |
Methods showsPrec :: Int -> Ordering -> ShowS # show :: Ordering -> String # showList :: [Ordering] -> ShowS #
Show Word # | Since: 2.1
Methods showsPrec :: Int -> Word -> ShowS # show :: Word -> String # showList :: [Word] -> ShowS #
Show Word8 # | Since: 2.1
Methods showsPrec :: Int -> Word8 -> ShowS # show :: Word8 -> String # showList :: [Word8] -> ShowS #
Show Word16 # | Since: 2.1
Methods showsPrec :: Int -> Word16 -> ShowS # show :: Word16 -> String # showList :: [Word16] -> ShowS #
Show Word32 # | Since: 2.1
Methods showsPrec :: Int -> Word32 -> ShowS # show :: Word32 -> String # showList :: [Word32] -> ShowS #
Show Word64 # | Since: 2.1
Methods showsPrec :: Int -> Word64 -> ShowS # show :: Word64 -> String # showList :: [Word64] -> ShowS #
Show CallStack # | Since: 4.9.0.0
Methods showsPrec :: Int -> CallStack -> ShowS # show :: CallStack -> String # showList :: [CallStack] -> ShowS #
Show SomeTypeRep # | Since: 4.10.0.0
Methods showsPrec :: Int -> SomeTypeRep -> ShowS # show :: SomeTypeRep -> String # showList :: [SomeTypeRep] -> ShowS #
Show () # |
Methods showsPrec :: Int -> () -> ShowS # show :: () -> String # showList :: [()] -> ShowS #
Show TyCon # | Since: 2.1
Methods showsPrec :: Int -> TyCon -> ShowS # show :: TyCon -> String # showList :: [TyCon] -> ShowS #
Show Module # | Since: 4.9.0.0
Methods showsPrec :: Int -> Module -> ShowS # show :: Module -> String # showList :: [Module] -> ShowS #
Show TrName # | Since: 4.9.0.0
Methods showsPrec :: Int -> TrName -> ShowS # show :: TrName -> String # showList :: [TrName] -> ShowS #
Show SrcLoc # |
Methods showsPrec :: Int -> SrcLoc -> ShowS # show :: SrcLoc -> String # showList :: [SrcLoc] -> ShowS #
Show SomeException # | Since: 3.0
Methods showsPrec :: Int -> SomeException -> ShowS # show :: SomeException -> String # showList :: [SomeException] -> ShowS #
Show GeneralCategory # |
Methods showsPrec :: Int -> GeneralCategory -> ShowS # show :: GeneralCategory -> String # showList :: [GeneralCategory] -> ShowS #
Show Number # |
Methods showsPrec :: Int -> Number -> ShowS # show :: Number -> String # showList :: [Number] -> ShowS #
Show Lexeme # |
Methods showsPrec :: Int -> Lexeme -> ShowS # show :: Lexeme -> String # showList :: [Lexeme] -> ShowS #
Show Fingerprint # | Since: 4.7.0.0
Methods showsPrec :: Int -> Fingerprint -> ShowS # show :: Fingerprint -> String # showList :: [Fingerprint] -> ShowS #
Show IOMode # |
Methods showsPrec :: Int -> IOMode -> ShowS # show :: IOMode -> String # showList :: [IOMode] -> ShowS #
Show IntPtr # |
Methods showsPrec :: Int -> IntPtr -> ShowS # show :: IntPtr -> String # showList :: [IntPtr] -> ShowS #
Show WordPtr # |
Methods showsPrec :: Int -> WordPtr -> ShowS # show :: WordPtr -> String # showList :: [WordPtr] -> ShowS #
Show CUIntMax # |
Methods showsPrec :: Int -> CUIntMax -> ShowS # show :: CUIntMax -> String # showList :: [CUIntMax] -> ShowS #
Show CIntMax # |
Methods showsPrec :: Int -> CIntMax -> ShowS # show :: CIntMax -> String # showList :: [CIntMax] -> ShowS #
Show CUIntPtr # |
Methods showsPrec :: Int -> CUIntPtr -> ShowS # show :: CUIntPtr -> String # showList :: [CUIntPtr] -> ShowS #
Show CIntPtr # |
Methods showsPrec :: Int -> CIntPtr -> ShowS # show :: CIntPtr -> String # showList :: [CIntPtr] -> ShowS #
Show CSUSeconds # |
Methods showsPrec :: Int -> CSUSeconds -> ShowS # show :: CSUSeconds -> String # showList :: [CSUSeconds] -> ShowS #
Show CUSeconds # |
Methods showsPrec :: Int -> CUSeconds -> ShowS # show :: CUSeconds -> String # showList :: [CUSeconds] -> ShowS #
Show CTime # |
Methods showsPrec :: Int -> CTime -> ShowS # show :: CTime -> String # showList :: [CTime] -> ShowS #
Show CClock # |
Methods showsPrec :: Int -> CClock -> ShowS # show :: CClock -> String # showList :: [CClock] -> ShowS #
Show CSigAtomic # |
Methods showsPrec :: Int -> CSigAtomic -> ShowS # show :: CSigAtomic -> String # showList :: [CSigAtomic] -> ShowS #
Show CWchar # |
Methods showsPrec :: Int -> CWchar -> ShowS # show :: CWchar -> String # showList :: [CWchar] -> ShowS #
Show CSize # |
Methods showsPrec :: Int -> CSize -> ShowS # show :: CSize -> String # showList :: [CSize] -> ShowS #
Show CPtrdiff # |
Methods showsPrec :: Int -> CPtrdiff -> ShowS # show :: CPtrdiff -> String # showList :: [CPtrdiff] -> ShowS #
Show CDouble # |
Methods showsPrec :: Int -> CDouble -> ShowS # show :: CDouble -> String # showList :: [CDouble] -> ShowS #
Show CFloat # |
Methods showsPrec :: Int -> CFloat -> ShowS # show :: CFloat -> String # showList :: [CFloat] -> ShowS #
Show CBool # |
Methods showsPrec :: Int -> CBool -> ShowS # show :: CBool -> String # showList :: [CBool] -> ShowS #
Show CULLong # |
Methods showsPrec :: Int -> CULLong -> ShowS # show :: CULLong -> String # showList :: [CULLong] -> ShowS #
Show CLLong # |
Methods showsPrec :: Int -> CLLong -> ShowS # show :: CLLong -> String # showList :: [CLLong] -> ShowS #
Show CULong # |
Methods showsPrec :: Int -> CULong -> ShowS # show :: CULong -> String # showList :: [CULong] -> ShowS #
Show CLong # |
Methods showsPrec :: Int -> CLong -> ShowS # show :: CLong -> String # showList :: [CLong] -> ShowS #
Show CUInt # |
Methods showsPrec :: Int -> CUInt -> ShowS # show :: CUInt -> String # showList :: [CUInt] -> ShowS #
Show CInt # |
Methods showsPrec :: Int -> CInt -> ShowS # show :: CInt -> String # showList :: [CInt] -> ShowS #
Show CUShort # |
Methods showsPrec :: Int -> CUShort -> ShowS # show :: CUShort -> String # showList :: [CUShort] -> ShowS #
Show CShort # |
Methods showsPrec :: Int -> CShort -> ShowS # show :: CShort -> String # showList :: [CShort] -> ShowS #
Show CUChar # |
Methods showsPrec :: Int -> CUChar -> ShowS # show :: CUChar -> String # showList :: [CUChar] -> ShowS #
Show CSChar # |
Methods showsPrec :: Int -> CSChar -> ShowS # show :: CSChar -> String # showList :: [CSChar] -> ShowS #
Show CChar # |
Methods showsPrec :: Int -> CChar -> ShowS # show :: CChar -> String # showList :: [CChar] -> ShowS #
Show SomeNat # | Since: 4.7.0.0
Methods showsPrec :: Int -> SomeNat -> ShowS # show :: SomeNat -> String # showList :: [SomeNat] -> ShowS #
Show SomeSymbol # | Since: 4.7.0.0
Methods showsPrec :: Int -> SomeSymbol -> ShowS # show :: SomeSymbol -> String # showList :: [SomeSymbol] -> ShowS #
Show DecidedStrictness # |
Methods showsPrec :: Int -> DecidedStrictness -> ShowS # show :: DecidedStrictness -> String # showList :: [DecidedStrictness] -> ShowS #
Show SourceStrictness # |
Methods showsPrec :: Int -> SourceStrictness -> ShowS # show :: SourceStrictness -> String # showList :: [SourceStrictness] -> ShowS #
Show SourceUnpackedness # |
Methods showsPrec :: Int -> SourceUnpackedness -> ShowS # show :: SourceUnpackedness -> String # showList :: [SourceUnpackedness] -> ShowS #
Show Associativity # |
Methods showsPrec :: Int -> Associativity -> ShowS # show :: Associativity -> String # showList :: [Associativity] -> ShowS #
Show Fixity # |
Methods showsPrec :: Int -> Fixity -> ShowS # show :: Fixity -> String # showList :: [Fixity] -> ShowS #
Show Any # |
Methods showsPrec :: Int -> Any -> ShowS # show :: Any -> String # showList :: [Any] -> ShowS #
Show All # |
Methods showsPrec :: Int -> All -> ShowS # show :: All -> String # showList :: [All] -> ShowS #
Show ArithException # | Since: 4.0.0.0
Methods showsPrec :: Int -> ArithException -> ShowS # show :: ArithException -> String # showList :: [ArithException] -> ShowS #
Show ErrorCall # | Since: 4.0.0.0
Methods showsPrec :: Int -> ErrorCall -> ShowS # show :: ErrorCall -> String # showList :: [ErrorCall] -> ShowS #
Show IOException # | Since: 4.1.0.0
Methods showsPrec :: Int -> IOException -> ShowS # show :: IOException -> String # showList :: [IOException] -> ShowS #
Show MaskingState # |
Methods showsPrec :: Int -> MaskingState -> ShowS # show :: MaskingState -> String # showList :: [MaskingState] -> ShowS #
Show CodingProgress # |
Methods showsPrec :: Int -> CodingProgress -> ShowS # show :: CodingProgress -> String # showList :: [CodingProgress] -> ShowS #
Show TextEncoding # | Since: 4.3.0.0
Methods showsPrec :: Int -> TextEncoding -> ShowS # show :: TextEncoding -> String # showList :: [TextEncoding] -> ShowS #
Show SeekMode # |
Methods showsPrec :: Int -> SeekMode -> ShowS # show :: SeekMode -> String # showList :: [SeekMode] -> ShowS #
Show NewlineMode # |
Methods showsPrec :: Int -> NewlineMode -> ShowS # show :: NewlineMode -> String # showList :: [NewlineMode] -> ShowS #
Show Newline # |
Methods showsPrec :: Int -> Newline -> ShowS # show :: Newline -> String # showList :: [Newline] -> ShowS #
Show BufferMode # |
Methods showsPrec :: Int -> BufferMode -> ShowS # show :: BufferMode -> String # showList :: [BufferMode] -> ShowS #
Show Handle # | Since: 4.1.0.0
Methods showsPrec :: Int -> Handle -> ShowS # show :: Handle -> String # showList :: [Handle] -> ShowS #
Show IOErrorType # | Since: 4.1.0.0
Methods showsPrec :: Int -> IOErrorType -> ShowS # show :: IOErrorType -> String # showList :: [IOErrorType] -> ShowS #
Show ExitCode # |
Methods showsPrec :: Int -> ExitCode -> ShowS # show :: ExitCode -> String # showList :: [ExitCode] -> ShowS #
Show ArrayException # | Since: 4.1.0.0
Methods showsPrec :: Int -> ArrayException -> ShowS # show :: ArrayException -> String # showList :: [ArrayException] -> ShowS #
Show AsyncException # | Since: 4.1.0.0
Methods showsPrec :: Int -> AsyncException -> ShowS # show :: AsyncException -> String # showList :: [AsyncException] -> ShowS #
Show SomeAsyncException # | Since: 4.7.0.0
Methods showsPrec :: Int -> SomeAsyncException -> ShowS # show :: SomeAsyncException -> String # showList :: [SomeAsyncException] -> ShowS #
Show AssertionFailed # | Since: 4.1.0.0
Methods showsPrec :: Int -> AssertionFailed -> ShowS # show :: AssertionFailed -> String # showList :: [AssertionFailed] -> ShowS #
Show CompactionFailed # | Since: 4.10.0.0
Methods showsPrec :: Int -> CompactionFailed -> ShowS # show :: CompactionFailed -> String # showList :: [CompactionFailed] -> ShowS #
Show AllocationLimitExceeded # | Since: 4.7.1.0
Methods showsPrec :: Int -> AllocationLimitExceeded -> ShowS # show :: AllocationLimitExceeded -> String # showList :: [AllocationLimitExceeded] -> ShowS #
Show Deadlock # | Since: 4.1.0.0
Methods showsPrec :: Int -> Deadlock -> ShowS # show :: Deadlock -> String # showList :: [Deadlock] -> ShowS #
Show BlockedIndefinitelyOnSTM # | Since: 4.1.0.0
Methods showsPrec :: Int -> BlockedIndefinitelyOnSTM -> ShowS # show :: BlockedIndefinitelyOnSTM -> String # showList :: [BlockedIndefinitelyOnSTM] -> ShowS #
Show BlockedIndefinitelyOnMVar # | Since: 4.1.0.0
Methods showsPrec :: Int -> BlockedIndefinitelyOnMVar -> ShowS # show :: BlockedIndefinitelyOnMVar -> String # showList :: [BlockedIndefinitelyOnMVar] -> ShowS #
Show CodingFailureMode # |
Methods showsPrec :: Int -> CodingFailureMode -> ShowS # show :: CodingFailureMode -> String # showList :: [CodingFailureMode] -> ShowS #
Show Fd # |
Methods showsPrec :: Int -> Fd -> ShowS # show :: Fd -> String # showList :: [Fd] -> ShowS #
Show CTimer # |
Methods showsPrec :: Int -> CTimer -> ShowS # show :: CTimer -> String # showList :: [CTimer] -> ShowS #
Show CKey # |
Methods showsPrec :: Int -> CKey -> ShowS # show :: CKey -> String # showList :: [CKey] -> ShowS #
Show CId # |
Methods showsPrec :: Int -> CId -> ShowS # show :: CId -> String # showList :: [CId] -> ShowS #
Show CFsFilCnt # |
Methods showsPrec :: Int -> CFsFilCnt -> ShowS # show :: CFsFilCnt -> String # showList :: [CFsFilCnt] -> ShowS #
Show CFsBlkCnt # |
Methods showsPrec :: Int -> CFsBlkCnt -> ShowS # show :: CFsBlkCnt -> String # showList :: [CFsBlkCnt] -> ShowS #
Show CClockId # |
Methods showsPrec :: Int -> CClockId -> ShowS # show :: CClockId -> String # showList :: [CClockId] -> ShowS #
Show CBlkCnt # |
Methods showsPrec :: Int -> CBlkCnt -> ShowS # show :: CBlkCnt -> String # showList :: [CBlkCnt] -> ShowS #
Show CBlkSize # |
Methods showsPrec :: Int -> CBlkSize -> ShowS # show :: CBlkSize -> String # showList :: [CBlkSize] -> ShowS #
Show CRLim # |
Methods showsPrec :: Int -> CRLim -> ShowS # show :: CRLim -> String # showList :: [CRLim] -> ShowS #
Show CTcflag # |
Methods showsPrec :: Int -> CTcflag -> ShowS # show :: CTcflag -> String # showList :: [CTcflag] -> ShowS #
Show CSpeed # |
Methods showsPrec :: Int -> CSpeed -> ShowS # show :: CSpeed -> String # showList :: [CSpeed] -> ShowS #
Show CCc # |
Methods showsPrec :: Int -> CCc -> ShowS # show :: CCc -> String # showList :: [CCc] -> ShowS #
Show CUid # |
Methods showsPrec :: Int -> CUid -> ShowS # show :: CUid -> String # showList :: [CUid] -> ShowS #
Show CNlink # |
Methods showsPrec :: Int -> CNlink -> ShowS # show :: CNlink -> String # showList :: [CNlink] -> ShowS #
Show CGid # |
Methods showsPrec :: Int -> CGid -> ShowS # show :: CGid -> String # showList :: [CGid] -> ShowS #
Show CSsize # |
Methods showsPrec :: Int -> CSsize -> ShowS # show :: CSsize -> String # showList :: [CSsize] -> ShowS #
Show CPid # |
Methods showsPrec :: Int -> CPid -> ShowS # show :: CPid -> String # showList :: [CPid] -> ShowS #
Show COff # |
Methods showsPrec :: Int -> COff -> ShowS # show :: COff -> String # showList :: [COff] -> ShowS #
Show CMode # |
Methods showsPrec :: Int -> CMode -> ShowS # show :: CMode -> String # showList :: [CMode] -> ShowS #
Show CIno # |
Methods showsPrec :: Int -> CIno -> ShowS # show :: CIno -> String # showList :: [CIno] -> ShowS #
Show CDev # |
Methods showsPrec :: Int -> CDev -> ShowS # show :: CDev -> String # showList :: [CDev] -> ShowS #
Show Lifetime # |
Methods showsPrec :: Int -> Lifetime -> ShowS # show :: Lifetime -> String # showList :: [Lifetime] -> ShowS #
Show Event # | Since: 4.3.1.0
Methods showsPrec :: Int -> Event -> ShowS # show :: Event -> String # showList :: [Event] -> ShowS #
Show Dynamic # | Since: 2.1
Methods showsPrec :: Int -> Dynamic -> ShowS # show :: Dynamic -> String # showList :: [Dynamic] -> ShowS #
Show ThreadStatus # |
Methods showsPrec :: Int -> ThreadStatus -> ShowS # show :: ThreadStatus -> String # showList :: [ThreadStatus] -> ShowS #
Show BlockReason # |
Methods showsPrec :: Int -> BlockReason -> ShowS # show :: BlockReason -> String # showList :: [BlockReason] -> ShowS #
Show ThreadId # | Since: 4.2.0.0
Methods showsPrec :: Int -> ThreadId -> ShowS # show :: ThreadId -> String # showList :: [ThreadId] -> ShowS #
Show NestedAtomically # | Since: 4.0
Methods showsPrec :: Int -> NestedAtomically -> ShowS # show :: NestedAtomically -> String # showList :: [NestedAtomically] -> ShowS #
Show NonTermination # | Since: 4.0
Methods showsPrec :: Int -> NonTermination -> ShowS # show :: NonTermination -> String # showList :: [NonTermination] -> ShowS #
Show TypeError # | Since: 4.9.0.0
Methods showsPrec :: Int -> TypeError -> ShowS # show :: TypeError -> String # showList :: [TypeError] -> ShowS #
Show NoMethodError # | Since: 4.0
Methods showsPrec :: Int -> NoMethodError -> ShowS # show :: NoMethodError -> String # showList :: [NoMethodError] -> ShowS #
Show RecUpdError # | Since: 4.0
Methods showsPrec :: Int -> RecUpdError -> ShowS # show :: RecUpdError -> String # showList :: [RecUpdError] -> ShowS #
Show RecConError # | Since: 4.0
Methods showsPrec :: Int -> RecConError -> ShowS # show :: RecConError -> String # showList :: [RecConError] -> ShowS #
Show RecSelError # | Since: 4.0
Methods showsPrec :: Int -> RecSelError -> ShowS # show :: RecSelError -> String # showList :: [RecSelError] -> ShowS #
Show PatternMatchFail # | Since: 4.0
Methods showsPrec :: Int -> PatternMatchFail -> ShowS # show :: PatternMatchFail -> String # showList :: [PatternMatchFail] -> ShowS #
Show FdKey # |
Methods showsPrec :: Int -> FdKey -> ShowS # show :: FdKey -> String # showList :: [FdKey] -> ShowS #
Show FileLockingNotSupported # |
Methods showsPrec :: Int -> FileLockingNotSupported -> ShowS # show :: FileLockingNotSupported -> String # showList :: [FileLockingNotSupported] -> ShowS #
Show HandlePosn # | Since: 4.1.0.0
Methods showsPrec :: Int -> HandlePosn -> ShowS # show :: HandlePosn -> String # showList :: [HandlePosn] -> ShowS #
Show Version # |
Methods showsPrec :: Int -> Version -> ShowS # show :: Version -> String # showList :: [Version] -> ShowS #
Show GCStats # |
Methods showsPrec :: Int -> GCStats -> ShowS # show :: GCStats -> String # showList :: [GCStats] -> ShowS #
Show GCDetails # |
Methods showsPrec :: Int -> GCDetails -> ShowS # show :: GCDetails -> String # showList :: [GCDetails] -> ShowS #
Show RTSStats # |
Methods showsPrec :: Int -> RTSStats -> ShowS # show :: RTSStats -> String # showList :: [RTSStats] -> ShowS #
Show RTSFlags # |
Methods showsPrec :: Int -> RTSFlags -> ShowS # show :: RTSFlags -> String # showList :: [RTSFlags] -> ShowS #
Show ParFlags # |
Methods showsPrec :: Int -> ParFlags -> ShowS # show :: ParFlags -> String # showList :: [ParFlags] -> ShowS #
Show TickyFlags # |
Methods showsPrec :: Int -> TickyFlags -> ShowS # show :: TickyFlags -> String # showList :: [TickyFlags] -> ShowS #
Show TraceFlags # |
Methods showsPrec :: Int -> TraceFlags -> ShowS # show :: TraceFlags -> String # showList :: [TraceFlags] -> ShowS #
Show DoTrace # |
Methods showsPrec :: Int -> DoTrace -> ShowS # show :: DoTrace -> String # showList :: [DoTrace] -> ShowS #
Show ProfFlags # |
Methods showsPrec :: Int -> ProfFlags -> ShowS # show :: ProfFlags -> String # showList :: [ProfFlags] -> ShowS #
Show DoHeapProfile # |
Methods showsPrec :: Int -> DoHeapProfile -> ShowS # show :: DoHeapProfile -> String # showList :: [DoHeapProfile] -> ShowS #
Show CCFlags # |
Methods showsPrec :: Int -> CCFlags -> ShowS # show :: CCFlags -> String # showList :: [CCFlags] -> ShowS #
Show DoCostCentres # |
Methods showsPrec :: Int -> DoCostCentres -> ShowS # show :: DoCostCentres -> String # showList :: [DoCostCentres] -> ShowS #
Show DebugFlags # |
Methods showsPrec :: Int -> DebugFlags -> ShowS # show :: DebugFlags -> String # showList :: [DebugFlags] -> ShowS #
Show MiscFlags # |
Methods showsPrec :: Int -> MiscFlags -> ShowS # show :: MiscFlags -> String # showList :: [MiscFlags] -> ShowS #
Show ConcFlags # |
Methods showsPrec :: Int -> ConcFlags -> ShowS # show :: ConcFlags -> String # showList :: [ConcFlags] -> ShowS #
Show GCFlags # |
Methods showsPrec :: Int -> GCFlags -> ShowS # show :: GCFlags -> String # showList :: [GCFlags] -> ShowS #
Show GiveGCStats # |
Methods showsPrec :: Int -> GiveGCStats -> ShowS # show :: GiveGCStats -> String # showList :: [GiveGCStats] -> ShowS #
Show Fixity # |
Methods showsPrec :: Int -> Fixity -> ShowS # show :: Fixity -> String # showList :: [Fixity] -> ShowS #
Show ConstrRep # |
Methods showsPrec :: Int -> ConstrRep -> ShowS # show :: ConstrRep -> String # showList :: [ConstrRep] -> ShowS #
Show DataRep # |
Methods showsPrec :: Int -> DataRep -> ShowS # show :: DataRep -> String # showList :: [DataRep] -> ShowS #
Show Constr # | Since: 4.0.0.0
Methods showsPrec :: Int -> Constr -> ShowS # show :: Constr -> String # showList :: [Constr] -> ShowS #
Show DataType # |
Methods showsPrec :: Int -> DataType -> ShowS # show :: DataType -> String # showList :: [DataType] -> ShowS #
Show StaticPtrInfo # |
Methods showsPrec :: Int -> StaticPtrInfo -> ShowS # show :: StaticPtrInfo -> String # showList :: [StaticPtrInfo] -> ShowS #
Show Void # | Since: 4.8.0.0
Methods showsPrec :: Int -> Void -> ShowS # show :: Void -> String # showList :: [Void] -> ShowS #
Show a => Show [a] # | Since: 2.1
Methods showsPrec :: Int -> [a] -> ShowS # show :: [a] -> String # showList :: [[a]] -> ShowS #
Show a => Show (Maybe a) # |
Methods showsPrec :: Int -> Maybe a -> ShowS # show :: Maybe a -> String # showList :: [Maybe a] -> ShowS #
Show a => Show (Ratio a) # | Since: 2.0.1
Methods showsPrec :: Int -> Ratio a -> ShowS # show :: Ratio a -> String # showList :: [Ratio a] -> ShowS #
Show (Ptr a) # | Since: 2.1
Methods showsPrec :: Int -> Ptr a -> ShowS # show :: Ptr a -> String # showList :: [Ptr a] -> ShowS #
Show (FunPtr a) # | Since: 2.1
Methods showsPrec :: Int -> FunPtr a -> ShowS # show :: FunPtr a -> String # showList :: [FunPtr a] -> ShowS #
Show p => Show (Par1 p) # |
Methods showsPrec :: Int -> Par1 p -> ShowS # show :: Par1 p -> String # showList :: [Par1 p] -> ShowS #
Show a => Show (Down a) # |
Methods showsPrec :: Int -> Down a -> ShowS # show :: Down a -> String # showList :: [Down a] -> ShowS #
Show a => Show (Last a) # |
Methods showsPrec :: Int -> Last a -> ShowS # show :: Last a -> String # showList :: [Last a] -> ShowS #
Show a => Show (First a) # |
Methods showsPrec :: Int -> First a -> ShowS # show :: First a -> String # showList :: [First a] -> ShowS #
Show a => Show (Product a) # |
Methods showsPrec :: Int -> Product a -> ShowS # show :: Product a -> String # showList :: [Product a] -> ShowS #
Show a => Show (Sum a) # |
Methods showsPrec :: Int -> Sum a -> ShowS # show :: Sum a -> String # showList :: [Sum a] -> ShowS #
Show a => Show (Dual a) # |
Methods showsPrec :: Int -> Dual a -> ShowS # show :: Dual a -> String # showList :: [Dual a] -> ShowS #
Show (ForeignPtr a) # | Since: 2.1
Methods showsPrec :: Int -> ForeignPtr a -> ShowS # show :: ForeignPtr a -> String # showList :: [ForeignPtr a] -> ShowS #
Show a => Show (Identity a) # | This instance would be equivalent to the derived instances of the `Identity` newtype if the `runIdentity` field were removed Since: 4.8.0.0
Methods showsPrec :: Int -> Identity a -> ShowS # show :: Identity a -> String # showList :: [Identity a] -> ShowS #
Show a => Show (ZipList a) # |
Methods showsPrec :: Int -> ZipList a -> ShowS # show :: ZipList a -> String # showList :: [ZipList a] -> ShowS #
Show a => Show (NonEmpty a) # |
Methods showsPrec :: Int -> NonEmpty a -> ShowS # show :: NonEmpty a -> String # showList :: [NonEmpty a] -> ShowS #
Show a => Show (Option a) # |
Methods showsPrec :: Int -> Option a -> ShowS # show :: Option a -> String # showList :: [Option a] -> ShowS #
Show m => Show (WrappedMonoid m) # |
Methods showsPrec :: Int -> WrappedMonoid m -> ShowS # show :: WrappedMonoid m -> String # showList :: [WrappedMonoid m] -> ShowS #
Show a => Show (Last a) # |
Methods showsPrec :: Int -> Last a -> ShowS # show :: Last a -> String # showList :: [Last a] -> ShowS #
Show a => Show (First a) # |
Methods showsPrec :: Int -> First a -> ShowS # show :: First a -> String # showList :: [First a] -> ShowS #
Show a => Show (Max a) # |
Methods showsPrec :: Int -> Max a -> ShowS # show :: Max a -> String # showList :: [Max a] -> ShowS #
Show a => Show (Min a) # |
Methods showsPrec :: Int -> Min a -> ShowS # show :: Min a -> String # showList :: [Min a] -> ShowS #
HasResolution a => Show (Fixed a) # | Since: 2.1
Methods showsPrec :: Int -> Fixed a -> ShowS # show :: Fixed a -> String # showList :: [Fixed a] -> ShowS #
Show a => Show (Complex a) # |
Methods showsPrec :: Int -> Complex a -> ShowS # show :: Complex a -> String # showList :: [Complex a] -> ShowS #
(Show b, Show a) => Show (Either a b) # |
Methods showsPrec :: Int -> Either a b -> ShowS # show :: Either a b -> String # showList :: [Either a b] -> ShowS #
Show (V1 k p) # |
Methods showsPrec :: Int -> V1 k p -> ShowS # show :: V1 k p -> String # showList :: [V1 k p] -> ShowS #
Show (U1 k p) # | Since: 4.9.0.0
Methods showsPrec :: Int -> U1 k p -> ShowS # show :: U1 k p -> String # showList :: [U1 k p] -> ShowS #
Show (TypeRep k a) # |
Methods showsPrec :: Int -> TypeRep k a -> ShowS # show :: TypeRep k a -> String # showList :: [TypeRep k a] -> ShowS #
(Show a, Show b) => Show (a, b) # | Since: 2.1
Methods showsPrec :: Int -> (a, b) -> ShowS # show :: (a, b) -> String # showList :: [(a, b)] -> ShowS #
Show (ST s a) # | Since: 2.1
Methods showsPrec :: Int -> ST s a -> ShowS # show :: ST s a -> String # showList :: [ST s a] -> ShowS #
Show (Proxy k s) # | Since: 4.7.0.0
Methods showsPrec :: Int -> Proxy k s -> ShowS # show :: Proxy k s -> String # showList :: [Proxy k s] -> ShowS #
(Show b, Show a) => Show (Arg a b) # |
Methods showsPrec :: Int -> Arg a b -> ShowS # show :: Arg a b -> String # showList :: [Arg a b] -> ShowS #
Show (f p) => Show (Rec1 k f p) # |
Methods showsPrec :: Int -> Rec1 k f p -> ShowS # show :: Rec1 k f p -> String # showList :: [Rec1 k f p] -> ShowS #
Show (URec k Word p) # |
Methods showsPrec :: Int -> URec k Word p -> ShowS # show :: URec k Word p -> String # showList :: [URec k Word p] -> ShowS #
Show (URec k Int p) # |
Methods showsPrec :: Int -> URec k Int p -> ShowS # show :: URec k Int p -> String # showList :: [URec k Int p] -> ShowS #
Show (URec k Float p) # |
Methods showsPrec :: Int -> URec k Float p -> ShowS # show :: URec k Float p -> String # showList :: [URec k Float p] -> ShowS #
Show (URec k Double p) # |
Methods showsPrec :: Int -> URec k Double p -> ShowS # show :: URec k Double p -> String # showList :: [URec k Double p] -> ShowS #
Show (URec k Char p) # |
Methods showsPrec :: Int -> URec k Char p -> ShowS # show :: URec k Char p -> String # showList :: [URec k Char p] -> ShowS #
(Show a, Show b, Show c) => Show (a, b, c) # | Since: 2.1
Methods showsPrec :: Int -> (a, b, c) -> ShowS # show :: (a, b, c) -> String # showList :: [(a, b, c)] -> ShowS #
Show ((:~:) k a b) # |
Methods showsPrec :: Int -> (k :~: a) b -> ShowS # show :: (k :~: a) b -> String # showList :: [(k :~: a) b] -> ShowS #
Show (Coercion k a b) # |
Methods showsPrec :: Int -> Coercion k a b -> ShowS # show :: Coercion k a b -> String # showList :: [Coercion k a b] -> ShowS #
Show (f a) => Show (Alt k f a) # |
Methods showsPrec :: Int -> Alt k f a -> ShowS # show :: Alt k f a -> String # showList :: [Alt k f a] -> ShowS #
Show a => Show (Const k a b) # | This instance would be equivalent to the derived instances of the `Const` newtype if the `runConst` field were removed Since: 4.8.0.0
Methods showsPrec :: Int -> Const k a b -> ShowS # show :: Const k a b -> String # showList :: [Const k a b] -> ShowS #
Show c => Show (K1 k i c p) # |
Methods showsPrec :: Int -> K1 k i c p -> ShowS # show :: K1 k i c p -> String # showList :: [K1 k i c p] -> ShowS #
(Show (g p), Show (f p)) => Show ((:+:) k f g p) # |
Methods showsPrec :: Int -> (k :+: f) g p -> ShowS # show :: (k :+: f) g p -> String # showList :: [(k :+: f) g p] -> ShowS #
(Show (g p), Show (f p)) => Show ((:*:) k f g p) # |
Methods showsPrec :: Int -> (k :*: f) g p -> ShowS # show :: (k :*: f) g p -> String # showList :: [(k :*: f) g p] -> ShowS #
(Show a, Show b, Show c, Show d) => Show (a, b, c, d) # | Since: 2.1
Methods showsPrec :: Int -> (a, b, c, d) -> ShowS # show :: (a, b, c, d) -> String # showList :: [(a, b, c, d)] -> ShowS #
Show ((:~~:) k1 k2 a b) # | Since: 4.10.0.0
Methods showsPrec :: Int -> (k1 :~~: k2) a b -> ShowS # show :: (k1 :~~: k2) a b -> String # showList :: [(k1 :~~: k2) a b] -> ShowS #
(Show1 f, Show1 g, Show a) => Show (Sum * f g a) # | Since: 4.9.0.0
Methods showsPrec :: Int -> Sum * f g a -> ShowS # show :: Sum * f g a -> String # showList :: [Sum * f g a] -> ShowS #
(Show1 f, Show1 g, Show a) => Show (Product * f g a) # | Since: 4.9.0.0
Methods showsPrec :: Int -> Product * f g a -> ShowS # show :: Product * f g a -> String # showList :: [Product * f g a] -> ShowS #
Show (f p) => Show (M1 k i c f p) # |
Methods showsPrec :: Int -> M1 k i c f p -> ShowS # show :: M1 k i c f p -> String # showList :: [M1 k i c f p] -> ShowS #
Show (f (g p)) => Show ((:.:) k2 k1 f g p) # |
Methods showsPrec :: Int -> (k2 :.: k1) f g p -> ShowS # show :: (k2 :.: k1) f g p -> String # showList :: [(k2 :.: k1) f g p] -> ShowS #
(Show a, Show b, Show c, Show d, Show e) => Show (a, b, c, d, e) # | Since: 2.1
Methods showsPrec :: Int -> (a, b, c, d, e) -> ShowS # show :: (a, b, c, d, e) -> String # showList :: [(a, b, c, d, e)] -> ShowS #
(Show1 f, Show1 g, Show a) => Show (Compose * * f g a) # | Since: 4.9.0.0
Methods showsPrec :: Int -> Compose * * f g a -> ShowS # show :: Compose * * f g a -> String # showList :: [Compose * * f g a] -> ShowS #
(Show a, Show b, Show c, Show d, Show e, Show f) => Show (a, b, c, d, e, f) # | Since: 2.1
Methods showsPrec :: Int -> (a, b, c, d, e, f) -> ShowS # show :: (a, b, c, d, e, f) -> String # showList :: [(a, b, c, d, e, f)] -> ShowS #
(Show a, Show b, Show c, Show d, Show e, Show f, Show g) => Show (a, b, c, d, e, f, g) # | Since: 2.1
Methods showsPrec :: Int -> (a, b, c, d, e, f, g) -> ShowS # show :: (a, b, c, d, e, f, g) -> String # showList :: [(a, b, c, d, e, f, g)] -> ShowS #
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h) => Show (a, b, c, d, e, f, g, h) # | Since: 2.1
Methods showsPrec :: Int -> (a, b, c, d, e, f, g, h) -> ShowS # show :: (a, b, c, d, e, f, g, h) -> String # showList :: [(a, b, c, d, e, f, g, h)] -> ShowS #
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i) => Show (a, b, c, d, e, f, g, h, i) # | Since: 2.1
Methods showsPrec :: Int -> (a, b, c, d, e, f, g, h, i) -> ShowS # show :: (a, b, c, d, e, f, g, h, i) -> String # showList :: [(a, b, c, d, e, f, g, h, i)] -> ShowS #
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j) => Show (a, b, c, d, e, f, g, h, i, j) # | Since: 2.1
Methods showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j) -> ShowS # show :: (a, b, c, d, e, f, g, h, i, j) -> String # showList :: [(a, b, c, d, e, f, g, h, i, j)] -> ShowS #
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k) => Show (a, b, c, d, e, f, g, h, i, j, k) # | Since: 2.1
Methods showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k) -> ShowS # show :: (a, b, c, d, e, f, g, h, i, j, k) -> String # showList :: [(a, b, c, d, e, f, g, h, i, j, k)] -> ShowS #
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l) => Show (a, b, c, d, e, f, g, h, i, j, k, l) # | Since: 2.1
Methods showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l) -> ShowS # show :: (a, b, c, d, e, f, g, h, i, j, k, l) -> String # showList :: [(a, b, c, d, e, f, g, h, i, j, k, l)] -> ShowS #
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m) => Show (a, b, c, d, e, f, g, h, i, j, k, l, m) # | Since: 2.1
Methods showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> ShowS # show :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> String # showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m)] -> ShowS #
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n) => Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n) # | Since: 2.1
Methods showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> ShowS # show :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> String # showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] -> ShowS #
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o) => Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) # | Since: 2.1
Methods showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> ShowS # show :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> String # showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] -> ShowS #

shows :: Show a => a -> ShowS #

equivalent to `showsPrec` with a precedence of 0.

showChar :: Char -> ShowS #

utility function converting a `Char` to a show function that simply prepends the character unchanged.

showString :: String -> ShowS #

utility function converting a `String` to a show function that simply prepends the string unchanged.

showParen :: Bool -> ShowS -> ShowS #

utility function that surrounds the inner show function with parentheses when the `Bool` parameter is `True`.

## Converting from `String`

type ReadS a = String -> [(a, String)] #

A parser for a type `a`, represented as a function that takes a `String` and returns a list of possible parses as `(a,`String`)` pairs.

Note that this kind of backtracking parser is very inefficient; reading a large structure may be quite slow (cf `ReadP`).

class Read a where #

Parsing of `String`s, producing values.

Derived instances of `Read` make the following assumptions, which derived instances of `Show` obey:

- If the constructor is defined to be an infix operator, then the derived `Read` instance will parse only infix applications of the constructor (not the prefix form).
- Associativity is not used to reduce the occurrence of parentheses, although precedence may be.
- If the constructor is defined using record syntax, the derived `Read` will parse only the record-syntax form, and furthermore, the fields must be given in the same order as the original declaration.
- The derived `Read` instance allows arbitrary Haskell whitespace between tokens of the input string. Extra parentheses are also allowed.

For example, given the declarations

    infixr 5 :^:
    data Tree a =  Leaf a  |  Tree a :^: Tree a

the derived instance of `Read` in Haskell 2010 is equivalent to

    instance (Read a) => Read (Tree a) where

            readsPrec d r =  readParen (d > app_prec)
                             (\r -> [(Leaf m,t) |
                                     ("Leaf",s) <- lex r,
                                     (m,t) <- readsPrec (app_prec+1) s]) r

                          ++ readParen (d > up_prec)
                             (\r -> [(u:^:v,w) |
                                     (u,s) <- readsPrec (up_prec+1) r,
                                     (":^:",t) <- lex s,
                                     (v,w) <- readsPrec (up_prec+1) t]) r

              where app_prec = 10
                    up_prec = 5

Note that right-associativity of `:^:` is unused.

The derived instance in GHC is equivalent to

    instance (Read a) => Read (Tree a) where

            readPrec = parens $ (prec app_prec $ do
                                     Ident "Leaf" <- lexP
                                     m <- step readPrec
                                     return (Leaf m))

                         +++ (prec up_prec $ do
                                     u <- step readPrec
                                     Symbol ":^:" <- lexP
                                     v <- step readPrec
                                     return (u :^: v))

              where app_prec = 10
                    up_prec = 5

            readListPrec = readListPrecDefault

Why do both `readsPrec` and `readPrec` exist, and why does GHC opt to implement `readPrec` in derived `Read` instances instead of `readsPrec`? The reason is that `readsPrec` is based on the `ReadS` type, and although `ReadS` is mentioned in the Haskell 2010 Report, it is not a very efficient parser data structure.

`readPrec`, on the other hand, is based on a much more efficient `ReadPrec` datatype (a.k.a "new-style parsers"), but its definition relies on the use of the `RankNTypes` language extension. Therefore, `readPrec` (and its cousin, `readListPrec`) are marked as GHC-only. Nevertheless, it is recommended to use `readPrec` instead of `readsPrec` whenever possible for the efficiency improvements it brings.

As mentioned above, derived `Read` instances in GHC will implement `readPrec` instead of `readsPrec`. The default implementations of `readsPrec` (and its cousin, `readList`) will simply use `readPrec` under the hood. If you are writing a `Read` instance by hand, it is recommended to write it like so:

    instance Read T where
      readPrec     = ...
      readListPrec = readListPrecDefault

Minimal complete definition

readsPrec | readPrec

Methods

readsPrec #

Arguments

:: Int | the operator precedence of the enclosing context (a number from `0` to `11`). Function application has precedence `10`.
-> ReadS a |

attempts to parse a value from the front of the string, returning a list of (parsed value, remaining string) pairs. If there is no successful parse, the returned list is empty.

Derived instances of `Read` and `Show` satisfy the following:

- `(x,"")` is an element of `(`readsPrec` d (`showsPrec` d x ""))`.

That is, `readsPrec` parses the string produced by `showsPrec`, and delivers the value that `showsPrec` started with.

readList :: ReadS [a] #

The method `readList` is provided to allow the programmer to give a specialised way of parsing lists of values. For example, this is used by the predefined `Read` instance of the `Char` type, where values of type `String` should be are expected to use double quotes, rather than square brackets.

Instances

Read Bool # | Since: 2.1
Methods readsPrec :: Int -> ReadS Bool # readList :: ReadS [Bool] # readPrec :: ReadPrec Bool # readListPrec :: ReadPrec [Bool] #
Read Char # | Since: 2.1
Methods readsPrec :: Int -> ReadS Char # readList :: ReadS [Char] # readPrec :: ReadPrec Char # readListPrec :: ReadPrec [Char] #
Read Double # | Since: 2.1
Methods readsPrec :: Int -> ReadS Double # readList :: ReadS [Double] # readPrec :: ReadPrec Double # readListPrec :: ReadPrec [Double] #
Read Float # | Since: 2.1
Methods readsPrec :: Int -> ReadS Float # readList :: ReadS [Float] # readPrec :: ReadPrec Float # readListPrec :: ReadPrec [Float] #
Read Int # | Since: 2.1
Methods readsPrec :: Int -> ReadS Int # readList :: ReadS [Int] # readPrec :: ReadPrec Int # readListPrec :: ReadPrec [Int] #
Read Int8 # | Since: 2.1
Methods readsPrec :: Int -> ReadS Int8 # readList :: ReadS [Int8] # readPrec :: ReadPrec Int8 # readListPrec :: ReadPrec [Int8] #
Read Int16 # | Since: 2.1
Methods readsPrec :: Int -> ReadS Int16 # readList :: ReadS [Int16] # readPrec :: ReadPrec Int16 # readListPrec :: ReadPrec [Int16] #
Read Int32 # | Since: 2.1
Methods readsPrec :: Int -> ReadS Int32 # readList :: ReadS [Int32] # readPrec :: ReadPrec Int32 # readListPrec :: ReadPrec [Int32] #
Read Int64 # | Since: 2.1
Methods readsPrec :: Int -> ReadS Int64 # readList :: ReadS [Int64] # readPrec :: ReadPrec Int64 # readListPrec :: ReadPrec [Int64] #
Read Integer # | Since: 2.1
Methods readsPrec :: Int -> ReadS Integer # readList :: ReadS [Integer] # readPrec :: ReadPrec Integer # readListPrec :: ReadPrec [Integer] #
Read Natural # | Since: 4.8.0.0
Methods readsPrec :: Int -> ReadS Natural # readList :: ReadS [Natural] # readPrec :: ReadPrec Natural # readListPrec :: ReadPrec [Natural] #
Read Ordering # | Since: 2.1
Methods readsPrec :: Int -> ReadS Ordering # readList :: ReadS [Ordering] # readPrec :: ReadPrec Ordering # readListPrec :: ReadPrec [Ordering] #
Read Word # | Since: 4.5.0.0
Methods readsPrec :: Int -> ReadS Word # readList :: ReadS [Word] # readPrec :: ReadPrec Word # readListPrec :: ReadPrec [Word] #
Read Word8 # | Since: 2.1
Methods readsPrec :: Int -> ReadS Word8 # readList :: ReadS [Word8] # readPrec :: ReadPrec Word8 # readListPrec :: ReadPrec [Word8] #
Read Word16 # | Since: 2.1
Methods readsPrec :: Int -> ReadS Word16 # readList :: ReadS [Word16] # readPrec :: ReadPrec Word16 # readListPrec :: ReadPrec [Word16] #
Read Word32 # | Since: 2.1
Methods readsPrec :: Int -> ReadS Word32 # readList :: ReadS [Word32] # readPrec :: ReadPrec Word32 # readListPrec :: ReadPrec [Word32] #
Read Word64 # | Since: 2.1
Methods readsPrec :: Int -> ReadS Word64 # readList :: ReadS [Word64] # readPrec :: ReadPrec Word64 # readListPrec :: ReadPrec [Word64] #
Read () # | Since: 2.1
Methods readsPrec :: Int -> ReadS () # readList :: ReadS [()] # readPrec :: ReadPrec () # readListPrec :: ReadPrec [()] #
Read GeneralCategory # |
Methods readsPrec :: Int -> ReadS GeneralCategory # readList :: ReadS [GeneralCategory] # readPrec :: ReadPrec GeneralCategory # readListPrec :: ReadPrec [GeneralCategory] #
Read Lexeme # | Since: 2.1
Methods readsPrec :: Int -> ReadS Lexeme # readList :: ReadS [Lexeme] # readPrec :: ReadPrec Lexeme # readListPrec :: ReadPrec [Lexeme] #
Read IOMode # |
Methods readsPrec :: Int -> ReadS IOMode # readList :: ReadS [IOMode] # readPrec :: ReadPrec IOMode # readListPrec :: ReadPrec [IOMode] #
Read IntPtr # |
Methods readsPrec :: Int -> ReadS IntPtr # readList :: ReadS [IntPtr] # readPrec :: ReadPrec IntPtr # readListPrec :: ReadPrec [IntPtr] #
Read WordPtr # |
Methods readsPrec :: Int -> ReadS WordPtr # readList :: ReadS [WordPtr] # readPrec :: ReadPrec WordPtr # readListPrec :: ReadPrec [WordPtr] #
Read CUIntMax # |
Methods readsPrec :: Int -> ReadS CUIntMax # readList :: ReadS [CUIntMax] # readPrec :: ReadPrec CUIntMax # readListPrec :: ReadPrec [CUIntMax] #
Read CIntMax # |
Methods readsPrec :: Int -> ReadS CIntMax # readList :: ReadS [CIntMax] # readPrec :: ReadPrec CIntMax # readListPrec :: ReadPrec [CIntMax] #
Read CUIntPtr # |
Methods readsPrec :: Int -> ReadS CUIntPtr # readList :: ReadS [CUIntPtr] # readPrec :: ReadPrec CUIntPtr # readListPrec :: ReadPrec [CUIntPtr] #
Read CIntPtr # |
Methods readsPrec :: Int -> ReadS CIntPtr # readList :: ReadS [CIntPtr] # readPrec :: ReadPrec CIntPtr # readListPrec :: ReadPrec [CIntPtr] #
Read CSUSeconds # |
Methods readsPrec :: Int -> ReadS CSUSeconds # readList :: ReadS [CSUSeconds] # readPrec :: ReadPrec CSUSeconds # readListPrec :: ReadPrec [CSUSeconds] #
Read CUSeconds # |
Methods readsPrec :: Int -> ReadS CUSeconds # readList :: ReadS [CUSeconds] # readPrec :: ReadPrec CUSeconds # readListPrec :: ReadPrec [CUSeconds] #
Read CTime # |
Methods readsPrec :: Int -> ReadS CTime # readList :: ReadS [CTime] # readPrec :: ReadPrec CTime # readListPrec :: ReadPrec [CTime] #
Read CClock # |
Methods readsPrec :: Int -> ReadS CClock # readList :: ReadS [CClock] # readPrec :: ReadPrec CClock # readListPrec :: ReadPrec [CClock] #
Read CSigAtomic # |
Methods readsPrec :: Int -> ReadS CSigAtomic # readList :: ReadS [CSigAtomic] # readPrec :: ReadPrec CSigAtomic # readListPrec :: ReadPrec [CSigAtomic] #
Read CWchar # |
Methods readsPrec :: Int -> ReadS CWchar # readList :: ReadS [CWchar] # readPrec :: ReadPrec CWchar # readListPrec :: ReadPrec [CWchar] #
Read CSize # |
Methods readsPrec :: Int -> ReadS CSize # readList :: ReadS [CSize] # readPrec :: ReadPrec CSize # readListPrec :: ReadPrec [CSize] #
Read CPtrdiff # |
Methods readsPrec :: Int -> ReadS CPtrdiff # readList :: ReadS [CPtrdiff] # readPrec :: ReadPrec CPtrdiff # readListPrec :: ReadPrec [CPtrdiff] #
Read CDouble # |
Methods readsPrec :: Int -> ReadS CDouble # readList :: ReadS [CDouble] # readPrec :: ReadPrec CDouble # readListPrec :: ReadPrec [CDouble] #
Read CFloat # |
Methods readsPrec :: Int -> ReadS CFloat # readList :: ReadS [CFloat] # readPrec :: ReadPrec CFloat # readListPrec :: ReadPrec [CFloat] #
Read CBool # |
Methods readsPrec :: Int -> ReadS CBool # readList :: ReadS [CBool] # readPrec :: ReadPrec CBool # readListPrec :: ReadPrec [CBool] #
Read CULLong # |
Methods readsPrec :: Int -> ReadS CULLong # readList :: ReadS [CULLong] # readPrec :: ReadPrec CULLong # readListPrec :: ReadPrec [CULLong] #
Read CLLong # |
Methods readsPrec :: Int -> ReadS CLLong # readList :: ReadS [CLLong] # readPrec :: ReadPrec CLLong # readListPrec :: ReadPrec [CLLong] #
Read CULong # |
Methods readsPrec :: Int -> ReadS CULong # readList :: ReadS [CULong] # readPrec :: ReadPrec CULong # readListPrec :: ReadPrec [CULong] #
Read CLong # |
Methods readsPrec :: Int -> ReadS CLong # readList :: ReadS [CLong] # readPrec :: ReadPrec CLong # readListPrec :: ReadPrec [CLong] #
Read CUInt # |
Methods readsPrec :: Int -> ReadS CUInt # readList :: ReadS [CUInt] # readPrec :: ReadPrec CUInt # readListPrec :: ReadPrec [CUInt] #
Read CInt # |
Methods readsPrec :: Int -> ReadS CInt # readList :: ReadS [CInt] # readPrec :: ReadPrec CInt # readListPrec :: ReadPrec [CInt] #
Read CUShort # |
Methods readsPrec :: Int -> ReadS CUShort # readList :: ReadS [CUShort] # readPrec :: ReadPrec CUShort # readListPrec :: ReadPrec [CUShort] #
Read CShort # |
Methods readsPrec :: Int -> ReadS CShort # readList :: ReadS [CShort] # readPrec :: ReadPrec CShort # readListPrec :: ReadPrec [CShort] #
Read CUChar # |
Methods readsPrec :: Int -> ReadS CUChar # readList :: ReadS [CUChar] # readPrec :: ReadPrec CUChar # readListPrec :: ReadPrec [CUChar] #
Read CSChar # |
Methods readsPrec :: Int -> ReadS CSChar # readList :: ReadS [CSChar] # readPrec :: ReadPrec CSChar # readListPrec :: ReadPrec [CSChar] #
Read CChar # |
Methods readsPrec :: Int -> ReadS CChar # readList :: ReadS [CChar] # readPrec :: ReadPrec CChar # readListPrec :: ReadPrec [CChar] #
Read SomeNat # | Since: 4.7.0.0
Methods readsPrec :: Int -> ReadS SomeNat # readList :: ReadS [SomeNat] # readPrec :: ReadPrec SomeNat # readListPrec :: ReadPrec [SomeNat] #
Read SomeSymbol # | Since: 4.7.0.0
Methods readsPrec :: Int -> ReadS SomeSymbol # readList :: ReadS [SomeSymbol] # readPrec :: ReadPrec SomeSymbol # readListPrec :: ReadPrec [SomeSymbol] #
Read DecidedStrictness # |
Methods readsPrec :: Int -> ReadS DecidedStrictness # readList :: ReadS [DecidedStrictness] # readPrec :: ReadPrec DecidedStrictness # readListPrec :: ReadPrec [DecidedStrictness] #
Read SourceStrictness # |
Methods readsPrec :: Int -> ReadS SourceStrictness # readList :: ReadS [SourceStrictness] # readPrec :: ReadPrec SourceStrictness # readListPrec :: ReadPrec [SourceStrictness] #
Read SourceUnpackedness # |
Methods readsPrec :: Int -> ReadS SourceUnpackedness # readList :: ReadS [SourceUnpackedness] # readPrec :: ReadPrec SourceUnpackedness # readListPrec :: ReadPrec [SourceUnpackedness] #
Read Associativity # |
Methods readsPrec :: Int -> ReadS Associativity # readList :: ReadS [Associativity] # readPrec :: ReadPrec Associativity # readListPrec :: ReadPrec [Associativity] #
Read Fixity # |
Methods readsPrec :: Int -> ReadS Fixity # readList :: ReadS [Fixity] # readPrec :: ReadPrec Fixity # readListPrec :: ReadPrec [Fixity] #
Read Any # |
Methods readsPrec :: Int -> ReadS Any # readList :: ReadS [Any] # readPrec :: ReadPrec Any # readListPrec :: ReadPrec [Any] #
Read All # |
Methods readsPrec :: Int -> ReadS All # readList :: ReadS [All] # readPrec :: ReadPrec All # readListPrec :: ReadPrec [All] #
Read SeekMode # |
Methods readsPrec :: Int -> ReadS SeekMode # readList :: ReadS [SeekMode] # readPrec :: ReadPrec SeekMode # readListPrec :: ReadPrec [SeekMode] #
Read NewlineMode # |
Methods readsPrec :: Int -> ReadS NewlineMode # readList :: ReadS [NewlineMode] # readPrec :: ReadPrec NewlineMode # readListPrec :: ReadPrec [NewlineMode] #
Read Newline # |
Methods readsPrec :: Int -> ReadS Newline # readList :: ReadS [Newline] # readPrec :: ReadPrec Newline # readListPrec :: ReadPrec [Newline] #
Read BufferMode # |
Methods readsPrec :: Int -> ReadS BufferMode # readList :: ReadS [BufferMode] # readPrec :: ReadPrec BufferMode # readListPrec :: ReadPrec [BufferMode] #
Read ExitCode # |
Methods readsPrec :: Int -> ReadS ExitCode # readList :: ReadS [ExitCode] # readPrec :: ReadPrec ExitCode # readListPrec :: ReadPrec [ExitCode] #
Read Fd # |
Methods readsPrec :: Int -> ReadS Fd # readList :: ReadS [Fd] # readPrec :: ReadPrec Fd # readListPrec :: ReadPrec [Fd] #
Read CKey # |
Methods readsPrec :: Int -> ReadS CKey # readList :: ReadS [CKey] # readPrec :: ReadPrec CKey # readListPrec :: ReadPrec [CKey] #
Read CId # |
Methods readsPrec :: Int -> ReadS CId # readList :: ReadS [CId] # readPrec :: ReadPrec CId # readListPrec :: ReadPrec [CId] #
Read CFsFilCnt # |
Methods readsPrec :: Int -> ReadS CFsFilCnt # readList :: ReadS [CFsFilCnt] # readPrec :: ReadPrec CFsFilCnt # readListPrec :: ReadPrec [CFsFilCnt] #
Read CFsBlkCnt # |
Methods readsPrec :: Int -> ReadS CFsBlkCnt # readList :: ReadS [CFsBlkCnt] # readPrec :: ReadPrec CFsBlkCnt # readListPrec :: ReadPrec [CFsBlkCnt] #
Read CClockId # |
Methods readsPrec :: Int -> ReadS CClockId # readList :: ReadS [CClockId] # readPrec :: ReadPrec CClockId # readListPrec :: ReadPrec [CClockId] #
Read CBlkCnt # |
Methods readsPrec :: Int -> ReadS CBlkCnt # readList :: ReadS [CBlkCnt] # readPrec :: ReadPrec CBlkCnt # readListPrec :: ReadPrec [CBlkCnt] #
Read CBlkSize # |
Methods readsPrec :: Int -> ReadS CBlkSize # readList :: ReadS [CBlkSize] # readPrec :: ReadPrec CBlkSize # readListPrec :: ReadPrec [CBlkSize] #
Read CRLim # |
Methods readsPrec :: Int -> ReadS CRLim # readList :: ReadS [CRLim] # readPrec :: ReadPrec CRLim # readListPrec :: ReadPrec [CRLim] #
Read CTcflag # |
Methods readsPrec :: Int -> ReadS CTcflag # readList :: ReadS [CTcflag] # readPrec :: ReadPrec CTcflag # readListPrec :: ReadPrec [CTcflag] #
Read CSpeed # |
Methods readsPrec :: Int -> ReadS CSpeed # readList :: ReadS [CSpeed] # readPrec :: ReadPrec CSpeed # readListPrec :: ReadPrec [CSpeed] #
Read CCc # |
Methods readsPrec :: Int -> ReadS CCc # readList :: ReadS [CCc] # readPrec :: ReadPrec CCc # readListPrec :: ReadPrec [CCc] #
Read CUid # |
Methods readsPrec :: Int -> ReadS CUid # readList :: ReadS [CUid] # readPrec :: ReadPrec CUid # readListPrec :: ReadPrec [CUid] #
Read CNlink # |
Methods readsPrec :: Int -> ReadS CNlink # readList :: ReadS [CNlink] # readPrec :: ReadPrec CNlink # readListPrec :: ReadPrec [CNlink] #
Read CGid # |
Methods readsPrec :: Int -> ReadS CGid # readList :: ReadS [CGid] # readPrec :: ReadPrec CGid # readListPrec :: ReadPrec [CGid] #
Read CSsize # |
Methods readsPrec :: Int -> ReadS CSsize # readList :: ReadS [CSsize] # readPrec :: ReadPrec CSsize # readListPrec :: ReadPrec [CSsize] #
Read CPid # |
Methods readsPrec :: Int -> ReadS CPid # readList :: ReadS [CPid] # readPrec :: ReadPrec CPid # readListPrec :: ReadPrec [CPid] #
Read COff # |
Methods readsPrec :: Int -> ReadS COff # readList :: ReadS [COff] # readPrec :: ReadPrec COff # readListPrec :: ReadPrec [COff] #
Read CMode # |
Methods readsPrec :: Int -> ReadS CMode # readList :: ReadS [CMode] # readPrec :: ReadPrec CMode # readListPrec :: ReadPrec [CMode] #
Read CIno # |
Methods readsPrec :: Int -> ReadS CIno # readList :: ReadS [CIno] # readPrec :: ReadPrec CIno # readListPrec :: ReadPrec [CIno] #
Read CDev # |
Methods readsPrec :: Int -> ReadS CDev # readList :: ReadS [CDev] # readPrec :: ReadPrec CDev # readListPrec :: ReadPrec [CDev] #
Read Version # |
Methods readsPrec :: Int -> ReadS Version # readList :: ReadS [Version] # readPrec :: ReadPrec Version # readListPrec :: ReadPrec [Version] #
Read GCStats # |
Methods readsPrec :: Int -> ReadS GCStats # readList :: ReadS [GCStats] # readPrec :: ReadPrec GCStats # readListPrec :: ReadPrec [GCStats] #
Read GCDetails # |
Methods readsPrec :: Int -> ReadS GCDetails # readList :: ReadS [GCDetails] # readPrec :: ReadPrec GCDetails # readListPrec :: ReadPrec [GCDetails] #
Read RTSStats # |
Methods readsPrec :: Int -> ReadS RTSStats # readList :: ReadS [RTSStats] # readPrec :: ReadPrec RTSStats # readListPrec :: ReadPrec [RTSStats] #
Read Void # | Reading a `Void` value is always a parse error, considering `Void` as a data type with no constructors. | @since 4.8.0.0
Methods readsPrec :: Int -> ReadS Void # readList :: ReadS [Void] # readPrec :: ReadPrec Void # readListPrec :: ReadPrec [Void] #
Read a => Read [a] # | Since: 2.1
Methods readsPrec :: Int -> ReadS [a] # readList :: ReadS [[a]] # readPrec :: ReadPrec [a] # readListPrec :: ReadPrec [[a]] #
Read a => Read (Maybe a) # | Since: 2.1
Methods readsPrec :: Int -> ReadS (Maybe a) # readList :: ReadS [Maybe a] # readPrec :: ReadPrec (Maybe a) # readListPrec :: ReadPrec [Maybe a] #
(Integral a, Read a) => Read (Ratio a) # | Since: 2.1
Methods readsPrec :: Int -> ReadS (Ratio a) # readList :: ReadS [Ratio a] # readPrec :: ReadPrec (Ratio a) # readListPrec :: ReadPrec [Ratio a] #
Read p => Read (Par1 p) # |
Methods readsPrec :: Int -> ReadS (Par1 p) # readList :: ReadS [Par1 p] # readPrec :: ReadPrec (Par1 p) # readListPrec :: ReadPrec [Par1 p] #
Read a => Read (Down a) # |
Methods readsPrec :: Int -> ReadS (Down a) # readList :: ReadS [Down a] # readPrec :: ReadPrec (Down a) # readListPrec :: ReadPrec [Down a] #
Read a => Read (Last a) # |
Methods readsPrec :: Int -> ReadS (Last a) # readList :: ReadS [Last a] # readPrec :: ReadPrec (Last a) # readListPrec :: ReadPrec [Last a] #
Read a => Read (First a) # |
Methods readsPrec :: Int -> ReadS (First a) # readList :: ReadS [First a] # readPrec :: ReadPrec (First a) # readListPrec :: ReadPrec [First a] #
Read a => Read (Product a) # |
Methods readsPrec :: Int -> ReadS (Product a) # readList :: ReadS [Product a] # readPrec :: ReadPrec (Product a) # readListPrec :: ReadPrec [Product a] #
Read a => Read (Sum a) # |
Methods readsPrec :: Int -> ReadS (Sum a) # readList :: ReadS [Sum a] # readPrec :: ReadPrec (Sum a) # readListPrec :: ReadPrec [Sum a] #
Read a => Read (Dual a) # |
Methods readsPrec :: Int -> ReadS (Dual a) # readList :: ReadS [Dual a] # readPrec :: ReadPrec (Dual a) # readListPrec :: ReadPrec [Dual a] #
Read a => Read (Identity a) # | This instance would be equivalent to the derived instances of the `Identity` newtype if the `runIdentity` field were removed Since: 4.8.0.0
Methods readsPrec :: Int -> ReadS (Identity a) # readList :: ReadS [Identity a] # readPrec :: ReadPrec (Identity a) # readListPrec :: ReadPrec [Identity a] #
Read a => Read (ZipList a) # |
Methods readsPrec :: Int -> ReadS (ZipList a) # readList :: ReadS [ZipList a] # readPrec :: ReadPrec (ZipList a) # readListPrec :: ReadPrec [ZipList a] #
Read a => Read (NonEmpty a) # |
Methods readsPrec :: Int -> ReadS (NonEmpty a) # readList :: ReadS [NonEmpty a] # readPrec :: ReadPrec (NonEmpty a) # readListPrec :: ReadPrec [NonEmpty a] #
Read a => Read (Option a) # |
Methods readsPrec :: Int -> ReadS (Option a) # readList :: ReadS [Option a] # readPrec :: ReadPrec (Option a) # readListPrec :: ReadPrec [Option a] #
Read m => Read (WrappedMonoid m) # |
Methods readsPrec :: Int -> ReadS (WrappedMonoid m) # readList :: ReadS [WrappedMonoid m] # readPrec :: ReadPrec (WrappedMonoid m) # readListPrec :: ReadPrec [WrappedMonoid m] #
Read a => Read (Last a) # |
Methods readsPrec :: Int -> ReadS (Last a) # readList :: ReadS [Last a] # readPrec :: ReadPrec (Last a) # readListPrec :: ReadPrec [Last a] #
Read a => Read (First a) # |
Methods readsPrec :: Int -> ReadS (First a) # readList :: ReadS [First a] # readPrec :: ReadPrec (First a) # readListPrec :: ReadPrec [First a] #
Read a => Read (Max a) # |
Methods readsPrec :: Int -> ReadS (Max a) # readList :: ReadS [Max a] # readPrec :: ReadPrec (Max a) # readListPrec :: ReadPrec [Max a] #
Read a => Read (Min a) # |
Methods readsPrec :: Int -> ReadS (Min a) # readList :: ReadS [Min a] # readPrec :: ReadPrec (Min a) # readListPrec :: ReadPrec [Min a] #
HasResolution a => Read (Fixed a) # | Since: 4.3.0.0
Methods readsPrec :: Int -> ReadS (Fixed a) # readList :: ReadS [Fixed a] # readPrec :: ReadPrec (Fixed a) # readListPrec :: ReadPrec [Fixed a] #
Read a => Read (Complex a) # |
Methods readsPrec :: Int -> ReadS (Complex a) # readList :: ReadS [Complex a] # readPrec :: ReadPrec (Complex a) # readListPrec :: ReadPrec [Complex a] #
(Read b, Read a) => Read (Either a b) # |
Methods readsPrec :: Int -> ReadS (Either a b) # readList :: ReadS [Either a b] # readPrec :: ReadPrec (Either a b) # readListPrec :: ReadPrec [Either a b] #
Read (V1 k p) # |
Methods readsPrec :: Int -> ReadS (V1 k p) # readList :: ReadS [V1 k p] # readPrec :: ReadPrec (V1 k p) # readListPrec :: ReadPrec [V1 k p] #
Read (U1 k p) # | Since: 4.9.0.0
Methods readsPrec :: Int -> ReadS (U1 k p) # readList :: ReadS [U1 k p] # readPrec :: ReadPrec (U1 k p) # readListPrec :: ReadPrec [U1 k p] #
(Read a, Read b) => Read (a, b) # | Since: 2.1
Methods readsPrec :: Int -> ReadS (a, b) # readList :: ReadS [(a, b)] # readPrec :: ReadPrec (a, b) # readListPrec :: ReadPrec [(a, b)] #
Read (Proxy k s) # | Since: 4.7.0.0
Methods readsPrec :: Int -> ReadS (Proxy k s) # readList :: ReadS [Proxy k s] # readPrec :: ReadPrec (Proxy k s) # readListPrec :: ReadPrec [Proxy k s] #
(Read b, Read a) => Read (Arg a b) # |
Methods readsPrec :: Int -> ReadS (Arg a b) # readList :: ReadS [Arg a b] # readPrec :: ReadPrec (Arg a b) # readListPrec :: ReadPrec [Arg a b] #
Read (f p) => Read (Rec1 k f p) # |
Methods readsPrec :: Int -> ReadS (Rec1 k f p) # readList :: ReadS [Rec1 k f p] # readPrec :: ReadPrec (Rec1 k f p) # readListPrec :: ReadPrec [Rec1 k f p] #
(Read a, Read b, Read c) => Read (a, b, c) # | Since: 2.1
Methods readsPrec :: Int -> ReadS (a, b, c) # readList :: ReadS [(a, b, c)] # readPrec :: ReadPrec (a, b, c) # readListPrec :: ReadPrec [(a, b, c)] #
(~) k a b => Read ((:~:) k a b) # | Since: 4.7.0.0
Methods readsPrec :: Int -> ReadS ((k :~: a) b) # readList :: ReadS [(k :~: a) b] # readPrec :: ReadPrec ((k :~: a) b) # readListPrec :: ReadPrec [(k :~: a) b] #
Coercible k a b => Read (Coercion k a b) # | Since: 4.7.0.0
Methods readsPrec :: Int -> ReadS (Coercion k a b) # readList :: ReadS [Coercion k a b] # readPrec :: ReadPrec (Coercion k a b) # readListPrec :: ReadPrec [Coercion k a b] #
Read (f a) => Read (Alt k f a) # |
Methods readsPrec :: Int -> ReadS (Alt k f a) # readList :: ReadS [Alt k f a] # readPrec :: ReadPrec (Alt k f a) # readListPrec :: ReadPrec [Alt k f a] #
Read a => Read (Const k a b) # | This instance would be equivalent to the derived instances of the `Const` newtype if the `runConst` field were removed Since: 4.8.0.0
Methods readsPrec :: Int -> ReadS (Const k a b) # readList :: ReadS [Const k a b] # readPrec :: ReadPrec (Const k a b) # readListPrec :: ReadPrec [Const k a b] #
Read c => Read (K1 k i c p) # |
Methods readsPrec :: Int -> ReadS (K1 k i c p) # readList :: ReadS [K1 k i c p] # readPrec :: ReadPrec (K1 k i c p) # readListPrec :: ReadPrec [K1 k i c p] #
(Read (g p), Read (f p)) => Read ((:+:) k f g p) # |
Methods readsPrec :: Int -> ReadS ((k :+: f) g p) # readList :: ReadS [(k :+: f) g p] # readPrec :: ReadPrec ((k :+: f) g p) # readListPrec :: ReadPrec [(k :+: f) g p] #
(Read (g p), Read (f p)) => Read ((:*:) k f g p) # |
Methods readsPrec :: Int -> ReadS ((k :*: f) g p) # readList :: ReadS [(k :*: f) g p] # readPrec :: ReadPrec ((k :*: f) g p) # readListPrec :: ReadPrec [(k :*: f) g p] #
(Read a, Read b, Read c, Read d) => Read (a, b, c, d) # | Since: 2.1
Methods readsPrec :: Int -> ReadS (a, b, c, d) # readList :: ReadS [(a, b, c, d)] # readPrec :: ReadPrec (a, b, c, d) # readListPrec :: ReadPrec [(a, b, c, d)] #
(~~) k1 k2 a b => Read ((:~~:) k1 k2 a b) # | Since: 4.10.0.0
Methods readsPrec :: Int -> ReadS ((k1 :~~: k2) a b) # readList :: ReadS [(k1 :~~: k2) a b] # readPrec :: ReadPrec ((k1 :~~: k2) a b) # readListPrec :: ReadPrec [(k1 :~~: k2) a b] #
(Read1 f, Read1 g, Read a) => Read (Sum * f g a) # | Since: 4.9.0.0
Methods readsPrec :: Int -> ReadS (Sum * f g a) # readList :: ReadS [Sum * f g a] # readPrec :: ReadPrec (Sum * f g a) # readListPrec :: ReadPrec [Sum * f g a] #
(Read1 f, Read1 g, Read a) => Read (Product * f g a) # | Since: 4.9.0.0
Methods readsPrec :: Int -> ReadS (Product * f g a) # readList :: ReadS [Product * f g a] # readPrec :: ReadPrec (Product * f g a) # readListPrec :: ReadPrec [Product * f g a] #
Read (f p) => Read (M1 k i c f p) # |
Methods readsPrec :: Int -> ReadS (M1 k i c f p) # readList :: ReadS [M1 k i c f p] # readPrec :: ReadPrec (M1 k i c f p) # readListPrec :: ReadPrec [M1 k i c f p] #
Read (f (g p)) => Read ((:.:) k2 k1 f g p) # |
Methods readsPrec :: Int -> ReadS ((k2 :.: k1) f g p) # readList :: ReadS [(k2 :.: k1) f g p] # readPrec :: ReadPrec ((k2 :.: k1) f g p) # readListPrec :: ReadPrec [(k2 :.: k1) f g p] #
(Read a, Read b, Read c, Read d, Read e) => Read (a, b, c, d, e) # | Since: 2.1
Methods readsPrec :: Int -> ReadS (a, b, c, d, e) # readList :: ReadS [(a, b, c, d, e)] # readPrec :: ReadPrec (a, b, c, d, e) # readListPrec :: ReadPrec [(a, b, c, d, e)] #
(Read1 f, Read1 g, Read a) => Read (Compose * * f g a) # | Since: 4.9.0.0
Methods readsPrec :: Int -> ReadS (Compose * * f g a) # readList :: ReadS [Compose * * f g a] # readPrec :: ReadPrec (Compose * * f g a) # readListPrec :: ReadPrec [Compose * * f g a] #
(Read a, Read b, Read c, Read d, Read e, Read f) => Read (a, b, c, d, e, f) # | Since: 2.1
Methods readsPrec :: Int -> ReadS (a, b, c, d, e, f) # readList :: ReadS [(a, b, c, d, e, f)] # readPrec :: ReadPrec (a, b, c, d, e, f) # readListPrec :: ReadPrec [(a, b, c, d, e, f)] #
(Read a, Read b, Read c, Read d, Read e, Read f, Read g) => Read (a, b, c, d, e, f, g) # | Since: 2.1
Methods readsPrec :: Int -> ReadS (a, b, c, d, e, f, g) # readList :: ReadS [(a, b, c, d, e, f, g)] # readPrec :: ReadPrec (a, b, c, d, e, f, g) # readListPrec :: ReadPrec [(a, b, c, d, e, f, g)] #
(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h) => Read (a, b, c, d, e, f, g, h) # | Since: 2.1
Methods readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h) # readList :: ReadS [(a, b, c, d, e, f, g, h)] # readPrec :: ReadPrec (a, b, c, d, e, f, g, h) # readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h)] #
(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i) => Read (a, b, c, d, e, f, g, h, i) # | Since: 2.1
Methods readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i) # readList :: ReadS [(a, b, c, d, e, f, g, h, i)] # readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i) # readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i)] #
(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j) => Read (a, b, c, d, e, f, g, h, i, j) # | Since: 2.1
Methods readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j) # readList :: ReadS [(a, b, c, d, e, f, g, h, i, j)] # readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j) # readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j)] #
(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k) => Read (a, b, c, d, e, f, g, h, i, j, k) # | Since: 2.1
Methods readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j, k) # readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k)] # readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j, k) # readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k)] #
(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k, Read l) => Read (a, b, c, d, e, f, g, h, i, j, k, l) # | Since: 2.1
Methods readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j, k, l) # readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l)] # readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j, k, l) # readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l)] #
(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k, Read l, Read m) => Read (a, b, c, d, e, f, g, h, i, j, k, l, m) # | Since: 2.1
Methods readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j, k, l, m) # readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l, m)] # readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j, k, l, m) # readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l, m)] #
(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k, Read l, Read m, Read n) => Read (a, b, c, d, e, f, g, h, i, j, k, l, m, n) # | Since: 2.1
Methods readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j, k, l, m, n) # readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] # readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j, k, l, m, n) # readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] #
(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k, Read l, Read m, Read n, Read o) => Read (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) # | Since: 2.1
Methods readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) # readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] # readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) # readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] #

reads :: Read a => ReadS a #

equivalent to `readsPrec` with a precedence of 0.

readParen :: Bool -> ReadS a -> ReadS a #

``readParen` `True` p` parses what `p` parses, but surrounded with parentheses.

``readParen` `False` p` parses what `p` parses, but optionally surrounded with parentheses.

read :: Read a => String -> a #

The `read` function reads input from a string, which must be completely consumed by the input process.

lex :: ReadS String #

The `lex` function reads a single lexeme from the input, discarding initial white space, and returning the characters that constitute the lexeme. If the input string contains only white space, `lex` returns a single successful `lexeme' consisting of the empty string. (Thus ``lex` "" = [("","")]`.) If there is no legal lexeme at the beginning of the input string, `lex` fails (i.e. returns `[]`).

This lexer is not completely faithful to the Haskell lexical syntax in the following respects:

- Qualified names are not handled properly
- Octal and hexadecimal numerics are not recognized as a single token
- Comments are not treated properly

# Basic Input and output

data IO a :: * -> * Source #

A value of type ``IO` a` is a computation which, when performed, does some I/O before returning a value of type `a`.

There is really only one way to "perform" an I/O action: bind it to `Main.main` in your program. When your program is run, the I/O will be performed. It isn't possible to perform I/O from an arbitrary function, unless that function is itself in the `IO` monad and called at some point, directly or indirectly, from `Main.main`.

`IO` is a monad, so `IO` actions can be combined using either the do-notation or the `>>` and `>>=` operations from the `Monad` class.

Instances

Monad IO # | Since: 2.1
Methods (>>=) :: IO a -> (a -> IO b) -> IO b # (>>) :: IO a -> IO b -> IO b # return :: a -> IO a # fail :: String -> IO a #
Functor IO # | Since: 2.1
Methods fmap :: (a -> b) -> IO a -> IO b # (<$) :: a -> IO b -> IO a #
MonadFix IO # | Since: 2.1
Methods mfix :: (a -> IO a) -> IO a #
MonadFail IO # | Since: 4.9.0.0
Methods fail :: String -> IO a #
Applicative IO # | Since: 2.1
Methods pure :: a -> IO a # (<*>) :: IO (a -> b) -> IO a -> IO b # liftA2 :: (a -> b -> c) -> IO a -> IO b -> IO c # (*>) :: IO a -> IO b -> IO b # (<*) :: IO a -> IO b -> IO a #
MonadPlus IO # | Since: 4.9.0.0
Methods mzero :: IO a # mplus :: IO a -> IO a -> IO a #
Alternative IO # | Since: 4.9.0.0
Methods empty :: IO a # (<|>) :: IO a -> IO a -> IO a # some :: IO a -> IO [a] # many :: IO a -> IO [a] #
MonadIO IO # | Since: 4.9.0.0
Methods liftIO :: IO a -> IO a #
Semigroup a => Semigroup (IO a) # | Since: 4.10.0.0
Methods (<>) :: IO a -> IO a -> IO a # sconcat :: NonEmpty (IO a) -> IO a # stimes :: Integral b => b -> IO a -> IO a #
Monoid a => Monoid (IO a) # | Since: 4.9.0.0
Methods mempty :: IO a # mappend :: IO a -> IO a -> IO a # mconcat :: [IO a] -> IO a #
(~) * a () => HPrintfType (IO a) # | Since: 4.7.0.0
Methods hspr :: Handle -> String -> [UPrintf] -> IO a
(~) * a () => PrintfType (IO a) # | Since: 4.7.0.0
Methods spr :: String -> [UPrintf] -> IO a

## Simple I/O operations

### Output functions

putChar :: Char -> IO () #

Write a character to the standard output device (same as `hPutChar` `stdout`).

putStr :: String -> IO () #

Write a string to the standard output device (same as `hPutStr` `stdout`).

putStrLn :: String -> IO () #

The same as `putStr`, but adds a newline character.

print :: Show a => a -> IO () #

The `print` function outputs a value of any printable type to the standard output device. Printable types are those that are instances of class `Show`; `print` converts values to strings for output using the `show` operation and adds a newline.

For example, a program to print the first 20 integers and their powers of 2 could be written as:

    main = print ([(n, 2^n) | n <- [0..19]])

### Input functions

getChar :: IO Char #

Read a character from the standard input device (same as `hGetChar` `stdin`).

getLine :: IO String #

Read a line from the standard input device (same as `hGetLine` `stdin`).

getContents :: IO String #

The `getContents` operation returns all user input as a single string, which is read lazily as it is needed (same as `hGetContents` `stdin`).

interact :: (String -> String) -> IO () #

The `interact` function takes a function of type `String->String` as its argument. The entire input from the standard input device is passed to this function as its argument, and the resulting string is output on the standard output device.

### Files

type FilePath = String #

File and directory names are values of type `String`, whose precise meaning is operating system dependent. Files can be opened, yielding a handle which can then be used to operate on the contents of that file.

readFile :: FilePath -> IO String #

The `readFile` function reads a file and returns the contents of the file as a string. The file is read lazily, on demand, as with `getContents`.

writeFile :: FilePath -> String -> IO () #

The computation `writeFile` `file str` function writes the string `str`, to the file `file`.

appendFile :: FilePath -> String -> IO () #

The computation `appendFile` `file str` function appends the string `str`, to the file `file`.

Note that `writeFile` and `appendFile` write a literal string to a file. To write a value of any printable type, as with `print`, use the `show` function to convert the value to a string first.

    main = appendFile "squares" (show [(x,x*x) | x <- [0,0.1..2]])

readIO :: Read a => String -> IO a #

The `readIO` function is similar to `read` except that it signals parse failure to the `IO` monad instead of terminating the program.

readLn :: Read a => IO a #

The `readLn` function combines `getLine` and `readIO`.

## Exception handling in the I/O monad

type IOError = IOException #

The Haskell 2010 type for exceptions in the `IO` monad. Any I/O operation may raise an `IOError` instead of returning a result. For a more general type of exception, including also those that arise in pure code, see `Exception`.

In Haskell 2010, this is an opaque type.

ioError :: IOError -> IO a #

Raise an `IOError` in the `IO` monad.

userError :: String -> IOError #

Construct an `IOError` value with a string describing the error. The `fail` method of the `IO` instance of the `Monad` class raises a `userError`, thus:

    instance Monad IO where
      ...
      fail s = ioError (userError s)