Prelude

base-4.9.0.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
  - (==) :: a -> a -> Bool
  - (/=) :: a -> a -> Bool
- class Eq a => Ord a where
  - compare :: a -> a -> Ordering
  - (<) :: a -> a -> Bool
  - (<=) :: a -> a -> Bool
  - (>) :: a -> a -> Bool
  - (>=) :: a -> a -> Bool
  - max :: a -> a -> a
  - min :: a -> a -> a
- 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. forall a. HasCallStack => [Char] -> a
- errorWithoutStackTrace :: forall r. forall a. [Char] -> a
- undefined :: forall r. forall a. 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 # |
Methods minBound :: Bool Source # maxBound :: Bool Source #
Enum Bool # |
Methods succ :: Bool -> Bool Source # pred :: Bool -> Bool Source # toEnum :: Int -> Bool Source # fromEnum :: Bool -> Int Source # enumFrom :: Bool -> [Bool] Source # enumFromThen :: Bool -> Bool -> [Bool] Source # enumFromTo :: Bool -> Bool -> [Bool] Source # enumFromThenTo :: Bool -> Bool -> Bool -> [Bool] Source #
Eq Bool |
Methods (==) :: Bool -> Bool -> Bool Source # (/=) :: Bool -> Bool -> Bool Source #
Data Bool # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Bool -> c Bool Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Bool Source # toConstr :: Bool -> Constr Source # dataTypeOf :: Bool -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Bool) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Bool) Source # gmapT :: (forall b. Data b => b -> b) -> Bool -> Bool Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bool -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bool -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Bool -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Bool -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Bool -> m Bool Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Bool -> m Bool Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Bool -> m Bool Source #
Ord Bool |
Methods compare :: Bool -> Bool -> Ordering Source # (<) :: Bool -> Bool -> Bool Source # (<=) :: Bool -> Bool -> Bool Source # (>) :: Bool -> Bool -> Bool Source # (>=) :: Bool -> Bool -> Bool Source # max :: Bool -> Bool -> Bool Source # min :: Bool -> Bool -> Bool Source #
Read Bool # |
Methods readsPrec :: Int -> ReadS Bool Source # readList :: ReadS [Bool] Source # readPrec :: ReadPrec Bool Source # readListPrec :: ReadPrec [Bool] Source #
Show Bool # |
Methods showsPrec :: Int -> Bool -> ShowS Source # show :: Bool -> String Source # showList :: [Bool] -> ShowS Source #
Ix Bool # |
Methods range :: (Bool, Bool) -> [Bool] Source # index :: (Bool, Bool) -> Bool -> Int Source # unsafeIndex :: (Bool, Bool) -> Bool -> Int inRange :: (Bool, Bool) -> Bool -> Bool Source # rangeSize :: (Bool, Bool) -> Int Source # unsafeRangeSize :: (Bool, Bool) -> Int
Generic Bool # |
Associated Types type Rep Bool :: * -> * Source # Methods from :: Bool -> Rep Bool x Source # to :: Rep Bool x -> Bool Source #
FiniteBits Bool # |
Methods finiteBitSize :: Bool -> Int Source # countLeadingZeros :: Bool -> Int Source # countTrailingZeros :: Bool -> Int Source #
Bits Bool # |
Methods (.&.) :: Bool -> Bool -> Bool Source # (.|.) :: Bool -> Bool -> Bool Source # xor :: Bool -> Bool -> Bool Source # complement :: Bool -> Bool Source # shift :: Bool -> Int -> Bool Source # rotate :: Bool -> Int -> Bool Source # zeroBits :: Bool Source # bit :: Int -> Bool Source # setBit :: Bool -> Int -> Bool Source # clearBit :: Bool -> Int -> Bool Source # complementBit :: Bool -> Int -> Bool Source # testBit :: Bool -> Int -> Bool Source # bitSizeMaybe :: Bool -> Maybe Int Source # bitSize :: Bool -> Int Source # isSigned :: Bool -> Bool Source # shiftL :: Bool -> Int -> Bool Source # unsafeShiftL :: Bool -> Int -> Bool Source # shiftR :: Bool -> Int -> Bool Source # unsafeShiftR :: Bool -> Int -> Bool Source # rotateL :: Bool -> Int -> Bool Source # rotateR :: Bool -> Int -> Bool Source # popCount :: Bool -> Int Source #
Storable Bool # |
Methods sizeOf :: Bool -> Int Source # alignment :: Bool -> Int Source # peekElemOff :: Ptr Bool -> Int -> IO Bool Source # pokeElemOff :: Ptr Bool -> Int -> Bool -> IO () Source # peekByteOff :: Ptr b -> Int -> IO Bool Source # pokeByteOff :: Ptr b -> Int -> Bool -> IO () Source # peek :: Ptr Bool -> IO Bool Source # poke :: Ptr Bool -> Bool -> IO () Source #
type Rep Bool |
type Rep Bool = D1 (MetaData "Bool" "GHC.Types" "ghc-prim" False) ((:+:) (C1 (MetaCons "False" PrefixI False) U1) (C1 (MetaCons "True" PrefixI False) U1))
type (==) Bool a b # |
type (==) Bool a b

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

Boolean "and"

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

Boolean "or"

not :: Bool -> Bool Source #

Boolean "not"

otherwise :: Bool Source #

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

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

data Maybe a Source #

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

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

Constructors

Nothing |
Just a |

Instances

Monad Maybe # |
Methods (>>=) :: Maybe a -> (a -> Maybe b) -> Maybe b Source # (>>) :: Maybe a -> Maybe b -> Maybe b Source # return :: a -> Maybe a Source # fail :: String -> Maybe a Source #
Functor Maybe # |
Methods fmap :: (a -> b) -> Maybe a -> Maybe b Source # (<$) :: a -> Maybe b -> Maybe a Source #
MonadFix Maybe # |
Methods mfix :: (a -> Maybe a) -> Maybe a Source #
MonadFail Maybe # |
Methods fail :: String -> Maybe a Source #
Applicative Maybe # |
Methods pure :: a -> Maybe a Source # (<*>) :: Maybe (a -> b) -> Maybe a -> Maybe b Source # (*>) :: Maybe a -> Maybe b -> Maybe b Source # (<*) :: Maybe a -> Maybe b -> Maybe a Source #
Foldable Maybe # |
Methods fold :: Monoid m => Maybe m -> m Source # foldMap :: Monoid m => (a -> m) -> Maybe a -> m Source # foldr :: (a -> b -> b) -> b -> Maybe a -> b Source # foldr' :: (a -> b -> b) -> b -> Maybe a -> b Source # foldl :: (b -> a -> b) -> b -> Maybe a -> b Source # foldl' :: (b -> a -> b) -> b -> Maybe a -> b Source # foldr1 :: (a -> a -> a) -> Maybe a -> a Source # foldl1 :: (a -> a -> a) -> Maybe a -> a Source # toList :: Maybe a -> [a] Source # null :: Maybe a -> Bool Source # length :: Maybe a -> Int Source # elem :: Eq a => a -> Maybe a -> Bool Source # maximum :: Ord a => Maybe a -> a Source # minimum :: Ord a => Maybe a -> a Source # sum :: Num a => Maybe a -> a Source # product :: Num a => Maybe a -> a Source #
Traversable Maybe # |
Methods traverse :: Applicative f => (a -> f b) -> Maybe a -> f (Maybe b) Source # sequenceA :: Applicative f => Maybe (f a) -> f (Maybe a) Source # mapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b) Source # sequence :: Monad m => Maybe (m a) -> m (Maybe a) Source #
Generic1 Maybe # |
Associated Types type Rep1 (Maybe :: * -> *) :: * -> * Source # Methods from1 :: Maybe a -> Rep1 Maybe a Source # to1 :: Rep1 Maybe a -> Maybe a Source #
MonadPlus Maybe # |
Methods mzero :: Maybe a Source # mplus :: Maybe a -> Maybe a -> Maybe a Source #
Alternative Maybe # |
Methods empty :: Maybe a Source # (<|>) :: Maybe a -> Maybe a -> Maybe a Source # some :: Maybe a -> Maybe [a] Source # many :: Maybe a -> Maybe [a] Source #
MonadZip Maybe # |
Methods mzip :: Maybe a -> Maybe b -> Maybe (a, b) Source # mzipWith :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c Source # munzip :: Maybe (a, b) -> (Maybe a, Maybe b) Source #
Show1 Maybe # |
Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Maybe a -> ShowS Source # liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Maybe a] -> ShowS Source #
Read1 Maybe # |
Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Maybe a) Source # liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Maybe a] Source #
Ord1 Maybe # |
Methods liftCompare :: (a -> b -> Ordering) -> Maybe a -> Maybe b -> Ordering Source #
Eq1 Maybe # |
Methods liftEq :: (a -> b -> Bool) -> Maybe a -> Maybe b -> Bool Source #
Eq a => Eq (Maybe a) # |
Methods (==) :: Maybe a -> Maybe a -> Bool Source # (/=) :: Maybe a -> Maybe a -> Bool Source #
Data a => Data (Maybe a) # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Maybe a -> c (Maybe a) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Maybe a) Source # toConstr :: Maybe a -> Constr Source # dataTypeOf :: Maybe a -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Maybe a)) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Maybe a)) Source # gmapT :: (forall b. Data b => b -> b) -> Maybe a -> Maybe a Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Maybe a -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Maybe a -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Maybe a -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Maybe a -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) Source #
Ord a => Ord (Maybe a) # |
Methods compare :: Maybe a -> Maybe a -> Ordering Source # (<) :: Maybe a -> Maybe a -> Bool Source # (<=) :: Maybe a -> Maybe a -> Bool Source # (>) :: Maybe a -> Maybe a -> Bool Source # (>=) :: Maybe a -> Maybe a -> Bool Source # max :: Maybe a -> Maybe a -> Maybe a Source # min :: Maybe a -> Maybe a -> Maybe a Source #
Read a => Read (Maybe a) # |
Methods readsPrec :: Int -> ReadS (Maybe a) Source # readList :: ReadS [Maybe a] Source # readPrec :: ReadPrec (Maybe a) Source # readListPrec :: ReadPrec [Maybe a] Source #
Show a => Show (Maybe a) # |
Methods showsPrec :: Int -> Maybe a -> ShowS Source # show :: Maybe a -> String Source # showList :: [Maybe a] -> ShowS Source #
Generic (Maybe a) # |
Associated Types type Rep (Maybe a) :: * -> * Source # Methods from :: Maybe a -> Rep (Maybe a) x Source # to :: Rep (Maybe a) x -> Maybe a Source #
Semigroup a => Semigroup (Maybe a) # |
Methods (<>) :: Maybe a -> Maybe a -> Maybe a Source # sconcat :: NonEmpty (Maybe a) -> Maybe a Source # stimes :: Integral b => b -> Maybe a -> Maybe a Source #
Monoid a => Monoid (Maybe a) # | Lift a semigroup into `Maybe` forming a `Monoid` according to http://en.wikipedia.org/wiki/Monoid: "Any semigroup `S` may be turned into a monoid simply by adjoining an element `e` not in `S` and defining `e*e = e` and `e*s = s = s*e` for all `s ∈ S`." Since there is no "Semigroup" typeclass providing just `mappend`, we use `Monoid` instead.
Methods mempty :: Maybe a Source # mappend :: Maybe a -> Maybe a -> Maybe a Source # mconcat :: [Maybe a] -> Maybe a Source #
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 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 (==) (Maybe k) a b # |
type (==) (Maybe k) a b

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

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

#### Examples

Basic usage:

    >>> maybe False odd (Just 3)
    True

    >>> maybe False odd Nothing
    False

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

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

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

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

data Either a b Source #

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

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

#### Examples

The type ``Either` `String` `Int`` is the type of values which can be either a `String` or an `Int`. The `Left` constructor can be used only on `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

Bifunctor Either # |
Methods bimap :: (a -> b) -> (c -> d) -> Either a c -> Either b d Source # first :: (a -> b) -> Either a c -> Either b c Source # second :: (b -> c) -> Either a b -> Either a c Source #
Show2 Either # |
Methods liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Either a b -> ShowS Source # liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Either a b] -> ShowS Source #
Read2 Either # |
Methods liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Either a b) Source # liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Either a b] Source #
Ord2 Either # |
Methods liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Either a c -> Either b d -> Ordering Source #
Eq2 Either # |
Methods liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Either a c -> Either b d -> Bool Source #
Monad (Either e) # |
Methods (>>=) :: Either e a -> (a -> Either e b) -> Either e b Source # (>>) :: Either e a -> Either e b -> Either e b Source # return :: a -> Either e a Source # fail :: String -> Either e a Source #
Functor (Either a) # |
Methods fmap :: (a -> b) -> Either a a -> Either a b Source # (<$) :: a -> Either a b -> Either a a Source #
MonadFix (Either e) # |
Methods mfix :: (a -> Either e a) -> Either e a Source #
Applicative (Either e) # |
Methods pure :: a -> Either e a Source # (<*>) :: Either e (a -> b) -> Either e a -> Either e b Source # (*>) :: Either e a -> Either e b -> Either e b Source # (<*) :: Either e a -> Either e b -> Either e a Source #
Foldable (Either a) # |
Methods fold :: Monoid m => Either a m -> m Source # foldMap :: Monoid m => (a -> m) -> Either a a -> m Source # foldr :: (a -> b -> b) -> b -> Either a a -> b Source # foldr' :: (a -> b -> b) -> b -> Either a a -> b Source # foldl :: (b -> a -> b) -> b -> Either a a -> b Source # foldl' :: (b -> a -> b) -> b -> Either a a -> b Source # foldr1 :: (a -> a -> a) -> Either a a -> a Source # foldl1 :: (a -> a -> a) -> Either a a -> a Source # toList :: Either a a -> [a] Source # null :: Either a a -> Bool Source # length :: Either a a -> Int Source # elem :: Eq a => a -> Either a a -> Bool Source # maximum :: Ord a => Either a a -> a Source # minimum :: Ord a => Either a a -> a Source # sum :: Num a => Either a a -> a Source # product :: Num a => Either a a -> a Source #
Traversable (Either a) # |
Methods traverse :: Applicative f => (a -> f b) -> Either a a -> f (Either a b) Source # sequenceA :: Applicative f => Either a (f a) -> f (Either a a) Source # mapM :: Monad m => (a -> m b) -> Either a a -> m (Either a b) Source # sequence :: Monad m => Either a (m a) -> m (Either a a) Source #
Generic1 (Either a) # |
Associated Types type Rep1 (Either a :: * -> *) :: * -> * Source # Methods from1 :: Either a a -> Rep1 (Either a) a Source # to1 :: Rep1 (Either a) a -> Either a a Source #
Show a => Show1 (Either a) # |
Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Either a a -> ShowS Source # liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Either a a] -> ShowS Source #
Read a => Read1 (Either a) # |
Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Either a a) Source # liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Either a a] Source #
Ord a => Ord1 (Either a) # |
Methods liftCompare :: (a -> b -> Ordering) -> Either a a -> Either a b -> Ordering Source #
Eq a => Eq1 (Either a) # |
Methods liftEq :: (a -> b -> Bool) -> Either a a -> Either a b -> Bool Source #
(Eq a, Eq b) => 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) # |
Methods gfoldl :: (forall d c. Data d => c (d -> c) -> d -> c c) -> (forall g. g -> c g) -> Either a b -> c (Either a b) Source # gunfold :: (forall c r. Data c => c (c -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Either a b) Source # toConstr :: Either a b -> Constr Source # dataTypeOf :: Either a b -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Either a b)) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Either a b)) Source # gmapT :: (forall c. Data c => c -> c) -> Either a b -> Either a b Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Either a b -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Either a b -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Either a b -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Either a b -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Either a b -> m (Either a b) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Either a b -> m (Either a b) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Either a b -> m (Either a b) Source #
(Ord a, Ord b) => 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 a, Read b) => Read (Either a b) # |
Methods readsPrec :: Int -> ReadS (Either a b) Source # readList :: ReadS [Either a b] Source # readPrec :: ReadPrec (Either a b) Source # readListPrec :: ReadPrec [Either a b] Source #
(Show a, Show b) => Show (Either a b) # |
Methods showsPrec :: Int -> Either a b -> ShowS Source # show :: Either a b -> String Source # showList :: [Either a b] -> ShowS Source #
Generic (Either a b) # |
Associated Types type Rep (Either a b) :: * -> * Source # Methods from :: Either a b -> Rep (Either a b) x Source # to :: Rep (Either a b) x -> Either a b Source #
Semigroup (Either a b) # |
Methods (<>) :: Either a b -> Either a b -> Either a b Source # sconcat :: NonEmpty (Either a b) -> Either a b Source # stimes :: Integral b => b -> Either a b -> Either a b Source #
type Rep1 (Either a) # |
type 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 k k1) a b # |
type (==) (Either k k1) a b

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

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

#### Examples

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

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

data Ordering :: * Source #

Constructors

LT |
EQ |
GT |

Instances

Bounded Ordering # |
Methods minBound :: Ordering Source # maxBound :: Ordering Source #
Enum Ordering # |
Methods succ :: Ordering -> Ordering Source # pred :: Ordering -> Ordering Source # toEnum :: Int -> Ordering Source # fromEnum :: Ordering -> Int Source # enumFrom :: Ordering -> [Ordering] Source # enumFromThen :: Ordering -> Ordering -> [Ordering] Source # enumFromTo :: Ordering -> Ordering -> [Ordering] Source # enumFromThenTo :: Ordering -> Ordering -> Ordering -> [Ordering] Source #
Eq Ordering |
Methods (==) :: Ordering -> Ordering -> Bool Source # (/=) :: Ordering -> Ordering -> Bool Source #
Data Ordering # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ordering -> c Ordering Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Ordering Source # toConstr :: Ordering -> Constr Source # dataTypeOf :: Ordering -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Ordering) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Ordering) Source # gmapT :: (forall b. Data b => b -> b) -> Ordering -> Ordering Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ordering -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ordering -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Ordering -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Ordering -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering Source #
Ord Ordering |
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 # |
Methods readsPrec :: Int -> ReadS Ordering Source # readList :: ReadS [Ordering] Source # readPrec :: ReadPrec Ordering Source # readListPrec :: ReadPrec [Ordering] Source #
Show Ordering # |
Methods showsPrec :: Int -> Ordering -> ShowS Source # show :: Ordering -> String Source # showList :: [Ordering] -> ShowS Source #
Ix Ordering # |
Methods range :: (Ordering, Ordering) -> [Ordering] Source # index :: (Ordering, Ordering) -> Ordering -> Int Source # unsafeIndex :: (Ordering, Ordering) -> Ordering -> Int inRange :: (Ordering, Ordering) -> Ordering -> Bool Source # rangeSize :: (Ordering, Ordering) -> Int Source # unsafeRangeSize :: (Ordering, Ordering) -> Int
Generic Ordering # |
Associated Types type Rep Ordering :: * -> * Source # Methods from :: Ordering -> Rep Ordering x Source # to :: Rep Ordering x -> Ordering Source #
Semigroup Ordering # |
Methods (<>) :: Ordering -> Ordering -> Ordering Source # sconcat :: NonEmpty Ordering -> Ordering Source # stimes :: Integral b => b -> Ordering -> Ordering Source #
Monoid Ordering # |
Methods mempty :: Ordering Source # mappend :: Ordering -> Ordering -> Ordering Source # mconcat :: [Ordering] -> Ordering Source #
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 # |
Methods minBound :: Char Source # maxBound :: Char Source #
Enum Char # |
Methods succ :: Char -> Char Source # pred :: Char -> Char Source # toEnum :: Int -> Char Source # fromEnum :: Char -> Int Source # enumFrom :: Char -> [Char] Source # enumFromThen :: Char -> Char -> [Char] Source # enumFromTo :: Char -> Char -> [Char] Source # enumFromThenTo :: Char -> Char -> Char -> [Char] Source #
Eq Char |
Methods (==) :: Char -> Char -> Bool Source # (/=) :: Char -> Char -> Bool Source #
Data Char # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Char -> c Char Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Char Source # toConstr :: Char -> Constr Source # dataTypeOf :: Char -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Char) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Char) Source # gmapT :: (forall b. Data b => b -> b) -> Char -> Char Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Char -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Char -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Char -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Char -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Char -> m Char Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Char -> m Char Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Char -> m Char Source #
Ord Char |
Methods compare :: Char -> Char -> Ordering Source # (<) :: Char -> Char -> Bool Source # (<=) :: Char -> Char -> Bool Source # (>) :: Char -> Char -> Bool Source # (>=) :: Char -> Char -> Bool Source # max :: Char -> Char -> Char Source # min :: Char -> Char -> Char Source #
Read Char # |
Methods readsPrec :: Int -> ReadS Char Source # readList :: ReadS [Char] Source # readPrec :: ReadPrec Char Source # readListPrec :: ReadPrec [Char] Source #
Show Char # |
Methods showsPrec :: Int -> Char -> ShowS Source # show :: Char -> String Source # showList :: [Char] -> ShowS Source #
Ix Char # |
Methods range :: (Char, Char) -> [Char] Source # index :: (Char, Char) -> Char -> Int Source # unsafeIndex :: (Char, Char) -> Char -> Int inRange :: (Char, Char) -> Char -> Bool Source # rangeSize :: (Char, Char) -> Int Source # unsafeRangeSize :: (Char, Char) -> Int
Storable Char # |
Methods sizeOf :: Char -> Int Source # alignment :: Char -> Int Source # peekElemOff :: Ptr Char -> Int -> IO Char Source # pokeElemOff :: Ptr Char -> Int -> Char -> IO () Source # peekByteOff :: Ptr b -> Int -> IO Char Source # pokeByteOff :: Ptr b -> Int -> Char -> IO () Source # peek :: Ptr Char -> IO Char Source # poke :: Ptr Char -> Char -> IO () Source #
IsChar Char # |
Methods toChar :: Char -> Char Source # fromChar :: Char -> Char Source #
PrintfArg Char # |
Methods formatArg :: Char -> FieldFormatter Source # parseFormat :: Char -> ModifierParser Source #
Functor (URec Char) # |
Methods fmap :: (a -> b) -> URec Char a -> URec Char b Source # (<$) :: a -> URec Char b -> URec Char a Source #
Foldable (URec Char) # |
Methods fold :: Monoid m => URec Char m -> m Source # foldMap :: Monoid m => (a -> m) -> URec Char a -> m Source # foldr :: (a -> b -> b) -> b -> URec Char a -> b Source # foldr' :: (a -> b -> b) -> b -> URec Char a -> b Source # foldl :: (b -> a -> b) -> b -> URec Char a -> b Source # foldl' :: (b -> a -> b) -> b -> URec Char a -> b Source # foldr1 :: (a -> a -> a) -> URec Char a -> a Source # foldl1 :: (a -> a -> a) -> URec Char a -> a Source # toList :: URec Char a -> [a] Source # null :: URec Char a -> Bool Source # length :: URec Char a -> Int Source # elem :: Eq a => a -> URec Char a -> Bool Source # maximum :: Ord a => URec Char a -> a Source # minimum :: Ord a => URec Char a -> a Source # sum :: Num a => URec Char a -> a Source # product :: Num a => URec Char a -> a Source #
Traversable (URec Char) # |
Methods traverse :: Applicative f => (a -> f b) -> URec Char a -> f (URec Char b) Source # sequenceA :: Applicative f => URec Char (f a) -> f (URec Char a) Source # mapM :: Monad m => (a -> m b) -> URec Char a -> m (URec Char b) Source # sequence :: Monad m => URec Char (m a) -> m (URec Char a) Source #
Generic1 (URec Char) # |
Associated Types type Rep1 (URec Char :: * -> *) :: * -> * Source # Methods from1 :: URec Char a -> Rep1 (URec Char) a Source # to1 :: Rep1 (URec Char) a -> URec Char a Source #
Eq (URec Char p) # |
Methods (==) :: URec Char p -> URec Char p -> Bool Source # (/=) :: URec Char p -> URec Char p -> Bool Source #
Ord (URec Char p) # |
Methods compare :: URec Char p -> URec Char p -> Ordering Source # (<) :: URec Char p -> URec Char p -> Bool Source # (<=) :: URec Char p -> URec Char p -> Bool Source # (>) :: URec Char p -> URec Char p -> Bool Source # (>=) :: URec Char p -> URec Char p -> Bool Source # max :: URec Char p -> URec Char p -> URec Char p Source # min :: URec Char p -> URec Char p -> URec Char p Source #
Show (URec Char p) # |
Methods showsPrec :: Int -> URec Char p -> ShowS Source # show :: URec Char p -> String Source # showList :: [URec Char p] -> ShowS Source #
Generic (URec Char p) # |
Associated Types type Rep (URec Char p) :: * -> * Source # Methods from :: URec Char p -> Rep (URec Char p) x Source # to :: Rep (URec Char p) x -> URec Char p Source #
data URec Char # | Used for marking occurrences of `Char#`
data URec Char = UChar { uChar# :: Char# }
type Rep1 (URec Char) # |
type Rep1 (URec Char) = D1 (MetaData "URec" "GHC.Generics" "base" False) (C1 (MetaCons "UChar" PrefixI True) (S1 (MetaSel (Just Symbol "uChar#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) UChar))
type Rep (URec Char p) # |
type Rep (URec Char p) = D1 (MetaData "URec" "GHC.Generics" "base" False) (C1 (MetaCons "UChar" PrefixI True) (S1 (MetaSel (Just Symbol "uChar#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) UChar))

type String = [Char] Source #

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

### Tuples

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

Extract the first component of a pair.

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

Extract the second component of a pair.

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

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

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

`uncurry` converts a curried function to a function on pairs.

## Basic type classes

class Eq a where Source #

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

Minimal complete definition: either `==` or `/=`.

Minimal complete definition

(==) | (/=)

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 # |
Methods (==) :: Int8 -> Int8 -> Bool Source # (/=) :: Int8 -> Int8 -> Bool Source #
Eq Int16 # |
Methods (==) :: Int16 -> Int16 -> Bool Source # (/=) :: Int16 -> Int16 -> Bool Source #
Eq Int32 # |
Methods (==) :: Int32 -> Int32 -> Bool Source # (/=) :: Int32 -> Int32 -> Bool Source #
Eq Int64 # |
Methods (==) :: Int64 -> Int64 -> Bool Source # (/=) :: Int64 -> Int64 -> Bool Source #
Eq Integer |
Methods (==) :: Integer -> Integer -> Bool Source # (/=) :: Integer -> Integer -> 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 # |
Methods (==) :: Word8 -> Word8 -> Bool Source # (/=) :: Word8 -> Word8 -> Bool Source #
Eq Word16 # |
Methods (==) :: Word16 -> Word16 -> Bool Source # (/=) :: Word16 -> Word16 -> Bool Source #
Eq Word32 # |
Methods (==) :: Word32 -> Word32 -> Bool Source # (/=) :: Word32 -> Word32 -> Bool Source #
Eq Word64 # |
Methods (==) :: Word64 -> Word64 -> Bool Source # (/=) :: Word64 -> Word64 -> Bool Source #
Eq TypeRep # |
Methods (==) :: TypeRep -> TypeRep -> Bool Source # (/=) :: TypeRep -> TypeRep -> Bool Source #
Eq () |
Methods (==) :: () -> () -> Bool Source # (/=) :: () -> () -> Bool Source #
Eq TyCon |
Methods (==) :: TyCon -> TyCon -> Bool Source # (/=) :: TyCon -> TyCon -> 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 IOMode # |
Methods (==) :: IOMode -> IOMode -> Bool Source # (/=) :: IOMode -> IOMode -> Bool Source #
Eq SomeSymbol # |
Methods (==) :: SomeSymbol -> SomeSymbol -> Bool Source # (/=) :: SomeSymbol -> SomeSymbol -> Bool Source #
Eq SomeNat # |
Methods (==) :: SomeNat -> SomeNat -> Bool Source # (/=) :: SomeNat -> SomeNat -> Bool Source #
Eq Fingerprint # |
Methods (==) :: Fingerprint -> Fingerprint -> Bool Source # (/=) :: Fingerprint -> Fingerprint -> 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 # |
Methods (==) :: IOException -> IOException -> Bool Source # (/=) :: IOException -> IOException -> Bool Source #
Eq MaskingState # |
Methods (==) :: MaskingState -> MaskingState -> Bool Source # (/=) :: MaskingState -> MaskingState -> 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 SeekMode # |
Methods (==) :: SeekMode -> SeekMode -> Bool Source # (/=) :: SeekMode -> SeekMode -> Bool Source #
Eq IODeviceType # |
Methods (==) :: IODeviceType -> IODeviceType -> Bool Source # (/=) :: IODeviceType -> IODeviceType -> 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 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 IntPtr # |
Methods (==) :: IntPtr -> IntPtr -> Bool Source # (/=) :: IntPtr -> IntPtr -> Bool Source #
Eq WordPtr # |
Methods (==) :: WordPtr -> WordPtr -> Bool Source # (/=) :: WordPtr -> WordPtr -> 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 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 # |
Methods (==) :: Handle -> Handle -> Bool Source # (/=) :: Handle -> Handle -> Bool Source #
Eq IOErrorType # |
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 # |
Methods (==) :: Errno -> Errno -> Bool Source # (/=) :: Errno -> Errno -> 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 # |
Methods (==) :: ThreadId -> ThreadId -> Bool Source # (/=) :: ThreadId -> ThreadId -> Bool Source #
Eq Fd # |
Methods (==) :: Fd -> Fd -> Bool Source # (/=) :: Fd -> Fd -> 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 FdKey # |
Methods (==) :: FdKey -> FdKey -> Bool Source # (/=) :: FdKey -> FdKey -> Bool Source #
Eq TimeoutKey # |
Methods (==) :: TimeoutKey -> TimeoutKey -> Bool Source # (/=) :: TimeoutKey -> TimeoutKey -> Bool Source #
Eq HandlePosn # |
Methods (==) :: HandlePosn -> HandlePosn -> Bool Source # (/=) :: HandlePosn -> HandlePosn -> Bool Source #
Eq Unique # |
Methods (==) :: Unique -> Unique -> Bool Source # (/=) :: Unique -> Unique -> Bool Source #
Eq Version # |
Methods (==) :: Version -> Version -> Bool Source # (/=) :: Version -> Version -> 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
Methods (==) :: Constr -> Constr -> Bool Source # (/=) :: Constr -> Constr -> Bool Source #
Eq Void # |
Methods (==) :: Void -> Void -> Bool Source # (/=) :: Void -> Void -> Bool Source #
Eq Natural # |
Methods (==) :: Natural -> Natural -> Bool Source # (/=) :: Natural -> Natural -> Bool Source #
Eq SpecConstrAnnotation # |
Methods (==) :: SpecConstrAnnotation -> SpecConstrAnnotation -> Bool Source # (/=) :: SpecConstrAnnotation -> SpecConstrAnnotation -> 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) # |
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 (V1 p) # |
Methods (==) :: V1 p -> V1 p -> Bool Source # (/=) :: V1 p -> V1 p -> Bool Source #
Eq (U1 p) # |
Methods (==) :: U1 p -> U1 p -> Bool Source # (/=) :: U1 p -> U1 p -> Bool Source #
Eq p => Eq (Par1 p) # |
Methods (==) :: Par1 p -> Par1 p -> Bool Source # (/=) :: Par1 p -> Par1 p -> Bool Source #
Eq (MVar a) # |
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 (IORef a) # |
Methods (==) :: IORef a -> IORef a -> Bool Source # (/=) :: IORef a -> IORef 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 (ForeignPtr a) # |
Methods (==) :: ForeignPtr a -> ForeignPtr a -> Bool Source # (/=) :: ForeignPtr a -> ForeignPtr a -> Bool Source #
Eq (TVar a) # |
Methods (==) :: TVar a -> TVar a -> Bool Source # (/=) :: TVar a -> TVar a -> Bool Source #
Eq a => Eq (ZipList a) # |
Methods (==) :: ZipList a -> ZipList a -> Bool Source # (/=) :: ZipList a -> ZipList a -> Bool Source #
Eq (Chan a) # |
Methods (==) :: Chan a -> Chan a -> Bool Source # (/=) :: Chan a -> Chan a -> Bool Source #
Eq (StableName a) # |
Methods (==) :: StableName a -> StableName a -> Bool Source # (/=) :: StableName a -> StableName a -> Bool Source #
Eq a => Eq (Complex a) # |
Methods (==) :: Complex a -> Complex a -> Bool Source # (/=) :: Complex a -> Complex a -> Bool Source #
Eq (Fixed a) # |
Methods (==) :: Fixed a -> Fixed a -> Bool Source # (/=) :: Fixed a -> Fixed 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 a => Eq (Identity a) # |
Methods (==) :: Identity a -> Identity a -> Bool Source # (/=) :: Identity a -> Identity a -> Bool Source #
(Eq a, Eq b) => Eq (Either a b) # |
Methods (==) :: Either a b -> Either a b -> Bool Source # (/=) :: Either a b -> Either a b -> Bool Source #
Eq (f p) => Eq (Rec1 f p) # |
Methods (==) :: Rec1 f p -> Rec1 f p -> Bool Source # (/=) :: Rec1 f p -> Rec1 f p -> Bool Source #
Eq (URec Char p) # |
Methods (==) :: URec Char p -> URec Char p -> Bool Source # (/=) :: URec Char p -> URec Char p -> Bool Source #
Eq (URec Double p) # |
Methods (==) :: URec Double p -> URec Double p -> Bool Source # (/=) :: URec Double p -> URec Double p -> Bool Source #
Eq (URec Float p) # |
Methods (==) :: URec Float p -> URec Float p -> Bool Source # (/=) :: URec Float p -> URec Float p -> Bool Source #
Eq (URec Int p) # |
Methods (==) :: URec Int p -> URec Int p -> Bool Source # (/=) :: URec Int p -> URec Int p -> Bool Source #
Eq (URec Word p) # |
Methods (==) :: URec Word p -> URec Word p -> Bool Source # (/=) :: URec Word p -> URec Word p -> Bool Source #
Eq (URec (Ptr ()) p) # |
Methods (==) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool Source # (/=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> 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) # |
Methods (==) :: STRef s a -> STRef s a -> Bool Source # (/=) :: STRef s a -> STRef s a -> Bool Source #
Eq (Proxy k s) # |
Methods (==) :: Proxy k s -> Proxy k s -> Bool Source # (/=) :: Proxy k s -> Proxy k s -> Bool Source #
Eq a => Eq (Arg a b) # |
Methods (==) :: Arg a b -> Arg a b -> Bool Source # (/=) :: Arg a b -> Arg a b -> Bool Source #
Eq c => Eq (K1 i c p) # |
Methods (==) :: K1 i c p -> K1 i c p -> Bool Source # (/=) :: K1 i c p -> K1 i c p -> Bool Source #
(Eq (f p), Eq (g p)) => Eq ((:+:) f g p) # |
Methods (==) :: (f :+: g) p -> (f :+: g) p -> Bool Source # (/=) :: (f :+: g) p -> (f :+: g) p -> Bool Source #
(Eq (f p), Eq (g p)) => Eq ((:*:) f g p) # |
Methods (==) :: (f :*: g) p -> (f :*: g) p -> Bool Source # (/=) :: (f :*: g) p -> (f :*: g) p -> Bool Source #
Eq (f (g p)) => Eq ((:.:) f g p) # |
Methods (==) :: (f :.: g) p -> (f :.: g) p -> Bool Source # (/=) :: (f :.: g) p -> (f :.: g) 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 (f p) => Eq (M1 i c f p) # |
Methods (==) :: M1 i c f p -> M1 i c f p -> Bool Source # (/=) :: M1 i c f p -> M1 i c f 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 #
(Eq1 f, Eq1 g, Eq a) => Eq (Product * f g a) # |
Methods (==) :: Product * f g a -> Product * f g a -> Bool Source # (/=) :: Product * f g a -> Product * f g a -> Bool Source #
(Eq1 f, Eq1 g, Eq a) => Eq (Sum * f g a) # |
Methods (==) :: Sum * f g a -> Sum * f g a -> Bool Source # (/=) :: Sum * f g a -> Sum * f g a -> 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) # |
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 | (<=)

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 # |
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 # |
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 # |
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 # |
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 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 # |
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 # |
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 # |
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 # |
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 TypeRep # |
Methods compare :: TypeRep -> TypeRep -> Ordering Source # (<) :: TypeRep -> TypeRep -> Bool Source # (<=) :: TypeRep -> TypeRep -> Bool Source # (>) :: TypeRep -> TypeRep -> Bool Source # (>=) :: TypeRep -> TypeRep -> Bool Source # max :: TypeRep -> TypeRep -> TypeRep Source # min :: TypeRep -> TypeRep -> TypeRep 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 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 SomeSymbol # |
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 SomeNat # |
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 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 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 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 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 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 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 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 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 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 # |
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 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 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 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 Version # |
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 Void # |
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 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 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) # |
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 (V1 p) # |
Methods compare :: V1 p -> V1 p -> Ordering Source # (<) :: V1 p -> V1 p -> Bool Source # (<=) :: V1 p -> V1 p -> Bool Source # (>) :: V1 p -> V1 p -> Bool Source # (>=) :: V1 p -> V1 p -> Bool Source # max :: V1 p -> V1 p -> V1 p Source # min :: V1 p -> V1 p -> V1 p Source #
Ord (U1 p) # |
Methods compare :: U1 p -> U1 p -> Ordering Source # (<) :: U1 p -> U1 p -> Bool Source # (<=) :: U1 p -> U1 p -> Bool Source # (>) :: U1 p -> U1 p -> Bool Source # (>=) :: U1 p -> U1 p -> Bool Source # max :: U1 p -> U1 p -> U1 p Source # min :: U1 p -> U1 p -> U1 p 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) # |
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) # |
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 (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 (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 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 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 b) => 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 (f p) => Ord (Rec1 f p) # |
Methods compare :: Rec1 f p -> Rec1 f p -> Ordering Source # (<) :: Rec1 f p -> Rec1 f p -> Bool Source # (<=) :: Rec1 f p -> Rec1 f p -> Bool Source # (>) :: Rec1 f p -> Rec1 f p -> Bool Source # (>=) :: Rec1 f p -> Rec1 f p -> Bool Source # max :: Rec1 f p -> Rec1 f p -> Rec1 f p Source # min :: Rec1 f p -> Rec1 f p -> Rec1 f p Source #
Ord (URec Char p) # |
Methods compare :: URec Char p -> URec Char p -> Ordering Source # (<) :: URec Char p -> URec Char p -> Bool Source # (<=) :: URec Char p -> URec Char p -> Bool Source # (>) :: URec Char p -> URec Char p -> Bool Source # (>=) :: URec Char p -> URec Char p -> Bool Source # max :: URec Char p -> URec Char p -> URec Char p Source # min :: URec Char p -> URec Char p -> URec Char p Source #
Ord (URec Double p) # |
Methods compare :: URec Double p -> URec Double p -> Ordering Source # (<) :: URec Double p -> URec Double p -> Bool Source # (<=) :: URec Double p -> URec Double p -> Bool Source # (>) :: URec Double p -> URec Double p -> Bool Source # (>=) :: URec Double p -> URec Double p -> Bool Source # max :: URec Double p -> URec Double p -> URec Double p Source # min :: URec Double p -> URec Double p -> URec Double p Source #
Ord (URec Float p) # |
Methods compare :: URec Float p -> URec Float p -> Ordering Source # (<) :: URec Float p -> URec Float p -> Bool Source # (<=) :: URec Float p -> URec Float p -> Bool Source # (>) :: URec Float p -> URec Float p -> Bool Source # (>=) :: URec Float p -> URec Float p -> Bool Source # max :: URec Float p -> URec Float p -> URec Float p Source # min :: URec Float p -> URec Float p -> URec Float p Source #
Ord (URec Int p) # |
Methods compare :: URec Int p -> URec Int p -> Ordering Source # (<) :: URec Int p -> URec Int p -> Bool Source # (<=) :: URec Int p -> URec Int p -> Bool Source # (>) :: URec Int p -> URec Int p -> Bool Source # (>=) :: URec Int p -> URec Int p -> Bool Source # max :: URec Int p -> URec Int p -> URec Int p Source # min :: URec Int p -> URec Int p -> URec Int p Source #
Ord (URec Word p) # |
Methods compare :: URec Word p -> URec Word p -> Ordering Source # (<) :: URec Word p -> URec Word p -> Bool Source # (<=) :: URec Word p -> URec Word p -> Bool Source # (>) :: URec Word p -> URec Word p -> Bool Source # (>=) :: URec Word p -> URec Word p -> Bool Source # max :: URec Word p -> URec Word p -> URec Word p Source # min :: URec Word p -> URec Word p -> URec Word p Source #
Ord (URec (Ptr ()) p) # |
Methods compare :: URec (Ptr ()) p -> URec (Ptr ()) p -> Ordering Source # (<) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool Source # (<=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool Source # (>) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool Source # (>=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool Source # max :: URec (Ptr ()) p -> URec (Ptr ()) p -> URec (Ptr ()) p Source # min :: URec (Ptr ()) p -> URec (Ptr ()) p -> URec (Ptr ()) p Source #
(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) # |
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) # |
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 c => Ord (K1 i c p) # |
Methods compare :: K1 i c p -> K1 i c p -> Ordering Source # (<) :: K1 i c p -> K1 i c p -> Bool Source # (<=) :: K1 i c p -> K1 i c p -> Bool Source # (>) :: K1 i c p -> K1 i c p -> Bool Source # (>=) :: K1 i c p -> K1 i c p -> Bool Source # max :: K1 i c p -> K1 i c p -> K1 i c p Source # min :: K1 i c p -> K1 i c p -> K1 i c p Source #
(Ord (f p), Ord (g p)) => Ord ((:+:) f g p) # |
Methods compare :: (f :+: g) p -> (f :+: g) p -> Ordering Source # (<) :: (f :+: g) p -> (f :+: g) p -> Bool Source # (<=) :: (f :+: g) p -> (f :+: g) p -> Bool Source # (>) :: (f :+: g) p -> (f :+: g) p -> Bool Source # (>=) :: (f :+: g) p -> (f :+: g) p -> Bool Source # max :: (f :+: g) p -> (f :+: g) p -> (f :+: g) p Source # min :: (f :+: g) p -> (f :+: g) p -> (f :+: g) p Source #
(Ord (f p), Ord (g p)) => Ord ((:*:) f g p) # |
Methods compare :: (f :*: g) p -> (f :*: g) p -> Ordering Source # (<) :: (f :*: g) p -> (f :*: g) p -> Bool Source # (<=) :: (f :*: g) p -> (f :*: g) p -> Bool Source # (>) :: (f :*: g) p -> (f :*: g) p -> Bool Source # (>=) :: (f :*: g) p -> (f :*: g) p -> Bool Source # max :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p Source # min :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p Source #
Ord (f (g p)) => Ord ((:.:) f g p) # |
Methods compare :: (f :.: g) p -> (f :.: g) p -> Ordering Source # (<) :: (f :.: g) p -> (f :.: g) p -> Bool Source # (<=) :: (f :.: g) p -> (f :.: g) p -> Bool Source # (>) :: (f :.: g) p -> (f :.: g) p -> Bool Source # (>=) :: (f :.: g) p -> (f :.: g) p -> Bool Source # max :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p Source # min :: (f :.: g) p -> (f :.: g) p -> (f :.: g) 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 (f p) => Ord (M1 i c f p) # |
Methods compare :: M1 i c f p -> M1 i c f p -> Ordering Source # (<) :: M1 i c f p -> M1 i c f p -> Bool Source # (<=) :: M1 i c f p -> M1 i c f p -> Bool Source # (>) :: M1 i c f p -> M1 i c f p -> Bool Source # (>=) :: M1 i c f p -> M1 i c f p -> Bool Source # max :: M1 i c f p -> M1 i c f p -> M1 i c f p Source # min :: M1 i c f p -> M1 i c f p -> M1 i c f 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 #
(Ord1 f, Ord1 g, Ord a) => Ord (Product * f g a) # |
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 #
(Ord1 f, Ord1 g, Ord a) => Ord (Sum * f g a) # |
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 #
(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) # |
Methods compare :: Compose * * f g a -> Compose * * f g a -> Ordering Source # (<) :: Compose * * f g a -> Compose * * f g a -> Bool Source # (<=) :: Compose * * f g a -> Compose * * f g a -> Bool Source # (>) :: Compose * * f g a -> Compose * * f g a -> Bool Source # (>=) :: Compose * * f g a -> Compose * * f g a -> Bool Source # max :: Compose * * f g a -> Compose * * f g a -> Compose * * f g a Source # min :: Compose * * f g a -> Compose * * f g a -> Compose * * f g a Source #
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f) => Ord (a, b, c, d, e, f) |
Methods compare :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Ordering Source # (<) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool Source # (<=) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool Source # (>) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool Source # (>=) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool Source # max :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) Source # min :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) Source #
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g) => Ord (a, b, c, d, e, f, g) |
Methods compare :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Ordering Source # (<) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool Source # (<=) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool Source # (>) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool Source # (>=) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool Source # max :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) Source # min :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) Source #
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h) => Ord (a, b, c, d, e, f, g, h) |
Methods compare :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Ordering Source # (<) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool Source # (<=) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool Source # (>) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool Source # (>=) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool Source # max :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) Source # min :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) Source #
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i) => Ord (a, b, c, d, e, f, g, h, i) |
Methods compare :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Ordering Source # (<) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool Source # (<=) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool Source # (>) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool Source # (>=) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool Source # max :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) Source # min :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) Source #
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j) => Ord (a, b, c, d, e, f, g, h, i, j) |
Methods compare :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Ordering Source # (<) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool Source # (<=) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool Source # (>) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool Source # (>=) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool Source # max :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) Source # min :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) Source #
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k) => Ord (a, b, c, d, e, f, g, h, i, j, k) |
Methods compare :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Ordering Source # (<) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool Source # (<=) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool Source # (>) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool Source # (>=) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool Source # max :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) Source # min :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) Source #
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l) => Ord (a, b, c, d, e, f, g, h, i, j, k, l) |
Methods compare :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Ordering Source # (<) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool Source # (<=) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool Source # (>) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool Source # (>=) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool Source # max :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) Source # min :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) Source #
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m) |
Methods compare :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Ordering Source # (<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool Source # (<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool Source # (>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool Source # (>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool Source # max :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) Source # min :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) Source #
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m, Ord n) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m, n) |
Methods compare :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Ordering Source # (<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool Source # (<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool Source # (>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool Source # (>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool Source # max :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source # min :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source #
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m, Ord n, Ord o) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) |
Methods compare :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Ordering Source # (<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool Source # (<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool Source # (>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool Source # (>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool Source # max :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source # min :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source #

class Enum a where Source #

Class `Enum` defines operations on sequentially ordered types.

The `enumFrom`... methods are used in Haskell's translation of arithmetic sequences.

Instances of `Enum` may be derived for any enumeration type (types whose constructors have no fields). The nullary constructors are assumed to be numbered left-to-right by `fromEnum` from `0` through `n-1`. See Chapter 10 of the Haskell Report for more details.

For any type that is an instance of class `Bounded` as well as `Enum`, the following should hold:

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

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

pred :: a -> a Source #

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

toEnum :: Int -> a Source #

Convert from an `Int`.

fromEnum :: a -> Int Source #

Convert to an `Int`. It is implementation-dependent what `fromEnum` returns when applied to a value that is too large to fit in an `Int`.

enumFrom :: a -> [a] Source #

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

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

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

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

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

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

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

Instances

Enum Bool # |
Methods succ :: Bool -> Bool Source # pred :: Bool -> Bool Source # toEnum :: Int -> Bool Source # fromEnum :: Bool -> Int Source # enumFrom :: Bool -> [Bool] Source # enumFromThen :: Bool -> Bool -> [Bool] Source # enumFromTo :: Bool -> Bool -> [Bool] Source # enumFromThenTo :: Bool -> Bool -> Bool -> [Bool] Source #
Enum Char # |
Methods succ :: Char -> Char Source # pred :: Char -> Char Source # toEnum :: Int -> Char Source # fromEnum :: Char -> Int Source # enumFrom :: Char -> [Char] Source # enumFromThen :: Char -> Char -> [Char] Source # enumFromTo :: Char -> Char -> [Char] Source # enumFromThenTo :: Char -> Char -> Char -> [Char] Source #
Enum Int # |
Methods succ :: Int -> Int Source # pred :: Int -> Int Source # toEnum :: Int -> Int Source # fromEnum :: Int -> Int Source # enumFrom :: Int -> [Int] Source # enumFromThen :: Int -> Int -> [Int] Source # enumFromTo :: Int -> Int -> [Int] Source # enumFromThenTo :: Int -> Int -> Int -> [Int] Source #
Enum Int8 # |
Methods succ :: Int8 -> Int8 Source # pred :: Int8 -> Int8 Source # toEnum :: Int -> Int8 Source # fromEnum :: Int8 -> Int Source # enumFrom :: Int8 -> [Int8] Source # enumFromThen :: Int8 -> Int8 -> [Int8] Source # enumFromTo :: Int8 -> Int8 -> [Int8] Source # enumFromThenTo :: Int8 -> Int8 -> Int8 -> [Int8] Source #
Enum Int16 # |
Methods succ :: Int16 -> Int16 Source # pred :: Int16 -> Int16 Source # toEnum :: Int -> Int16 Source # fromEnum :: Int16 -> Int Source # enumFrom :: Int16 -> [Int16] Source # enumFromThen :: Int16 -> Int16 -> [Int16] Source # enumFromTo :: Int16 -> Int16 -> [Int16] Source # enumFromThenTo :: Int16 -> Int16 -> Int16 -> [Int16] Source #
Enum Int32 # |
Methods succ :: Int32 -> Int32 Source # pred :: Int32 -> Int32 Source # toEnum :: Int -> Int32 Source # fromEnum :: Int32 -> Int Source # enumFrom :: Int32 -> [Int32] Source # enumFromThen :: Int32 -> Int32 -> [Int32] Source # enumFromTo :: Int32 -> Int32 -> [Int32] Source # enumFromThenTo :: Int32 -> Int32 -> Int32 -> [Int32] Source #
Enum Int64 # |
Methods succ :: Int64 -> Int64 Source # pred :: Int64 -> Int64 Source # toEnum :: Int -> Int64 Source # fromEnum :: Int64 -> Int Source # enumFrom :: Int64 -> [Int64] Source # enumFromThen :: Int64 -> Int64 -> [Int64] Source # enumFromTo :: Int64 -> Int64 -> [Int64] Source # enumFromThenTo :: Int64 -> Int64 -> Int64 -> [Int64] Source #
Enum Integer # |
Methods succ :: Integer -> Integer Source # pred :: Integer -> Integer Source # toEnum :: Int -> Integer Source # fromEnum :: Integer -> Int Source # enumFrom :: Integer -> [Integer] Source # enumFromThen :: Integer -> Integer -> [Integer] Source # enumFromTo :: Integer -> Integer -> [Integer] Source # enumFromThenTo :: Integer -> Integer -> Integer -> [Integer] Source #
Enum Ordering # |
Methods succ :: Ordering -> Ordering Source # pred :: Ordering -> Ordering Source # toEnum :: Int -> Ordering Source # fromEnum :: Ordering -> Int Source # enumFrom :: Ordering -> [Ordering] Source # enumFromThen :: Ordering -> Ordering -> [Ordering] Source # enumFromTo :: Ordering -> Ordering -> [Ordering] Source # enumFromThenTo :: Ordering -> Ordering -> Ordering -> [Ordering] Source #
Enum Word # |
Methods succ :: Word -> Word Source # pred :: Word -> Word Source # toEnum :: Int -> Word Source # fromEnum :: Word -> Int Source # enumFrom :: Word -> [Word] Source # enumFromThen :: Word -> Word -> [Word] Source # enumFromTo :: Word -> Word -> [Word] Source # enumFromThenTo :: Word -> Word -> Word -> [Word] Source #
Enum Word8 # |
Methods succ :: Word8 -> Word8 Source # pred :: Word8 -> Word8 Source # toEnum :: Int -> Word8 Source # fromEnum :: Word8 -> Int Source # enumFrom :: Word8 -> [Word8] Source # enumFromThen :: Word8 -> Word8 -> [Word8] Source # enumFromTo :: Word8 -> Word8 -> [Word8] Source # enumFromThenTo :: Word8 -> Word8 -> Word8 -> [Word8] Source #
Enum Word16 # |
Methods succ :: Word16 -> Word16 Source # pred :: Word16 -> Word16 Source # toEnum :: Int -> Word16 Source # fromEnum :: Word16 -> Int Source # enumFrom :: Word16 -> [Word16] Source # enumFromThen :: Word16 -> Word16 -> [Word16] Source # enumFromTo :: Word16 -> Word16 -> [Word16] Source # enumFromThenTo :: Word16 -> Word16 -> Word16 -> [Word16] Source #
Enum Word32 # |
Methods succ :: Word32 -> Word32 Source # pred :: Word32 -> Word32 Source # toEnum :: Int -> Word32 Source # fromEnum :: Word32 -> Int Source # enumFrom :: Word32 -> [Word32] Source # enumFromThen :: Word32 -> Word32 -> [Word32] Source # enumFromTo :: Word32 -> Word32 -> [Word32] Source # enumFromThenTo :: Word32 -> Word32 -> Word32 -> [Word32] Source #
Enum Word64 # |
Methods succ :: Word64 -> Word64 Source # pred :: Word64 -> Word64 Source # toEnum :: Int -> Word64 Source # fromEnum :: Word64 -> Int Source # enumFrom :: Word64 -> [Word64] Source # enumFromThen :: Word64 -> Word64 -> [Word64] Source # enumFromTo :: Word64 -> Word64 -> [Word64] Source # enumFromThenTo :: Word64 -> Word64 -> Word64 -> [Word64] Source #
Enum () # |
Methods succ :: () -> () Source # pred :: () -> () Source # toEnum :: Int -> () Source # fromEnum :: () -> Int Source # enumFrom :: () -> [()] Source # enumFromThen :: () -> () -> [()] Source # enumFromTo :: () -> () -> [()] Source # enumFromThenTo :: () -> () -> () -> [()] Source #
Enum GeneralCategory # |
Methods succ :: GeneralCategory -> GeneralCategory Source # pred :: GeneralCategory -> GeneralCategory Source # toEnum :: Int -> GeneralCategory Source # fromEnum :: GeneralCategory -> Int Source # enumFrom :: GeneralCategory -> [GeneralCategory] Source # enumFromThen :: GeneralCategory -> GeneralCategory -> [GeneralCategory] Source # enumFromTo :: GeneralCategory -> GeneralCategory -> [GeneralCategory] Source # enumFromThenTo :: GeneralCategory -> GeneralCategory -> GeneralCategory -> [GeneralCategory] Source #
Enum IOMode # |
Methods succ :: IOMode -> IOMode Source # pred :: IOMode -> IOMode Source # toEnum :: Int -> IOMode Source # fromEnum :: IOMode -> Int Source # enumFrom :: IOMode -> [IOMode] Source # enumFromThen :: IOMode -> IOMode -> [IOMode] Source # enumFromTo :: IOMode -> IOMode -> [IOMode] Source # enumFromThenTo :: IOMode -> IOMode -> IOMode -> [IOMode] Source #
Enum DecidedStrictness # |
Methods succ :: DecidedStrictness -> DecidedStrictness Source # pred :: DecidedStrictness -> DecidedStrictness Source # toEnum :: Int -> DecidedStrictness Source # fromEnum :: DecidedStrictness -> Int Source # enumFrom :: DecidedStrictness -> [DecidedStrictness] Source # enumFromThen :: DecidedStrictness -> DecidedStrictness -> [DecidedStrictness] Source # enumFromTo :: DecidedStrictness -> DecidedStrictness -> [DecidedStrictness] Source # enumFromThenTo :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness -> [DecidedStrictness] Source #
Enum SourceStrictness # |
Methods succ :: SourceStrictness -> SourceStrictness Source # pred :: SourceStrictness -> SourceStrictness Source # toEnum :: Int -> SourceStrictness Source # fromEnum :: SourceStrictness -> Int Source # enumFrom :: SourceStrictness -> [SourceStrictness] Source # enumFromThen :: SourceStrictness -> SourceStrictness -> [SourceStrictness] Source # enumFromTo :: SourceStrictness -> SourceStrictness -> [SourceStrictness] Source # enumFromThenTo :: SourceStrictness -> SourceStrictness -> SourceStrictness -> [SourceStrictness] Source #
Enum SourceUnpackedness # |
Methods succ :: SourceUnpackedness -> SourceUnpackedness Source # pred :: SourceUnpackedness -> SourceUnpackedness Source # toEnum :: Int -> SourceUnpackedness Source # fromEnum :: SourceUnpackedness -> Int Source # enumFrom :: SourceUnpackedness -> [SourceUnpackedness] Source # enumFromThen :: SourceUnpackedness -> SourceUnpackedness -> [SourceUnpackedness] Source # enumFromTo :: SourceUnpackedness -> SourceUnpackedness -> [SourceUnpackedness] Source # enumFromThenTo :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness -> [SourceUnpackedness] Source #
Enum Associativity # |
Methods succ :: Associativity -> Associativity Source # pred :: Associativity -> Associativity Source # toEnum :: Int -> Associativity Source # fromEnum :: Associativity -> Int Source # enumFrom :: Associativity -> [Associativity] Source # enumFromThen :: Associativity -> Associativity -> [Associativity] Source # enumFromTo :: Associativity -> Associativity -> [Associativity] Source # enumFromThenTo :: Associativity -> Associativity -> Associativity -> [Associativity] Source #
Enum SeekMode # |
Methods succ :: SeekMode -> SeekMode Source # pred :: SeekMode -> SeekMode Source # toEnum :: Int -> SeekMode Source # fromEnum :: SeekMode -> Int Source # enumFrom :: SeekMode -> [SeekMode] Source # enumFromThen :: SeekMode -> SeekMode -> [SeekMode] Source # enumFromTo :: SeekMode -> SeekMode -> [SeekMode] Source # enumFromThenTo :: SeekMode -> SeekMode -> SeekMode -> [SeekMode] Source #
Enum CUIntMax # |
Methods succ :: CUIntMax -> CUIntMax Source # pred :: CUIntMax -> CUIntMax Source # toEnum :: Int -> CUIntMax Source # fromEnum :: CUIntMax -> Int Source # enumFrom :: CUIntMax -> [CUIntMax] Source # enumFromThen :: CUIntMax -> CUIntMax -> [CUIntMax] Source # enumFromTo :: CUIntMax -> CUIntMax -> [CUIntMax] Source # enumFromThenTo :: CUIntMax -> CUIntMax -> CUIntMax -> [CUIntMax] Source #
Enum CIntMax # |
Methods succ :: CIntMax -> CIntMax Source # pred :: CIntMax -> CIntMax Source # toEnum :: Int -> CIntMax Source # fromEnum :: CIntMax -> Int Source # enumFrom :: CIntMax -> [CIntMax] Source # enumFromThen :: CIntMax -> CIntMax -> [CIntMax] Source # enumFromTo :: CIntMax -> CIntMax -> [CIntMax] Source # enumFromThenTo :: CIntMax -> CIntMax -> CIntMax -> [CIntMax] Source #
Enum CUIntPtr # |
Methods succ :: CUIntPtr -> CUIntPtr Source # pred :: CUIntPtr -> CUIntPtr Source # toEnum :: Int -> CUIntPtr Source # fromEnum :: CUIntPtr -> Int Source # enumFrom :: CUIntPtr -> [CUIntPtr] Source # enumFromThen :: CUIntPtr -> CUIntPtr -> [CUIntPtr] Source # enumFromTo :: CUIntPtr -> CUIntPtr -> [CUIntPtr] Source # enumFromThenTo :: CUIntPtr -> CUIntPtr -> CUIntPtr -> [CUIntPtr] Source #
Enum CIntPtr # |
Methods succ :: CIntPtr -> CIntPtr Source # pred :: CIntPtr -> CIntPtr Source # toEnum :: Int -> CIntPtr Source # fromEnum :: CIntPtr -> Int Source # enumFrom :: CIntPtr -> [CIntPtr] Source # enumFromThen :: CIntPtr -> CIntPtr -> [CIntPtr] Source # enumFromTo :: CIntPtr -> CIntPtr -> [CIntPtr] Source # enumFromThenTo :: CIntPtr -> CIntPtr -> CIntPtr -> [CIntPtr] Source #
Enum CSUSeconds # |
Methods succ :: CSUSeconds -> CSUSeconds Source # pred :: CSUSeconds -> CSUSeconds Source # toEnum :: Int -> CSUSeconds Source # fromEnum :: CSUSeconds -> Int Source # enumFrom :: CSUSeconds -> [CSUSeconds] Source # enumFromThen :: CSUSeconds -> CSUSeconds -> [CSUSeconds] Source # enumFromTo :: CSUSeconds -> CSUSeconds -> [CSUSeconds] Source # enumFromThenTo :: CSUSeconds -> CSUSeconds -> CSUSeconds -> [CSUSeconds] Source #
Enum CUSeconds # |
Methods succ :: CUSeconds -> CUSeconds Source # pred :: CUSeconds -> CUSeconds Source # toEnum :: Int -> CUSeconds Source # fromEnum :: CUSeconds -> Int Source # enumFrom :: CUSeconds -> [CUSeconds] Source # enumFromThen :: CUSeconds -> CUSeconds -> [CUSeconds] Source # enumFromTo :: CUSeconds -> CUSeconds -> [CUSeconds] Source # enumFromThenTo :: CUSeconds -> CUSeconds -> CUSeconds -> [CUSeconds] Source #
Enum CTime # |
Methods succ :: CTime -> CTime Source # pred :: CTime -> CTime Source # toEnum :: Int -> CTime Source # fromEnum :: CTime -> Int Source # enumFrom :: CTime -> [CTime] Source # enumFromThen :: CTime -> CTime -> [CTime] Source # enumFromTo :: CTime -> CTime -> [CTime] Source # enumFromThenTo :: CTime -> CTime -> CTime -> [CTime] Source #
Enum CClock # |
Methods succ :: CClock -> CClock Source # pred :: CClock -> CClock Source # toEnum :: Int -> CClock Source # fromEnum :: CClock -> Int Source # enumFrom :: CClock -> [CClock] Source # enumFromThen :: CClock -> CClock -> [CClock] Source # enumFromTo :: CClock -> CClock -> [CClock] Source # enumFromThenTo :: CClock -> CClock -> CClock -> [CClock] Source #
Enum CSigAtomic # |
Methods succ :: CSigAtomic -> CSigAtomic Source # pred :: CSigAtomic -> CSigAtomic Source # toEnum :: Int -> CSigAtomic Source # fromEnum :: CSigAtomic -> Int Source # enumFrom :: CSigAtomic -> [CSigAtomic] Source # enumFromThen :: CSigAtomic -> CSigAtomic -> [CSigAtomic] Source # enumFromTo :: CSigAtomic -> CSigAtomic -> [CSigAtomic] Source # enumFromThenTo :: CSigAtomic -> CSigAtomic -> CSigAtomic -> [CSigAtomic] Source #
Enum CWchar # |
Methods succ :: CWchar -> CWchar Source # pred :: CWchar -> CWchar Source # toEnum :: Int -> CWchar Source # fromEnum :: CWchar -> Int Source # enumFrom :: CWchar -> [CWchar] Source # enumFromThen :: CWchar -> CWchar -> [CWchar] Source # enumFromTo :: CWchar -> CWchar -> [CWchar] Source # enumFromThenTo :: CWchar -> CWchar -> CWchar -> [CWchar] Source #
Enum CSize # |
Methods succ :: CSize -> CSize Source # pred :: CSize -> CSize Source # toEnum :: Int -> CSize Source # fromEnum :: CSize -> Int Source # enumFrom :: CSize -> [CSize] Source # enumFromThen :: CSize -> CSize -> [CSize] Source # enumFromTo :: CSize -> CSize -> [CSize] Source # enumFromThenTo :: CSize -> CSize -> CSize -> [CSize] Source #
Enum CPtrdiff # |
Methods succ :: CPtrdiff -> CPtrdiff Source # pred :: CPtrdiff -> CPtrdiff Source # toEnum :: Int -> CPtrdiff Source # fromEnum :: CPtrdiff -> Int Source # enumFrom :: CPtrdiff -> [CPtrdiff] Source # enumFromThen :: CPtrdiff -> CPtrdiff -> [CPtrdiff] Source # enumFromTo :: CPtrdiff -> CPtrdiff -> [CPtrdiff] Source # enumFromThenTo :: CPtrdiff -> CPtrdiff -> CPtrdiff -> [CPtrdiff] Source #
Enum CDouble # |
Methods succ :: CDouble -> CDouble Source # pred :: CDouble -> CDouble Source # toEnum :: Int -> CDouble Source # fromEnum :: CDouble -> Int Source # enumFrom :: CDouble -> [CDouble] Source # enumFromThen :: CDouble -> CDouble -> [CDouble] Source # enumFromTo :: CDouble -> CDouble -> [CDouble] Source # enumFromThenTo :: CDouble -> CDouble -> CDouble -> [CDouble] Source #
Enum CFloat # |
Methods succ :: CFloat -> CFloat Source # pred :: CFloat -> CFloat Source # toEnum :: Int -> CFloat Source # fromEnum :: CFloat -> Int Source # enumFrom :: CFloat -> [CFloat] Source # enumFromThen :: CFloat -> CFloat -> [CFloat] Source # enumFromTo :: CFloat -> CFloat -> [CFloat] Source # enumFromThenTo :: CFloat -> CFloat -> CFloat -> [CFloat] Source #
Enum CULLong # |
Methods succ :: CULLong -> CULLong Source # pred :: CULLong -> CULLong Source # toEnum :: Int -> CULLong Source # fromEnum :: CULLong -> Int Source # enumFrom :: CULLong -> [CULLong] Source # enumFromThen :: CULLong -> CULLong -> [CULLong] Source # enumFromTo :: CULLong -> CULLong -> [CULLong] Source # enumFromThenTo :: CULLong -> CULLong -> CULLong -> [CULLong] Source #
Enum CLLong # |
Methods succ :: CLLong -> CLLong Source # pred :: CLLong -> CLLong Source # toEnum :: Int -> CLLong Source # fromEnum :: CLLong -> Int Source # enumFrom :: CLLong -> [CLLong] Source # enumFromThen :: CLLong -> CLLong -> [CLLong] Source # enumFromTo :: CLLong -> CLLong -> [CLLong] Source # enumFromThenTo :: CLLong -> CLLong -> CLLong -> [CLLong] Source #
Enum CULong # |
Methods succ :: CULong -> CULong Source # pred :: CULong -> CULong Source # toEnum :: Int -> CULong Source # fromEnum :: CULong -> Int Source # enumFrom :: CULong -> [CULong] Source # enumFromThen :: CULong -> CULong -> [CULong] Source # enumFromTo :: CULong -> CULong -> [CULong] Source # enumFromThenTo :: CULong -> CULong -> CULong -> [CULong] Source #
Enum CLong # |
Methods succ :: CLong -> CLong Source # pred :: CLong -> CLong Source # toEnum :: Int -> CLong Source # fromEnum :: CLong -> Int Source # enumFrom :: CLong -> [CLong] Source # enumFromThen :: CLong -> CLong -> [CLong] Source # enumFromTo :: CLong -> CLong -> [CLong] Source # enumFromThenTo :: CLong -> CLong -> CLong -> [CLong] Source #
Enum CUInt # |
Methods succ :: CUInt -> CUInt Source # pred :: CUInt -> CUInt Source # toEnum :: Int -> CUInt Source # fromEnum :: CUInt -> Int Source # enumFrom :: CUInt -> [CUInt] Source # enumFromThen :: CUInt -> CUInt -> [CUInt] Source # enumFromTo :: CUInt -> CUInt -> [CUInt] Source # enumFromThenTo :: CUInt -> CUInt -> CUInt -> [CUInt] Source #
Enum CInt # |
Methods succ :: CInt -> CInt Source # pred :: CInt -> CInt Source # toEnum :: Int -> CInt Source # fromEnum :: CInt -> Int Source # enumFrom :: CInt -> [CInt] Source # enumFromThen :: CInt -> CInt -> [CInt] Source # enumFromTo :: CInt -> CInt -> [CInt] Source # enumFromThenTo :: CInt -> CInt -> CInt -> [CInt] Source #
Enum CUShort # |
Methods succ :: CUShort -> CUShort Source # pred :: CUShort -> CUShort Source # toEnum :: Int -> CUShort Source # fromEnum :: CUShort -> Int Source # enumFrom :: CUShort -> [CUShort] Source # enumFromThen :: CUShort -> CUShort -> [CUShort] Source # enumFromTo :: CUShort -> CUShort -> [CUShort] Source # enumFromThenTo :: CUShort -> CUShort -> CUShort -> [CUShort] Source #
Enum CShort # |
Methods succ :: CShort -> CShort Source # pred :: CShort -> CShort Source # toEnum :: Int -> CShort Source # fromEnum :: CShort -> Int Source # enumFrom :: CShort -> [CShort] Source # enumFromThen :: CShort -> CShort -> [CShort] Source # enumFromTo :: CShort -> CShort -> [CShort] Source # enumFromThenTo :: CShort -> CShort -> CShort -> [CShort] Source #
Enum CUChar # |
Methods succ :: CUChar -> CUChar Source # pred :: CUChar -> CUChar Source # toEnum :: Int -> CUChar Source # fromEnum :: CUChar -> Int Source # enumFrom :: CUChar -> [CUChar] Source # enumFromThen :: CUChar -> CUChar -> [CUChar] Source # enumFromTo :: CUChar -> CUChar -> [CUChar] Source # enumFromThenTo :: CUChar -> CUChar -> CUChar -> [CUChar] Source #
Enum CSChar # |
Methods succ :: CSChar -> CSChar Source # pred :: CSChar -> CSChar Source # toEnum :: Int -> CSChar Source # fromEnum :: CSChar -> Int Source # enumFrom :: CSChar -> [CSChar] Source # enumFromThen :: CSChar -> CSChar -> [CSChar] Source # enumFromTo :: CSChar -> CSChar -> [CSChar] Source # enumFromThenTo :: CSChar -> CSChar -> CSChar -> [CSChar] Source #
Enum CChar # |
Methods succ :: CChar -> CChar Source # pred :: CChar -> CChar Source # toEnum :: Int -> CChar Source # fromEnum :: CChar -> Int Source # enumFrom :: CChar -> [CChar] Source # enumFromThen :: CChar -> CChar -> [CChar] Source # enumFromTo :: CChar -> CChar -> [CChar] Source # enumFromThenTo :: CChar -> CChar -> CChar -> [CChar] Source #
Enum IntPtr # |
Methods succ :: IntPtr -> IntPtr Source # pred :: IntPtr -> IntPtr Source # toEnum :: Int -> IntPtr Source # fromEnum :: IntPtr -> Int Source # enumFrom :: IntPtr -> [IntPtr] Source # enumFromThen :: IntPtr -> IntPtr -> [IntPtr] Source # enumFromTo :: IntPtr -> IntPtr -> [IntPtr] Source # enumFromThenTo :: IntPtr -> IntPtr -> IntPtr -> [IntPtr] Source #
Enum WordPtr # |
Methods succ :: WordPtr -> WordPtr Source # pred :: WordPtr -> WordPtr Source # toEnum :: Int -> WordPtr Source # fromEnum :: WordPtr -> Int Source # enumFrom :: WordPtr -> [WordPtr] Source # enumFromThen :: WordPtr -> WordPtr -> [WordPtr] Source # enumFromTo :: WordPtr -> WordPtr -> [WordPtr] Source # enumFromThenTo :: WordPtr -> WordPtr -> WordPtr -> [WordPtr] Source #
Enum Fd # |
Methods succ :: Fd -> Fd Source # pred :: Fd -> Fd Source # toEnum :: Int -> Fd Source # fromEnum :: Fd -> Int Source # enumFrom :: Fd -> [Fd] Source # enumFromThen :: Fd -> Fd -> [Fd] Source # enumFromTo :: Fd -> Fd -> [Fd] Source # enumFromThenTo :: Fd -> Fd -> Fd -> [Fd] Source #
Enum CRLim # |
Methods succ :: CRLim -> CRLim Source # pred :: CRLim -> CRLim Source # toEnum :: Int -> CRLim Source # fromEnum :: CRLim -> Int Source # enumFrom :: CRLim -> [CRLim] Source # enumFromThen :: CRLim -> CRLim -> [CRLim] Source # enumFromTo :: CRLim -> CRLim -> [CRLim] Source # enumFromThenTo :: CRLim -> CRLim -> CRLim -> [CRLim] Source #
Enum CTcflag # |
Methods succ :: CTcflag -> CTcflag Source # pred :: CTcflag -> CTcflag Source # toEnum :: Int -> CTcflag Source # fromEnum :: CTcflag -> Int Source # enumFrom :: CTcflag -> [CTcflag] Source # enumFromThen :: CTcflag -> CTcflag -> [CTcflag] Source # enumFromTo :: CTcflag -> CTcflag -> [CTcflag] Source # enumFromThenTo :: CTcflag -> CTcflag -> CTcflag -> [CTcflag] Source #
Enum CSpeed # |
Methods succ :: CSpeed -> CSpeed Source # pred :: CSpeed -> CSpeed Source # toEnum :: Int -> CSpeed Source # fromEnum :: CSpeed -> Int Source # enumFrom :: CSpeed -> [CSpeed] Source # enumFromThen :: CSpeed -> CSpeed -> [CSpeed] Source # enumFromTo :: CSpeed -> CSpeed -> [CSpeed] Source # enumFromThenTo :: CSpeed -> CSpeed -> CSpeed -> [CSpeed] Source #
Enum CCc # |
Methods succ :: CCc -> CCc Source # pred :: CCc -> CCc Source # toEnum :: Int -> CCc Source # fromEnum :: CCc -> Int Source # enumFrom :: CCc -> [CCc] Source # enumFromThen :: CCc -> CCc -> [CCc] Source # enumFromTo :: CCc -> CCc -> [CCc] Source # enumFromThenTo :: CCc -> CCc -> CCc -> [CCc] Source #
Enum CUid # |
Methods succ :: CUid -> CUid Source # pred :: CUid -> CUid Source # toEnum :: Int -> CUid Source # fromEnum :: CUid -> Int Source # enumFrom :: CUid -> [CUid] Source # enumFromThen :: CUid -> CUid -> [CUid] Source # enumFromTo :: CUid -> CUid -> [CUid] Source # enumFromThenTo :: CUid -> CUid -> CUid -> [CUid] Source #
Enum CNlink # |
Methods succ :: CNlink -> CNlink Source # pred :: CNlink -> CNlink Source # toEnum :: Int -> CNlink Source # fromEnum :: CNlink -> Int Source # enumFrom :: CNlink -> [CNlink] Source # enumFromThen :: CNlink -> CNlink -> [CNlink] Source # enumFromTo :: CNlink -> CNlink -> [CNlink] Source # enumFromThenTo :: CNlink -> CNlink -> CNlink -> [CNlink] Source #
Enum CGid # |
Methods succ :: CGid -> CGid Source # pred :: CGid -> CGid Source # toEnum :: Int -> CGid Source # fromEnum :: CGid -> Int Source # enumFrom :: CGid -> [CGid] Source # enumFromThen :: CGid -> CGid -> [CGid] Source # enumFromTo :: CGid -> CGid -> [CGid] Source # enumFromThenTo :: CGid -> CGid -> CGid -> [CGid] Source #
Enum CSsize # |
Methods succ :: CSsize -> CSsize Source # pred :: CSsize -> CSsize Source # toEnum :: Int -> CSsize Source # fromEnum :: CSsize -> Int Source # enumFrom :: CSsize -> [CSsize] Source # enumFromThen :: CSsize -> CSsize -> [CSsize] Source # enumFromTo :: CSsize -> CSsize -> [CSsize] Source # enumFromThenTo :: CSsize -> CSsize -> CSsize -> [CSsize] Source #
Enum CPid # |
Methods succ :: CPid -> CPid Source # pred :: CPid -> CPid Source # toEnum :: Int -> CPid Source # fromEnum :: CPid -> Int Source # enumFrom :: CPid -> [CPid] Source # enumFromThen :: CPid -> CPid -> [CPid] Source # enumFromTo :: CPid -> CPid -> [CPid] Source # enumFromThenTo :: CPid -> CPid -> CPid -> [CPid] Source #
Enum COff # |
Methods succ :: COff -> COff Source # pred :: COff -> COff Source # toEnum :: Int -> COff Source # fromEnum :: COff -> Int Source # enumFrom :: COff -> [COff] Source # enumFromThen :: COff -> COff -> [COff] Source # enumFromTo :: COff -> COff -> [COff] Source # enumFromThenTo :: COff -> COff -> COff -> [COff] Source #
Enum CMode # |
Methods succ :: CMode -> CMode Source # pred :: CMode -> CMode Source # toEnum :: Int -> CMode Source # fromEnum :: CMode -> Int Source # enumFrom :: CMode -> [CMode] Source # enumFromThen :: CMode -> CMode -> [CMode] Source # enumFromTo :: CMode -> CMode -> [CMode] Source # enumFromThenTo :: CMode -> CMode -> CMode -> [CMode] Source #
Enum CIno # |
Methods succ :: CIno -> CIno Source # pred :: CIno -> CIno Source # toEnum :: Int -> CIno Source # fromEnum :: CIno -> Int Source # enumFrom :: CIno -> [CIno] Source # enumFromThen :: CIno -> CIno -> [CIno] Source # enumFromTo :: CIno -> CIno -> [CIno] Source # enumFromThenTo :: CIno -> CIno -> CIno -> [CIno] Source #
Enum CDev # |
Methods succ :: CDev -> CDev Source # pred :: CDev -> CDev Source # toEnum :: Int -> CDev Source # fromEnum :: CDev -> Int Source # enumFrom :: CDev -> [CDev] Source # enumFromThen :: CDev -> CDev -> [CDev] Source # enumFromTo :: CDev -> CDev -> [CDev] Source # enumFromThenTo :: CDev -> CDev -> CDev -> [CDev] Source #
Enum Natural # |
Methods succ :: Natural -> Natural Source # pred :: Natural -> Natural Source # toEnum :: Int -> Natural Source # fromEnum :: Natural -> Int Source # enumFrom :: Natural -> [Natural] Source # enumFromThen :: Natural -> Natural -> [Natural] Source # enumFromTo :: Natural -> Natural -> [Natural] Source # enumFromThenTo :: Natural -> Natural -> Natural -> [Natural] Source #
Enum DoTrace # |
Methods succ :: DoTrace -> DoTrace Source # pred :: DoTrace -> DoTrace Source # toEnum :: Int -> DoTrace Source # fromEnum :: DoTrace -> Int Source # enumFrom :: DoTrace -> [DoTrace] Source # enumFromThen :: DoTrace -> DoTrace -> [DoTrace] Source # enumFromTo :: DoTrace -> DoTrace -> [DoTrace] Source # enumFromThenTo :: DoTrace -> DoTrace -> DoTrace -> [DoTrace] Source #
Enum DoHeapProfile # |
Methods succ :: DoHeapProfile -> DoHeapProfile Source # pred :: DoHeapProfile -> DoHeapProfile Source # toEnum :: Int -> DoHeapProfile Source # fromEnum :: DoHeapProfile -> Int Source # enumFrom :: DoHeapProfile -> [DoHeapProfile] Source # enumFromThen :: DoHeapProfile -> DoHeapProfile -> [DoHeapProfile] Source # enumFromTo :: DoHeapProfile -> DoHeapProfile -> [DoHeapProfile] Source # enumFromThenTo :: DoHeapProfile -> DoHeapProfile -> DoHeapProfile -> [DoHeapProfile] Source #
Enum DoCostCentres # |
Methods succ :: DoCostCentres -> DoCostCentres Source # pred :: DoCostCentres -> DoCostCentres Source # toEnum :: Int -> DoCostCentres Source # fromEnum :: DoCostCentres -> Int Source # enumFrom :: DoCostCentres -> [DoCostCentres] Source # enumFromThen :: DoCostCentres -> DoCostCentres -> [DoCostCentres] Source # enumFromTo :: DoCostCentres -> DoCostCentres -> [DoCostCentres] Source # enumFromThenTo :: DoCostCentres -> DoCostCentres -> DoCostCentres -> [DoCostCentres] Source #
Enum GiveGCStats # |
Methods succ :: GiveGCStats -> GiveGCStats Source # pred :: GiveGCStats -> GiveGCStats Source # toEnum :: Int -> GiveGCStats Source # fromEnum :: GiveGCStats -> Int Source # enumFrom :: GiveGCStats -> [GiveGCStats] Source # enumFromThen :: GiveGCStats -> GiveGCStats -> [GiveGCStats] Source # enumFromTo :: GiveGCStats -> GiveGCStats -> [GiveGCStats] Source # enumFromThenTo :: GiveGCStats -> GiveGCStats -> GiveGCStats -> [GiveGCStats] Source #
Integral a => Enum (Ratio a) # |
Methods succ :: Ratio a -> Ratio a Source # pred :: Ratio a -> Ratio a Source # toEnum :: Int -> Ratio a Source # fromEnum :: Ratio a -> Int Source # enumFrom :: Ratio a -> [Ratio a] Source # enumFromThen :: Ratio a -> Ratio a -> [Ratio a] Source # enumFromTo :: Ratio a -> Ratio a -> [Ratio a] Source # enumFromThenTo :: Ratio a -> Ratio a -> Ratio a -> [Ratio a] Source #
Enum (Fixed a) # |
Methods succ :: Fixed a -> Fixed a Source # pred :: Fixed a -> Fixed a Source # toEnum :: Int -> Fixed a Source # fromEnum :: Fixed a -> Int Source # enumFrom :: Fixed a -> [Fixed a] Source # enumFromThen :: Fixed a -> Fixed a -> [Fixed a] Source # enumFromTo :: Fixed a -> Fixed a -> [Fixed a] Source # enumFromThenTo :: Fixed a -> Fixed a -> Fixed a -> [Fixed a] Source #
Enum a => Enum (WrappedMonoid a) # |
Methods succ :: WrappedMonoid a -> WrappedMonoid a Source # pred :: WrappedMonoid a -> WrappedMonoid a Source # toEnum :: Int -> WrappedMonoid a Source # fromEnum :: WrappedMonoid a -> Int Source # enumFrom :: WrappedMonoid a -> [WrappedMonoid a] Source # enumFromThen :: WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] Source # enumFromTo :: WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] Source # enumFromThenTo :: WrappedMonoid a -> WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] Source #
Enum a => Enum (Last a) # |
Methods succ :: Last a -> Last a Source # pred :: Last a -> Last a Source # toEnum :: Int -> Last a Source # fromEnum :: Last a -> Int Source # enumFrom :: Last a -> [Last a] Source # enumFromThen :: Last a -> Last a -> [Last a] Source # enumFromTo :: Last a -> Last a -> [Last a] Source # enumFromThenTo :: Last a -> Last a -> Last a -> [Last a] Source #
Enum a => Enum (First a) # |
Methods succ :: First a -> First a Source # pred :: First a -> First a Source # toEnum :: Int -> First a Source # fromEnum :: First a -> Int Source # enumFrom :: First a -> [First a] Source # enumFromThen :: First a -> First a -> [First a] Source # enumFromTo :: First a -> First a -> [First a] Source # enumFromThenTo :: First a -> First a -> First a -> [First a] Source #
Enum a => Enum (Max a) # |
Methods succ :: Max a -> Max a Source # pred :: Max a -> Max a Source # toEnum :: Int -> Max a Source # fromEnum :: Max a -> Int Source # enumFrom :: Max a -> [Max a] Source # enumFromThen :: Max a -> Max a -> [Max a] Source # enumFromTo :: Max a -> Max a -> [Max a] Source # enumFromThenTo :: Max a -> Max a -> Max a -> [Max a] Source #
Enum a => Enum (Min a) # |
Methods succ :: Min a -> Min a Source # pred :: Min a -> Min a Source # toEnum :: Int -> Min a Source # fromEnum :: Min a -> Int Source # enumFrom :: Min a -> [Min a] Source # enumFromThen :: Min a -> Min a -> [Min a] Source # enumFromTo :: Min a -> Min a -> [Min a] Source # enumFromThenTo :: Min a -> Min a -> Min a -> [Min a] Source #
Enum a => Enum (Identity a) # |
Methods succ :: Identity a -> Identity a Source # pred :: Identity a -> Identity a Source # toEnum :: Int -> Identity a Source # fromEnum :: Identity a -> Int Source # enumFrom :: Identity a -> [Identity a] Source # enumFromThen :: Identity a -> Identity a -> [Identity a] Source # enumFromTo :: Identity a -> Identity a -> [Identity a] Source # enumFromThenTo :: Identity a -> Identity a -> Identity a -> [Identity a] Source #
Enum (Proxy k s) # |
Methods succ :: Proxy k s -> Proxy k s Source # pred :: Proxy k s -> Proxy k s Source # toEnum :: Int -> Proxy k s Source # fromEnum :: Proxy k s -> Int Source # enumFrom :: Proxy k s -> [Proxy k s] Source # enumFromThen :: Proxy k s -> Proxy k s -> [Proxy k s] Source # enumFromTo :: Proxy k s -> Proxy k s -> [Proxy k s] Source # enumFromThenTo :: Proxy k s -> Proxy k s -> Proxy k s -> [Proxy k s] Source #
(~) k a b => Enum ((:~:) k a b) # |
Methods succ :: (k :~: a) b -> (k :~: a) b Source # pred :: (k :~: a) b -> (k :~: a) b Source # toEnum :: Int -> (k :~: a) b Source # fromEnum :: (k :~: a) b -> Int Source # enumFrom :: (k :~: a) b -> [(k :~: a) b] Source # enumFromThen :: (k :~: a) b -> (k :~: a) b -> [(k :~: a) b] Source # enumFromTo :: (k :~: a) b -> (k :~: a) b -> [(k :~: a) b] Source # enumFromThenTo :: (k :~: a) b -> (k :~: a) b -> (k :~: a) b -> [(k :~: a) b] Source #
Coercible k a b => Enum (Coercion k a b) # |
Methods succ :: Coercion k a b -> Coercion k a b Source # pred :: Coercion k a b -> Coercion k a b Source # toEnum :: Int -> Coercion k a b Source # fromEnum :: Coercion k a b -> Int Source # enumFrom :: Coercion k a b -> [Coercion k a b] Source # enumFromThen :: Coercion k a b -> Coercion k a b -> [Coercion k a b] Source # enumFromTo :: Coercion k a b -> Coercion k a b -> [Coercion k a b] Source # enumFromThenTo :: Coercion k a b -> Coercion k a b -> Coercion k a b -> [Coercion k a b] Source #
Enum (f a) => Enum (Alt k f a) # |
Methods succ :: Alt k f a -> Alt k f a Source # pred :: Alt k f a -> Alt k f a Source # toEnum :: Int -> Alt k f a Source # fromEnum :: Alt k f a -> Int Source # enumFrom :: Alt k f a -> [Alt k f a] Source # enumFromThen :: Alt k f a -> Alt k f a -> [Alt k f a] Source # enumFromTo :: Alt k f a -> Alt k f a -> [Alt k f a] Source # enumFromThenTo :: Alt k f a -> Alt k f a -> Alt k f a -> [Alt k f a] Source #
Enum a => Enum (Const k a b) # |
Methods succ :: Const k a b -> Const k a b Source # pred :: Const k a b -> Const k a b Source # toEnum :: Int -> Const k a b Source # fromEnum :: Const k a b -> Int Source # enumFrom :: Const k a b -> [Const k a b] Source # enumFromThen :: Const k a b -> Const k a b -> [Const k a b] Source # enumFromTo :: Const k a b -> Const k a b -> [Const k a b] Source # enumFromThenTo :: Const k a b -> Const k a b -> Const k a b -> [Const k a b] Source #

class Bounded a where Source #

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

Instances

Bounded Bool # |
Methods minBound :: Bool Source # maxBound :: Bool Source #
Bounded Char # |
Methods minBound :: Char Source # maxBound :: Char Source #
Bounded Int # |
Methods minBound :: Int Source # maxBound :: Int Source #
Bounded Int8 # |
Methods minBound :: Int8 Source # maxBound :: Int8 Source #
Bounded Int16 # |
Methods minBound :: Int16 Source # maxBound :: Int16 Source #
Bounded Int32 # |
Methods minBound :: Int32 Source # maxBound :: Int32 Source #
Bounded Int64 # |
Methods minBound :: Int64 Source # maxBound :: Int64 Source #
Bounded Ordering # |
Methods minBound :: Ordering Source # maxBound :: Ordering Source #
Bounded Word # |
Methods minBound :: Word Source # maxBound :: Word Source #
Bounded Word8 # |
Methods minBound :: Word8 Source # maxBound :: Word8 Source #
Bounded Word16 # |
Methods minBound :: Word16 Source # maxBound :: Word16 Source #
Bounded Word32 # |
Methods minBound :: Word32 Source # maxBound :: Word32 Source #
Bounded Word64 # |
Methods minBound :: Word64 Source # maxBound :: Word64 Source #
Bounded () # |
Methods minBound :: () Source # maxBound :: () Source #
Bounded GeneralCategory # |
Methods minBound :: GeneralCategory Source # maxBound :: GeneralCategory Source #
Bounded DecidedStrictness # |
Methods minBound :: DecidedStrictness Source # maxBound :: DecidedStrictness Source #
Bounded SourceStrictness # |
Methods minBound :: SourceStrictness Source # maxBound :: SourceStrictness Source #
Bounded SourceUnpackedness # |
Methods minBound :: SourceUnpackedness Source # maxBound :: SourceUnpackedness Source #
Bounded Associativity # |
Methods minBound :: Associativity Source # maxBound :: Associativity Source #
Bounded Any # |
Methods minBound :: Any Source # maxBound :: Any Source #
Bounded All # |
Methods minBound :: All Source # maxBound :: All Source #
Bounded CUIntMax # |
Methods minBound :: CUIntMax Source # maxBound :: CUIntMax Source #
Bounded CIntMax # |
Methods minBound :: CIntMax Source # maxBound :: CIntMax Source #
Bounded CUIntPtr # |
Methods minBound :: CUIntPtr Source # maxBound :: CUIntPtr Source #
Bounded CIntPtr # |
Methods minBound :: CIntPtr Source # maxBound :: CIntPtr Source #
Bounded CSigAtomic # |
Methods minBound :: CSigAtomic Source # maxBound :: CSigAtomic Source #
Bounded CWchar # |
Methods minBound :: CWchar Source # maxBound :: CWchar Source #
Bounded CSize # |
Methods minBound :: CSize Source # maxBound :: CSize Source #
Bounded CPtrdiff # |
Methods minBound :: CPtrdiff Source # maxBound :: CPtrdiff Source #
Bounded CULLong # |
Methods minBound :: CULLong Source # maxBound :: CULLong Source #
Bounded CLLong # |
Methods minBound :: CLLong Source # maxBound :: CLLong Source #
Bounded CULong # |
Methods minBound :: CULong Source # maxBound :: CULong Source #
Bounded CLong # |
Methods minBound :: CLong Source # maxBound :: CLong Source #
Bounded CUInt # |
Methods minBound :: CUInt Source # maxBound :: CUInt Source #
Bounded CInt # |
Methods minBound :: CInt Source # maxBound :: CInt Source #
Bounded CUShort # |
Methods minBound :: CUShort Source # maxBound :: CUShort Source #
Bounded CShort # |
Methods minBound :: CShort Source # maxBound :: CShort Source #
Bounded CUChar # |
Methods minBound :: CUChar Source # maxBound :: CUChar Source #
Bounded CSChar # |
Methods minBound :: CSChar Source # maxBound :: CSChar Source #
Bounded CChar # |
Methods minBound :: CChar Source # maxBound :: CChar Source #
Bounded IntPtr # |
Methods minBound :: IntPtr Source # maxBound :: IntPtr Source #
Bounded WordPtr # |
Methods minBound :: WordPtr Source # maxBound :: WordPtr Source #
Bounded Fd # |
Methods minBound :: Fd Source # maxBound :: Fd Source #
Bounded CRLim # |
Methods minBound :: CRLim Source # maxBound :: CRLim Source #
Bounded CTcflag # |
Methods minBound :: CTcflag Source # maxBound :: CTcflag Source #
Bounded CUid # |
Methods minBound :: CUid Source # maxBound :: CUid Source #
Bounded CNlink # |
Methods minBound :: CNlink Source # maxBound :: CNlink Source #
Bounded CGid # |
Methods minBound :: CGid Source # maxBound :: CGid Source #
Bounded CSsize # |
Methods minBound :: CSsize Source # maxBound :: CSsize Source #
Bounded CPid # |
Methods minBound :: CPid Source # maxBound :: CPid Source #
Bounded COff # |
Methods minBound :: COff Source # maxBound :: COff Source #
Bounded CMode # |
Methods minBound :: CMode Source # maxBound :: CMode Source #
Bounded CIno # |
Methods minBound :: CIno Source # maxBound :: CIno Source #
Bounded CDev # |
Methods minBound :: CDev Source # maxBound :: CDev Source #
Bounded a => Bounded (Product a) # |
Methods minBound :: Product a Source # maxBound :: Product a Source #
Bounded a => Bounded (Sum a) # |
Methods minBound :: Sum a Source # maxBound :: Sum a Source #
Bounded a => Bounded (Dual a) # |
Methods minBound :: Dual a Source # maxBound :: Dual a Source #
Bounded a => Bounded (WrappedMonoid a) # |
Methods minBound :: WrappedMonoid a Source # maxBound :: WrappedMonoid a Source #
Bounded a => Bounded (Last a) # |
Methods minBound :: Last a Source # maxBound :: Last a Source #
Bounded a => Bounded (First a) # |
Methods minBound :: First a Source # maxBound :: First a Source #
Bounded a => Bounded (Max a) # |
Methods minBound :: Max a Source # maxBound :: Max a Source #
Bounded a => Bounded (Min a) # |
Methods minBound :: Min a Source # maxBound :: Min a Source #
Bounded a => Bounded (Identity a) # |
Methods minBound :: Identity a Source # maxBound :: Identity a Source #
(Bounded a, Bounded b) => Bounded (a, b) # |
Methods minBound :: (a, b) Source # maxBound :: (a, b) Source #
Bounded (Proxy k s) # |
Methods minBound :: Proxy k s Source # maxBound :: Proxy k s Source #
(Bounded a, Bounded b, Bounded c) => Bounded (a, b, c) # |
Methods minBound :: (a, b, c) Source # maxBound :: (a, b, c) Source #
(~) k a b => Bounded ((:~:) k a b) # |
Methods minBound :: (k :~: a) b Source # maxBound :: (k :~: a) b Source #
Coercible k a b => Bounded (Coercion k a b) # |
Methods minBound :: Coercion k a b Source # maxBound :: Coercion k a b Source #
Bounded a => Bounded (Const k a b) # |
Methods minBound :: Const k a b Source # maxBound :: Const k a b Source #
(Bounded a, Bounded b, Bounded c, Bounded d) => Bounded (a, b, c, d) # |
Methods minBound :: (a, b, c, d) Source # maxBound :: (a, b, c, d) Source #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e) => Bounded (a, b, c, d, e) # |
Methods minBound :: (a, b, c, d, e) Source # maxBound :: (a, b, c, d, e) Source #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f) => Bounded (a, b, c, d, e, f) # |
Methods minBound :: (a, b, c, d, e, f) Source # maxBound :: (a, b, c, d, e, f) Source #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g) => Bounded (a, b, c, d, e, f, g) # |
Methods minBound :: (a, b, c, d, e, f, g) Source # maxBound :: (a, b, c, d, e, f, g) Source #
(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) # |
Methods minBound :: (a, b, c, d, e, f, g, h) Source # maxBound :: (a, b, c, d, e, f, g, h) Source #
(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) # |
Methods minBound :: (a, b, c, d, e, f, g, h, i) Source # maxBound :: (a, b, c, d, e, f, g, h, i) Source #
(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) # |
Methods minBound :: (a, b, c, d, e, f, g, h, i, j) Source # maxBound :: (a, b, c, d, e, f, g, h, i, j) Source #
(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) # |
Methods minBound :: (a, b, c, d, e, f, g, h, i, j, k) Source # maxBound :: (a, b, c, d, e, f, g, h, i, j, k) Source #
(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) # |
Methods minBound :: (a, b, c, d, e, f, g, h, i, j, k, l) Source # maxBound :: (a, b, c, d, e, f, g, h, i, j, k, l) Source #
(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) # |
Methods minBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m) Source # maxBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m) Source #
(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) # |
Methods minBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source # maxBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source #
(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) # |
Methods minBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source # maxBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source #

## 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 # |
Methods minBound :: Int Source # maxBound :: Int Source #
Enum Int # |
Methods succ :: Int -> Int Source # pred :: Int -> Int Source # toEnum :: Int -> Int Source # fromEnum :: Int -> Int Source # enumFrom :: Int -> [Int] Source # enumFromThen :: Int -> Int -> [Int] Source # enumFromTo :: Int -> Int -> [Int] Source # enumFromThenTo :: Int -> Int -> Int -> [Int] Source #
Eq Int |
Methods (==) :: Int -> Int -> Bool Source # (/=) :: Int -> Int -> Bool Source #
Integral Int # |
Methods quot :: Int -> Int -> Int Source # rem :: Int -> Int -> Int Source # div :: Int -> Int -> Int Source # mod :: Int -> Int -> Int Source # quotRem :: Int -> Int -> (Int, Int) Source # divMod :: Int -> Int -> (Int, Int) Source # toInteger :: Int -> Integer Source #
Data Int # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int -> c Int Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int Source # toConstr :: Int -> Constr Source # dataTypeOf :: Int -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Int) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int) Source # gmapT :: (forall b. Data b => b -> b) -> Int -> Int Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Int -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Int -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int -> m Int Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int -> m Int Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int -> m Int Source #
Num Int # |
Methods (+) :: Int -> Int -> Int Source # (-) :: Int -> Int -> Int Source # (*) :: Int -> Int -> Int Source # negate :: Int -> Int Source # abs :: Int -> Int Source # signum :: Int -> Int Source # fromInteger :: Integer -> Int 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 #
Read Int # |
Methods readsPrec :: Int -> ReadS Int Source # readList :: ReadS [Int] Source # readPrec :: ReadPrec Int Source # readListPrec :: ReadPrec [Int] Source #
Real Int # |
Methods toRational :: Int -> Rational Source #
Show Int # |
Methods showsPrec :: Int -> Int -> ShowS Source # show :: Int -> String Source # showList :: [Int] -> ShowS Source #
Ix Int # |
Methods range :: (Int, Int) -> [Int] Source # index :: (Int, Int) -> Int -> Int Source # unsafeIndex :: (Int, Int) -> Int -> Int inRange :: (Int, Int) -> Int -> Bool Source # rangeSize :: (Int, Int) -> Int Source # unsafeRangeSize :: (Int, Int) -> Int
FiniteBits Int # |
Methods finiteBitSize :: Int -> Int Source # countLeadingZeros :: Int -> Int Source # countTrailingZeros :: Int -> Int Source #
Bits Int # |
Methods (.&.) :: Int -> Int -> Int Source # (.|.) :: Int -> Int -> Int Source # xor :: Int -> Int -> Int Source # complement :: Int -> Int Source # shift :: Int -> Int -> Int Source # rotate :: Int -> Int -> Int Source # zeroBits :: Int Source # bit :: Int -> Int Source # setBit :: Int -> Int -> Int Source # clearBit :: Int -> Int -> Int Source # complementBit :: Int -> Int -> Int Source # testBit :: Int -> Int -> Bool Source # bitSizeMaybe :: Int -> Maybe Int Source # bitSize :: Int -> Int Source # isSigned :: Int -> Bool Source # shiftL :: Int -> Int -> Int Source # unsafeShiftL :: Int -> Int -> Int Source # shiftR :: Int -> Int -> Int Source # unsafeShiftR :: Int -> Int -> Int Source # rotateL :: Int -> Int -> Int Source # rotateR :: Int -> Int -> Int Source # popCount :: Int -> Int Source #
Storable Int # |
Methods sizeOf :: Int -> Int Source # alignment :: Int -> Int Source # peekElemOff :: Ptr Int -> Int -> IO Int Source # pokeElemOff :: Ptr Int -> Int -> Int -> IO () Source # peekByteOff :: Ptr b -> Int -> IO Int Source # pokeByteOff :: Ptr b -> Int -> Int -> IO () Source # peek :: Ptr Int -> IO Int Source # poke :: Ptr Int -> Int -> IO () Source #
PrintfArg Int # |
Methods formatArg :: Int -> FieldFormatter Source # parseFormat :: Int -> ModifierParser Source #
Functor (URec Int) # |
Methods fmap :: (a -> b) -> URec Int a -> URec Int b Source # (<$) :: a -> URec Int b -> URec Int a Source #
Foldable (URec Int) # |
Methods fold :: Monoid m => URec Int m -> m Source # foldMap :: Monoid m => (a -> m) -> URec Int a -> m Source # foldr :: (a -> b -> b) -> b -> URec Int a -> b Source # foldr' :: (a -> b -> b) -> b -> URec Int a -> b Source # foldl :: (b -> a -> b) -> b -> URec Int a -> b Source # foldl' :: (b -> a -> b) -> b -> URec Int a -> b Source # foldr1 :: (a -> a -> a) -> URec Int a -> a Source # foldl1 :: (a -> a -> a) -> URec Int a -> a Source # toList :: URec Int a -> [a] Source # null :: URec Int a -> Bool Source # length :: URec Int a -> Int Source # elem :: Eq a => a -> URec Int a -> Bool Source # maximum :: Ord a => URec Int a -> a Source # minimum :: Ord a => URec Int a -> a Source # sum :: Num a => URec Int a -> a Source # product :: Num a => URec Int a -> a Source #
Traversable (URec Int) # |
Methods traverse :: Applicative f => (a -> f b) -> URec Int a -> f (URec Int b) Source # sequenceA :: Applicative f => URec Int (f a) -> f (URec Int a) Source # mapM :: Monad m => (a -> m b) -> URec Int a -> m (URec Int b) Source # sequence :: Monad m => URec Int (m a) -> m (URec Int a) Source #
Generic1 (URec Int) # |
Associated Types type Rep1 (URec Int :: * -> *) :: * -> * Source # Methods from1 :: URec Int a -> Rep1 (URec Int) a Source # to1 :: Rep1 (URec Int) a -> URec Int a Source #
Eq (URec Int p) # |
Methods (==) :: URec Int p -> URec Int p -> Bool Source # (/=) :: URec Int p -> URec Int p -> Bool Source #
Ord (URec Int p) # |
Methods compare :: URec Int p -> URec Int p -> Ordering Source # (<) :: URec Int p -> URec Int p -> Bool Source # (<=) :: URec Int p -> URec Int p -> Bool Source # (>) :: URec Int p -> URec Int p -> Bool Source # (>=) :: URec Int p -> URec Int p -> Bool Source # max :: URec Int p -> URec Int p -> URec Int p Source # min :: URec Int p -> URec Int p -> URec Int p Source #
Show (URec Int p) # |
Methods showsPrec :: Int -> URec Int p -> ShowS Source # show :: URec Int p -> String Source # showList :: [URec Int p] -> ShowS Source #
Generic (URec Int p) # |
Associated Types type Rep (URec Int p) :: * -> * Source # Methods from :: URec Int p -> Rep (URec Int p) x Source # to :: Rep (URec Int p) x -> URec Int p Source #
data URec Int # | Used for marking occurrences of `Int#`
data URec Int = UInt { uInt# :: Int# }
type Rep1 (URec Int) # |
type Rep1 (URec Int) = D1 (MetaData "URec" "GHC.Generics" "base" False) (C1 (MetaCons "UInt" PrefixI True) (S1 (MetaSel (Just Symbol "uInt#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) UInt))
type Rep (URec Int p) # |
type Rep (URec 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 # |
Methods succ :: Integer -> Integer Source # pred :: Integer -> Integer Source # toEnum :: Int -> Integer Source # fromEnum :: Integer -> Int Source # enumFrom :: Integer -> [Integer] Source # enumFromThen :: Integer -> Integer -> [Integer] Source # enumFromTo :: Integer -> Integer -> [Integer] Source # enumFromThenTo :: Integer -> Integer -> Integer -> [Integer] Source #
Eq Integer |
Methods (==) :: Integer -> Integer -> Bool Source # (/=) :: Integer -> Integer -> Bool Source #
Integral Integer # |
Methods quot :: Integer -> Integer -> Integer Source # rem :: Integer -> Integer -> Integer Source # div :: Integer -> Integer -> Integer Source # mod :: Integer -> Integer -> Integer Source # quotRem :: Integer -> Integer -> (Integer, Integer) Source # divMod :: Integer -> Integer -> (Integer, Integer) Source # toInteger :: Integer -> Integer Source #
Data Integer # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Integer -> c Integer Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Integer Source # toConstr :: Integer -> Constr Source # dataTypeOf :: Integer -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Integer) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Integer) Source # gmapT :: (forall b. Data b => b -> b) -> Integer -> Integer Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Integer -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Integer -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Integer -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Integer -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Integer -> m Integer Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Integer -> m Integer Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Integer -> m Integer Source #
Num Integer # |
Methods (+) :: Integer -> Integer -> Integer Source # (-) :: Integer -> Integer -> Integer Source # (*) :: Integer -> Integer -> Integer Source # negate :: Integer -> Integer Source # abs :: Integer -> Integer Source # signum :: Integer -> Integer Source # fromInteger :: Integer -> Integer 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 #
Read Integer # |
Methods readsPrec :: Int -> ReadS Integer Source # readList :: ReadS [Integer] Source # readPrec :: ReadPrec Integer Source # readListPrec :: ReadPrec [Integer] Source #
Real Integer # |
Methods toRational :: Integer -> Rational Source #
Show Integer # |
Methods showsPrec :: Int -> Integer -> ShowS Source # show :: Integer -> String Source # showList :: [Integer] -> ShowS Source #
Ix Integer # |
Methods range :: (Integer, Integer) -> [Integer] Source # index :: (Integer, Integer) -> Integer -> Int Source # unsafeIndex :: (Integer, Integer) -> Integer -> Int inRange :: (Integer, Integer) -> Integer -> Bool Source # rangeSize :: (Integer, Integer) -> Int Source # unsafeRangeSize :: (Integer, Integer) -> Int
Bits Integer # |
Methods (.&.) :: Integer -> Integer -> Integer Source # (.|.) :: Integer -> Integer -> Integer Source # xor :: Integer -> Integer -> Integer Source # complement :: Integer -> Integer Source # shift :: Integer -> Int -> Integer Source # rotate :: Integer -> Int -> Integer Source # zeroBits :: Integer Source # bit :: Int -> Integer Source # setBit :: Integer -> Int -> Integer Source # clearBit :: Integer -> Int -> Integer Source # complementBit :: Integer -> Int -> Integer Source # testBit :: Integer -> Int -> Bool Source # bitSizeMaybe :: Integer -> Maybe Int Source # bitSize :: Integer -> Int Source # isSigned :: Integer -> Bool Source # shiftL :: Integer -> Int -> Integer Source # unsafeShiftL :: Integer -> Int -> Integer Source # shiftR :: Integer -> Int -> Integer Source # unsafeShiftR :: Integer -> Int -> Integer Source # rotateL :: Integer -> Int -> Integer Source # rotateR :: Integer -> Int -> Integer Source # popCount :: Integer -> Int Source #
PrintfArg Integer # |
Methods formatArg :: Integer -> FieldFormatter Source # parseFormat :: Integer -> ModifierParser Source #

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 # |
Methods pi :: Float Source # exp :: Float -> Float Source # log :: Float -> Float Source # sqrt :: Float -> Float Source # (**) :: Float -> Float -> Float Source # logBase :: Float -> Float -> Float Source # sin :: Float -> Float Source # cos :: Float -> Float Source # tan :: Float -> Float Source # asin :: Float -> Float Source # acos :: Float -> Float Source # atan :: Float -> Float Source # sinh :: Float -> Float Source # cosh :: Float -> Float Source # tanh :: Float -> Float Source # asinh :: Float -> Float Source # acosh :: Float -> Float Source # atanh :: Float -> Float Source # log1p :: Float -> Float Source # expm1 :: Float -> Float Source # log1pexp :: Float -> Float Source # log1mexp :: Float -> Float Source #
Data Float # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Float -> c Float Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Float Source # toConstr :: Float -> Constr Source # dataTypeOf :: Float -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Float) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Float) Source # gmapT :: (forall b. Data b => b -> b) -> Float -> Float Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Float -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Float -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Float -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Float -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Float -> m Float Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Float -> m Float Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Float -> m Float 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 #
Read Float # |
Methods readsPrec :: Int -> ReadS Float Source # readList :: ReadS [Float] Source # readPrec :: ReadPrec Float Source # readListPrec :: ReadPrec [Float] Source #
RealFloat Float # |
Methods floatRadix :: Float -> Integer Source # floatDigits :: Float -> Int Source # floatRange :: Float -> (Int, Int) Source # decodeFloat :: Float -> (Integer, Int) Source # encodeFloat :: Integer -> Int -> Float Source # exponent :: Float -> Int Source # significand :: Float -> Float Source # scaleFloat :: Int -> Float -> Float Source # isNaN :: Float -> Bool Source # isInfinite :: Float -> Bool Source # isDenormalized :: Float -> Bool Source # isNegativeZero :: Float -> Bool Source # isIEEE :: Float -> Bool Source # atan2 :: Float -> Float -> Float Source #
Storable Float # |
Methods sizeOf :: Float -> Int Source # alignment :: Float -> Int Source # peekElemOff :: Ptr Float -> Int -> IO Float Source # pokeElemOff :: Ptr Float -> Int -> Float -> IO () Source # peekByteOff :: Ptr b -> Int -> IO Float Source # pokeByteOff :: Ptr b -> Int -> Float -> IO () Source # peek :: Ptr Float -> IO Float Source # poke :: Ptr Float -> Float -> IO () Source #
PrintfArg Float # |
Methods formatArg :: Float -> FieldFormatter Source # parseFormat :: Float -> ModifierParser Source #
Functor (URec Float) # |
Methods fmap :: (a -> b) -> URec Float a -> URec Float b Source # (<$) :: a -> URec Float b -> URec Float a Source #
Foldable (URec Float) # |
Methods fold :: Monoid m => URec Float m -> m Source # foldMap :: Monoid m => (a -> m) -> URec Float a -> m Source # foldr :: (a -> b -> b) -> b -> URec Float a -> b Source # foldr' :: (a -> b -> b) -> b -> URec Float a -> b Source # foldl :: (b -> a -> b) -> b -> URec Float a -> b Source # foldl' :: (b -> a -> b) -> b -> URec Float a -> b Source # foldr1 :: (a -> a -> a) -> URec Float a -> a Source # foldl1 :: (a -> a -> a) -> URec Float a -> a Source # toList :: URec Float a -> [a] Source # null :: URec Float a -> Bool Source # length :: URec Float a -> Int Source # elem :: Eq a => a -> URec Float a -> Bool Source # maximum :: Ord a => URec Float a -> a Source # minimum :: Ord a => URec Float a -> a Source # sum :: Num a => URec Float a -> a Source # product :: Num a => URec Float a -> a Source #
Traversable (URec Float) # |
Methods traverse :: Applicative f => (a -> f b) -> URec Float a -> f (URec Float b) Source # sequenceA :: Applicative f => URec Float (f a) -> f (URec Float a) Source # mapM :: Monad m => (a -> m b) -> URec Float a -> m (URec Float b) Source # sequence :: Monad m => URec Float (m a) -> m (URec Float a) Source #
Generic1 (URec Float) # |
Associated Types type Rep1 (URec Float :: * -> *) :: * -> * Source # Methods from1 :: URec Float a -> Rep1 (URec Float) a Source # to1 :: Rep1 (URec Float) a -> URec Float a Source #
Eq (URec Float p) # |
Methods (==) :: URec Float p -> URec Float p -> Bool Source # (/=) :: URec Float p -> URec Float p -> Bool Source #
Ord (URec Float p) # |
Methods compare :: URec Float p -> URec Float p -> Ordering Source # (<) :: URec Float p -> URec Float p -> Bool Source # (<=) :: URec Float p -> URec Float p -> Bool Source # (>) :: URec Float p -> URec Float p -> Bool Source # (>=) :: URec Float p -> URec Float p -> Bool Source # max :: URec Float p -> URec Float p -> URec Float p Source # min :: URec Float p -> URec Float p -> URec Float p Source #
Show (URec Float p) # |
Methods showsPrec :: Int -> URec Float p -> ShowS Source # show :: URec Float p -> String Source # showList :: [URec Float p] -> ShowS Source #
Generic (URec Float p) # |
Associated Types type Rep (URec Float p) :: * -> * Source # Methods from :: URec Float p -> Rep (URec Float p) x Source # to :: Rep (URec Float p) x -> URec Float p Source #
data URec Float # | Used for marking occurrences of `Float#`
data URec Float = UFloat { uFloat# :: Float# }
type Rep1 (URec Float) # |
type Rep1 (URec Float) = D1 (MetaData "URec" "GHC.Generics" "base" False) (C1 (MetaCons "UFloat" PrefixI True) (S1 (MetaSel (Just Symbol "uFloat#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) UFloat))
type Rep (URec Float p) # |
type Rep (URec 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 # |
Methods pi :: Double Source # exp :: Double -> Double Source # log :: Double -> Double Source # sqrt :: Double -> Double Source # (**) :: Double -> Double -> Double Source # logBase :: Double -> Double -> Double Source # sin :: Double -> Double Source # cos :: Double -> Double Source # tan :: Double -> Double Source # asin :: Double -> Double Source # acos :: Double -> Double Source # atan :: Double -> Double Source # sinh :: Double -> Double Source # cosh :: Double -> Double Source # tanh :: Double -> Double Source # asinh :: Double -> Double Source # acosh :: Double -> Double Source # atanh :: Double -> Double Source # log1p :: Double -> Double Source # expm1 :: Double -> Double Source # log1pexp :: Double -> Double Source # log1mexp :: Double -> Double Source #
Data Double # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Double -> c Double Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Double Source # toConstr :: Double -> Constr Source # dataTypeOf :: Double -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Double) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Double) Source # gmapT :: (forall b. Data b => b -> b) -> Double -> Double Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Double -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Double -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Double -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Double -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Double -> m Double Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Double -> m Double Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Double -> m Double 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 #
Read Double # |
Methods readsPrec :: Int -> ReadS Double Source # readList :: ReadS [Double] Source # readPrec :: ReadPrec Double Source # readListPrec :: ReadPrec [Double] Source #
RealFloat Double # |
Methods floatRadix :: Double -> Integer Source # floatDigits :: Double -> Int Source # floatRange :: Double -> (Int, Int) Source # decodeFloat :: Double -> (Integer, Int) Source # encodeFloat :: Integer -> Int -> Double Source # exponent :: Double -> Int Source # significand :: Double -> Double Source # scaleFloat :: Int -> Double -> Double Source # isNaN :: Double -> Bool Source # isInfinite :: Double -> Bool Source # isDenormalized :: Double -> Bool Source # isNegativeZero :: Double -> Bool Source # isIEEE :: Double -> Bool Source # atan2 :: Double -> Double -> Double Source #
Storable Double # |
Methods sizeOf :: Double -> Int Source # alignment :: Double -> Int Source # peekElemOff :: Ptr Double -> Int -> IO Double Source # pokeElemOff :: Ptr Double -> Int -> Double -> IO () Source # peekByteOff :: Ptr b -> Int -> IO Double Source # pokeByteOff :: Ptr b -> Int -> Double -> IO () Source # peek :: Ptr Double -> IO Double Source # poke :: Ptr Double -> Double -> IO () Source #
PrintfArg Double # |
Methods formatArg :: Double -> FieldFormatter Source # parseFormat :: Double -> ModifierParser Source #
Functor (URec Double) # |
Methods fmap :: (a -> b) -> URec Double a -> URec Double b Source # (<$) :: a -> URec Double b -> URec Double a Source #
Foldable (URec Double) # |
Methods fold :: Monoid m => URec Double m -> m Source # foldMap :: Monoid m => (a -> m) -> URec Double a -> m Source # foldr :: (a -> b -> b) -> b -> URec Double a -> b Source # foldr' :: (a -> b -> b) -> b -> URec Double a -> b Source # foldl :: (b -> a -> b) -> b -> URec Double a -> b Source # foldl' :: (b -> a -> b) -> b -> URec Double a -> b Source # foldr1 :: (a -> a -> a) -> URec Double a -> a Source # foldl1 :: (a -> a -> a) -> URec Double a -> a Source # toList :: URec Double a -> [a] Source # null :: URec Double a -> Bool Source # length :: URec Double a -> Int Source # elem :: Eq a => a -> URec Double a -> Bool Source # maximum :: Ord a => URec Double a -> a Source # minimum :: Ord a => URec Double a -> a Source # sum :: Num a => URec Double a -> a Source # product :: Num a => URec Double a -> a Source #
Traversable (URec Double) # |
Methods traverse :: Applicative f => (a -> f b) -> URec Double a -> f (URec Double b) Source # sequenceA :: Applicative f => URec Double (f a) -> f (URec Double a) Source # mapM :: Monad m => (a -> m b) -> URec Double a -> m (URec Double b) Source # sequence :: Monad m => URec Double (m a) -> m (URec Double a) Source #
Generic1 (URec Double) # |
Associated Types type Rep1 (URec Double :: * -> *) :: * -> * Source # Methods from1 :: URec Double a -> Rep1 (URec Double) a Source # to1 :: Rep1 (URec Double) a -> URec Double a Source #
Eq (URec Double p) # |
Methods (==) :: URec Double p -> URec Double p -> Bool Source # (/=) :: URec Double p -> URec Double p -> Bool Source #
Ord (URec Double p) # |
Methods compare :: URec Double p -> URec Double p -> Ordering Source # (<) :: URec Double p -> URec Double p -> Bool Source # (<=) :: URec Double p -> URec Double p -> Bool Source # (>) :: URec Double p -> URec Double p -> Bool Source # (>=) :: URec Double p -> URec Double p -> Bool Source # max :: URec Double p -> URec Double p -> URec Double p Source # min :: URec Double p -> URec Double p -> URec Double p Source #
Show (URec Double p) # |
Methods showsPrec :: Int -> URec Double p -> ShowS Source # show :: URec Double p -> String Source # showList :: [URec Double p] -> ShowS Source #
Generic (URec Double p) # |
Associated Types type Rep (URec Double p) :: * -> * Source # Methods from :: URec Double p -> Rep (URec Double p) x Source # to :: Rep (URec Double p) x -> URec Double p Source #
data URec Double # | Used for marking occurrences of `Double#`
data URec Double = UDouble { uDouble# :: Double# }
type Rep1 (URec Double) # |
type Rep1 (URec Double) = D1 (MetaData "URec" "GHC.Generics" "base" False) (C1 (MetaCons "UDouble" PrefixI True) (S1 (MetaSel (Just Symbol "uDouble#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) UDouble))
type Rep (URec Double p) # |
type Rep (URec 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 Source #

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 # |
Methods minBound :: Word Source # maxBound :: Word Source #
Enum Word # |
Methods succ :: Word -> Word Source # pred :: Word -> Word Source # toEnum :: Int -> Word Source # fromEnum :: Word -> Int Source # enumFrom :: Word -> [Word] Source # enumFromThen :: Word -> Word -> [Word] Source # enumFromTo :: Word -> Word -> [Word] Source # enumFromThenTo :: Word -> Word -> Word -> [Word] Source #
Eq Word |
Methods (==) :: Word -> Word -> Bool Source # (/=) :: Word -> Word -> Bool Source #
Integral Word # |
Methods quot :: Word -> Word -> Word Source # rem :: Word -> Word -> Word Source # div :: Word -> Word -> Word Source # mod :: Word -> Word -> Word Source # quotRem :: Word -> Word -> (Word, Word) Source # divMod :: Word -> Word -> (Word, Word) Source # toInteger :: Word -> Integer Source #
Data Word # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word -> c Word Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word Source # toConstr :: Word -> Constr Source # dataTypeOf :: Word -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Word) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word) Source # gmapT :: (forall b. Data b => b -> b) -> Word -> Word Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Word -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Word -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word -> m Word Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word -> m Word Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word -> m Word Source #
Num Word # |
Methods (+) :: Word -> Word -> Word Source # (-) :: Word -> Word -> Word Source # (*) :: Word -> Word -> Word Source # negate :: Word -> Word Source # abs :: Word -> Word Source # signum :: Word -> Word Source # fromInteger :: Integer -> Word 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 #
Read Word # |
Methods readsPrec :: Int -> ReadS Word Source # readList :: ReadS [Word] Source # readPrec :: ReadPrec Word Source # readListPrec :: ReadPrec [Word] Source #
Real Word # |
Methods toRational :: Word -> Rational Source #
Show Word # |
Methods showsPrec :: Int -> Word -> ShowS Source # show :: Word -> String Source # showList :: [Word] -> ShowS Source #
Ix Word # |
Methods range :: (Word, Word) -> [Word] Source # index :: (Word, Word) -> Word -> Int Source # unsafeIndex :: (Word, Word) -> Word -> Int inRange :: (Word, Word) -> Word -> Bool Source # rangeSize :: (Word, Word) -> Int Source # unsafeRangeSize :: (Word, Word) -> Int
FiniteBits Word # |
Methods finiteBitSize :: Word -> Int Source # countLeadingZeros :: Word -> Int Source # countTrailingZeros :: Word -> Int Source #
Bits Word # |
Methods (.&.) :: Word -> Word -> Word Source # (.|.) :: Word -> Word -> Word Source # xor :: Word -> Word -> Word Source # complement :: Word -> Word Source # shift :: Word -> Int -> Word Source # rotate :: Word -> Int -> Word Source # zeroBits :: Word Source # bit :: Int -> Word Source # setBit :: Word -> Int -> Word Source # clearBit :: Word -> Int -> Word Source # complementBit :: Word -> Int -> Word Source # testBit :: Word -> Int -> Bool Source # bitSizeMaybe :: Word -> Maybe Int Source # bitSize :: Word -> Int Source # isSigned :: Word -> Bool Source # shiftL :: Word -> Int -> Word Source # unsafeShiftL :: Word -> Int -> Word Source # shiftR :: Word -> Int -> Word Source # unsafeShiftR :: Word -> Int -> Word Source # rotateL :: Word -> Int -> Word Source # rotateR :: Word -> Int -> Word Source # popCount :: Word -> Int Source #
Storable Word # |
Methods sizeOf :: Word -> Int Source # alignment :: Word -> Int Source # peekElemOff :: Ptr Word -> Int -> IO Word Source # pokeElemOff :: Ptr Word -> Int -> Word -> IO () Source # peekByteOff :: Ptr b -> Int -> IO Word Source # pokeByteOff :: Ptr b -> Int -> Word -> IO () Source # peek :: Ptr Word -> IO Word Source # poke :: Ptr Word -> Word -> IO () Source #
PrintfArg Word # |
Methods formatArg :: Word -> FieldFormatter Source # parseFormat :: Word -> ModifierParser Source #
Functor (URec Word) # |
Methods fmap :: (a -> b) -> URec Word a -> URec Word b Source # (<$) :: a -> URec Word b -> URec Word a Source #
Foldable (URec Word) # |
Methods fold :: Monoid m => URec Word m -> m Source # foldMap :: Monoid m => (a -> m) -> URec Word a -> m Source # foldr :: (a -> b -> b) -> b -> URec Word a -> b Source # foldr' :: (a -> b -> b) -> b -> URec Word a -> b Source # foldl :: (b -> a -> b) -> b -> URec Word a -> b Source # foldl' :: (b -> a -> b) -> b -> URec Word a -> b Source # foldr1 :: (a -> a -> a) -> URec Word a -> a Source # foldl1 :: (a -> a -> a) -> URec Word a -> a Source # toList :: URec Word a -> [a] Source # null :: URec Word a -> Bool Source # length :: URec Word a -> Int Source # elem :: Eq a => a -> URec Word a -> Bool Source # maximum :: Ord a => URec Word a -> a Source # minimum :: Ord a => URec Word a -> a Source # sum :: Num a => URec Word a -> a Source # product :: Num a => URec Word a -> a Source #
Traversable (URec Word) # |
Methods traverse :: Applicative f => (a -> f b) -> URec Word a -> f (URec Word b) Source # sequenceA :: Applicative f => URec Word (f a) -> f (URec Word a) Source # mapM :: Monad m => (a -> m b) -> URec Word a -> m (URec Word b) Source # sequence :: Monad m => URec Word (m a) -> m (URec Word a) Source #
Generic1 (URec Word) # |
Associated Types type Rep1 (URec Word :: * -> *) :: * -> * Source # Methods from1 :: URec Word a -> Rep1 (URec Word) a Source # to1 :: Rep1 (URec Word) a -> URec Word a Source #
Eq (URec Word p) # |
Methods (==) :: URec Word p -> URec Word p -> Bool Source # (/=) :: URec Word p -> URec Word p -> Bool Source #
Ord (URec Word p) # |
Methods compare :: URec Word p -> URec Word p -> Ordering Source # (<) :: URec Word p -> URec Word p -> Bool Source # (<=) :: URec Word p -> URec Word p -> Bool Source # (>) :: URec Word p -> URec Word p -> Bool Source # (>=) :: URec Word p -> URec Word p -> Bool Source # max :: URec Word p -> URec Word p -> URec Word p Source # min :: URec Word p -> URec Word p -> URec Word p Source #
Show (URec Word p) # |
Methods showsPrec :: Int -> URec Word p -> ShowS Source # show :: URec Word p -> String Source # showList :: [URec Word p] -> ShowS Source #
Generic (URec Word p) # |
Associated Types type Rep (URec Word p) :: * -> * Source # Methods from :: URec Word p -> Rep (URec Word p) x Source # to :: Rep (URec Word p) x -> URec Word p Source #
data URec Word # | Used for marking occurrences of `Word#`
data URec Word = UWord { uWord# :: Word# }
type Rep1 (URec Word) # |
type Rep1 (URec Word) = D1 (MetaData "URec" "GHC.Generics" "base" False) (C1 (MetaCons "UWord" PrefixI True) (S1 (MetaSel (Just Symbol "uWord#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) UWord))
type Rep (URec Word p) # |
type Rep (URec 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 Source #

Basic numeric class.

Minimal complete definition

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

Methods

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

negate :: a -> a Source #

Unary negation.

abs :: a -> a Source #

Absolute value.

signum :: a -> a Source #

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

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

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

Minimal complete definition

toRational

Methods

toRational :: a -> Rational Source #

the rational equivalent of its real argument with full precision

Instances

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

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

Integral numbers, supporting integer division.

Minimal complete definition

quotRem, toInteger

Methods

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

integer division truncated toward zero

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

integer remainder, satisfying

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

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

integer division truncated toward negative infinity

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

integer modulus, satisfying

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

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

simultaneous `quot` and `rem`

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

simultaneous `div` and `mod`

toInteger :: a -> Integer Source #

conversion to `Integer`

Instances

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

class Num a => Fractional a where Source #

Fractional numbers, supporting real division.

Minimal complete definition

fromRational, (recip | (/))

Methods

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

fractional division

recip :: a -> a Source #

reciprocal fraction

fromRational :: Rational -> a Source #

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 Source # recip :: CDouble -> CDouble Source # fromRational :: Rational -> CDouble Source #
Fractional CFloat # |
Methods (/) :: CFloat -> CFloat -> CFloat Source # recip :: CFloat -> CFloat Source # fromRational :: Rational -> CFloat Source #
Integral a => Fractional (Ratio a) # |
Methods (/) :: Ratio a -> Ratio a -> Ratio a Source # recip :: Ratio a -> Ratio a Source # fromRational :: Rational -> Ratio a Source #
RealFloat a => Fractional (Complex a) # |
Methods (/) :: Complex a -> Complex a -> Complex a Source # recip :: Complex a -> Complex a Source # fromRational :: Rational -> Complex a Source #
HasResolution a => Fractional (Fixed a) # |
Methods (/) :: Fixed a -> Fixed a -> Fixed a Source # recip :: Fixed a -> Fixed a Source # fromRational :: Rational -> Fixed a Source #
Fractional a => Fractional (Identity a) # |
Methods (/) :: Identity a -> Identity a -> Identity a Source # recip :: Identity a -> Identity a Source # fromRational :: Rational -> Identity a Source #
Fractional a => Fractional (Const k a b) # |
Methods (/) :: Const k a b -> Const k a b -> Const k a b Source # recip :: Const k a b -> Const k a b Source # fromRational :: Rational -> Const k a b Source #

class Fractional a => Floating a where Source #

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

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

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

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

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

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

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

Instances

Floating Double # |
Methods pi :: Double Source # exp :: Double -> Double Source # log :: Double -> Double Source # sqrt :: Double -> Double Source # (**) :: Double -> Double -> Double Source # logBase :: Double -> Double -> Double Source # sin :: Double -> Double Source # cos :: Double -> Double Source # tan :: Double -> Double Source # asin :: Double -> Double Source # acos :: Double -> Double Source # atan :: Double -> Double Source # sinh :: Double -> Double Source # cosh :: Double -> Double Source # tanh :: Double -> Double Source # asinh :: Double -> Double Source # acosh :: Double -> Double Source # atanh :: Double -> Double Source # log1p :: Double -> Double Source # expm1 :: Double -> Double Source # log1pexp :: Double -> Double Source # log1mexp :: Double -> Double Source #
Floating Float # |
Methods pi :: Float Source # exp :: Float -> Float Source # log :: Float -> Float Source # sqrt :: Float -> Float Source # (**) :: Float -> Float -> Float Source # logBase :: Float -> Float -> Float Source # sin :: Float -> Float Source # cos :: Float -> Float Source # tan :: Float -> Float Source # asin :: Float -> Float Source # acos :: Float -> Float Source # atan :: Float -> Float Source # sinh :: Float -> Float Source # cosh :: Float -> Float Source # tanh :: Float -> Float Source # asinh :: Float -> Float Source # acosh :: Float -> Float Source # atanh :: Float -> Float Source # log1p :: Float -> Float Source # expm1 :: Float -> Float Source # log1pexp :: Float -> Float Source # log1mexp :: Float -> Float Source #
Floating CDouble # |
Methods pi :: CDouble Source # exp :: CDouble -> CDouble Source # log :: CDouble -> CDouble Source # sqrt :: CDouble -> CDouble Source # (**) :: CDouble -> CDouble -> CDouble Source # logBase :: CDouble -> CDouble -> CDouble Source # sin :: CDouble -> CDouble Source # cos :: CDouble -> CDouble Source # tan :: CDouble -> CDouble Source # asin :: CDouble -> CDouble Source # acos :: CDouble -> CDouble Source # atan :: CDouble -> CDouble Source # sinh :: CDouble -> CDouble Source # cosh :: CDouble -> CDouble Source # tanh :: CDouble -> CDouble Source # asinh :: CDouble -> CDouble Source # acosh :: CDouble -> CDouble Source # atanh :: CDouble -> CDouble Source # log1p :: CDouble -> CDouble Source # expm1 :: CDouble -> CDouble Source # log1pexp :: CDouble -> CDouble Source # log1mexp :: CDouble -> CDouble Source #
Floating CFloat # |
Methods pi :: CFloat Source # exp :: CFloat -> CFloat Source # log :: CFloat -> CFloat Source # sqrt :: CFloat -> CFloat Source # (**) :: CFloat -> CFloat -> CFloat Source # logBase :: CFloat -> CFloat -> CFloat Source # sin :: CFloat -> CFloat Source # cos :: CFloat -> CFloat Source # tan :: CFloat -> CFloat Source # asin :: CFloat -> CFloat Source # acos :: CFloat -> CFloat Source # atan :: CFloat -> CFloat Source # sinh :: CFloat -> CFloat Source # cosh :: CFloat -> CFloat Source # tanh :: CFloat -> CFloat Source # asinh :: CFloat -> CFloat Source # acosh :: CFloat -> CFloat Source # atanh :: CFloat -> CFloat Source # log1p :: CFloat -> CFloat Source # expm1 :: CFloat -> CFloat Source # log1pexp :: CFloat -> CFloat Source # log1mexp :: CFloat -> CFloat Source #
RealFloat a => Floating (Complex a) # |
Methods pi :: Complex a Source # exp :: Complex a -> Complex a Source # log :: Complex a -> Complex a Source # sqrt :: Complex a -> Complex a Source # (**) :: Complex a -> Complex a -> Complex a Source # logBase :: Complex a -> Complex a -> Complex a Source # sin :: Complex a -> Complex a Source # cos :: Complex a -> Complex a Source # tan :: Complex a -> Complex a Source # asin :: Complex a -> Complex a Source # acos :: Complex a -> Complex a Source # atan :: Complex a -> Complex a Source # sinh :: Complex a -> Complex a Source # cosh :: Complex a -> Complex a Source # tanh :: Complex a -> Complex a Source # asinh :: Complex a -> Complex a Source # acosh :: Complex a -> Complex a Source # atanh :: Complex a -> Complex a Source # log1p :: Complex a -> Complex a Source # expm1 :: Complex a -> Complex a Source # log1pexp :: Complex a -> Complex a Source # log1mexp :: Complex a -> Complex a Source #
Floating a => Floating (Identity a) # |
Methods pi :: Identity a Source # exp :: Identity a -> Identity a Source # log :: Identity a -> Identity a Source # sqrt :: Identity a -> Identity a Source # (**) :: Identity a -> Identity a -> Identity a Source # logBase :: Identity a -> Identity a -> Identity a Source # sin :: Identity a -> Identity a Source # cos :: Identity a -> Identity a Source # tan :: Identity a -> Identity a Source # asin :: Identity a -> Identity a Source # acos :: Identity a -> Identity a Source # atan :: Identity a -> Identity a Source # sinh :: Identity a -> Identity a Source # cosh :: Identity a -> Identity a Source # tanh :: Identity a -> Identity a Source # asinh :: Identity a -> Identity a Source # acosh :: Identity a -> Identity a Source # atanh :: Identity a -> Identity a Source # log1p :: Identity a -> Identity a Source # expm1 :: Identity a -> Identity a Source # log1pexp :: Identity a -> Identity a Source # log1mexp :: Identity a -> Identity a Source #
Floating a => Floating (Const k a b) # |
Methods pi :: Const k a b Source # exp :: Const k a b -> Const k a b Source # log :: Const k a b -> Const k a b Source # sqrt :: Const k a b -> Const k a b Source # (**) :: Const k a b -> Const k a b -> Const k a b Source # logBase :: Const k a b -> Const k a b -> Const k a b Source # sin :: Const k a b -> Const k a b Source # cos :: Const k a b -> Const k a b Source # tan :: Const k a b -> Const k a b Source # asin :: Const k a b -> Const k a b Source # acos :: Const k a b -> Const k a b Source # atan :: Const k a b -> Const k a b Source # sinh :: Const k a b -> Const k a b Source # cosh :: Const k a b -> Const k a b Source # tanh :: Const k a b -> Const k a b Source # asinh :: Const k a b -> Const k a b Source # acosh :: Const k a b -> Const k a b Source # atanh :: Const k a b -> Const k a b Source # log1p :: Const k a b -> Const k a b Source # expm1 :: Const k a b -> Const k a b Source # log1pexp :: Const k a b -> Const k a b Source # log1mexp :: Const k a b -> Const k a b Source #

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

Extracting components of fractions.

Minimal complete definition

properFraction

Methods

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

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

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

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

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

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

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

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

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

Instances

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

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

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

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

floatDigits :: a -> Int Source #

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

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

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

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

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

`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 Source #

`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 Source #

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

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

isNaN :: a -> Bool Source #

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

isInfinite :: a -> Bool Source #

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

isDenormalized :: a -> Bool Source #

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

isNegativeZero :: a -> Bool Source #

`True` if the argument is an IEEE negative zero

isIEEE :: a -> Bool Source #

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

atan2 :: a -> a -> a Source #

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 # |
Methods floatRadix :: Double -> Integer Source # floatDigits :: Double -> Int Source # floatRange :: Double -> (Int, Int) Source # decodeFloat :: Double -> (Integer, Int) Source # encodeFloat :: Integer -> Int -> Double Source # exponent :: Double -> Int Source # significand :: Double -> Double Source # scaleFloat :: Int -> Double -> Double Source # isNaN :: Double -> Bool Source # isInfinite :: Double -> Bool Source # isDenormalized :: Double -> Bool Source # isNegativeZero :: Double -> Bool Source # isIEEE :: Double -> Bool Source # atan2 :: Double -> Double -> Double Source #
RealFloat Float # |
Methods floatRadix :: Float -> Integer Source # floatDigits :: Float -> Int Source # floatRange :: Float -> (Int, Int) Source # decodeFloat :: Float -> (Integer, Int) Source # encodeFloat :: Integer -> Int -> Float Source # exponent :: Float -> Int Source # significand :: Float -> Float Source # scaleFloat :: Int -> Float -> Float Source # isNaN :: Float -> Bool Source # isInfinite :: Float -> Bool Source # isDenormalized :: Float -> Bool Source # isNegativeZero :: Float -> Bool Source # isIEEE :: Float -> Bool Source # atan2 :: Float -> Float -> Float Source #
RealFloat CDouble # |
Methods floatRadix :: CDouble -> Integer Source # floatDigits :: CDouble -> Int Source # floatRange :: CDouble -> (Int, Int) Source # decodeFloat :: CDouble -> (Integer, Int) Source # encodeFloat :: Integer -> Int -> CDouble Source # exponent :: CDouble -> Int Source # significand :: CDouble -> CDouble Source # scaleFloat :: Int -> CDouble -> CDouble Source # isNaN :: CDouble -> Bool Source # isInfinite :: CDouble -> Bool Source # isDenormalized :: CDouble -> Bool Source # isNegativeZero :: CDouble -> Bool Source # isIEEE :: CDouble -> Bool Source # atan2 :: CDouble -> CDouble -> CDouble Source #
RealFloat CFloat # |
Methods floatRadix :: CFloat -> Integer Source # floatDigits :: CFloat -> Int Source # floatRange :: CFloat -> (Int, Int) Source # decodeFloat :: CFloat -> (Integer, Int) Source # encodeFloat :: Integer -> Int -> CFloat Source # exponent :: CFloat -> Int Source # significand :: CFloat -> CFloat Source # scaleFloat :: Int -> CFloat -> CFloat Source # isNaN :: CFloat -> Bool Source # isInfinite :: CFloat -> Bool Source # isDenormalized :: CFloat -> Bool Source # isNegativeZero :: CFloat -> Bool Source # isIEEE :: CFloat -> Bool Source # atan2 :: CFloat -> CFloat -> CFloat Source #
RealFloat a => RealFloat (Identity a) # |
Methods floatRadix :: Identity a -> Integer Source # floatDigits :: Identity a -> Int Source # floatRange :: Identity a -> (Int, Int) Source # decodeFloat :: Identity a -> (Integer, Int) Source # encodeFloat :: Integer -> Int -> Identity a Source # exponent :: Identity a -> Int Source # significand :: Identity a -> Identity a Source # scaleFloat :: Int -> Identity a -> Identity a Source # isNaN :: Identity a -> Bool Source # isInfinite :: Identity a -> Bool Source # isDenormalized :: Identity a -> Bool Source # isNegativeZero :: Identity a -> Bool Source # isIEEE :: Identity a -> Bool Source # atan2 :: Identity a -> Identity a -> Identity a Source #
RealFloat a => RealFloat (Const k a b) # |
Methods floatRadix :: Const k a b -> Integer Source # floatDigits :: Const k a b -> Int Source # floatRange :: Const k a b -> (Int, Int) Source # decodeFloat :: Const k a b -> (Integer, Int) Source # encodeFloat :: Integer -> Int -> Const k a b Source # exponent :: Const k a b -> Int Source # significand :: Const k a b -> Const k a b Source # scaleFloat :: Int -> Const k a b -> Const k a b Source # isNaN :: Const k a b -> Bool Source # isInfinite :: Const k a b -> Bool Source # isDenormalized :: Const k a b -> Bool Source # isNegativeZero :: Const k a b -> Bool Source # isIEEE :: Const k a b -> Bool Source # atan2 :: Const k a b -> Const k a b -> Const k a b Source #

### Numeric functions

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

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

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

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

``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 Source #

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

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

raise a number to a non-negative integral power

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

raise a number to an integral power

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

general coercion from integral types

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

general coercion to fractional types

## Monoids

class Monoid a where Source #

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

Identity of `mappend`

mappend :: a -> a -> a Source #

An associative operation

mconcat :: [a] -> a Source #

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 # |
Methods mempty :: Ordering Source # mappend :: Ordering -> Ordering -> Ordering Source # mconcat :: [Ordering] -> Ordering Source #
Monoid () # |
Methods mempty :: () Source # mappend :: () -> () -> () Source # mconcat :: [()] -> () Source #
Monoid Any # |
Methods mempty :: Any Source # mappend :: Any -> Any -> Any Source # mconcat :: [Any] -> Any Source #
Monoid All # |
Methods mempty :: All Source # mappend :: All -> All -> All Source # mconcat :: [All] -> All Source #
Monoid Lifetime # | `mappend` == `elSupremum`
Methods mempty :: Lifetime Source # mappend :: Lifetime -> Lifetime -> Lifetime Source # mconcat :: [Lifetime] -> Lifetime Source #
Monoid Event # |
Methods mempty :: Event Source # mappend :: Event -> Event -> Event Source # mconcat :: [Event] -> Event Source #
Monoid [a] # |
Methods mempty :: [a] Source # mappend :: [a] -> [a] -> [a] Source # mconcat :: [[a]] -> [a] Source #
Monoid a => Monoid (Maybe a) # | Lift a semigroup into `Maybe` forming a `Monoid` according to http://en.wikipedia.org/wiki/Monoid: "Any semigroup `S` may be turned into a monoid simply by adjoining an element `e` not in `S` and defining `e*e = e` and `e*s = s = s*e` for all `s ∈ S`." Since there is no "Semigroup" typeclass providing just `mappend`, we use `Monoid` instead.
Methods mempty :: Maybe a Source # mappend :: Maybe a -> Maybe a -> Maybe a Source # mconcat :: [Maybe a] -> Maybe a Source #
Monoid a => Monoid (IO a) # |
Methods mempty :: IO a Source # mappend :: IO a -> IO a -> IO a Source # mconcat :: [IO a] -> IO a Source #
Monoid (Last a) # |
Methods mempty :: Last a Source # mappend :: Last a -> Last a -> Last a Source # mconcat :: [Last a] -> Last a Source #
Monoid (First a) # |
Methods mempty :: First a Source # mappend :: First a -> First a -> First a Source # mconcat :: [First a] -> First a Source #
Num a => Monoid (Product a) # |
Methods mempty :: Product a Source # mappend :: Product a -> Product a -> Product a Source # mconcat :: [Product a] -> Product a Source #
Num a => Monoid (Sum a) # |
Methods mempty :: Sum a Source # mappend :: Sum a -> Sum a -> Sum a Source # mconcat :: [Sum a] -> Sum a Source #
Monoid (Endo a) # |
Methods mempty :: Endo a Source # mappend :: Endo a -> Endo a -> Endo a Source # mconcat :: [Endo a] -> Endo a Source #
Monoid a => Monoid (Dual a) # |
Methods mempty :: Dual a Source # mappend :: Dual a -> Dual a -> Dual a Source # mconcat :: [Dual a] -> Dual a Source #
Semigroup a => Monoid (Option a) # |
Methods mempty :: Option a Source # mappend :: Option a -> Option a -> Option a Source # mconcat :: [Option a] -> Option a Source #
Monoid m => Monoid (WrappedMonoid m) # |
Methods mempty :: WrappedMonoid m Source # mappend :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m Source # mconcat :: [WrappedMonoid m] -> WrappedMonoid m Source #
(Ord a, Bounded a) => Monoid (Max a) # |
Methods mempty :: Max a Source # mappend :: Max a -> Max a -> Max a Source # mconcat :: [Max a] -> Max a Source #
(Ord a, Bounded a) => Monoid (Min a) # |
Methods mempty :: Min a Source # mappend :: Min a -> Min a -> Min a Source # mconcat :: [Min a] -> Min a Source #
Monoid a => Monoid (Identity a) # |
Methods mempty :: Identity a Source # mappend :: Identity a -> Identity a -> Identity a Source # mconcat :: [Identity a] -> Identity a Source #
Monoid b => Monoid (a -> b) # |
Methods mempty :: a -> b Source # mappend :: (a -> b) -> (a -> b) -> a -> b Source # mconcat :: [a -> b] -> a -> b Source #
(Monoid a, Monoid b) => Monoid (a, b) # |
Methods mempty :: (a, b) Source # mappend :: (a, b) -> (a, b) -> (a, b) Source # mconcat :: [(a, b)] -> (a, b) Source #
Monoid (Proxy k s) # |
Methods mempty :: Proxy k s Source # mappend :: Proxy k s -> Proxy k s -> Proxy k s Source # mconcat :: [Proxy k s] -> Proxy k s Source #
(Monoid a, Monoid b, Monoid c) => Monoid (a, b, c) # |
Methods mempty :: (a, b, c) Source # mappend :: (a, b, c) -> (a, b, c) -> (a, b, c) Source # mconcat :: [(a, b, c)] -> (a, b, c) Source #
Alternative f => Monoid (Alt * f a) # |
Methods mempty :: Alt * f a Source # mappend :: Alt * f a -> Alt * f a -> Alt * f a Source # mconcat :: [Alt * f a] -> Alt * f a Source #
Monoid a => Monoid (Const k a b) # |
Methods mempty :: Const k a b Source # mappend :: Const k a b -> Const k a b -> Const k a b Source # mconcat :: [Const k a b] -> Const k a b Source #
(Monoid a, Monoid b, Monoid c, Monoid d) => Monoid (a, b, c, d) # |
Methods mempty :: (a, b, c, d) Source # mappend :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source # mconcat :: [(a, b, c, d)] -> (a, b, c, d) Source #
(Monoid a, Monoid b, Monoid c, Monoid d, Monoid e) => Monoid (a, b, c, d, e) # |
Methods mempty :: (a, b, c, d, e) Source # mappend :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source # mconcat :: [(a, b, c, d, e)] -> (a, b, c, d, e) Source #

## Monads and functors

class Functor f where Source #

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

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

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

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

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

A functor with application, providing operations to

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

A minimal complete definition must include implementations of these functions satisfying the following laws:

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 = pure (const id) <*> u <*> v

-     u <* v = pure const <*> u <*> v

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

-     fmap f x = pure f <*> x

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, (<*>)

Methods

pure :: a -> f a Source #

Lift a value.

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

Sequential application.

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

Sequence actions, discarding the value of the first argument.

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

Sequence actions, discarding the value of the second argument.

Instances

Applicative [] # |
Methods pure :: a -> [a] Source # (<*>) :: [a -> b] -> [a] -> [b] Source # (*>) :: [a] -> [b] -> [b] Source # (<*) :: [a] -> [b] -> [a] Source #
Applicative Maybe # |
Methods pure :: a -> Maybe a Source # (<*>) :: Maybe (a -> b) -> Maybe a -> Maybe b Source # (*>) :: Maybe a -> Maybe b -> Maybe b Source # (<*) :: Maybe a -> Maybe b -> Maybe a Source #
Applicative IO # |
Methods pure :: a -> IO a Source # (<*>) :: IO (a -> b) -> IO a -> IO b Source # (*>) :: IO a -> IO b -> IO b Source # (<*) :: IO a -> IO b -> IO a Source #
Applicative U1 # |
Methods pure :: a -> U1 a Source # (<*>) :: U1 (a -> b) -> U1 a -> U1 b Source # (*>) :: U1 a -> U1 b -> U1 b Source # (<*) :: U1 a -> U1 b -> U1 a Source #
Applicative Par1 # |
Methods pure :: a -> Par1 a Source # (<*>) :: Par1 (a -> b) -> Par1 a -> Par1 b Source # (*>) :: Par1 a -> Par1 b -> Par1 b Source # (<*) :: Par1 a -> Par1 b -> Par1 a Source #
Applicative ReadP # |
Methods pure :: a -> ReadP a Source # (<*>) :: ReadP (a -> b) -> ReadP a -> ReadP b Source # (*>) :: ReadP a -> ReadP b -> ReadP b Source # (<*) :: ReadP a -> ReadP b -> ReadP a Source #
Applicative ReadPrec # |
Methods pure :: a -> ReadPrec a Source # (<*>) :: ReadPrec (a -> b) -> ReadPrec a -> ReadPrec b Source # (*>) :: ReadPrec a -> ReadPrec b -> ReadPrec b Source # (<*) :: ReadPrec a -> ReadPrec b -> ReadPrec a Source #
Applicative Last # |
Methods pure :: a -> Last a Source # (<*>) :: Last (a -> b) -> Last a -> Last b Source # (*>) :: Last a -> Last b -> Last b Source # (<*) :: Last a -> Last b -> Last a Source #
Applicative First # |
Methods pure :: a -> First a Source # (<*>) :: First (a -> b) -> First a -> First b Source # (*>) :: First a -> First b -> First b Source # (<*) :: First a -> First b -> First a Source #
Applicative Product # |
Methods pure :: a -> Product a Source # (<*>) :: Product (a -> b) -> Product a -> Product b Source # (*>) :: Product a -> Product b -> Product b Source # (<*) :: Product a -> Product b -> Product a Source #
Applicative Sum # |
Methods pure :: a -> Sum a Source # (<*>) :: Sum (a -> b) -> Sum a -> Sum b Source # (*>) :: Sum a -> Sum b -> Sum b Source # (<*) :: Sum a -> Sum b -> Sum a Source #
Applicative Dual # |
Methods pure :: a -> Dual a Source # (<*>) :: Dual (a -> b) -> Dual a -> Dual b Source # (*>) :: Dual a -> Dual b -> Dual b Source # (<*) :: Dual a -> Dual b -> Dual a Source #
Applicative STM # |
Methods pure :: a -> STM a Source # (<*>) :: STM (a -> b) -> STM a -> STM b Source # (*>) :: STM a -> STM b -> STM b Source # (<*) :: STM a -> STM b -> STM a Source #
Applicative ZipList # |
Methods pure :: a -> ZipList a Source # (<*>) :: ZipList (a -> b) -> ZipList a -> ZipList b Source # (*>) :: ZipList a -> ZipList b -> ZipList b Source # (<*) :: ZipList a -> ZipList b -> ZipList a Source #
Applicative Complex # |
Methods pure :: a -> Complex a Source # (<*>) :: Complex (a -> b) -> Complex a -> Complex b Source # (*>) :: Complex a -> Complex b -> Complex b Source # (<*) :: Complex a -> Complex b -> Complex a Source #
Applicative NonEmpty # |
Methods pure :: a -> NonEmpty a Source # (<*>) :: NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b Source # (*>) :: NonEmpty a -> NonEmpty b -> NonEmpty b Source # (<*) :: NonEmpty a -> NonEmpty b -> NonEmpty a Source #
Applicative Option # |
Methods pure :: a -> Option a Source # (<*>) :: Option (a -> b) -> Option a -> Option b Source # (*>) :: Option a -> Option b -> Option b Source # (<*) :: Option a -> Option b -> Option a Source #
Applicative Last # |
Methods pure :: a -> Last a Source # (<*>) :: Last (a -> b) -> Last a -> Last b Source # (*>) :: Last a -> Last b -> Last b Source # (<*) :: Last a -> Last b -> Last a Source #
Applicative First # |
Methods pure :: a -> First a Source # (<*>) :: First (a -> b) -> First a -> First b Source # (*>) :: First a -> First b -> First b Source # (<*) :: First a -> First b -> First a Source #
Applicative Max # |
Methods pure :: a -> Max a Source # (<*>) :: Max (a -> b) -> Max a -> Max b Source # (*>) :: Max a -> Max b -> Max b Source # (<*) :: Max a -> Max b -> Max a Source #
Applicative Min # |
Methods pure :: a -> Min a Source # (<*>) :: Min (a -> b) -> Min a -> Min b Source # (*>) :: Min a -> Min b -> Min b Source # (<*) :: Min a -> Min b -> Min a Source #
Applicative Identity # |
Methods pure :: a -> Identity a Source # (<*>) :: Identity (a -> b) -> Identity a -> Identity b Source # (*>) :: Identity a -> Identity b -> Identity b Source # (<*) :: Identity a -> Identity b -> Identity a Source #
Applicative ((->) a) # |
Methods pure :: a -> a -> a Source # (<*>) :: (a -> a -> b) -> (a -> a) -> a -> b Source # (*>) :: (a -> a) -> (a -> b) -> a -> b Source # (<*) :: (a -> a) -> (a -> b) -> a -> a Source #
Applicative (Either e) # |
Methods pure :: a -> Either e a Source # (<*>) :: Either e (a -> b) -> Either e a -> Either e b Source # (*>) :: Either e a -> Either e b -> Either e b Source # (<*) :: Either e a -> Either e b -> Either e a Source #
Applicative f => Applicative (Rec1 f) # |
Methods pure :: a -> Rec1 f a Source # (<*>) :: Rec1 f (a -> b) -> Rec1 f a -> Rec1 f b Source # (*>) :: Rec1 f a -> Rec1 f b -> Rec1 f b Source # (<*) :: Rec1 f a -> Rec1 f b -> Rec1 f a Source #
Monoid a => Applicative ((,) a) # |
Methods pure :: a -> (a, a) Source # (<*>) :: (a, a -> b) -> (a, a) -> (a, b) Source # (*>) :: (a, a) -> (a, b) -> (a, b) Source # (<*) :: (a, a) -> (a, b) -> (a, a) Source #
Applicative (ST s) # |
Methods pure :: a -> ST s a Source # (<*>) :: ST s (a -> b) -> ST s a -> ST s b Source # (*>) :: ST s a -> ST s b -> ST s b Source # (<*) :: ST s a -> ST s b -> ST s a Source #
Applicative (Proxy *) # |
Methods pure :: a -> Proxy * a Source # (<*>) :: Proxy * (a -> b) -> Proxy * a -> Proxy * b Source # (*>) :: Proxy * a -> Proxy * b -> Proxy * b Source # (<*) :: Proxy * a -> Proxy * b -> Proxy * a Source #
Arrow a => Applicative (ArrowMonad a) # |
Methods pure :: a -> ArrowMonad a a Source # (<*>) :: ArrowMonad a (a -> b) -> ArrowMonad a a -> ArrowMonad a b Source # (*>) :: ArrowMonad a a -> ArrowMonad a b -> ArrowMonad a b Source # (<*) :: ArrowMonad a a -> ArrowMonad a b -> ArrowMonad a a Source #
Monad m => Applicative (WrappedMonad m) # |
Methods pure :: a -> WrappedMonad m a Source # (<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b Source # (*>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b Source # (<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a Source #
Applicative (ST s) # |
Methods pure :: a -> ST s a Source # (<*>) :: ST s (a -> b) -> ST s a -> ST s b Source # (*>) :: ST s a -> ST s b -> ST s b Source # (<*) :: ST s a -> ST s b -> ST s a Source #
(Applicative f, Applicative g) => Applicative ((:*:) f g) # |
Methods pure :: a -> (f :*: g) a Source # (<*>) :: (f :*: g) (a -> b) -> (f :*: g) a -> (f :*: g) b Source # (*>) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) b Source # (<*) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) a Source #
(Applicative f, Applicative g) => Applicative ((:.:) f g) # |
Methods pure :: a -> (f :.: g) a Source # (<*>) :: (f :.: g) (a -> b) -> (f :.: g) a -> (f :.: g) b Source # (*>) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) b Source # (<*) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) a Source #
Applicative f => Applicative (Alt * f) # |
Methods pure :: a -> Alt * f a Source # (<*>) :: Alt * f (a -> b) -> Alt * f a -> Alt * f b Source # (*>) :: Alt * f a -> Alt * f b -> Alt * f b Source # (<*) :: Alt * f a -> Alt * f b -> Alt * f a Source #
Monoid m => Applicative (Const * m) # |
Methods pure :: a -> Const * m a Source # (<*>) :: Const * m (a -> b) -> Const * m a -> Const * m b Source # (*>) :: Const * m a -> Const * m b -> Const * m b Source # (<*) :: Const * m a -> Const * m b -> Const * m a Source #
Arrow a => Applicative (WrappedArrow a b) # |
Methods pure :: a -> WrappedArrow a b a Source # (<*>) :: WrappedArrow a b (a -> b) -> WrappedArrow a b a -> WrappedArrow a b b Source # (*>) :: WrappedArrow a b a -> WrappedArrow a b b -> WrappedArrow a b b Source # (<*) :: WrappedArrow a b a -> WrappedArrow a b b -> WrappedArrow a b a Source #
Applicative f => Applicative (M1 i c f) # |
Methods pure :: a -> M1 i c f a Source # (<*>) :: M1 i c f (a -> b) -> M1 i c f a -> M1 i c f b Source # (*>) :: M1 i c f a -> M1 i c f b -> M1 i c f b Source # (<*) :: M1 i c f a -> M1 i c f b -> M1 i c f a Source #
(Applicative f, Applicative g) => Applicative (Product * f g) # |
Methods pure :: a -> Product * f g a Source # (<*>) :: Product * f g (a -> b) -> Product * f g a -> Product * f g b Source # (*>) :: Product * f g a -> Product * f g b -> Product * f g b Source # (<*) :: Product * f g a -> Product * f g b -> Product * f g a Source #
(Applicative f, Applicative g) => Applicative (Compose * * f g) # |
Methods pure :: a -> Compose * * f g a Source # (<*>) :: Compose * * f g (a -> b) -> Compose * * f g a -> Compose * * f g b Source # (*>) :: Compose * * f g a -> Compose * * f g b -> Compose * * f g b Source # (<*) :: Compose * * f g a -> Compose * * f g b -> Compose * * f g a Source #

class Applicative m => Monad m where Source #

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

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

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

Inject a value into the monadic type.

fail :: String -> m a Source #

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 [] # |
Methods (>>=) :: [a] -> (a -> [b]) -> [b] Source # (>>) :: [a] -> [b] -> [b] Source # return :: a -> [a] Source # fail :: String -> [a] Source #
Monad Maybe # |
Methods (>>=) :: Maybe a -> (a -> Maybe b) -> Maybe b Source # (>>) :: Maybe a -> Maybe b -> Maybe b Source # return :: a -> Maybe a Source # fail :: String -> Maybe a Source #
Monad IO # |
Methods (>>=) :: IO a -> (a -> IO b) -> IO b Source # (>>) :: IO a -> IO b -> IO b Source # return :: a -> IO a Source # fail :: String -> IO a Source #
Monad U1 # |
Methods (>>=) :: U1 a -> (a -> U1 b) -> U1 b Source # (>>) :: U1 a -> U1 b -> U1 b Source # return :: a -> U1 a Source # fail :: String -> U1 a Source #
Monad Par1 # |
Methods (>>=) :: Par1 a -> (a -> Par1 b) -> Par1 b Source # (>>) :: Par1 a -> Par1 b -> Par1 b Source # return :: a -> Par1 a Source # fail :: String -> Par1 a Source #
Monad ReadP # |
Methods (>>=) :: ReadP a -> (a -> ReadP b) -> ReadP b Source # (>>) :: ReadP a -> ReadP b -> ReadP b Source # return :: a -> ReadP a Source # fail :: String -> ReadP a Source #
Monad ReadPrec # |
Methods (>>=) :: ReadPrec a -> (a -> ReadPrec b) -> ReadPrec b Source # (>>) :: ReadPrec a -> ReadPrec b -> ReadPrec b Source # return :: a -> ReadPrec a Source # fail :: String -> ReadPrec a Source #
Monad Last # |
Methods (>>=) :: Last a -> (a -> Last b) -> Last b Source # (>>) :: Last a -> Last b -> Last b Source # return :: a -> Last a Source # fail :: String -> Last a Source #
Monad First # |
Methods (>>=) :: First a -> (a -> First b) -> First b Source # (>>) :: First a -> First b -> First b Source # return :: a -> First a Source # fail :: String -> First a Source #
Monad Product # |
Methods (>>=) :: Product a -> (a -> Product b) -> Product b Source # (>>) :: Product a -> Product b -> Product b Source # return :: a -> Product a Source # fail :: String -> Product a Source #
Monad Sum # |
Methods (>>=) :: Sum a -> (a -> Sum b) -> Sum b Source # (>>) :: Sum a -> Sum b -> Sum b Source # return :: a -> Sum a Source # fail :: String -> Sum a Source #
Monad Dual # |
Methods (>>=) :: Dual a -> (a -> Dual b) -> Dual b Source # (>>) :: Dual a -> Dual b -> Dual b Source # return :: a -> Dual a Source # fail :: String -> Dual a Source #
Monad STM # |
Methods (>>=) :: STM a -> (a -> STM b) -> STM b Source # (>>) :: STM a -> STM b -> STM b Source # return :: a -> STM a Source # fail :: String -> STM a Source #
Monad Complex # |
Methods (>>=) :: Complex a -> (a -> Complex b) -> Complex b Source # (>>) :: Complex a -> Complex b -> Complex b Source # return :: a -> Complex a Source # fail :: String -> Complex a Source #
Monad NonEmpty # |
Methods (>>=) :: NonEmpty a -> (a -> NonEmpty b) -> NonEmpty b Source # (>>) :: NonEmpty a -> NonEmpty b -> NonEmpty b Source # return :: a -> NonEmpty a Source # fail :: String -> NonEmpty a Source #
Monad Option # |
Methods (>>=) :: Option a -> (a -> Option b) -> Option b Source # (>>) :: Option a -> Option b -> Option b Source # return :: a -> Option a Source # fail :: String -> Option a Source #
Monad Last # |
Methods (>>=) :: Last a -> (a -> Last b) -> Last b Source # (>>) :: Last a -> Last b -> Last b Source # return :: a -> Last a Source # fail :: String -> Last a Source #
Monad First # |
Methods (>>=) :: First a -> (a -> First b) -> First b Source # (>>) :: First a -> First b -> First b Source # return :: a -> First a Source # fail :: String -> First a Source #
Monad Max # |
Methods (>>=) :: Max a -> (a -> Max b) -> Max b Source # (>>) :: Max a -> Max b -> Max b Source # return :: a -> Max a Source # fail :: String -> Max a Source #
Monad Min # |
Methods (>>=) :: Min a -> (a -> Min b) -> Min b Source # (>>) :: Min a -> Min b -> Min b Source # return :: a -> Min a Source # fail :: String -> Min a Source #
Monad Identity # |
Methods (>>=) :: Identity a -> (a -> Identity b) -> Identity b Source # (>>) :: Identity a -> Identity b -> Identity b Source # return :: a -> Identity a Source # fail :: String -> Identity a Source #
Monad ((->) r) # |
Methods (>>=) :: (r -> a) -> (a -> r -> b) -> r -> b Source # (>>) :: (r -> a) -> (r -> b) -> r -> b Source # return :: a -> r -> a Source # fail :: String -> r -> a Source #
Monad (Either e) # |
Methods (>>=) :: Either e a -> (a -> Either e b) -> Either e b Source # (>>) :: Either e a -> Either e b -> Either e b Source # return :: a -> Either e a Source # fail :: String -> Either e a Source #
Monad f => Monad (Rec1 f) # |
Methods (>>=) :: Rec1 f a -> (a -> Rec1 f b) -> Rec1 f b Source # (>>) :: Rec1 f a -> Rec1 f b -> Rec1 f b Source # return :: a -> Rec1 f a Source # fail :: String -> Rec1 f a Source #
Monoid a => Monad ((,) a) # |
Methods (>>=) :: (a, a) -> (a -> (a, b)) -> (a, b) Source # (>>) :: (a, a) -> (a, b) -> (a, b) Source # return :: a -> (a, a) Source # fail :: String -> (a, a) Source #
Monad (ST s) # |
Methods (>>=) :: ST s a -> (a -> ST s b) -> ST s b Source # (>>) :: ST s a -> ST s b -> ST s b Source # return :: a -> ST s a Source # fail :: String -> ST s a Source #
Monad (Proxy *) # |
Methods (>>=) :: Proxy * a -> (a -> Proxy * b) -> Proxy * b Source # (>>) :: Proxy * a -> Proxy * b -> Proxy * b Source # return :: a -> Proxy * a Source # fail :: String -> Proxy * a Source #
ArrowApply a => Monad (ArrowMonad a) # |
Methods (>>=) :: ArrowMonad a a -> (a -> ArrowMonad a b) -> ArrowMonad a b Source # (>>) :: ArrowMonad a a -> ArrowMonad a b -> ArrowMonad a b Source # return :: a -> ArrowMonad a a Source # fail :: String -> ArrowMonad a a Source #
Monad m => Monad (WrappedMonad m) # |
Methods (>>=) :: WrappedMonad m a -> (a -> WrappedMonad m b) -> WrappedMonad m b Source # (>>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b Source # return :: a -> WrappedMonad m a Source # fail :: String -> WrappedMonad m a Source #
Monad (ST s) # |
Methods (>>=) :: ST s a -> (a -> ST s b) -> ST s b Source # (>>) :: ST s a -> ST s b -> ST s b Source # return :: a -> ST s a Source # fail :: String -> ST s a Source #
(Monad f, Monad g) => Monad ((:*:) f g) # |
Methods (>>=) :: (f :*: g) a -> (a -> (f :*: g) b) -> (f :*: g) b Source # (>>) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) b Source # return :: a -> (f :*: g) a Source # fail :: String -> (f :*: g) a Source #
Monad f => Monad (Alt * f) # |
Methods (>>=) :: Alt * f a -> (a -> Alt * f b) -> Alt * f b Source # (>>) :: Alt * f a -> Alt * f b -> Alt * f b Source # return :: a -> Alt * f a Source # fail :: String -> Alt * f a Source #
Monad f => Monad (M1 i c f) # |
Methods (>>=) :: M1 i c f a -> (a -> M1 i c f b) -> M1 i c f b Source # (>>) :: M1 i c f a -> M1 i c f b -> M1 i c f b Source # return :: a -> M1 i c f a Source # fail :: String -> M1 i c f a Source #
(Monad f, Monad g) => Monad (Product * f g) # |
Methods (>>=) :: Product * f g a -> (a -> Product * f g b) -> Product * f g b Source # (>>) :: Product * f g a -> Product * f g b -> Product * f g b Source # return :: a -> Product * f g a Source # fail :: String -> Product * f g a Source #

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

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 () Source #

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

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

## Folds and traversals

class Foldable t where Source #

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

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

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

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

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

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

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

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

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

Does the element occur in the structure?

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

The largest element of a non-empty structure.

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

The least element of a non-empty structure.

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

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

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

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

Instances

Foldable [] # |
Methods fold :: Monoid m => [m] -> m Source # foldMap :: Monoid m => (a -> m) -> [a] -> m Source # foldr :: (a -> b -> b) -> b -> [a] -> b Source # foldr' :: (a -> b -> b) -> b -> [a] -> b Source # foldl :: (b -> a -> b) -> b -> [a] -> b Source # foldl' :: (b -> a -> b) -> b -> [a] -> b Source # foldr1 :: (a -> a -> a) -> [a] -> a Source # foldl1 :: (a -> a -> a) -> [a] -> a Source # toList :: [a] -> [a] Source # null :: [a] -> Bool Source # length :: [a] -> Int Source # elem :: Eq a => a -> [a] -> Bool Source # maximum :: Ord a => [a] -> a Source # minimum :: Ord a => [a] -> a Source # sum :: Num a => [a] -> a Source # product :: Num a => [a] -> a Source #
Foldable Maybe # |
Methods fold :: Monoid m => Maybe m -> m Source # foldMap :: Monoid m => (a -> m) -> Maybe a -> m Source # foldr :: (a -> b -> b) -> b -> Maybe a -> b Source # foldr' :: (a -> b -> b) -> b -> Maybe a -> b Source # foldl :: (b -> a -> b) -> b -> Maybe a -> b Source # foldl' :: (b -> a -> b) -> b -> Maybe a -> b Source # foldr1 :: (a -> a -> a) -> Maybe a -> a Source # foldl1 :: (a -> a -> a) -> Maybe a -> a Source # toList :: Maybe a -> [a] Source # null :: Maybe a -> Bool Source # length :: Maybe a -> Int Source # elem :: Eq a => a -> Maybe a -> Bool Source # maximum :: Ord a => Maybe a -> a Source # minimum :: Ord a => Maybe a -> a Source # sum :: Num a => Maybe a -> a Source # product :: Num a => Maybe a -> a Source #
Foldable V1 # |
Methods fold :: Monoid m => V1 m -> m Source # foldMap :: Monoid m => (a -> m) -> V1 a -> m Source # foldr :: (a -> b -> b) -> b -> V1 a -> b Source # foldr' :: (a -> b -> b) -> b -> V1 a -> b Source # foldl :: (b -> a -> b) -> b -> V1 a -> b Source # foldl' :: (b -> a -> b) -> b -> V1 a -> b Source # foldr1 :: (a -> a -> a) -> V1 a -> a Source # foldl1 :: (a -> a -> a) -> V1 a -> a Source # toList :: V1 a -> [a] Source # null :: V1 a -> Bool Source # length :: V1 a -> Int Source # elem :: Eq a => a -> V1 a -> Bool Source # maximum :: Ord a => V1 a -> a Source # minimum :: Ord a => V1 a -> a Source # sum :: Num a => V1 a -> a Source # product :: Num a => V1 a -> a Source #
Foldable U1 # |
Methods fold :: Monoid m => U1 m -> m Source # foldMap :: Monoid m => (a -> m) -> U1 a -> m Source # foldr :: (a -> b -> b) -> b -> U1 a -> b Source # foldr' :: (a -> b -> b) -> b -> U1 a -> b Source # foldl :: (b -> a -> b) -> b -> U1 a -> b Source # foldl' :: (b -> a -> b) -> b -> U1 a -> b Source # foldr1 :: (a -> a -> a) -> U1 a -> a Source # foldl1 :: (a -> a -> a) -> U1 a -> a Source # toList :: U1 a -> [a] Source # null :: U1 a -> Bool Source # length :: U1 a -> Int Source # elem :: Eq a => a -> U1 a -> Bool Source # maximum :: Ord a => U1 a -> a Source # minimum :: Ord a => U1 a -> a Source # sum :: Num a => U1 a -> a Source # product :: Num a => U1 a -> a Source #
Foldable Par1 # |
Methods fold :: Monoid m => Par1 m -> m Source # foldMap :: Monoid m => (a -> m) -> Par1 a -> m Source # foldr :: (a -> b -> b) -> b -> Par1 a -> b Source # foldr' :: (a -> b -> b) -> b -> Par1 a -> b Source # foldl :: (b -> a -> b) -> b -> Par1 a -> b Source # foldl' :: (b -> a -> b) -> b -> Par1 a -> b Source # foldr1 :: (a -> a -> a) -> Par1 a -> a Source # foldl1 :: (a -> a -> a) -> Par1 a -> a Source # toList :: Par1 a -> [a] Source # null :: Par1 a -> Bool Source # length :: Par1 a -> Int Source # elem :: Eq a => a -> Par1 a -> Bool Source # maximum :: Ord a => Par1 a -> a Source # minimum :: Ord a => Par1 a -> a Source # sum :: Num a => Par1 a -> a Source # product :: Num a => Par1 a -> a Source #
Foldable Last # |
Methods fold :: Monoid m => Last m -> m Source # foldMap :: Monoid m => (a -> m) -> Last a -> m Source # foldr :: (a -> b -> b) -> b -> Last a -> b Source # foldr' :: (a -> b -> b) -> b -> Last a -> b Source # foldl :: (b -> a -> b) -> b -> Last a -> b Source # foldl' :: (b -> a -> b) -> b -> Last a -> b Source # foldr1 :: (a -> a -> a) -> Last a -> a Source # foldl1 :: (a -> a -> a) -> Last a -> a Source # toList :: Last a -> [a] Source # null :: Last a -> Bool Source # length :: Last a -> Int Source # elem :: Eq a => a -> Last a -> Bool Source # maximum :: Ord a => Last a -> a Source # minimum :: Ord a => Last a -> a Source # sum :: Num a => Last a -> a Source # product :: Num a => Last a -> a Source #
Foldable First # |
Methods fold :: Monoid m => First m -> m Source # foldMap :: Monoid m => (a -> m) -> First a -> m Source # foldr :: (a -> b -> b) -> b -> First a -> b Source # foldr' :: (a -> b -> b) -> b -> First a -> b Source # foldl :: (b -> a -> b) -> b -> First a -> b Source # foldl' :: (b -> a -> b) -> b -> First a -> b Source # foldr1 :: (a -> a -> a) -> First a -> a Source # foldl1 :: (a -> a -> a) -> First a -> a Source # toList :: First a -> [a] Source # null :: First a -> Bool Source # length :: First a -> Int Source # elem :: Eq a => a -> First a -> Bool Source # maximum :: Ord a => First a -> a Source # minimum :: Ord a => First a -> a Source # sum :: Num a => First a -> a Source # product :: Num a => First a -> a Source #
Foldable Product # |
Methods fold :: Monoid m => Product m -> m Source # foldMap :: Monoid m => (a -> m) -> Product a -> m Source # foldr :: (a -> b -> b) -> b -> Product a -> b Source # foldr' :: (a -> b -> b) -> b -> Product a -> b Source # foldl :: (b -> a -> b) -> b -> Product a -> b Source # foldl' :: (b -> a -> b) -> b -> Product a -> b Source # foldr1 :: (a -> a -> a) -> Product a -> a Source # foldl1 :: (a -> a -> a) -> Product a -> a Source # toList :: Product a -> [a] Source # null :: Product a -> Bool Source # length :: Product a -> Int Source # elem :: Eq a => a -> Product a -> Bool Source # maximum :: Ord a => Product a -> a Source # minimum :: Ord a => Product a -> a Source # sum :: Num a => Product a -> a Source # product :: Num a => Product a -> a Source #
Foldable Sum # |
Methods fold :: Monoid m => Sum m -> m Source # foldMap :: Monoid m => (a -> m) -> Sum a -> m Source # foldr :: (a -> b -> b) -> b -> Sum a -> b Source # foldr' :: (a -> b -> b) -> b -> Sum a -> b Source # foldl :: (b -> a -> b) -> b -> Sum a -> b Source # foldl' :: (b -> a -> b) -> b -> Sum a -> b Source # foldr1 :: (a -> a -> a) -> Sum a -> a Source # foldl1 :: (a -> a -> a) -> Sum a -> a Source # toList :: Sum a -> [a] Source # null :: Sum a -> Bool Source # length :: Sum a -> Int Source # elem :: Eq a => a -> Sum a -> Bool Source # maximum :: Ord a => Sum a -> a Source # minimum :: Ord a => Sum a -> a Source # sum :: Num a => Sum a -> a Source # product :: Num a => Sum a -> a Source #
Foldable Dual # |
Methods fold :: Monoid m => Dual m -> m Source # foldMap :: Monoid m => (a -> m) -> Dual a -> m Source # foldr :: (a -> b -> b) -> b -> Dual a -> b Source # foldr' :: (a -> b -> b) -> b -> Dual a -> b Source # foldl :: (b -> a -> b) -> b -> Dual a -> b Source # foldl' :: (b -> a -> b) -> b -> Dual a -> b Source # foldr1 :: (a -> a -> a) -> Dual a -> a Source # foldl1 :: (a -> a -> a) -> Dual a -> a Source # toList :: Dual a -> [a] Source # null :: Dual a -> Bool Source # length :: Dual a -> Int Source # elem :: Eq a => a -> Dual a -> Bool Source # maximum :: Ord a => Dual a -> a Source # minimum :: Ord a => Dual a -> a Source # sum :: Num a => Dual a -> a Source # product :: Num a => Dual a -> a Source #
Foldable ZipList # |
Methods fold :: Monoid m => ZipList m -> m Source # foldMap :: Monoid m => (a -> m) -> ZipList a -> m Source # foldr :: (a -> b -> b) -> b -> ZipList a -> b Source # foldr' :: (a -> b -> b) -> b -> ZipList a -> b Source # foldl :: (b -> a -> b) -> b -> ZipList a -> b Source # foldl' :: (b -> a -> b) -> b -> ZipList a -> b Source # foldr1 :: (a -> a -> a) -> ZipList a -> a Source # foldl1 :: (a -> a -> a) -> ZipList a -> a Source # toList :: ZipList a -> [a] Source # null :: ZipList a -> Bool Source # length :: ZipList a -> Int Source # elem :: Eq a => a -> ZipList a -> Bool Source # maximum :: Ord a => ZipList a -> a Source # minimum :: Ord a => ZipList a -> a Source # sum :: Num a => ZipList a -> a Source # product :: Num a => ZipList a -> a Source #
Foldable Complex # |
Methods fold :: Monoid m => Complex m -> m Source # foldMap :: Monoid m => (a -> m) -> Complex a -> m Source # foldr :: (a -> b -> b) -> b -> Complex a -> b Source # foldr' :: (a -> b -> b) -> b -> Complex a -> b Source # foldl :: (b -> a -> b) -> b -> Complex a -> b Source # foldl' :: (b -> a -> b) -> b -> Complex a -> b Source # foldr1 :: (a -> a -> a) -> Complex a -> a Source # foldl1 :: (a -> a -> a) -> Complex a -> a Source # toList :: Complex a -> [a] Source # null :: Complex a -> Bool Source # length :: Complex a -> Int Source # elem :: Eq a => a -> Complex a -> Bool Source # maximum :: Ord a => Complex a -> a Source # minimum :: Ord a => Complex a -> a Source # sum :: Num a => Complex a -> a Source # product :: Num a => Complex a -> a Source #
Foldable NonEmpty # |
Methods fold :: Monoid m => NonEmpty m -> m Source # foldMap :: Monoid m => (a -> m) -> NonEmpty a -> m Source # foldr :: (a -> b -> b) -> b -> NonEmpty a -> b Source # foldr' :: (a -> b -> b) -> b -> NonEmpty a -> b Source # foldl :: (b -> a -> b) -> b -> NonEmpty a -> b Source # foldl' :: (b -> a -> b) -> b -> NonEmpty a -> b Source # foldr1 :: (a -> a -> a) -> NonEmpty a -> a Source # foldl1 :: (a -> a -> a) -> NonEmpty a -> a Source # toList :: NonEmpty a -> [a] Source # null :: NonEmpty a -> Bool Source # length :: NonEmpty a -> Int Source # elem :: Eq a => a -> NonEmpty a -> Bool Source # maximum :: Ord a => NonEmpty a -> a Source # minimum :: Ord a => NonEmpty a -> a Source # sum :: Num a => NonEmpty a -> a Source # product :: Num a => NonEmpty a -> a Source #
Foldable Option # |
Methods fold :: Monoid m => Option m -> m Source # foldMap :: Monoid m => (a -> m) -> Option a -> m Source # foldr :: (a -> b -> b) -> b -> Option a -> b Source # foldr' :: (a -> b -> b) -> b -> Option a -> b Source # foldl :: (b -> a -> b) -> b -> Option a -> b Source # foldl' :: (b -> a -> b) -> b -> Option a -> b Source # foldr1 :: (a -> a -> a) -> Option a -> a Source # foldl1 :: (a -> a -> a) -> Option a -> a Source # toList :: Option a -> [a] Source # null :: Option a -> Bool Source # length :: Option a -> Int Source # elem :: Eq a => a -> Option a -> Bool Source # maximum :: Ord a => Option a -> a Source # minimum :: Ord a => Option a -> a Source # sum :: Num a => Option a -> a Source # product :: Num a => Option a -> a Source #
Foldable Last # |
Methods fold :: Monoid m => Last m -> m Source # foldMap :: Monoid m => (a -> m) -> Last a -> m Source # foldr :: (a -> b -> b) -> b -> Last a -> b Source # foldr' :: (a -> b -> b) -> b -> Last a -> b Source # foldl :: (b -> a -> b) -> b -> Last a -> b Source # foldl' :: (b -> a -> b) -> b -> Last a -> b Source # foldr1 :: (a -> a -> a) -> Last a -> a Source # foldl1 :: (a -> a -> a) -> Last a -> a Source # toList :: Last a -> [a] Source # null :: Last a -> Bool Source # length :: Last a -> Int Source # elem :: Eq a => a -> Last a -> Bool Source # maximum :: Ord a => Last a -> a Source # minimum :: Ord a => Last a -> a Source # sum :: Num a => Last a -> a Source # product :: Num a => Last a -> a Source #
Foldable First # |
Methods fold :: Monoid m => First m -> m Source # foldMap :: Monoid m => (a -> m) -> First a -> m Source # foldr :: (a -> b -> b) -> b -> First a -> b Source # foldr' :: (a -> b -> b) -> b -> First a -> b Source # foldl :: (b -> a -> b) -> b -> First a -> b Source # foldl' :: (b -> a -> b) -> b -> First a -> b Source # foldr1 :: (a -> a -> a) -> First a -> a Source # foldl1 :: (a -> a -> a) -> First a -> a Source # toList :: First a -> [a] Source # null :: First a -> Bool Source # length :: First a -> Int Source # elem :: Eq a => a -> First a -> Bool Source # maximum :: Ord a => First a -> a Source # minimum :: Ord a => First a -> a Source # sum :: Num a => First a -> a Source # product :: Num a => First a -> a Source #
Foldable Max # |
Methods fold :: Monoid m => Max m -> m Source # foldMap :: Monoid m => (a -> m) -> Max a -> m Source # foldr :: (a -> b -> b) -> b -> Max a -> b Source # foldr' :: (a -> b -> b) -> b -> Max a -> b Source # foldl :: (b -> a -> b) -> b -> Max a -> b Source # foldl' :: (b -> a -> b) -> b -> Max a -> b Source # foldr1 :: (a -> a -> a) -> Max a -> a Source # foldl1 :: (a -> a -> a) -> Max a -> a Source # toList :: Max a -> [a] Source # null :: Max a -> Bool Source # length :: Max a -> Int Source # elem :: Eq a => a -> Max a -> Bool Source # maximum :: Ord a => Max a -> a Source # minimum :: Ord a => Max a -> a Source # sum :: Num a => Max a -> a Source # product :: Num a => Max a -> a Source #
Foldable Min # |
Methods fold :: Monoid m => Min m -> m Source # foldMap :: Monoid m => (a -> m) -> Min a -> m Source # foldr :: (a -> b -> b) -> b -> Min a -> b Source # foldr' :: (a -> b -> b) -> b -> Min a -> b Source # foldl :: (b -> a -> b) -> b -> Min a -> b Source # foldl' :: (b -> a -> b) -> b -> Min a -> b Source # foldr1 :: (a -> a -> a) -> Min a -> a Source # foldl1 :: (a -> a -> a) -> Min a -> a Source # toList :: Min a -> [a] Source # null :: Min a -> Bool Source # length :: Min a -> Int Source # elem :: Eq a => a -> Min a -> Bool Source # maximum :: Ord a => Min a -> a Source # minimum :: Ord a => Min a -> a Source # sum :: Num a => Min a -> a Source # product :: Num a => Min a -> a Source #
Foldable Identity # |
Methods fold :: Monoid m => Identity m -> m Source # foldMap :: Monoid m => (a -> m) -> Identity a -> m Source # foldr :: (a -> b -> b) -> b -> Identity a -> b Source # foldr' :: (a -> b -> b) -> b -> Identity a -> b Source # foldl :: (b -> a -> b) -> b -> Identity a -> b Source # foldl' :: (b -> a -> b) -> b -> Identity a -> b Source # foldr1 :: (a -> a -> a) -> Identity a -> a Source # foldl1 :: (a -> a -> a) -> Identity a -> a Source # toList :: Identity a -> [a] Source # null :: Identity a -> Bool Source # length :: Identity a -> Int Source # elem :: Eq a => a -> Identity a -> Bool Source # maximum :: Ord a => Identity a -> a Source # minimum :: Ord a => Identity a -> a Source # sum :: Num a => Identity a -> a Source # product :: Num a => Identity a -> a Source #
Foldable (Either a) # |
Methods fold :: Monoid m => Either a m -> m Source # foldMap :: Monoid m => (a -> m) -> Either a a -> m Source # foldr :: (a -> b -> b) -> b -> Either a a -> b Source # foldr' :: (a -> b -> b) -> b -> Either a a -> b Source # foldl :: (b -> a -> b) -> b -> Either a a -> b Source # foldl' :: (b -> a -> b) -> b -> Either a a -> b Source # foldr1 :: (a -> a -> a) -> Either a a -> a Source # foldl1 :: (a -> a -> a) -> Either a a -> a Source # toList :: Either a a -> [a] Source # null :: Either a a -> Bool Source # length :: Either a a -> Int Source # elem :: Eq a => a -> Either a a -> Bool Source # maximum :: Ord a => Either a a -> a Source # minimum :: Ord a => Either a a -> a Source # sum :: Num a => Either a a -> a Source # product :: Num a => Either a a -> a Source #
Foldable f => Foldable (Rec1 f) # |
Methods fold :: Monoid m => Rec1 f m -> m Source # foldMap :: Monoid m => (a -> m) -> Rec1 f a -> m Source # foldr :: (a -> b -> b) -> b -> Rec1 f a -> b Source # foldr' :: (a -> b -> b) -> b -> Rec1 f a -> b Source # foldl :: (b -> a -> b) -> b -> Rec1 f a -> b Source # foldl' :: (b -> a -> b) -> b -> Rec1 f a -> b Source # foldr1 :: (a -> a -> a) -> Rec1 f a -> a Source # foldl1 :: (a -> a -> a) -> Rec1 f a -> a Source # toList :: Rec1 f a -> [a] Source # null :: Rec1 f a -> Bool Source # length :: Rec1 f a -> Int Source # elem :: Eq a => a -> Rec1 f a -> Bool Source # maximum :: Ord a => Rec1 f a -> a Source # minimum :: Ord a => Rec1 f a -> a Source # sum :: Num a => Rec1 f a -> a Source # product :: Num a => Rec1 f a -> a Source #
Foldable (URec Char) # |
Methods fold :: Monoid m => URec Char m -> m Source # foldMap :: Monoid m => (a -> m) -> URec Char a -> m Source # foldr :: (a -> b -> b) -> b -> URec Char a -> b Source # foldr' :: (a -> b -> b) -> b -> URec Char a -> b Source # foldl :: (b -> a -> b) -> b -> URec Char a -> b Source # foldl' :: (b -> a -> b) -> b -> URec Char a -> b Source # foldr1 :: (a -> a -> a) -> URec Char a -> a Source # foldl1 :: (a -> a -> a) -> URec Char a -> a Source # toList :: URec Char a -> [a] Source # null :: URec Char a -> Bool Source # length :: URec Char a -> Int Source # elem :: Eq a => a -> URec Char a -> Bool Source # maximum :: Ord a => URec Char a -> a Source # minimum :: Ord a => URec Char a -> a Source # sum :: Num a => URec Char a -> a Source # product :: Num a => URec Char a -> a Source #
Foldable (URec Double) # |
Methods fold :: Monoid m => URec Double m -> m Source # foldMap :: Monoid m => (a -> m) -> URec Double a -> m Source # foldr :: (a -> b -> b) -> b -> URec Double a -> b Source # foldr' :: (a -> b -> b) -> b -> URec Double a -> b Source # foldl :: (b -> a -> b) -> b -> URec Double a -> b Source # foldl' :: (b -> a -> b) -> b -> URec Double a -> b Source # foldr1 :: (a -> a -> a) -> URec Double a -> a Source # foldl1 :: (a -> a -> a) -> URec Double a -> a Source # toList :: URec Double a -> [a] Source # null :: URec Double a -> Bool Source # length :: URec Double a -> Int Source # elem :: Eq a => a -> URec Double a -> Bool Source # maximum :: Ord a => URec Double a -> a Source # minimum :: Ord a => URec Double a -> a Source # sum :: Num a => URec Double a -> a Source # product :: Num a => URec Double a -> a Source #
Foldable (URec Float) # |
Methods fold :: Monoid m => URec Float m -> m Source # foldMap :: Monoid m => (a -> m) -> URec Float a -> m Source # foldr :: (a -> b -> b) -> b -> URec Float a -> b Source # foldr' :: (a -> b -> b) -> b -> URec Float a -> b Source # foldl :: (b -> a -> b) -> b -> URec Float a -> b Source # foldl' :: (b -> a -> b) -> b -> URec Float a -> b Source # foldr1 :: (a -> a -> a) -> URec Float a -> a Source # foldl1 :: (a -> a -> a) -> URec Float a -> a Source # toList :: URec Float a -> [a] Source # null :: URec Float a -> Bool Source # length :: URec Float a -> Int Source # elem :: Eq a => a -> URec Float a -> Bool Source # maximum :: Ord a => URec Float a -> a Source # minimum :: Ord a => URec Float a -> a Source # sum :: Num a => URec Float a -> a Source # product :: Num a => URec Float a -> a Source #
Foldable (URec Int) # |
Methods fold :: Monoid m => URec Int m -> m Source # foldMap :: Monoid m => (a -> m) -> URec Int a -> m Source # foldr :: (a -> b -> b) -> b -> URec Int a -> b Source # foldr' :: (a -> b -> b) -> b -> URec Int a -> b Source # foldl :: (b -> a -> b) -> b -> URec Int a -> b Source # foldl' :: (b -> a -> b) -> b -> URec Int a -> b Source # foldr1 :: (a -> a -> a) -> URec Int a -> a Source # foldl1 :: (a -> a -> a) -> URec Int a -> a Source # toList :: URec Int a -> [a] Source # null :: URec Int a -> Bool Source # length :: URec Int a -> Int Source # elem :: Eq a => a -> URec Int a -> Bool Source # maximum :: Ord a => URec Int a -> a Source # minimum :: Ord a => URec Int a -> a Source # sum :: Num a => URec Int a -> a Source # product :: Num a => URec Int a -> a Source #
Foldable (URec Word) # |
Methods fold :: Monoid m => URec Word m -> m Source # foldMap :: Monoid m => (a -> m) -> URec Word a -> m Source # foldr :: (a -> b -> b) -> b -> URec Word a -> b Source # foldr' :: (a -> b -> b) -> b -> URec Word a -> b Source # foldl :: (b -> a -> b) -> b -> URec Word a -> b Source # foldl' :: (b -> a -> b) -> b -> URec Word a -> b Source # foldr1 :: (a -> a -> a) -> URec Word a -> a Source # foldl1 :: (a -> a -> a) -> URec Word a -> a Source # toList :: URec Word a -> [a] Source # null :: URec Word a -> Bool Source # length :: URec Word a -> Int Source # elem :: Eq a => a -> URec Word a -> Bool Source # maximum :: Ord a => URec Word a -> a Source # minimum :: Ord a => URec Word a -> a Source # sum :: Num a => URec Word a -> a Source # product :: Num a => URec Word a -> a Source #
Foldable (URec (Ptr ())) # |
Methods fold :: Monoid m => URec (Ptr ()) m -> m Source # foldMap :: Monoid m => (a -> m) -> URec (Ptr ()) a -> m Source # foldr :: (a -> b -> b) -> b -> URec (Ptr ()) a -> b Source # foldr' :: (a -> b -> b) -> b -> URec (Ptr ()) a -> b Source # foldl :: (b -> a -> b) -> b -> URec (Ptr ()) a -> b Source # foldl' :: (b -> a -> b) -> b -> URec (Ptr ()) a -> b Source # foldr1 :: (a -> a -> a) -> URec (Ptr ()) a -> a Source # foldl1 :: (a -> a -> a) -> URec (Ptr ()) a -> a Source # toList :: URec (Ptr ()) a -> [a] Source # null :: URec (Ptr ()) a -> Bool Source # length :: URec (Ptr ()) a -> Int Source # elem :: Eq a => a -> URec (Ptr ()) a -> Bool Source # maximum :: Ord a => URec (Ptr ()) a -> a Source # minimum :: Ord a => URec (Ptr ()) a -> a Source # sum :: Num a => URec (Ptr ()) a -> a Source # product :: Num a => URec (Ptr ()) a -> a Source #
Foldable ((,) a) # |
Methods fold :: Monoid m => (a, m) -> m Source # foldMap :: Monoid m => (a -> m) -> (a, a) -> m Source # foldr :: (a -> b -> b) -> b -> (a, a) -> b Source # foldr' :: (a -> b -> b) -> b -> (a, a) -> b Source # foldl :: (b -> a -> b) -> b -> (a, a) -> b Source # foldl' :: (b -> a -> b) -> b -> (a, a) -> b Source # foldr1 :: (a -> a -> a) -> (a, a) -> a Source # foldl1 :: (a -> a -> a) -> (a, a) -> a Source # toList :: (a, a) -> [a] Source # null :: (a, a) -> Bool Source # length :: (a, a) -> Int Source # elem :: Eq a => a -> (a, a) -> Bool Source # maximum :: Ord a => (a, a) -> a Source # minimum :: Ord a => (a, a) -> a Source # sum :: Num a => (a, a) -> a Source # product :: Num a => (a, a) -> a Source #
Foldable (Proxy *) # |
Methods fold :: Monoid m => Proxy * m -> m Source # foldMap :: Monoid m => (a -> m) -> Proxy * a -> m Source # foldr :: (a -> b -> b) -> b -> Proxy * a -> b Source # foldr' :: (a -> b -> b) -> b -> Proxy * a -> b Source # foldl :: (b -> a -> b) -> b -> Proxy * a -> b Source # foldl' :: (b -> a -> b) -> b -> Proxy * a -> b Source # foldr1 :: (a -> a -> a) -> Proxy * a -> a Source # foldl1 :: (a -> a -> a) -> Proxy * a -> a Source # toList :: Proxy * a -> [a] Source # null :: Proxy * a -> Bool Source # length :: Proxy * a -> Int Source # elem :: Eq a => a -> Proxy * a -> Bool Source # maximum :: Ord a => Proxy * a -> a Source # minimum :: Ord a => Proxy * a -> a Source # sum :: Num a => Proxy * a -> a Source # product :: Num a => Proxy * a -> a Source #
Foldable (Arg a) # |
Methods fold :: Monoid m => Arg a m -> m Source # foldMap :: Monoid m => (a -> m) -> Arg a a -> m Source # foldr :: (a -> b -> b) -> b -> Arg a a -> b Source # foldr' :: (a -> b -> b) -> b -> Arg a a -> b Source # foldl :: (b -> a -> b) -> b -> Arg a a -> b Source # foldl' :: (b -> a -> b) -> b -> Arg a a -> b Source # foldr1 :: (a -> a -> a) -> Arg a a -> a Source # foldl1 :: (a -> a -> a) -> Arg a a -> a Source # toList :: Arg a a -> [a] Source # null :: Arg a a -> Bool Source # length :: Arg a a -> Int Source # elem :: Eq a => a -> Arg a a -> Bool Source # maximum :: Ord a => Arg a a -> a Source # minimum :: Ord a => Arg a a -> a Source # sum :: Num a => Arg a a -> a Source # product :: Num a => Arg a a -> a Source #
Foldable (K1 i c) # |
Methods fold :: Monoid m => K1 i c m -> m Source # foldMap :: Monoid m => (a -> m) -> K1 i c a -> m Source # foldr :: (a -> b -> b) -> b -> K1 i c a -> b Source # foldr' :: (a -> b -> b) -> b -> K1 i c a -> b Source # foldl :: (b -> a -> b) -> b -> K1 i c a -> b Source # foldl' :: (b -> a -> b) -> b -> K1 i c a -> b Source # foldr1 :: (a -> a -> a) -> K1 i c a -> a Source # foldl1 :: (a -> a -> a) -> K1 i c a -> a Source # toList :: K1 i c a -> [a] Source # null :: K1 i c a -> Bool Source # length :: K1 i c a -> Int Source # elem :: Eq a => a -> K1 i c a -> Bool Source # maximum :: Ord a => K1 i c a -> a Source # minimum :: Ord a => K1 i c a -> a Source # sum :: Num a => K1 i c a -> a Source # product :: Num a => K1 i c a -> a Source #
(Foldable f, Foldable g) => Foldable ((:+:) f g) # |
Methods fold :: Monoid m => (f :+: g) m -> m Source # foldMap :: Monoid m => (a -> m) -> (f :+: g) a -> m Source # foldr :: (a -> b -> b) -> b -> (f :+: g) a -> b Source # foldr' :: (a -> b -> b) -> b -> (f :+: g) a -> b Source # foldl :: (b -> a -> b) -> b -> (f :+: g) a -> b Source # foldl' :: (b -> a -> b) -> b -> (f :+: g) a -> b Source # foldr1 :: (a -> a -> a) -> (f :+: g) a -> a Source # foldl1 :: (a -> a -> a) -> (f :+: g) a -> a Source # toList :: (f :+: g) a -> [a] Source # null :: (f :+: g) a -> Bool Source # length :: (f :+: g) a -> Int Source # elem :: Eq a => a -> (f :+: g) a -> Bool Source # maximum :: Ord a => (f :+: g) a -> a Source # minimum :: Ord a => (f :+: g) a -> a Source # sum :: Num a => (f :+: g) a -> a Source # product :: Num a => (f :+: g) a -> a Source #
(Foldable f, Foldable g) => Foldable ((:*:) f g) # |
Methods fold :: Monoid m => (f :*: g) m -> m Source # foldMap :: Monoid m => (a -> m) -> (f :*: g) a -> m Source # foldr :: (a -> b -> b) -> b -> (f :*: g) a -> b Source # foldr' :: (a -> b -> b) -> b -> (f :*: g) a -> b Source # foldl :: (b -> a -> b) -> b -> (f :*: g) a -> b Source # foldl' :: (b -> a -> b) -> b -> (f :*: g) a -> b Source # foldr1 :: (a -> a -> a) -> (f :*: g) a -> a Source # foldl1 :: (a -> a -> a) -> (f :*: g) a -> a Source # toList :: (f :*: g) a -> [a] Source # null :: (f :*: g) a -> Bool Source # length :: (f :*: g) a -> Int Source # elem :: Eq a => a -> (f :*: g) a -> Bool Source # maximum :: Ord a => (f :*: g) a -> a Source # minimum :: Ord a => (f :*: g) a -> a Source # sum :: Num a => (f :*: g) a -> a Source # product :: Num a => (f :*: g) a -> a Source #
(Foldable f, Foldable g) => Foldable ((:.:) f g) # |
Methods fold :: Monoid m => (f :.: g) m -> m Source # foldMap :: Monoid m => (a -> m) -> (f :.: g) a -> m Source # foldr :: (a -> b -> b) -> b -> (f :.: g) a -> b Source # foldr' :: (a -> b -> b) -> b -> (f :.: g) a -> b Source # foldl :: (b -> a -> b) -> b -> (f :.: g) a -> b Source # foldl' :: (b -> a -> b) -> b -> (f :.: g) a -> b Source # foldr1 :: (a -> a -> a) -> (f :.: g) a -> a Source # foldl1 :: (a -> a -> a) -> (f :.: g) a -> a Source # toList :: (f :.: g) a -> [a] Source # null :: (f :.: g) a -> Bool Source # length :: (f :.: g) a -> Int Source # elem :: Eq a => a -> (f :.: g) a -> Bool Source # maximum :: Ord a => (f :.: g) a -> a Source # minimum :: Ord a => (f :.: g) a -> a Source # sum :: Num a => (f :.: g) a -> a Source # product :: Num a => (f :.: g) a -> a Source #
Foldable (Const * m) # |
Methods fold :: Monoid m => Const * m m -> m Source # foldMap :: Monoid m => (a -> m) -> Const * m a -> m Source # foldr :: (a -> b -> b) -> b -> Const * m a -> b Source # foldr' :: (a -> b -> b) -> b -> Const * m a -> b Source # foldl :: (b -> a -> b) -> b -> Const * m a -> b Source # foldl' :: (b -> a -> b) -> b -> Const * m a -> b Source # foldr1 :: (a -> a -> a) -> Const * m a -> a Source # foldl1 :: (a -> a -> a) -> Const * m a -> a Source # toList :: Const * m a -> [a] Source # null :: Const * m a -> Bool Source # length :: Const * m a -> Int Source # elem :: Eq a => a -> Const * m a -> Bool Source # maximum :: Ord a => Const * m a -> a Source # minimum :: Ord a => Const * m a -> a Source # sum :: Num a => Const * m a -> a Source # product :: Num a => Const * m a -> a Source #
Foldable f => Foldable (M1 i c f) # |
Methods fold :: Monoid m => M1 i c f m -> m Source # foldMap :: Monoid m => (a -> m) -> M1 i c f a -> m Source # foldr :: (a -> b -> b) -> b -> M1 i c f a -> b Source # foldr' :: (a -> b -> b) -> b -> M1 i c f a -> b Source # foldl :: (b -> a -> b) -> b -> M1 i c f a -> b Source # foldl' :: (b -> a -> b) -> b -> M1 i c f a -> b Source # foldr1 :: (a -> a -> a) -> M1 i c f a -> a Source # foldl1 :: (a -> a -> a) -> M1 i c f a -> a Source # toList :: M1 i c f a -> [a] Source # null :: M1 i c f a -> Bool Source # length :: M1 i c f a -> Int Source # elem :: Eq a => a -> M1 i c f a -> Bool Source # maximum :: Ord a => M1 i c f a -> a Source # minimum :: Ord a => M1 i c f a -> a Source # sum :: Num a => M1 i c f a -> a Source # product :: Num a => M1 i c f a -> a Source #
(Foldable f, Foldable g) => Foldable (Product * f g) # |
Methods fold :: Monoid m => Product * f g m -> m Source # foldMap :: Monoid m => (a -> m) -> Product * f g a -> m Source # foldr :: (a -> b -> b) -> b -> Product * f g a -> b Source # foldr' :: (a -> b -> b) -> b -> Product * f g a -> b Source # foldl :: (b -> a -> b) -> b -> Product * f g a -> b Source # foldl' :: (b -> a -> b) -> b -> Product * f g a -> b Source # foldr1 :: (a -> a -> a) -> Product * f g a -> a Source # foldl1 :: (a -> a -> a) -> Product * f g a -> a Source # toList :: Product * f g a -> [a] Source # null :: Product * f g a -> Bool Source # length :: Product * f g a -> Int Source # elem :: Eq a => a -> Product * f g a -> Bool Source # maximum :: Ord a => Product * f g a -> a Source # minimum :: Ord a => Product * f g a -> a Source # sum :: Num a => Product * f g a -> a Source # product :: Num a => Product * f g a -> a Source #
(Foldable f, Foldable g) => Foldable (Sum * f g) # |
Methods fold :: Monoid m => Sum * f g m -> m Source # foldMap :: Monoid m => (a -> m) -> Sum * f g a -> m Source # foldr :: (a -> b -> b) -> b -> Sum * f g a -> b Source # foldr' :: (a -> b -> b) -> b -> Sum * f g a -> b Source # foldl :: (b -> a -> b) -> b -> Sum * f g a -> b Source # foldl' :: (b -> a -> b) -> b -> Sum * f g a -> b Source # foldr1 :: (a -> a -> a) -> Sum * f g a -> a Source # foldl1 :: (a -> a -> a) -> Sum * f g a -> a Source # toList :: Sum * f g a -> [a] Source # null :: Sum * f g a -> Bool Source # length :: Sum * f g a -> Int Source # elem :: Eq a => a -> Sum * f g a -> Bool Source # maximum :: Ord a => Sum * f g a -> a Source # minimum :: Ord a => Sum * f g a -> a Source # sum :: Num a => Sum * f g a -> a Source # product :: Num a => Sum * f g a -> a Source #
(Foldable f, Foldable g) => Foldable (Compose * * f g) # |
Methods fold :: Monoid m => Compose * * f g m -> m Source # foldMap :: Monoid m => (a -> m) -> Compose * * f g a -> m Source # foldr :: (a -> b -> b) -> b -> Compose * * f g a -> b Source # foldr' :: (a -> b -> b) -> b -> Compose * * f g a -> b Source # foldl :: (b -> a -> b) -> b -> Compose * * f g a -> b Source # foldl' :: (b -> a -> b) -> b -> Compose * * f g a -> b Source # foldr1 :: (a -> a -> a) -> Compose * * f g a -> a Source # foldl1 :: (a -> a -> a) -> Compose * * f g a -> a Source # toList :: Compose * * f g a -> [a] Source # null :: Compose * * f g a -> Bool Source # length :: Compose * * f g a -> Int Source # elem :: Eq a => a -> Compose * * f g a -> Bool Source # maximum :: Ord a => Compose * * f g a -> a Source # minimum :: Ord a => Compose * * f g a -> a Source # sum :: Num a => Compose * * f g a -> a Source # product :: Num a => Compose * * f g a -> a Source #

class (Functor t, Foldable t) => Traversable t where Source #

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) Source #

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) Source #

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) Source #

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) Source #

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 [] # |
Methods traverse :: Applicative f => (a -> f b) -> [a] -> f [b] Source # sequenceA :: Applicative f => [f a] -> f [a] Source # mapM :: Monad m => (a -> m b) -> [a] -> m [b] Source # sequence :: Monad m => [m a] -> m [a] Source #
Traversable Maybe # |
Methods traverse :: Applicative f => (a -> f b) -> Maybe a -> f (Maybe b) Source # sequenceA :: Applicative f => Maybe (f a) -> f (Maybe a) Source # mapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b) Source # sequence :: Monad m => Maybe (m a) -> m (Maybe a) Source #
Traversable V1 # |
Methods traverse :: Applicative f => (a -> f b) -> V1 a -> f (V1 b) Source # sequenceA :: Applicative f => V1 (f a) -> f (V1 a) Source # mapM :: Monad m => (a -> m b) -> V1 a -> m (V1 b) Source # sequence :: Monad m => V1 (m a) -> m (V1 a) Source #
Traversable U1 # |
Methods traverse :: Applicative f => (a -> f b) -> U1 a -> f (U1 b) Source # sequenceA :: Applicative f => U1 (f a) -> f (U1 a) Source # mapM :: Monad m => (a -> m b) -> U1 a -> m (U1 b) Source # sequence :: Monad m => U1 (m a) -> m (U1 a) Source #
Traversable Par1 # |
Methods traverse :: Applicative f => (a -> f b) -> Par1 a -> f (Par1 b) Source # sequenceA :: Applicative f => Par1 (f a) -> f (Par1 a) Source # mapM :: Monad m => (a -> m b) -> Par1 a -> m (Par1 b) Source # sequence :: Monad m => Par1 (m a) -> m (Par1 a) Source #
Traversable Last # |
Methods traverse :: Applicative f => (a -> f b) -> Last a -> f (Last b) Source # sequenceA :: Applicative f => Last (f a) -> f (Last a) Source # mapM :: Monad m => (a -> m b) -> Last a -> m (Last b) Source # sequence :: Monad m => Last (m a) -> m (Last a) Source #
Traversable First # |
Methods traverse :: Applicative f => (a -> f b) -> First a -> f (First b) Source # sequenceA :: Applicative f => First (f a) -> f (First a) Source # mapM :: Monad m => (a -> m b) -> First a -> m (First b) Source # sequence :: Monad m => First (m a) -> m (First a) Source #
Traversable Product # |
Methods traverse :: Applicative f => (a -> f b) -> Product a -> f (Product b) Source # sequenceA :: Applicative f => Product (f a) -> f (Product a) Source # mapM :: Monad m => (a -> m b) -> Product a -> m (Product b) Source # sequence :: Monad m => Product (m a) -> m (Product a) Source #
Traversable Sum # |
Methods traverse :: Applicative f => (a -> f b) -> Sum a -> f (Sum b) Source # sequenceA :: Applicative f => Sum (f a) -> f (Sum a) Source # mapM :: Monad m => (a -> m b) -> Sum a -> m (Sum b) Source # sequence :: Monad m => Sum (m a) -> m (Sum a) Source #
Traversable Dual # |
Methods traverse :: Applicative f => (a -> f b) -> Dual a -> f (Dual b) Source # sequenceA :: Applicative f => Dual (f a) -> f (Dual a) Source # mapM :: Monad m => (a -> m b) -> Dual a -> m (Dual b) Source # sequence :: Monad m => Dual (m a) -> m (Dual a) Source #
Traversable ZipList # |
Methods traverse :: Applicative f => (a -> f b) -> ZipList a -> f (ZipList b) Source # sequenceA :: Applicative f => ZipList (f a) -> f (ZipList a) Source # mapM :: Monad m => (a -> m b) -> ZipList a -> m (ZipList b) Source # sequence :: Monad m => ZipList (m a) -> m (ZipList a) Source #
Traversable Complex # |
Methods traverse :: Applicative f => (a -> f b) -> Complex a -> f (Complex b) Source # sequenceA :: Applicative f => Complex (f a) -> f (Complex a) Source # mapM :: Monad m => (a -> m b) -> Complex a -> m (Complex b) Source # sequence :: Monad m => Complex (m a) -> m (Complex a) Source #
Traversable NonEmpty # |
Methods traverse :: Applicative f => (a -> f b) -> NonEmpty a -> f (NonEmpty b) Source # sequenceA :: Applicative f => NonEmpty (f a) -> f (NonEmpty a) Source # mapM :: Monad m => (a -> m b) -> NonEmpty a -> m (NonEmpty b) Source # sequence :: Monad m => NonEmpty (m a) -> m (NonEmpty a) Source #
Traversable Option # |
Methods traverse :: Applicative f => (a -> f b) -> Option a -> f (Option b) Source # sequenceA :: Applicative f => Option (f a) -> f (Option a) Source # mapM :: Monad m => (a -> m b) -> Option a -> m (Option b) Source # sequence :: Monad m => Option (m a) -> m (Option a) Source #
Traversable Last # |
Methods traverse :: Applicative f => (a -> f b) -> Last a -> f (Last b) Source # sequenceA :: Applicative f => Last (f a) -> f (Last a) Source # mapM :: Monad m => (a -> m b) -> Last a -> m (Last b) Source # sequence :: Monad m => Last (m a) -> m (Last a) Source #
Traversable First # |
Methods traverse :: Applicative f => (a -> f b) -> First a -> f (First b) Source # sequenceA :: Applicative f => First (f a) -> f (First a) Source # mapM :: Monad m => (a -> m b) -> First a -> m (First b) Source # sequence :: Monad m => First (m a) -> m (First a) Source #
Traversable Max # |
Methods traverse :: Applicative f => (a -> f b) -> Max a -> f (Max b) Source # sequenceA :: Applicative f => Max (f a) -> f (Max a) Source # mapM :: Monad m => (a -> m b) -> Max a -> m (Max b) Source # sequence :: Monad m => Max (m a) -> m (Max a) Source #
Traversable Min # |
Methods traverse :: Applicative f => (a -> f b) -> Min a -> f (Min b) Source # sequenceA :: Applicative f => Min (f a) -> f (Min a) Source # mapM :: Monad m => (a -> m b) -> Min a -> m (Min b) Source # sequence :: Monad m => Min (m a) -> m (Min a) Source #
Traversable Identity # |
Methods traverse :: Applicative f => (a -> f b) -> Identity a -> f (Identity b) Source # sequenceA :: Applicative f => Identity (f a) -> f (Identity a) Source # mapM :: Monad m => (a -> m b) -> Identity a -> m (Identity b) Source # sequence :: Monad m => Identity (m a) -> m (Identity a) Source #
Traversable (Either a) # |
Methods traverse :: Applicative f => (a -> f b) -> Either a a -> f (Either a b) Source # sequenceA :: Applicative f => Either a (f a) -> f (Either a a) Source # mapM :: Monad m => (a -> m b) -> Either a a -> m (Either a b) Source # sequence :: Monad m => Either a (m a) -> m (Either a a) Source #
Traversable f => Traversable (Rec1 f) # |
Methods traverse :: Applicative f => (a -> f b) -> Rec1 f a -> f (Rec1 f b) Source # sequenceA :: Applicative f => Rec1 f (f a) -> f (Rec1 f a) Source # mapM :: Monad m => (a -> m b) -> Rec1 f a -> m (Rec1 f b) Source # sequence :: Monad m => Rec1 f (m a) -> m (Rec1 f a) Source #
Traversable (URec Char) # |
Methods traverse :: Applicative f => (a -> f b) -> URec Char a -> f (URec Char b) Source # sequenceA :: Applicative f => URec Char (f a) -> f (URec Char a) Source # mapM :: Monad m => (a -> m b) -> URec Char a -> m (URec Char b) Source # sequence :: Monad m => URec Char (m a) -> m (URec Char a) Source #
Traversable (URec Double) # |
Methods traverse :: Applicative f => (a -> f b) -> URec Double a -> f (URec Double b) Source # sequenceA :: Applicative f => URec Double (f a) -> f (URec Double a) Source # mapM :: Monad m => (a -> m b) -> URec Double a -> m (URec Double b) Source # sequence :: Monad m => URec Double (m a) -> m (URec Double a) Source #
Traversable (URec Float) # |
Methods traverse :: Applicative f => (a -> f b) -> URec Float a -> f (URec Float b) Source # sequenceA :: Applicative f => URec Float (f a) -> f (URec Float a) Source # mapM :: Monad m => (a -> m b) -> URec Float a -> m (URec Float b) Source # sequence :: Monad m => URec Float (m a) -> m (URec Float a) Source #
Traversable (URec Int) # |
Methods traverse :: Applicative f => (a -> f b) -> URec Int a -> f (URec Int b) Source # sequenceA :: Applicative f => URec Int (f a) -> f (URec Int a) Source # mapM :: Monad m => (a -> m b) -> URec Int a -> m (URec Int b) Source # sequence :: Monad m => URec Int (m a) -> m (URec Int a) Source #
Traversable (URec Word) # |
Methods traverse :: Applicative f => (a -> f b) -> URec Word a -> f (URec Word b) Source # sequenceA :: Applicative f => URec Word (f a) -> f (URec Word a) Source # mapM :: Monad m => (a -> m b) -> URec Word a -> m (URec Word b) Source # sequence :: Monad m => URec Word (m a) -> m (URec Word a) Source #
Traversable (URec (Ptr ())) # |
Methods traverse :: Applicative f => (a -> f b) -> URec (Ptr ()) a -> f (URec (Ptr ()) b) Source # sequenceA :: Applicative f => URec (Ptr ()) (f a) -> f (URec (Ptr ()) a) Source # mapM :: Monad m => (a -> m b) -> URec (Ptr ()) a -> m (URec (Ptr ()) b) Source # sequence :: Monad m => URec (Ptr ()) (m a) -> m (URec (Ptr ()) a) Source #
Traversable ((,) a) # |
Methods traverse :: Applicative f => (a -> f b) -> (a, a) -> f (a, b) Source # sequenceA :: Applicative f => (a, f a) -> f (a, a) Source # mapM :: Monad m => (a -> m b) -> (a, a) -> m (a, b) Source # sequence :: Monad m => (a, m a) -> m (a, a) Source #
Traversable (Proxy *) # |
Methods traverse :: Applicative f => (a -> f b) -> Proxy * a -> f (Proxy * b) Source # sequenceA :: Applicative f => Proxy * (f a) -> f (Proxy * a) Source # mapM :: Monad m => (a -> m b) -> Proxy * a -> m (Proxy * b) Source # sequence :: Monad m => Proxy * (m a) -> m (Proxy * a) Source #
Traversable (Arg a) # |
Methods traverse :: Applicative f => (a -> f b) -> Arg a a -> f (Arg a b) Source # sequenceA :: Applicative f => Arg a (f a) -> f (Arg a a) Source # mapM :: Monad m => (a -> m b) -> Arg a a -> m (Arg a b) Source # sequence :: Monad m => Arg a (m a) -> m (Arg a a) Source #
Traversable (K1 i c) # |
Methods traverse :: Applicative f => (a -> f b) -> K1 i c a -> f (K1 i c b) Source # sequenceA :: Applicative f => K1 i c (f a) -> f (K1 i c a) Source # mapM :: Monad m => (a -> m b) -> K1 i c a -> m (K1 i c b) Source # sequence :: Monad m => K1 i c (m a) -> m (K1 i c a) Source #
(Traversable f, Traversable g) => Traversable ((:+:) f g) # |
Methods traverse :: Applicative f => (a -> f b) -> (f :+: g) a -> f ((f :+: g) b) Source # sequenceA :: Applicative f => (f :+: g) (f a) -> f ((f :+: g) a) Source # mapM :: Monad m => (a -> m b) -> (f :+: g) a -> m ((f :+: g) b) Source # sequence :: Monad m => (f :+: g) (m a) -> m ((f :+: g) a) Source #
(Traversable f, Traversable g) => Traversable ((:*:) f g) # |
Methods traverse :: Applicative f => (a -> f b) -> (f :*: g) a -> f ((f :*: g) b) Source # sequenceA :: Applicative f => (f :*: g) (f a) -> f ((f :*: g) a) Source # mapM :: Monad m => (a -> m b) -> (f :*: g) a -> m ((f :*: g) b) Source # sequence :: Monad m => (f :*: g) (m a) -> m ((f :*: g) a) Source #
(Traversable f, Traversable g) => Traversable ((:.:) f g) # |
Methods traverse :: Applicative f => (a -> f b) -> (f :.: g) a -> f ((f :.: g) b) Source # sequenceA :: Applicative f => (f :.: g) (f a) -> f ((f :.: g) a) Source # mapM :: Monad m => (a -> m b) -> (f :.: g) a -> m ((f :.: g) b) Source # sequence :: Monad m => (f :.: g) (m a) -> m ((f :.: g) a) Source #
Traversable (Const * m) # |
Methods traverse :: Applicative f => (a -> f b) -> Const * m a -> f (Const * m b) Source # sequenceA :: Applicative f => Const * m (f a) -> f (Const * m a) Source # mapM :: Monad m => (a -> m b) -> Const * m a -> m (Const * m b) Source # sequence :: Monad m => Const * m (m a) -> m (Const * m a) Source #
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) Source # sequenceA :: Applicative f => M1 i c f (f a) -> f (M1 i c f a) Source # mapM :: Monad m => (a -> m b) -> M1 i c f a -> m (M1 i c f b) Source # sequence :: Monad m => M1 i c f (m a) -> m (M1 i c f a) Source #
(Traversable f, Traversable g) => Traversable (Product * f g) # |
Methods traverse :: Applicative f => (a -> f b) -> Product * f g a -> f (Product * f g b) Source # sequenceA :: Applicative f => Product * f g (f a) -> f (Product * f g a) Source # mapM :: Monad m => (a -> m b) -> Product * f g a -> m (Product * f g b) Source # sequence :: Monad m => Product * f g (m a) -> m (Product * f g a) Source #
(Traversable f, Traversable g) => Traversable (Sum * f g) # |
Methods traverse :: Applicative f => (a -> f b) -> Sum * f g a -> f (Sum * f g b) Source # sequenceA :: Applicative f => Sum * f g (f a) -> f (Sum * f g a) Source # mapM :: Monad m => (a -> m b) -> Sum * f g a -> m (Sum * f g b) Source # sequence :: Monad m => Sum * f g (m a) -> m (Sum * f g a) Source #
(Traversable f, Traversable g) => Traversable (Compose * * f g) # |
Methods traverse :: Applicative f => (a -> f b) -> Compose * * f g a -> f (Compose * * f g b) Source # sequenceA :: Applicative f => Compose * * f g (f a) -> f (Compose * * f g a) Source # mapM :: Monad m => (a -> m b) -> Compose * * f g a -> m (Compose * * f g b) Source # sequence :: Monad m => Compose * * f g (m a) -> m (Compose * * f g a) Source #

## Miscellaneous functions

id :: a -> a Source #

Identity function.

const :: a -> b -> a Source #

`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 Source #

Function composition.

flip :: (a -> b -> c) -> b -> a -> c Source #

``flip` f` takes its (first) two arguments in the reverse order of `f`.

($) :: (a -> b) -> a -> b infixr 0 Source #

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

``until` p f` yields the result of applying `f` until `p` holds.

asTypeOf :: a -> a -> a Source #

`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. forall a. HasCallStack => [Char] -> a Source #

`error` stops execution and displays an error message.

errorWithoutStackTrace :: forall r. forall a. [Char] -> a Source #

A variant of `error` that does not produce a stack trace.

Since: 4.9.0.0

undefined :: forall r. forall a. HasCallStack => a Source #

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

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

`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 Source #

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

`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 Source #

Extract the first element of a list, which must be non-empty.

last :: [a] -> a Source #

Extract the last element of a list, which must be finite and non-empty.

tail :: [a] -> [a] Source #

Extract the elements after the head of a list, which must be non-empty.

init :: [a] -> [a] Source #

Return all the elements of a list except the last one. The list must be non-empty.

null :: Foldable t => t a -> Bool Source #

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

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

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

`reverse` `xs` returns the elements of `xs` in reverse order. `xs` must be finite.

### Special folds

and :: Foldable t => t Bool -> Bool Source #

`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 Source #

`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 Source #

Determines whether any element of the structure satisfies the predicate.

all :: Foldable t => (a -> Bool) -> t a -> Bool Source #

Determines whether all elements of the structure satisfy the predicate.

concat :: Foldable t => t [a] -> [a] Source #

The concatenation of all the elements of a container of lists.

concatMap :: Foldable t => (a -> [b]) -> t a -> [b] Source #

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

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

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

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

`scanr1` is a variant of `scanr` that has no starting value argument.

### Infinite lists

iterate :: (a -> a) -> a -> [a] Source #

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

`repeat` `x` is an infinite list, with `x` the value of every element.

replicate :: Int -> a -> [a] Source #

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

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

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

`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]) Source #

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

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

`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]) Source #

`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]) Source #

`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 Source #

`notElem` is the negation of `elem`.

lookup :: Eq a => a -> [(a, b)] -> Maybe b Source #

`lookup` `key assocs` looks up a key in an association list.

## Zipping and unzipping lists

zip :: [a] -> [b] -> [(a, b)] Source #

`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)] Source #

`zip3` takes three lists and returns a list of triples, analogous to `zip`.

zipWith :: (a -> b -> c) -> [a] -> [b] -> [c] Source #

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

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

`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]) Source #

The `unzip3` function takes a list of triples and returns three lists, analogous to `unzip`.

## Functions on strings

lines :: String -> [String] Source #

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

`words` breaks a string up into a list of words, which were delimited by white space.

unlines :: [String] -> String Source #

`unlines` is an inverse operation to `lines`. It joins lines, after appending a terminating newline to each.

unwords :: [String] -> String Source #

`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 Source #

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

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 :: Int -> a -> ShowS Source #

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

A specialised variant of `showsPrec`, using precedence context zero, and returning an ordinary `String`.

showList :: [a] -> ShowS Source #

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 Source # show :: Bool -> String Source # showList :: [Bool] -> ShowS Source #
Show Char # |
Methods showsPrec :: Int -> Char -> ShowS Source # show :: Char -> String Source # showList :: [Char] -> ShowS Source #
Show Int # |
Methods showsPrec :: Int -> Int -> ShowS Source # show :: Int -> String Source # showList :: [Int] -> ShowS Source #
Show Int8 # |
Methods showsPrec :: Int -> Int8 -> ShowS Source # show :: Int8 -> String Source # showList :: [Int8] -> ShowS Source #
Show Int16 # |
Methods showsPrec :: Int -> Int16 -> ShowS Source # show :: Int16 -> String Source # showList :: [Int16] -> ShowS Source #
Show Int32 # |
Methods showsPrec :: Int -> Int32 -> ShowS Source # show :: Int32 -> String Source # showList :: [Int32] -> ShowS Source #
Show Int64 # |
Methods showsPrec :: Int -> Int64 -> ShowS Source # show :: Int64 -> String Source # showList :: [Int64] -> ShowS Source #
Show Integer # |
Methods showsPrec :: Int -> Integer -> ShowS Source # show :: Integer -> String Source # showList :: [Integer] -> ShowS Source #
Show Ordering # |
Methods showsPrec :: Int -> Ordering -> ShowS Source # show :: Ordering -> String Source # showList :: [Ordering] -> ShowS Source #
Show Word # |
Methods showsPrec :: Int -> Word -> ShowS Source # show :: Word -> String Source # showList :: [Word] -> ShowS Source #
Show Word8 # |
Methods showsPrec :: Int -> Word8 -> ShowS Source # show :: Word8 -> String Source # showList :: [Word8] -> ShowS Source #
Show Word16 # |
Methods showsPrec :: Int -> Word16 -> ShowS Source # show :: Word16 -> String Source # showList :: [Word16] -> ShowS Source #
Show Word32 # |
Methods showsPrec :: Int -> Word32 -> ShowS Source # show :: Word32 -> String Source # showList :: [Word32] -> ShowS Source #
Show Word64 # |
Methods showsPrec :: Int -> Word64 -> ShowS Source # show :: Word64 -> String Source # showList :: [Word64] -> ShowS Source #
Show CallStack # |
Methods showsPrec :: Int -> CallStack -> ShowS Source # show :: CallStack -> String Source # showList :: [CallStack] -> ShowS Source #
Show TypeRep # |
Methods showsPrec :: Int -> TypeRep -> ShowS Source # show :: TypeRep -> String Source # showList :: [TypeRep] -> ShowS Source #
Show () # |
Methods showsPrec :: Int -> () -> ShowS Source # show :: () -> String Source # showList :: [()] -> ShowS Source #
Show TyCon # |
Methods showsPrec :: Int -> TyCon -> ShowS Source # show :: TyCon -> String Source # showList :: [TyCon] -> ShowS Source #
Show Module # |
Methods showsPrec :: Int -> Module -> ShowS Source # show :: Module -> String Source # showList :: [Module] -> ShowS Source #
Show TrName # |
Methods showsPrec :: Int -> TrName -> ShowS Source # show :: TrName -> String Source # showList :: [TrName] -> ShowS Source #
Show SrcLoc # |
Methods showsPrec :: Int -> SrcLoc -> ShowS Source # show :: SrcLoc -> String Source # showList :: [SrcLoc] -> ShowS Source #
Show SomeException # |
Methods showsPrec :: Int -> SomeException -> ShowS Source # show :: SomeException -> String Source # showList :: [SomeException] -> ShowS Source #
Show GeneralCategory # |
Methods showsPrec :: Int -> GeneralCategory -> ShowS Source # show :: GeneralCategory -> String Source # showList :: [GeneralCategory] -> ShowS Source #
Show Number # |
Methods showsPrec :: Int -> Number -> ShowS Source # show :: Number -> String Source # showList :: [Number] -> ShowS Source #
Show Lexeme # |
Methods showsPrec :: Int -> Lexeme -> ShowS Source # show :: Lexeme -> String Source # showList :: [Lexeme] -> ShowS Source #
Show IOMode # |
Methods showsPrec :: Int -> IOMode -> ShowS Source # show :: IOMode -> String Source # showList :: [IOMode] -> ShowS Source #
Show SomeSymbol # |
Methods showsPrec :: Int -> SomeSymbol -> ShowS Source # show :: SomeSymbol -> String Source # showList :: [SomeSymbol] -> ShowS Source #
Show SomeNat # |
Methods showsPrec :: Int -> SomeNat -> ShowS Source # show :: SomeNat -> String Source # showList :: [SomeNat] -> ShowS Source #
Show Fingerprint # |
Methods showsPrec :: Int -> Fingerprint -> ShowS Source # show :: Fingerprint -> String Source # showList :: [Fingerprint] -> ShowS Source #
Show ArithException # |
Methods showsPrec :: Int -> ArithException -> ShowS Source # show :: ArithException -> String Source # showList :: [ArithException] -> ShowS Source #
Show ErrorCall # |
Methods showsPrec :: Int -> ErrorCall -> ShowS Source # show :: ErrorCall -> String Source # showList :: [ErrorCall] -> ShowS Source #
Show Dynamic # |
Methods showsPrec :: Int -> Dynamic -> ShowS Source # show :: Dynamic -> String Source # showList :: [Dynamic] -> ShowS Source #
Show IOException # |
Methods showsPrec :: Int -> IOException -> ShowS Source # show :: IOException -> String Source # showList :: [IOException] -> ShowS Source #
Show MaskingState # |
Methods showsPrec :: Int -> MaskingState -> ShowS Source # show :: MaskingState -> String Source # showList :: [MaskingState] -> ShowS Source #
Show DecidedStrictness # |
Methods showsPrec :: Int -> DecidedStrictness -> ShowS Source # show :: DecidedStrictness -> String Source # showList :: [DecidedStrictness] -> ShowS Source #
Show SourceStrictness # |
Methods showsPrec :: Int -> SourceStrictness -> ShowS Source # show :: SourceStrictness -> String Source # showList :: [SourceStrictness] -> ShowS Source #
Show SourceUnpackedness # |
Methods showsPrec :: Int -> SourceUnpackedness -> ShowS Source # show :: SourceUnpackedness -> String Source # showList :: [SourceUnpackedness] -> ShowS Source #
Show Associativity # |
Methods showsPrec :: Int -> Associativity -> ShowS Source # show :: Associativity -> String Source # showList :: [Associativity] -> ShowS Source #
Show Fixity # |
Methods showsPrec :: Int -> Fixity -> ShowS Source # show :: Fixity -> String Source # showList :: [Fixity] -> ShowS Source #
Show Any # |
Methods showsPrec :: Int -> Any -> ShowS Source # show :: Any -> String Source # showList :: [Any] -> ShowS Source #
Show All # |
Methods showsPrec :: Int -> All -> ShowS Source # show :: All -> String Source # showList :: [All] -> ShowS Source #
Show SeekMode # |
Methods showsPrec :: Int -> SeekMode -> ShowS Source # show :: SeekMode -> String Source # showList :: [SeekMode] -> ShowS Source #
Show CUIntMax # |
Methods showsPrec :: Int -> CUIntMax -> ShowS Source # show :: CUIntMax -> String Source # showList :: [CUIntMax] -> ShowS Source #
Show CIntMax # |
Methods showsPrec :: Int -> CIntMax -> ShowS Source # show :: CIntMax -> String Source # showList :: [CIntMax] -> ShowS Source #
Show CUIntPtr # |
Methods showsPrec :: Int -> CUIntPtr -> ShowS Source # show :: CUIntPtr -> String Source # showList :: [CUIntPtr] -> ShowS Source #
Show CIntPtr # |
Methods showsPrec :: Int -> CIntPtr -> ShowS Source # show :: CIntPtr -> String Source # showList :: [CIntPtr] -> ShowS Source #
Show CSUSeconds # |
Methods showsPrec :: Int -> CSUSeconds -> ShowS Source # show :: CSUSeconds -> String Source # showList :: [CSUSeconds] -> ShowS Source #
Show CUSeconds # |
Methods showsPrec :: Int -> CUSeconds -> ShowS Source # show :: CUSeconds -> String Source # showList :: [CUSeconds] -> ShowS Source #
Show CTime # |
Methods showsPrec :: Int -> CTime -> ShowS Source # show :: CTime -> String Source # showList :: [CTime] -> ShowS Source #
Show CClock # |
Methods showsPrec :: Int -> CClock -> ShowS Source # show :: CClock -> String Source # showList :: [CClock] -> ShowS Source #
Show CSigAtomic # |
Methods showsPrec :: Int -> CSigAtomic -> ShowS Source # show :: CSigAtomic -> String Source # showList :: [CSigAtomic] -> ShowS Source #
Show CWchar # |
Methods showsPrec :: Int -> CWchar -> ShowS Source # show :: CWchar -> String Source # showList :: [CWchar] -> ShowS Source #
Show CSize # |
Methods showsPrec :: Int -> CSize -> ShowS Source # show :: CSize -> String Source # showList :: [CSize] -> ShowS Source #
Show CPtrdiff # |
Methods showsPrec :: Int -> CPtrdiff -> ShowS Source # show :: CPtrdiff -> String Source # showList :: [CPtrdiff] -> ShowS Source #
Show CDouble # |
Methods showsPrec :: Int -> CDouble -> ShowS Source # show :: CDouble -> String Source # showList :: [CDouble] -> ShowS Source #
Show CFloat # |
Methods showsPrec :: Int -> CFloat -> ShowS Source # show :: CFloat -> String Source # showList :: [CFloat] -> ShowS Source #
Show CULLong # |
Methods showsPrec :: Int -> CULLong -> ShowS Source # show :: CULLong -> String Source # showList :: [CULLong] -> ShowS Source #
Show CLLong # |
Methods showsPrec :: Int -> CLLong -> ShowS Source # show :: CLLong -> String Source # showList :: [CLLong] -> ShowS Source #
Show CULong # |
Methods showsPrec :: Int -> CULong -> ShowS Source # show :: CULong -> String Source # showList :: [CULong] -> ShowS Source #
Show CLong # |
Methods showsPrec :: Int -> CLong -> ShowS Source # show :: CLong -> String Source # showList :: [CLong] -> ShowS Source #
Show CUInt # |
Methods showsPrec :: Int -> CUInt -> ShowS Source # show :: CUInt -> String Source # showList :: [CUInt] -> ShowS Source #
Show CInt # |
Methods showsPrec :: Int -> CInt -> ShowS Source # show :: CInt -> String Source # showList :: [CInt] -> ShowS Source #
Show CUShort # |
Methods showsPrec :: Int -> CUShort -> ShowS Source # show :: CUShort -> String Source # showList :: [CUShort] -> ShowS Source #
Show CShort # |
Methods showsPrec :: Int -> CShort -> ShowS Source # show :: CShort -> String Source # showList :: [CShort] -> ShowS Source #
Show CUChar # |
Methods showsPrec :: Int -> CUChar -> ShowS Source # show :: CUChar -> String Source # showList :: [CUChar] -> ShowS Source #
Show CSChar # |
Methods showsPrec :: Int -> CSChar -> ShowS Source # show :: CSChar -> String Source # showList :: [CSChar] -> ShowS Source #
Show CChar # |
Methods showsPrec :: Int -> CChar -> ShowS Source # show :: CChar -> String Source # showList :: [CChar] -> ShowS Source #
Show IntPtr # |
Methods showsPrec :: Int -> IntPtr -> ShowS Source # show :: IntPtr -> String Source # showList :: [IntPtr] -> ShowS Source #
Show WordPtr # |
Methods showsPrec :: Int -> WordPtr -> ShowS Source # show :: WordPtr -> String Source # showList :: [WordPtr] -> ShowS Source #
Show CodingProgress # |
Methods showsPrec :: Int -> CodingProgress -> ShowS Source # show :: CodingProgress -> String Source # showList :: [CodingProgress] -> ShowS Source #
Show TextEncoding # |
Methods showsPrec :: Int -> TextEncoding -> ShowS Source # show :: TextEncoding -> String Source # showList :: [TextEncoding] -> ShowS Source #
Show NewlineMode # |
Methods showsPrec :: Int -> NewlineMode -> ShowS Source # show :: NewlineMode -> String Source # showList :: [NewlineMode] -> ShowS Source #
Show Newline # |
Methods showsPrec :: Int -> Newline -> ShowS Source # show :: Newline -> String Source # showList :: [Newline] -> ShowS Source #
Show BufferMode # |
Methods showsPrec :: Int -> BufferMode -> ShowS Source # show :: BufferMode -> String Source # showList :: [BufferMode] -> ShowS Source #
Show Handle # |
Methods showsPrec :: Int -> Handle -> ShowS Source # show :: Handle -> String Source # showList :: [Handle] -> ShowS Source #
Show IOErrorType # |
Methods showsPrec :: Int -> IOErrorType -> ShowS Source # show :: IOErrorType -> String Source # showList :: [IOErrorType] -> ShowS Source #
Show ExitCode # |
Methods showsPrec :: Int -> ExitCode -> ShowS Source # show :: ExitCode -> String Source # showList :: [ExitCode] -> ShowS Source #
Show ArrayException # |
Methods showsPrec :: Int -> ArrayException -> ShowS Source # show :: ArrayException -> String Source # showList :: [ArrayException] -> ShowS Source #
Show AsyncException # |
Methods showsPrec :: Int -> AsyncException -> ShowS Source # show :: AsyncException -> String Source # showList :: [AsyncException] -> ShowS Source #
Show SomeAsyncException # |
Methods showsPrec :: Int -> SomeAsyncException -> ShowS Source # show :: SomeAsyncException -> String Source # showList :: [SomeAsyncException] -> ShowS Source #
Show AssertionFailed # |
Methods showsPrec :: Int -> AssertionFailed -> ShowS Source # show :: AssertionFailed -> String Source # showList :: [AssertionFailed] -> ShowS Source #
Show AllocationLimitExceeded # |
Methods showsPrec :: Int -> AllocationLimitExceeded -> ShowS Source # show :: AllocationLimitExceeded -> String Source # showList :: [AllocationLimitExceeded] -> ShowS Source #
Show Deadlock # |
Methods showsPrec :: Int -> Deadlock -> ShowS Source # show :: Deadlock -> String Source # showList :: [Deadlock] -> ShowS Source #
Show BlockedIndefinitelyOnSTM # |
Methods showsPrec :: Int -> BlockedIndefinitelyOnSTM -> ShowS Source # show :: BlockedIndefinitelyOnSTM -> String Source # showList :: [BlockedIndefinitelyOnSTM] -> ShowS Source #
Show BlockedIndefinitelyOnMVar # |
Methods showsPrec :: Int -> BlockedIndefinitelyOnMVar -> ShowS Source # show :: BlockedIndefinitelyOnMVar -> String Source # showList :: [BlockedIndefinitelyOnMVar] -> ShowS Source #
Show CodingFailureMode # |
Methods showsPrec :: Int -> CodingFailureMode -> ShowS Source # show :: CodingFailureMode -> String Source # showList :: [CodingFailureMode] -> ShowS Source #
Show ThreadStatus # |
Methods showsPrec :: Int -> ThreadStatus -> ShowS Source # show :: ThreadStatus -> String Source # showList :: [ThreadStatus] -> ShowS Source #
Show BlockReason # |
Methods showsPrec :: Int -> BlockReason -> ShowS Source # show :: BlockReason -> String Source # showList :: [BlockReason] -> ShowS Source #
Show ThreadId # |
Methods showsPrec :: Int -> ThreadId -> ShowS Source # show :: ThreadId -> String Source # showList :: [ThreadId] -> ShowS Source #
Show Fd # |
Methods showsPrec :: Int -> Fd -> ShowS Source # show :: Fd -> String Source # showList :: [Fd] -> ShowS Source #
Show CRLim # |
Methods showsPrec :: Int -> CRLim -> ShowS Source # show :: CRLim -> String Source # showList :: [CRLim] -> ShowS Source #
Show CTcflag # |
Methods showsPrec :: Int -> CTcflag -> ShowS Source # show :: CTcflag -> String Source # showList :: [CTcflag] -> ShowS Source #
Show CSpeed # |
Methods showsPrec :: Int -> CSpeed -> ShowS Source # show :: CSpeed -> String Source # showList :: [CSpeed] -> ShowS Source #
Show CCc # |
Methods showsPrec :: Int -> CCc -> ShowS Source # show :: CCc -> String Source # showList :: [CCc] -> ShowS Source #
Show CUid # |
Methods showsPrec :: Int -> CUid -> ShowS Source # show :: CUid -> String Source # showList :: [CUid] -> ShowS Source #
Show CNlink # |
Methods showsPrec :: Int -> CNlink -> ShowS Source # show :: CNlink -> String Source # showList :: [CNlink] -> ShowS Source #
Show CGid # |
Methods showsPrec :: Int -> CGid -> ShowS Source # show :: CGid -> String Source # showList :: [CGid] -> ShowS Source #
Show CSsize # |
Methods showsPrec :: Int -> CSsize -> ShowS Source # show :: CSsize -> String Source # showList :: [CSsize] -> ShowS Source #
Show CPid # |
Methods showsPrec :: Int -> CPid -> ShowS Source # show :: CPid -> String Source # showList :: [CPid] -> ShowS Source #
Show COff # |
Methods showsPrec :: Int -> COff -> ShowS Source # show :: COff -> String Source # showList :: [COff] -> ShowS Source #
Show CMode # |
Methods showsPrec :: Int -> CMode -> ShowS Source # show :: CMode -> String Source # showList :: [CMode] -> ShowS Source #
Show CIno # |
Methods showsPrec :: Int -> CIno -> ShowS Source # show :: CIno -> String Source # showList :: [CIno] -> ShowS Source #
Show CDev # |
Methods showsPrec :: Int -> CDev -> ShowS Source # show :: CDev -> String Source # showList :: [CDev] -> ShowS Source #
Show Lifetime # |
Methods showsPrec :: Int -> Lifetime -> ShowS Source # show :: Lifetime -> String Source # showList :: [Lifetime] -> ShowS Source #
Show Event # |
Methods showsPrec :: Int -> Event -> ShowS Source # show :: Event -> String Source # showList :: [Event] -> ShowS Source #
Show NestedAtomically # |
Methods showsPrec :: Int -> NestedAtomically -> ShowS Source # show :: NestedAtomically -> String Source # showList :: [NestedAtomically] -> ShowS Source #
Show NonTermination # |
Methods showsPrec :: Int -> NonTermination -> ShowS Source # show :: NonTermination -> String Source # showList :: [NonTermination] -> ShowS Source #
Show TypeError # |
Methods showsPrec :: Int -> TypeError -> ShowS Source # show :: TypeError -> String Source # showList :: [TypeError] -> ShowS Source #
Show NoMethodError # |
Methods showsPrec :: Int -> NoMethodError -> ShowS Source # show :: NoMethodError -> String Source # showList :: [NoMethodError] -> ShowS Source #
Show RecUpdError # |
Methods showsPrec :: Int -> RecUpdError -> ShowS Source # show :: RecUpdError -> String Source # showList :: [RecUpdError] -> ShowS Source #
Show RecConError # |
Methods showsPrec :: Int -> RecConError -> ShowS Source # show :: RecConError -> String Source # showList :: [RecConError] -> ShowS Source #
Show RecSelError # |
Methods showsPrec :: Int -> RecSelError -> ShowS Source # show :: RecSelError -> String Source # showList :: [RecSelError] -> ShowS Source #
Show PatternMatchFail # |
Methods showsPrec :: Int -> PatternMatchFail -> ShowS Source # show :: PatternMatchFail -> String Source # showList :: [PatternMatchFail] -> ShowS Source #
Show FdKey # |
Methods showsPrec :: Int -> FdKey -> ShowS Source # show :: FdKey -> String Source # showList :: [FdKey] -> ShowS Source #
Show HandlePosn # |
Methods showsPrec :: Int -> HandlePosn -> ShowS Source # show :: HandlePosn -> String Source # showList :: [HandlePosn] -> ShowS Source #
Show GCStats # |
Methods showsPrec :: Int -> GCStats -> ShowS Source # show :: GCStats -> String Source # showList :: [GCStats] -> ShowS Source #
Show Version # |
Methods showsPrec :: Int -> Version -> ShowS Source # show :: Version -> String Source # showList :: [Version] -> ShowS Source #
Show Fixity # |
Methods showsPrec :: Int -> Fixity -> ShowS Source # show :: Fixity -> String Source # showList :: [Fixity] -> ShowS Source #
Show ConstrRep # |
Methods showsPrec :: Int -> ConstrRep -> ShowS Source # show :: ConstrRep -> String Source # showList :: [ConstrRep] -> ShowS Source #
Show DataRep # |
Methods showsPrec :: Int -> DataRep -> ShowS Source # show :: DataRep -> String Source # showList :: [DataRep] -> ShowS Source #
Show Constr # |
Methods showsPrec :: Int -> Constr -> ShowS Source # show :: Constr -> String Source # showList :: [Constr] -> ShowS Source #
Show DataType # |
Methods showsPrec :: Int -> DataType -> ShowS Source # show :: DataType -> String Source # showList :: [DataType] -> ShowS Source #
Show Void # |
Methods showsPrec :: Int -> Void -> ShowS Source # show :: Void -> String Source # showList :: [Void] -> ShowS Source #
Show Natural # |
Methods showsPrec :: Int -> Natural -> ShowS Source # show :: Natural -> String Source # showList :: [Natural] -> ShowS Source #
Show StaticPtrInfo # |
Methods showsPrec :: Int -> StaticPtrInfo -> ShowS Source # show :: StaticPtrInfo -> String Source # showList :: [StaticPtrInfo] -> ShowS Source #
Show RTSFlags # |
Methods showsPrec :: Int -> RTSFlags -> ShowS Source # show :: RTSFlags -> String Source # showList :: [RTSFlags] -> ShowS Source #
Show TickyFlags # |
Methods showsPrec :: Int -> TickyFlags -> ShowS Source # show :: TickyFlags -> String Source # showList :: [TickyFlags] -> ShowS Source #
Show TraceFlags # |
Methods showsPrec :: Int -> TraceFlags -> ShowS Source # show :: TraceFlags -> String Source # showList :: [TraceFlags] -> ShowS Source #
Show DoTrace # |
Methods showsPrec :: Int -> DoTrace -> ShowS Source # show :: DoTrace -> String Source # showList :: [DoTrace] -> ShowS Source #
Show ProfFlags # |
Methods showsPrec :: Int -> ProfFlags -> ShowS Source # show :: ProfFlags -> String Source # showList :: [ProfFlags] -> ShowS Source #
Show DoHeapProfile # |
Methods showsPrec :: Int -> DoHeapProfile -> ShowS Source # show :: DoHeapProfile -> String Source # showList :: [DoHeapProfile] -> ShowS Source #
Show CCFlags # |
Methods showsPrec :: Int -> CCFlags -> ShowS Source # show :: CCFlags -> String Source # showList :: [CCFlags] -> ShowS Source #
Show DoCostCentres # |
Methods showsPrec :: Int -> DoCostCentres -> ShowS Source # show :: DoCostCentres -> String Source # showList :: [DoCostCentres] -> ShowS Source #
Show DebugFlags # |
Methods showsPrec :: Int -> DebugFlags -> ShowS Source # show :: DebugFlags -> String Source # showList :: [DebugFlags] -> ShowS Source #
Show MiscFlags # |
Methods showsPrec :: Int -> MiscFlags -> ShowS Source # show :: MiscFlags -> String Source # showList :: [MiscFlags] -> ShowS Source #
Show ConcFlags # |
Methods showsPrec :: Int -> ConcFlags -> ShowS Source # show :: ConcFlags -> String Source # showList :: [ConcFlags] -> ShowS Source #
Show GCFlags # |
Methods showsPrec :: Int -> GCFlags -> ShowS Source # show :: GCFlags -> String Source # showList :: [GCFlags] -> ShowS Source #
Show GiveGCStats # |
Methods showsPrec :: Int -> GiveGCStats -> ShowS Source # show :: GiveGCStats -> String Source # showList :: [GiveGCStats] -> ShowS Source #
Show a => Show [a] # |
Methods showsPrec :: Int -> [a] -> ShowS Source # show :: [a] -> String Source # showList :: [[a]] -> ShowS Source #
Show a => Show (Maybe a) # |
Methods showsPrec :: Int -> Maybe a -> ShowS Source # show :: Maybe a -> String Source # showList :: [Maybe a] -> ShowS Source #
Show a => Show (Ratio a) # |
Methods showsPrec :: Int -> Ratio a -> ShowS Source # show :: Ratio a -> String Source # showList :: [Ratio a] -> ShowS Source #
Show (Ptr a) # |
Methods showsPrec :: Int -> Ptr a -> ShowS Source # show :: Ptr a -> String Source # showList :: [Ptr a] -> ShowS Source #
Show (FunPtr a) # |
Methods showsPrec :: Int -> FunPtr a -> ShowS Source # show :: FunPtr a -> String Source # showList :: [FunPtr a] -> ShowS Source #
Show (V1 p) # |
Methods showsPrec :: Int -> V1 p -> ShowS Source # show :: V1 p -> String Source # showList :: [V1 p] -> ShowS Source #
Show (U1 p) # |
Methods showsPrec :: Int -> U1 p -> ShowS Source # show :: U1 p -> String Source # showList :: [U1 p] -> ShowS Source #
Show p => Show (Par1 p) # |
Methods showsPrec :: Int -> Par1 p -> ShowS Source # show :: Par1 p -> String Source # showList :: [Par1 p] -> ShowS Source #
Show a => Show (Down a) # |
Methods showsPrec :: Int -> Down a -> ShowS Source # show :: Down a -> String Source # showList :: [Down a] -> ShowS Source #
Show a => Show (Last a) # |
Methods showsPrec :: Int -> Last a -> ShowS Source # show :: Last a -> String Source # showList :: [Last a] -> ShowS Source #
Show a => Show (First a) # |
Methods showsPrec :: Int -> First a -> ShowS Source # show :: First a -> String Source # showList :: [First a] -> ShowS Source #
Show a => Show (Product a) # |
Methods showsPrec :: Int -> Product a -> ShowS Source # show :: Product a -> String Source # showList :: [Product a] -> ShowS Source #
Show a => Show (Sum a) # |
Methods showsPrec :: Int -> Sum a -> ShowS Source # show :: Sum a -> String Source # showList :: [Sum a] -> ShowS Source #
Show a => Show (Dual a) # |
Methods showsPrec :: Int -> Dual a -> ShowS Source # show :: Dual a -> String Source # showList :: [Dual a] -> ShowS Source #
Show (ForeignPtr a) # |
Methods showsPrec :: Int -> ForeignPtr a -> ShowS Source # show :: ForeignPtr a -> String Source # showList :: [ForeignPtr a] -> ShowS Source #
Show a => Show (ZipList a) # |
Methods showsPrec :: Int -> ZipList a -> ShowS Source # show :: ZipList a -> String Source # showList :: [ZipList a] -> ShowS Source #
Show a => Show (Complex a) # |
Methods showsPrec :: Int -> Complex a -> ShowS Source # show :: Complex a -> String Source # showList :: [Complex a] -> ShowS Source #
HasResolution a => Show (Fixed a) # |
Methods showsPrec :: Int -> Fixed a -> ShowS Source # show :: Fixed a -> String Source # showList :: [Fixed a] -> ShowS Source #
Show a => Show (NonEmpty a) # |
Methods showsPrec :: Int -> NonEmpty a -> ShowS Source # show :: NonEmpty a -> String Source # showList :: [NonEmpty a] -> ShowS Source #
Show a => Show (Option a) # |
Methods showsPrec :: Int -> Option a -> ShowS Source # show :: Option a -> String Source # showList :: [Option a] -> ShowS Source #
Show m => Show (WrappedMonoid m) # |
Methods showsPrec :: Int -> WrappedMonoid m -> ShowS Source # show :: WrappedMonoid m -> String Source # showList :: [WrappedMonoid m] -> ShowS Source #
Show a => Show (Last a) # |
Methods showsPrec :: Int -> Last a -> ShowS Source # show :: Last a -> String Source # showList :: [Last a] -> ShowS Source #
Show a => Show (First a) # |
Methods showsPrec :: Int -> First a -> ShowS Source # show :: First a -> String Source # showList :: [First a] -> ShowS Source #
Show a => Show (Max a) # |
Methods showsPrec :: Int -> Max a -> ShowS Source # show :: Max a -> String Source # showList :: [Max a] -> ShowS Source #
Show a => Show (Min a) # |
Methods showsPrec :: Int -> Min a -> ShowS Source # show :: Min a -> String Source # showList :: [Min a] -> ShowS Source #
Show a => Show (Identity a) # | This instance would be equivalent to the derived instances of the `Identity` newtype if the `runIdentity` field were removed
Methods showsPrec :: Int -> Identity a -> ShowS Source # show :: Identity a -> String Source # showList :: [Identity a] -> ShowS Source #
(Show a, Show b) => Show (Either a b) # |
Methods showsPrec :: Int -> Either a b -> ShowS Source # show :: Either a b -> String Source # showList :: [Either a b] -> ShowS Source #
Show (f p) => Show (Rec1 f p) # |
Methods showsPrec :: Int -> Rec1 f p -> ShowS Source # show :: Rec1 f p -> String Source # showList :: [Rec1 f p] -> ShowS Source #
Show (URec Char p) # |
Methods showsPrec :: Int -> URec Char p -> ShowS Source # show :: URec Char p -> String Source # showList :: [URec Char p] -> ShowS Source #
Show (URec Double p) # |
Methods showsPrec :: Int -> URec Double p -> ShowS Source # show :: URec Double p -> String Source # showList :: [URec Double p] -> ShowS Source #
Show (URec Float p) # |
Methods showsPrec :: Int -> URec Float p -> ShowS Source # show :: URec Float p -> String Source # showList :: [URec Float p] -> ShowS Source #
Show (URec Int p) # |
Methods showsPrec :: Int -> URec Int p -> ShowS Source # show :: URec Int p -> String Source # showList :: [URec Int p] -> ShowS Source #
Show (URec Word p) # |
Methods showsPrec :: Int -> URec Word p -> ShowS Source # show :: URec Word p -> String Source # showList :: [URec Word p] -> ShowS Source #
(Show a, Show b) => Show (a, b) # |
Methods showsPrec :: Int -> (a, b) -> ShowS Source # show :: (a, b) -> String Source # showList :: [(a, b)] -> ShowS Source #
Show (ST s a) # |
Methods showsPrec :: Int -> ST s a -> ShowS Source # show :: ST s a -> String Source # showList :: [ST s a] -> ShowS Source #
Show (Proxy k s) # |
Methods showsPrec :: Int -> Proxy k s -> ShowS Source # show :: Proxy k s -> String Source # showList :: [Proxy k s] -> ShowS Source #
(Show a, Show b) => Show (Arg a b) # |
Methods showsPrec :: Int -> Arg a b -> ShowS Source # show :: Arg a b -> String Source # showList :: [Arg a b] -> ShowS Source #
Show c => Show (K1 i c p) # |
Methods showsPrec :: Int -> K1 i c p -> ShowS Source # show :: K1 i c p -> String Source # showList :: [K1 i c p] -> ShowS Source #
(Show (f p), Show (g p)) => Show ((:+:) f g p) # |
Methods showsPrec :: Int -> (f :+: g) p -> ShowS Source # show :: (f :+: g) p -> String Source # showList :: [(f :+: g) p] -> ShowS Source #
(Show (f p), Show (g p)) => Show ((:*:) f g p) # |
Methods showsPrec :: Int -> (f :*: g) p -> ShowS Source # show :: (f :*: g) p -> String Source # showList :: [(f :*: g) p] -> ShowS Source #
Show (f (g p)) => Show ((:.:) f g p) # |
Methods showsPrec :: Int -> (f :.: g) p -> ShowS Source # show :: (f :.: g) p -> String Source # showList :: [(f :.: g) p] -> ShowS Source #
(Show a, Show b, Show c) => Show (a, b, c) # |
Methods showsPrec :: Int -> (a, b, c) -> ShowS Source # show :: (a, b, c) -> String Source # showList :: [(a, b, c)] -> ShowS Source #
Show ((:~:) k a b) # |
Methods showsPrec :: Int -> (k :~: a) b -> ShowS Source # show :: (k :~: a) b -> String Source # showList :: [(k :~: a) b] -> ShowS Source #
Show (Coercion k a b) # |
Methods showsPrec :: Int -> Coercion k a b -> ShowS Source # show :: Coercion k a b -> String Source # showList :: [Coercion k a b] -> ShowS Source #
Show (f a) => Show (Alt k f a) # |
Methods showsPrec :: Int -> Alt k f a -> ShowS Source # show :: Alt k f a -> String Source # showList :: [Alt k f a] -> ShowS Source #
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
Methods showsPrec :: Int -> Const k a b -> ShowS Source # show :: Const k a b -> String Source # showList :: [Const k a b] -> ShowS Source #
Show (f p) => Show (M1 i c f p) # |
Methods showsPrec :: Int -> M1 i c f p -> ShowS Source # show :: M1 i c f p -> String Source # showList :: [M1 i c f p] -> ShowS Source #
(Show a, Show b, Show c, Show d) => Show (a, b, c, d) # |
Methods showsPrec :: Int -> (a, b, c, d) -> ShowS Source # show :: (a, b, c, d) -> String Source # showList :: [(a, b, c, d)] -> ShowS Source #
(Show1 f, Show1 g, Show a) => Show (Product * f g a) # |
Methods showsPrec :: Int -> Product * f g a -> ShowS Source # show :: Product * f g a -> String Source # showList :: [Product * f g a] -> ShowS Source #
(Show1 f, Show1 g, Show a) => Show (Sum * f g a) # |
Methods showsPrec :: Int -> Sum * f g a -> ShowS Source # show :: Sum * f g a -> String Source # showList :: [Sum * f g a] -> ShowS Source #
(Show a, Show b, Show c, Show d, Show e) => Show (a, b, c, d, e) # |
Methods showsPrec :: Int -> (a, b, c, d, e) -> ShowS Source # show :: (a, b, c, d, e) -> String Source # showList :: [(a, b, c, d, e)] -> ShowS Source #
(Show1 f, Show1 g, Show a) => Show (Compose * * f g a) # |
Methods showsPrec :: Int -> Compose * * f g a -> ShowS Source # show :: Compose * * f g a -> String Source # showList :: [Compose * * f g a] -> ShowS Source #
(Show a, Show b, Show c, Show d, Show e, Show f) => Show (a, b, c, d, e, f) # |
Methods showsPrec :: Int -> (a, b, c, d, e, f) -> ShowS Source # show :: (a, b, c, d, e, f) -> String Source # showList :: [(a, b, c, d, e, f)] -> ShowS Source #
(Show a, Show b, Show c, Show d, Show e, Show f, Show g) => Show (a, b, c, d, e, f, g) # |
Methods showsPrec :: Int -> (a, b, c, d, e, f, g) -> ShowS Source # show :: (a, b, c, d, e, f, g) -> String Source # showList :: [(a, b, c, d, e, f, g)] -> ShowS Source #
(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) # |
Methods showsPrec :: Int -> (a, b, c, d, e, f, g, h) -> ShowS Source # show :: (a, b, c, d, e, f, g, h) -> String Source # showList :: [(a, b, c, d, e, f, g, h)] -> ShowS Source #
(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) # |
Methods showsPrec :: Int -> (a, b, c, d, e, f, g, h, i) -> ShowS Source # show :: (a, b, c, d, e, f, g, h, i) -> String Source # showList :: [(a, b, c, d, e, f, g, h, i)] -> ShowS Source #
(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) # |
Methods showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j) -> ShowS Source # show :: (a, b, c, d, e, f, g, h, i, j) -> String Source # showList :: [(a, b, c, d, e, f, g, h, i, j)] -> ShowS Source #
(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) # |
Methods showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k) -> ShowS Source # show :: (a, b, c, d, e, f, g, h, i, j, k) -> String Source # showList :: [(a, b, c, d, e, f, g, h, i, j, k)] -> ShowS Source #
(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) # |
Methods showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l) -> ShowS Source # show :: (a, b, c, d, e, f, g, h, i, j, k, l) -> String Source # showList :: [(a, b, c, d, e, f, g, h, i, j, k, l)] -> ShowS Source #
(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) # |
Methods showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> ShowS Source # show :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> String Source # showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m)] -> ShowS Source #
(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) # |
Methods showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> ShowS Source # show :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> String Source # showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] -> ShowS Source #
(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) # |
Methods showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> ShowS Source # show :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> String Source # showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] -> ShowS Source #

shows :: Show a => a -> ShowS Source #

equivalent to `showsPrec` with a precedence of 0.

showChar :: Char -> ShowS Source #

utility function converting a `Char` to a show function that simply prepends the character unchanged.

showString :: String -> ShowS Source #

utility function converting a `String` to a show function that simply prepends the string unchanged.

showParen :: Bool -> ShowS -> ShowS Source #

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

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

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

Minimal complete definition

readsPrec | readPrec

Methods

readsPrec :: Int -> ReadS a Source #

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

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 # |
Methods readsPrec :: Int -> ReadS Bool Source # readList :: ReadS [Bool] Source # readPrec :: ReadPrec Bool Source # readListPrec :: ReadPrec [Bool] Source #
Read Char # |
Methods readsPrec :: Int -> ReadS Char Source # readList :: ReadS [Char] Source # readPrec :: ReadPrec Char Source # readListPrec :: ReadPrec [Char] Source #
Read Double # |
Methods readsPrec :: Int -> ReadS Double Source # readList :: ReadS [Double] Source # readPrec :: ReadPrec Double Source # readListPrec :: ReadPrec [Double] Source #
Read Float # |
Methods readsPrec :: Int -> ReadS Float Source # readList :: ReadS [Float] Source # readPrec :: ReadPrec Float Source # readListPrec :: ReadPrec [Float] Source #
Read Int # |
Methods readsPrec :: Int -> ReadS Int Source # readList :: ReadS [Int] Source # readPrec :: ReadPrec Int Source # readListPrec :: ReadPrec [Int] Source #
Read Int8 # |
Methods readsPrec :: Int -> ReadS Int8 Source # readList :: ReadS [Int8] Source # readPrec :: ReadPrec Int8 Source # readListPrec :: ReadPrec [Int8] Source #
Read Int16 # |
Methods readsPrec :: Int -> ReadS Int16 Source # readList :: ReadS [Int16] Source # readPrec :: ReadPrec Int16 Source # readListPrec :: ReadPrec [Int16] Source #
Read Int32 # |
Methods readsPrec :: Int -> ReadS Int32 Source # readList :: ReadS [Int32] Source # readPrec :: ReadPrec Int32 Source # readListPrec :: ReadPrec [Int32] Source #
Read Int64 # |
Methods readsPrec :: Int -> ReadS Int64 Source # readList :: ReadS [Int64] Source # readPrec :: ReadPrec Int64 Source # readListPrec :: ReadPrec [Int64] Source #
Read Integer # |
Methods readsPrec :: Int -> ReadS Integer Source # readList :: ReadS [Integer] Source # readPrec :: ReadPrec Integer Source # readListPrec :: ReadPrec [Integer] Source #
Read Ordering # |
Methods readsPrec :: Int -> ReadS Ordering Source # readList :: ReadS [Ordering] Source # readPrec :: ReadPrec Ordering Source # readListPrec :: ReadPrec [Ordering] Source #
Read Word # |
Methods readsPrec :: Int -> ReadS Word Source # readList :: ReadS [Word] Source # readPrec :: ReadPrec Word Source # readListPrec :: ReadPrec [Word] Source #
Read Word8 # |
Methods readsPrec :: Int -> ReadS Word8 Source # readList :: ReadS [Word8] Source # readPrec :: ReadPrec Word8 Source # readListPrec :: ReadPrec [Word8] Source #
Read Word16 # |
Methods readsPrec :: Int -> ReadS Word16 Source # readList :: ReadS [Word16] Source # readPrec :: ReadPrec Word16 Source # readListPrec :: ReadPrec [Word16] Source #
Read Word32 # |
Methods readsPrec :: Int -> ReadS Word32 Source # readList :: ReadS [Word32] Source # readPrec :: ReadPrec Word32 Source # readListPrec :: ReadPrec [Word32] Source #
Read Word64 # |
Methods readsPrec :: Int -> ReadS Word64 Source # readList :: ReadS [Word64] Source # readPrec :: ReadPrec Word64 Source # readListPrec :: ReadPrec [Word64] Source #
Read () # |
Methods readsPrec :: Int -> ReadS () Source # readList :: ReadS [()] Source # readPrec :: ReadPrec () Source # readListPrec :: ReadPrec [()] Source #
Read GeneralCategory # |
Methods readsPrec :: Int -> ReadS GeneralCategory Source # readList :: ReadS [GeneralCategory] Source # readPrec :: ReadPrec GeneralCategory Source # readListPrec :: ReadPrec [GeneralCategory] Source #
Read Lexeme # |
Methods readsPrec :: Int -> ReadS Lexeme Source # readList :: ReadS [Lexeme] Source # readPrec :: ReadPrec Lexeme Source # readListPrec :: ReadPrec [Lexeme] Source #
Read IOMode # |
Methods readsPrec :: Int -> ReadS IOMode Source # readList :: ReadS [IOMode] Source # readPrec :: ReadPrec IOMode Source # readListPrec :: ReadPrec [IOMode] Source #
Read SomeSymbol # |
Methods readsPrec :: Int -> ReadS SomeSymbol Source # readList :: ReadS [SomeSymbol] Source # readPrec :: ReadPrec SomeSymbol Source # readListPrec :: ReadPrec [SomeSymbol] Source #
Read SomeNat # |
Methods readsPrec :: Int -> ReadS SomeNat Source # readList :: ReadS [SomeNat] Source # readPrec :: ReadPrec SomeNat Source # readListPrec :: ReadPrec [SomeNat] Source #
Read DecidedStrictness # |
Methods readsPrec :: Int -> ReadS DecidedStrictness Source # readList :: ReadS [DecidedStrictness] Source # readPrec :: ReadPrec DecidedStrictness Source # readListPrec :: ReadPrec [DecidedStrictness] Source #
Read SourceStrictness # |
Methods readsPrec :: Int -> ReadS SourceStrictness Source # readList :: ReadS [SourceStrictness] Source # readPrec :: ReadPrec SourceStrictness Source # readListPrec :: ReadPrec [SourceStrictness] Source #
Read SourceUnpackedness # |
Methods readsPrec :: Int -> ReadS SourceUnpackedness Source # readList :: ReadS [SourceUnpackedness] Source # readPrec :: ReadPrec SourceUnpackedness Source # readListPrec :: ReadPrec [SourceUnpackedness] Source #
Read Associativity # |
Methods readsPrec :: Int -> ReadS Associativity Source # readList :: ReadS [Associativity] Source # readPrec :: ReadPrec Associativity Source # readListPrec :: ReadPrec [Associativity] Source #
Read Fixity # |
Methods readsPrec :: Int -> ReadS Fixity Source # readList :: ReadS [Fixity] Source # readPrec :: ReadPrec Fixity Source # readListPrec :: ReadPrec [Fixity] Source #
Read Any # |
Methods readsPrec :: Int -> ReadS Any Source # readList :: ReadS [Any] Source # readPrec :: ReadPrec Any Source # readListPrec :: ReadPrec [Any] Source #
Read All # |
Methods readsPrec :: Int -> ReadS All Source # readList :: ReadS [All] Source # readPrec :: ReadPrec All Source # readListPrec :: ReadPrec [All] Source #
Read SeekMode # |
Methods readsPrec :: Int -> ReadS SeekMode Source # readList :: ReadS [SeekMode] Source # readPrec :: ReadPrec SeekMode Source # readListPrec :: ReadPrec [SeekMode] Source #
Read CUIntMax # |
Methods readsPrec :: Int -> ReadS CUIntMax Source # readList :: ReadS [CUIntMax] Source # readPrec :: ReadPrec CUIntMax Source # readListPrec :: ReadPrec [CUIntMax] Source #
Read CIntMax # |
Methods readsPrec :: Int -> ReadS CIntMax Source # readList :: ReadS [CIntMax] Source # readPrec :: ReadPrec CIntMax Source # readListPrec :: ReadPrec [CIntMax] Source #
Read CUIntPtr # |
Methods readsPrec :: Int -> ReadS CUIntPtr Source # readList :: ReadS [CUIntPtr] Source # readPrec :: ReadPrec CUIntPtr Source # readListPrec :: ReadPrec [CUIntPtr] Source #
Read CIntPtr # |
Methods readsPrec :: Int -> ReadS CIntPtr Source # readList :: ReadS [CIntPtr] Source # readPrec :: ReadPrec CIntPtr Source # readListPrec :: ReadPrec [CIntPtr] Source #
Read CSUSeconds # |
Methods readsPrec :: Int -> ReadS CSUSeconds Source # readList :: ReadS [CSUSeconds] Source # readPrec :: ReadPrec CSUSeconds Source # readListPrec :: ReadPrec [CSUSeconds] Source #
Read CUSeconds # |
Methods readsPrec :: Int -> ReadS CUSeconds Source # readList :: ReadS [CUSeconds] Source # readPrec :: ReadPrec CUSeconds Source # readListPrec :: ReadPrec [CUSeconds] Source #
Read CTime # |
Methods readsPrec :: Int -> ReadS CTime Source # readList :: ReadS [CTime] Source # readPrec :: ReadPrec CTime Source # readListPrec :: ReadPrec [CTime] Source #
Read CClock # |
Methods readsPrec :: Int -> ReadS CClock Source # readList :: ReadS [CClock] Source # readPrec :: ReadPrec CClock Source # readListPrec :: ReadPrec [CClock] Source #
Read CSigAtomic # |
Methods readsPrec :: Int -> ReadS CSigAtomic Source # readList :: ReadS [CSigAtomic] Source # readPrec :: ReadPrec CSigAtomic Source # readListPrec :: ReadPrec [CSigAtomic] Source #
Read CWchar # |
Methods readsPrec :: Int -> ReadS CWchar Source # readList :: ReadS [CWchar] Source # readPrec :: ReadPrec CWchar Source # readListPrec :: ReadPrec [CWchar] Source #
Read CSize # |
Methods readsPrec :: Int -> ReadS CSize Source # readList :: ReadS [CSize] Source # readPrec :: ReadPrec CSize Source # readListPrec :: ReadPrec [CSize] Source #
Read CPtrdiff # |
Methods readsPrec :: Int -> ReadS CPtrdiff Source # readList :: ReadS [CPtrdiff] Source # readPrec :: ReadPrec CPtrdiff Source # readListPrec :: ReadPrec [CPtrdiff] Source #
Read CDouble # |
Methods readsPrec :: Int -> ReadS CDouble Source # readList :: ReadS [CDouble] Source # readPrec :: ReadPrec CDouble Source # readListPrec :: ReadPrec [CDouble] Source #
Read CFloat # |
Methods readsPrec :: Int -> ReadS CFloat Source # readList :: ReadS [CFloat] Source # readPrec :: ReadPrec CFloat Source # readListPrec :: ReadPrec [CFloat] Source #
Read CULLong # |
Methods readsPrec :: Int -> ReadS CULLong Source # readList :: ReadS [CULLong] Source # readPrec :: ReadPrec CULLong Source # readListPrec :: ReadPrec [CULLong] Source #
Read CLLong # |
Methods readsPrec :: Int -> ReadS CLLong Source # readList :: ReadS [CLLong] Source # readPrec :: ReadPrec CLLong Source # readListPrec :: ReadPrec [CLLong] Source #
Read CULong # |
Methods readsPrec :: Int -> ReadS CULong Source # readList :: ReadS [CULong] Source # readPrec :: ReadPrec CULong Source # readListPrec :: ReadPrec [CULong] Source #
Read CLong # |
Methods readsPrec :: Int -> ReadS CLong Source # readList :: ReadS [CLong] Source # readPrec :: ReadPrec CLong Source # readListPrec :: ReadPrec [CLong] Source #
Read CUInt # |
Methods readsPrec :: Int -> ReadS CUInt Source # readList :: ReadS [CUInt] Source # readPrec :: ReadPrec CUInt Source # readListPrec :: ReadPrec [CUInt] Source #
Read CInt # |
Methods readsPrec :: Int -> ReadS CInt Source # readList :: ReadS [CInt] Source # readPrec :: ReadPrec CInt Source # readListPrec :: ReadPrec [CInt] Source #
Read CUShort # |
Methods readsPrec :: Int -> ReadS CUShort Source # readList :: ReadS [CUShort] Source # readPrec :: ReadPrec CUShort Source # readListPrec :: ReadPrec [CUShort] Source #
Read CShort # |
Methods readsPrec :: Int -> ReadS CShort Source # readList :: ReadS [CShort] Source # readPrec :: ReadPrec CShort Source # readListPrec :: ReadPrec [CShort] Source #
Read CUChar # |
Methods readsPrec :: Int -> ReadS CUChar Source # readList :: ReadS [CUChar] Source # readPrec :: ReadPrec CUChar Source # readListPrec :: ReadPrec [CUChar] Source #
Read CSChar # |
Methods readsPrec :: Int -> ReadS CSChar Source # readList :: ReadS [CSChar] Source # readPrec :: ReadPrec CSChar Source # readListPrec :: ReadPrec [CSChar] Source #
Read CChar # |
Methods readsPrec :: Int -> ReadS CChar Source # readList :: ReadS [CChar] Source # readPrec :: ReadPrec CChar Source # readListPrec :: ReadPrec [CChar] Source #
Read IntPtr # |
Methods readsPrec :: Int -> ReadS IntPtr Source # readList :: ReadS [IntPtr] Source # readPrec :: ReadPrec IntPtr Source # readListPrec :: ReadPrec [IntPtr] Source #
Read WordPtr # |
Methods readsPrec :: Int -> ReadS WordPtr Source # readList :: ReadS [WordPtr] Source # readPrec :: ReadPrec WordPtr Source # readListPrec :: ReadPrec [WordPtr] Source #
Read NewlineMode # |
Methods readsPrec :: Int -> ReadS NewlineMode Source # readList :: ReadS [NewlineMode] Source # readPrec :: ReadPrec NewlineMode Source # readListPrec :: ReadPrec [NewlineMode] Source #
Read Newline # |
Methods readsPrec :: Int -> ReadS Newline Source # readList :: ReadS [Newline] Source # readPrec :: ReadPrec Newline Source # readListPrec :: ReadPrec [Newline] Source #
Read BufferMode # |
Methods readsPrec :: Int -> ReadS BufferMode Source # readList :: ReadS [BufferMode] Source # readPrec :: ReadPrec BufferMode Source # readListPrec :: ReadPrec [BufferMode] Source #
Read ExitCode # |
Methods readsPrec :: Int -> ReadS ExitCode Source # readList :: ReadS [ExitCode] Source # readPrec :: ReadPrec ExitCode Source # readListPrec :: ReadPrec [ExitCode] Source #
Read Fd # |
Methods readsPrec :: Int -> ReadS Fd Source # readList :: ReadS [Fd] Source # readPrec :: ReadPrec Fd Source # readListPrec :: ReadPrec [Fd] Source #
Read CRLim # |
Methods readsPrec :: Int -> ReadS CRLim Source # readList :: ReadS [CRLim] Source # readPrec :: ReadPrec CRLim Source # readListPrec :: ReadPrec [CRLim] Source #
Read CTcflag # |
Methods readsPrec :: Int -> ReadS CTcflag Source # readList :: ReadS [CTcflag] Source # readPrec :: ReadPrec CTcflag Source # readListPrec :: ReadPrec [CTcflag] Source #
Read CSpeed # |
Methods readsPrec :: Int -> ReadS CSpeed Source # readList :: ReadS [CSpeed] Source # readPrec :: ReadPrec CSpeed Source # readListPrec :: ReadPrec [CSpeed] Source #
Read CCc # |
Methods readsPrec :: Int -> ReadS CCc Source # readList :: ReadS [CCc] Source # readPrec :: ReadPrec CCc Source # readListPrec :: ReadPrec [CCc] Source #
Read CUid # |
Methods readsPrec :: Int -> ReadS CUid Source # readList :: ReadS [CUid] Source # readPrec :: ReadPrec CUid Source # readListPrec :: ReadPrec [CUid] Source #
Read CNlink # |
Methods readsPrec :: Int -> ReadS CNlink Source # readList :: ReadS [CNlink] Source # readPrec :: ReadPrec CNlink Source # readListPrec :: ReadPrec [CNlink] Source #
Read CGid # |
Methods readsPrec :: Int -> ReadS CGid Source # readList :: ReadS [CGid] Source # readPrec :: ReadPrec CGid Source # readListPrec :: ReadPrec [CGid] Source #
Read CSsize # |
Methods readsPrec :: Int -> ReadS CSsize Source # readList :: ReadS [CSsize] Source # readPrec :: ReadPrec CSsize Source # readListPrec :: ReadPrec [CSsize] Source #
Read CPid # |
Methods readsPrec :: Int -> ReadS CPid Source # readList :: ReadS [CPid] Source # readPrec :: ReadPrec CPid Source # readListPrec :: ReadPrec [CPid] Source #
Read COff # |
Methods readsPrec :: Int -> ReadS COff Source # readList :: ReadS [COff] Source # readPrec :: ReadPrec COff Source # readListPrec :: ReadPrec [COff] Source #
Read CMode # |
Methods readsPrec :: Int -> ReadS CMode Source # readList :: ReadS [CMode] Source # readPrec :: ReadPrec CMode Source # readListPrec :: ReadPrec [CMode] Source #
Read CIno # |
Methods readsPrec :: Int -> ReadS CIno Source # readList :: ReadS [CIno] Source # readPrec :: ReadPrec CIno Source # readListPrec :: ReadPrec [CIno] Source #
Read CDev # |
Methods readsPrec :: Int -> ReadS CDev Source # readList :: ReadS [CDev] Source # readPrec :: ReadPrec CDev Source # readListPrec :: ReadPrec [CDev] Source #
Read GCStats # |
Methods readsPrec :: Int -> ReadS GCStats Source # readList :: ReadS [GCStats] Source # readPrec :: ReadPrec GCStats Source # readListPrec :: ReadPrec [GCStats] Source #
Read Version # |
Methods readsPrec :: Int -> ReadS Version Source # readList :: ReadS [Version] Source # readPrec :: ReadPrec Version Source # readListPrec :: ReadPrec [Version] Source #
Read Void # | Reading a `Void` value is always a parse error, considering `Void` as a data type with no constructors.
Methods readsPrec :: Int -> ReadS Void Source # readList :: ReadS [Void] Source # readPrec :: ReadPrec Void Source # readListPrec :: ReadPrec [Void] Source #
Read Natural # |
Methods readsPrec :: Int -> ReadS Natural Source # readList :: ReadS [Natural] Source # readPrec :: ReadPrec Natural Source # readListPrec :: ReadPrec [Natural] Source #
Read a => Read [a] # |
Methods readsPrec :: Int -> ReadS [a] Source # readList :: ReadS [[a]] Source # readPrec :: ReadPrec [a] Source # readListPrec :: ReadPrec [[a]] Source #
Read a => Read (Maybe a) # |
Methods readsPrec :: Int -> ReadS (Maybe a) Source # readList :: ReadS [Maybe a] Source # readPrec :: ReadPrec (Maybe a) Source # readListPrec :: ReadPrec [Maybe a] Source #
(Integral a, Read a) => Read (Ratio a) # |
Methods readsPrec :: Int -> ReadS (Ratio a) Source # readList :: ReadS [Ratio a] Source # readPrec :: ReadPrec (Ratio a) Source # readListPrec :: ReadPrec [Ratio a] Source #
Read (V1 p) # |
Methods readsPrec :: Int -> ReadS (V1 p) Source # readList :: ReadS [V1 p] Source # readPrec :: ReadPrec (V1 p) Source # readListPrec :: ReadPrec [V1 p] Source #
Read (U1 p) # |
Methods readsPrec :: Int -> ReadS (U1 p) Source # readList :: ReadS [U1 p] Source # readPrec :: ReadPrec (U1 p) Source # readListPrec :: ReadPrec [U1 p] Source #
Read p => Read (Par1 p) # |
Methods readsPrec :: Int -> ReadS (Par1 p) Source # readList :: ReadS [Par1 p] Source # readPrec :: ReadPrec (Par1 p) Source # readListPrec :: ReadPrec [Par1 p] Source #
Read a => Read (Down a) # |
Methods readsPrec :: Int -> ReadS (Down a) Source # readList :: ReadS [Down a] Source # readPrec :: ReadPrec (Down a) Source # readListPrec :: ReadPrec [Down a] Source #
Read a => Read (Last a) # |
Methods readsPrec :: Int -> ReadS (Last a) Source # readList :: ReadS [Last a] Source # readPrec :: ReadPrec (Last a) Source # readListPrec :: ReadPrec [Last a] Source #
Read a => Read (First a) # |
Methods readsPrec :: Int -> ReadS (First a) Source # readList :: ReadS [First a] Source # readPrec :: ReadPrec (First a) Source # readListPrec :: ReadPrec [First a] Source #
Read a => Read (Product a) # |
Methods readsPrec :: Int -> ReadS (Product a) Source # readList :: ReadS [Product a] Source # readPrec :: ReadPrec (Product a) Source # readListPrec :: ReadPrec [Product a] Source #
Read a => Read (Sum a) # |
Methods readsPrec :: Int -> ReadS (Sum a) Source # readList :: ReadS [Sum a] Source # readPrec :: ReadPrec (Sum a) Source # readListPrec :: ReadPrec [Sum a] Source #
Read a => Read (Dual a) # |
Methods readsPrec :: Int -> ReadS (Dual a) Source # readList :: ReadS [Dual a] Source # readPrec :: ReadPrec (Dual a) Source # readListPrec :: ReadPrec [Dual a] Source #
Read a => Read (ZipList a) # |
Methods readsPrec :: Int -> ReadS (ZipList a) Source # readList :: ReadS [ZipList a] Source # readPrec :: ReadPrec (ZipList a) Source # readListPrec :: ReadPrec [ZipList a] Source #
Read a => Read (Complex a) # |
Methods readsPrec :: Int -> ReadS (Complex a) Source # readList :: ReadS [Complex a] Source # readPrec :: ReadPrec (Complex a) Source # readListPrec :: ReadPrec [Complex a] Source #
HasResolution a => Read (Fixed a) # |
Methods readsPrec :: Int -> ReadS (Fixed a) Source # readList :: ReadS [Fixed a] Source # readPrec :: ReadPrec (Fixed a) Source # readListPrec :: ReadPrec [Fixed a] Source #
Read a => Read (NonEmpty a) # |
Methods readsPrec :: Int -> ReadS (NonEmpty a) Source # readList :: ReadS [NonEmpty a] Source # readPrec :: ReadPrec (NonEmpty a) Source # readListPrec :: ReadPrec [NonEmpty a] Source #
Read a => Read (Option a) # |
Methods readsPrec :: Int -> ReadS (Option a) Source # readList :: ReadS [Option a] Source # readPrec :: ReadPrec (Option a) Source # readListPrec :: ReadPrec [Option a] Source #
Read m => Read (WrappedMonoid m) # |
Methods readsPrec :: Int -> ReadS (WrappedMonoid m) Source # readList :: ReadS [WrappedMonoid m] Source # readPrec :: ReadPrec (WrappedMonoid m) Source # readListPrec :: ReadPrec [WrappedMonoid m] Source #
Read a => Read (Last a) # |
Methods readsPrec :: Int -> ReadS (Last a) Source # readList :: ReadS [Last a] Source # readPrec :: ReadPrec (Last a) Source # readListPrec :: ReadPrec [Last a] Source #
Read a => Read (First a) # |
Methods readsPrec :: Int -> ReadS (First a) Source # readList :: ReadS [First a] Source # readPrec :: ReadPrec (First a) Source # readListPrec :: ReadPrec [First a] Source #
Read a => Read (Max a) # |
Methods readsPrec :: Int -> ReadS (Max a) Source # readList :: ReadS [Max a] Source # readPrec :: ReadPrec (Max a) Source # readListPrec :: ReadPrec [Max a] Source #
Read a => Read (Min a) # |
Methods readsPrec :: Int -> ReadS (Min a) Source # readList :: ReadS [Min a] Source # readPrec :: ReadPrec (Min a) Source # readListPrec :: ReadPrec [Min a] Source #
Read a => Read (Identity a) # | This instance would be equivalent to the derived instances of the `Identity` newtype if the `runIdentity` field were removed
Methods readsPrec :: Int -> ReadS (Identity a) Source # readList :: ReadS [Identity a] Source # readPrec :: ReadPrec (Identity a) Source # readListPrec :: ReadPrec [Identity a] Source #
(Read a, Read b) => Read (Either a b) # |
Methods readsPrec :: Int -> ReadS (Either a b) Source # readList :: ReadS [Either a b] Source # readPrec :: ReadPrec (Either a b) Source # readListPrec :: ReadPrec [Either a b] Source #
Read (f p) => Read (Rec1 f p) # |
Methods readsPrec :: Int -> ReadS (Rec1 f p) Source # readList :: ReadS [Rec1 f p] Source # readPrec :: ReadPrec (Rec1 f p) Source # readListPrec :: ReadPrec [Rec1 f p] Source #
(Read a, Read b) => Read (a, b) # |
Methods readsPrec :: Int -> ReadS (a, b) Source # readList :: ReadS [(a, b)] Source # readPrec :: ReadPrec (a, b) Source # readListPrec :: ReadPrec [(a, b)] Source #
Read (Proxy k s) # |
Methods readsPrec :: Int -> ReadS (Proxy k s) Source # readList :: ReadS [Proxy k s] Source # readPrec :: ReadPrec (Proxy k s) Source # readListPrec :: ReadPrec [Proxy k s] Source #
(Read a, Read b) => Read (Arg a b) # |
Methods readsPrec :: Int -> ReadS (Arg a b) Source # readList :: ReadS [Arg a b] Source # readPrec :: ReadPrec (Arg a b) Source # readListPrec :: ReadPrec [Arg a b] Source #
Read c => Read (K1 i c p) # |
Methods readsPrec :: Int -> ReadS (K1 i c p) Source # readList :: ReadS [K1 i c p] Source # readPrec :: ReadPrec (K1 i c p) Source # readListPrec :: ReadPrec [K1 i c p] Source #
(Read (f p), Read (g p)) => Read ((:+:) f g p) # |
Methods readsPrec :: Int -> ReadS ((f :+: g) p) Source # readList :: ReadS [(f :+: g) p] Source # readPrec :: ReadPrec ((f :+: g) p) Source # readListPrec :: ReadPrec [(f :+: g) p] Source #
(Read (f p), Read (g p)) => Read ((:*:) f g p) # |
Methods readsPrec :: Int -> ReadS ((f :*: g) p) Source # readList :: ReadS [(f :*: g) p] Source # readPrec :: ReadPrec ((f :*: g) p) Source # readListPrec :: ReadPrec [(f :*: g) p] Source #
Read (f (g p)) => Read ((:.:) f g p) # |
Methods readsPrec :: Int -> ReadS ((f :.: g) p) Source # readList :: ReadS [(f :.: g) p] Source # readPrec :: ReadPrec ((f :.: g) p) Source # readListPrec :: ReadPrec [(f :.: g) p] Source #
(Read a, Read b, Read c) => Read (a, b, c) # |
Methods readsPrec :: Int -> ReadS (a, b, c) Source # readList :: ReadS [(a, b, c)] Source # readPrec :: ReadPrec (a, b, c) Source # readListPrec :: ReadPrec [(a, b, c)] Source #
(~) k a b => Read ((:~:) k a b) # |
Methods readsPrec :: Int -> ReadS ((k :~: a) b) Source # readList :: ReadS [(k :~: a) b] Source # readPrec :: ReadPrec ((k :~: a) b) Source # readListPrec :: ReadPrec [(k :~: a) b] Source #
Coercible k a b => Read (Coercion k a b) # |
Methods readsPrec :: Int -> ReadS (Coercion k a b) Source # readList :: ReadS [Coercion k a b] Source # readPrec :: ReadPrec (Coercion k a b) Source # readListPrec :: ReadPrec [Coercion k a b] Source #
Read (f a) => Read (Alt k f a) # |
Methods readsPrec :: Int -> ReadS (Alt k f a) Source # readList :: ReadS [Alt k f a] Source # readPrec :: ReadPrec (Alt k f a) Source # readListPrec :: ReadPrec [Alt k f a] Source #
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
Methods readsPrec :: Int -> ReadS (Const k a b) Source # readList :: ReadS [Const k a b] Source # readPrec :: ReadPrec (Const k a b) Source # readListPrec :: ReadPrec [Const k a b] Source #
Read (f p) => Read (M1 i c f p) # |
Methods readsPrec :: Int -> ReadS (M1 i c f p) Source # readList :: ReadS [M1 i c f p] Source # readPrec :: ReadPrec (M1 i c f p) Source # readListPrec :: ReadPrec [M1 i c f p] Source #
(Read a, Read b, Read c, Read d) => Read (a, b, c, d) # |
Methods readsPrec :: Int -> ReadS (a, b, c, d) Source # readList :: ReadS [(a, b, c, d)] Source # readPrec :: ReadPrec (a, b, c, d) Source # readListPrec :: ReadPrec [(a, b, c, d)] Source #
(Read1 f, Read1 g, Read a) => Read (Product * f g a) # |
Methods readsPrec :: Int -> ReadS (Product * f g a) Source # readList :: ReadS [Product * f g a] Source # readPrec :: ReadPrec (Product * f g a) Source # readListPrec :: ReadPrec [Product * f g a] Source #
(Read1 f, Read1 g, Read a) => Read (Sum * f g a) # |
Methods readsPrec :: Int -> ReadS (Sum * f g a) Source # readList :: ReadS [Sum * f g a] Source # readPrec :: ReadPrec (Sum * f g a) Source # readListPrec :: ReadPrec [Sum * f g a] Source #
(Read a, Read b, Read c, Read d, Read e) => Read (a, b, c, d, e) # |
Methods readsPrec :: Int -> ReadS (a, b, c, d, e) Source # readList :: ReadS [(a, b, c, d, e)] Source # readPrec :: ReadPrec (a, b, c, d, e) Source # readListPrec :: ReadPrec [(a, b, c, d, e)] Source #
(Read1 f, Read1 g, Read a) => Read (Compose * * f g a) # |
Methods readsPrec :: Int -> ReadS (Compose * * f g a) Source # readList :: ReadS [Compose * * f g a] Source # readPrec :: ReadPrec (Compose * * f g a) Source # readListPrec :: ReadPrec [Compose * * f g a] Source #
(Read a, Read b, Read c, Read d, Read e, Read f) => Read (a, b, c, d, e, f) # |
Methods readsPrec :: Int -> ReadS (a, b, c, d, e, f) Source # readList :: ReadS [(a, b, c, d, e, f)] Source # readPrec :: ReadPrec (a, b, c, d, e, f) Source # readListPrec :: ReadPrec [(a, b, c, d, e, f)] Source #
(Read a, Read b, Read c, Read d, Read e, Read f, Read g) => Read (a, b, c, d, e, f, g) # |
Methods readsPrec :: Int -> ReadS (a, b, c, d, e, f, g) Source # readList :: ReadS [(a, b, c, d, e, f, g)] Source # readPrec :: ReadPrec (a, b, c, d, e, f, g) Source # readListPrec :: ReadPrec [(a, b, c, d, e, f, g)] Source #
(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) # |
Methods readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h) Source # readList :: ReadS [(a, b, c, d, e, f, g, h)] Source # readPrec :: ReadPrec (a, b, c, d, e, f, g, h) Source # readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h)] Source #
(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) # |
Methods readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i) Source # readList :: ReadS [(a, b, c, d, e, f, g, h, i)] Source # readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i) Source # readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i)] Source #
(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) # |
Methods readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j) Source # readList :: ReadS [(a, b, c, d, e, f, g, h, i, j)] Source # readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j) Source # readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j)] Source #
(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) # |
Methods readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j, k) Source # readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k)] Source # readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j, k) Source # readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k)] Source #
(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) # |
Methods readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j, k, l) Source # readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l)] Source # readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j, k, l) Source # readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l)] Source #
(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) # |
Methods readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j, k, l, m) Source # readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l, m)] Source # readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j, k, l, m) Source # readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l, m)] Source #
(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) # |
Methods readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source # readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] Source # readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source # readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] Source #
(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) # |
Methods readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source # readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] Source # readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source # readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] Source #

reads :: Read a => ReadS a Source #

equivalent to `readsPrec` with a precedence of 0.

readParen :: Bool -> ReadS a -> ReadS a Source #

``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 Source #

The `read` function reads input from a string, which must be completely consumed by the input process.

lex :: ReadS String Source #

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 # |
Methods (>>=) :: IO a -> (a -> IO b) -> IO b Source # (>>) :: IO a -> IO b -> IO b Source # return :: a -> IO a Source # fail :: String -> IO a Source #
Functor IO # |
Methods fmap :: (a -> b) -> IO a -> IO b Source # (<$) :: a -> IO b -> IO a Source #
MonadFix IO # |
Methods mfix :: (a -> IO a) -> IO a Source #
MonadFail IO # |
Methods fail :: String -> IO a Source #
Applicative IO # |
Methods pure :: a -> IO a Source # (<*>) :: IO (a -> b) -> IO a -> IO b Source # (*>) :: IO a -> IO b -> IO b Source # (<*) :: IO a -> IO b -> IO a Source #
MonadPlus IO # |
Methods mzero :: IO a Source # mplus :: IO a -> IO a -> IO a Source #
Alternative IO # |
Methods empty :: IO a Source # (<|>) :: IO a -> IO a -> IO a Source # some :: IO a -> IO [a] Source # many :: IO a -> IO [a] Source #
MonadIO IO # |
Methods liftIO :: IO a -> IO a Source #
Monoid a => Monoid (IO a) # |
Methods mempty :: IO a Source # mappend :: IO a -> IO a -> IO a Source # mconcat :: [IO a] -> IO a Source #
(~) * a () => HPrintfType (IO a) # |
Methods hspr :: Handle -> String -> [UPrintf] -> IO a
(~) * a () => PrintfType (IO a) # |
Methods spr :: String -> [UPrintf] -> IO a

## Simple I/O operations

### Output functions

putChar :: Char -> IO () Source #

Write a character to the standard output device (same as `hPutChar` `stdout`).

putStr :: String -> IO () Source #

Write a string to the standard output device (same as `hPutStr` `stdout`).

putStrLn :: String -> IO () Source #

The same as `putStr`, but adds a newline character.

print :: Show a => a -> IO () Source #

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

Read a character from the standard input device (same as `hGetChar` `stdin`).

getLine :: IO String Source #

Read a line from the standard input device (same as `hGetLine` `stdin`).

getContents :: IO String Source #

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 () Source #

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

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

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 () Source #

The computation `writeFile` `file str` function writes the string `str`, to the file `file`.

appendFile :: FilePath -> String -> IO () Source #

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

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

The `readLn` function combines `getLine` and `readIO`.

## Exception handling in the I/O monad

type IOError = IOException Source #

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

Raise an `IOError` in the `IO` monad.

userError :: String -> IOError Source #

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)