Foundation

foundation-0.0.30: Alternative prelude with batteries and no dependencies

License | BSD-style
Maintainer | Vincent Hanquez <vincent@snarc.org>
Stability | experimental
Portability | portable
Safe Haskell | None
Language | Haskell2010

Foundation

Contents

- Standard
  - Operators
  - Functions
  - Type classes
  - Numeric type classes
  - Data types
  - Numbers
  - Collection types
  - Numeric functions
  - Monoids
  - Collection
  - Folds
  - Maybe
  - Either
  - Function
  - Applicative
  - Monad
  - Exceptions
  - Proxy
  - Partial
  - Old Prelude Strings as [Char] with bridge back and forth

Description

I tried to picture clusters of information As they moved through the computer What do they look like?

Alternative Prelude

Synopsis

- ($) :: (a -> b) -> a -> b
- ($!) :: (a -> b) -> a -> b
- (&&) :: Bool -> Bool -> Bool
- (||) :: Bool -> Bool -> Bool
- (.) :: forall (b :: k) (c :: k) (a :: k). Category cat => cat b c -> cat a b -> cat a c
- not :: Bool -> Bool
- otherwise :: Bool
- class Fstable a where
  - type ProductFirst a
  - fst :: a -> ProductFirst a
- class Sndable a where
  - type ProductSecond a
  - snd :: a -> ProductSecond a
- data Tuple2 a b = Tuple2 !a !b
- data Tuple3 a b c = Tuple3 !a !b !c
- data Tuple4 a b c d = Tuple4 !a !b !c !d
- class Thdable a where
  - type ProductThird a
  - thd :: a -> ProductThird a
- type family ProductFirst a
- type family ProductSecond a
- type family ProductThird a
- id :: forall (a :: k). Category cat => cat a a
- maybe :: b -> (a -> b) -> Maybe a -> b
- either :: (a -> c) -> (b -> c) -> Either a b -> c
- flip :: (a -> b -> c) -> b -> a -> c
- const :: a -> b -> a
- error :: HasCallStack => String -> a
- putStr :: String -> IO ()
- putStrLn :: String -> IO ()
- getArgs :: IO [String]
- uncurry :: (a -> b -> c) -> (a, b) -> c
- curry :: ((a, b) -> c) -> a -> b -> c
- swap :: (a, b) -> (b, a)
- until :: (a -> Bool) -> (a -> a) -> a -> a
- asTypeOf :: a -> a -> a
- undefined :: HasCallStack => a
- seq :: a -> b -> b
- class NormalForm a
- deepseq :: NormalForm a => a -> b -> b
- force :: NormalForm a => a -> a
- class Show a
- show :: Show a => a -> String
- 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 Eq a where
  - (==) :: a -> a -> Bool
  - (/=) :: a -> a -> Bool
- class Bounded a where
  - minBound :: a
  - maxBound :: a
- class Enum a where
  - succ :: a -> a
  - pred :: a -> a
  - toEnum :: Int -> a
  - fromEnum :: a -> Int
  - enumFrom :: a -> [a]
  - enumFromThen :: a -> a -> [a]
  - enumFromTo :: a -> a -> [a]
  - enumFromThenTo :: a -> a -> a -> [a]
- class Functor (f :: Type -> Type) where
  - fmap :: (a -> b) -> f a -> f b
  - (<$) :: a -> f b -> f a
- class Integral a where
  - fromInteger :: Integer -> a
- class Fractional a where
  - fromRational :: Rational -> a
- class HasNegation a where
  - negate :: a -> a
- class (forall a. Functor (p a)) => Bifunctor (p :: Type -> Type -> Type) where
  - bimap :: (a -> b) -> (c -> d) -> p a c -> p b d
  - first :: (a -> b) -> p a c -> p b c
  - second :: (b -> c) -> p a b -> p a c
- class Functor f => Applicative (f :: Type -> Type) where
  - pure :: a -> f a
  - (<*>) :: f (a -> b) -> f a -> f b
  - liftA2 :: (a -> b -> c) -> f a -> f b -> f c
  - (*>) :: f a -> f b -> f b
  - (<*) :: f a -> f b -> f a
- class Applicative m => Monad (m :: Type -> Type) where
  - (>>=) :: m a -> (a -> m b) -> m b
  - (>>) :: m a -> m b -> m b
  - return :: a -> m a
- (=<<) :: Monad m => (a -> m b) -> m a -> m b
- class IsString a where
  - fromString :: String -> a
- class IsList l where
  - type Item l
  - fromList :: [Item l] -> l
  - fromListN :: Int -> [Item l] -> l
  - toList :: l -> [Item l]
- class (Integral a, Eq a, Ord a) => IsIntegral a where
  - toInteger :: a -> Integer
- class IsIntegral a => IsNatural a where
  - toNatural :: a -> Natural
- class Signed a where
  - abs :: a -> a
  - signum :: a -> Sign
- class Additive a where
  - azero :: a
  - (+) :: a -> a -> a
  - scale :: IsNatural n => n -> a -> a
- class Subtractive a where
  - type Difference a
  - (-) :: a -> a -> Difference a
- class Multiplicative a where
  - midentity :: a
  - (*) :: a -> a -> a
  - (^) :: (IsNatural n, Enum n, IDivisible n) => a -> n -> a
- class (Additive a, Multiplicative a) => IDivisible a where
  - div :: a -> a -> a
  - mod :: a -> a -> a
  - divMod :: a -> a -> (a, a)
- class Multiplicative a => Divisible a where
  - (/) :: a -> a -> a
- data Maybe a
  - = Nothing
  - | Just a
- data Ordering
  - = LT
  - | EQ
  - | GT
- data Bool
  - = False
  - | True
- data Char
- data Char7
- data IO a
- data Either a b
  - = Left a
  - | Right b
- data Int8
- data Int16
- data Int32
- data Int64
- data Word8
- data Word16
- data Word32
- data Word64
- data Word
- data Word128
- data Word256
- data Int
- data Integer
- data Natural
- type Rational = Ratio Integer
- data Float
- data Double
- newtype CountOf ty = CountOf Int
- newtype Offset ty = Offset Int
- toCount :: Int -> CountOf ty
- fromCount :: CountOf ty -> Int
- data UArray ty
- class Eq ty => PrimType ty
- data Array a
- data String
- (^^) :: (Fractional a, Integral b) => a -> b -> a
- fromIntegral :: (Integral a, Num b) => a -> b
- realToFrac :: (Real a, Fractional b) => a -> b
- class Semigroup a
- class Semigroup a => Monoid a where
  - mempty :: a
  - mappend :: a -> a -> a
  - mconcat :: [a] -> a
- (<>) :: Semigroup a => a -> a -> a
- class (IsList c, Item c ~ Element c) => Collection c where
  - null :: c -> Bool
  - length :: c -> CountOf (Element c)
  - elem :: (Eq a, a ~ Element c) => Element c -> c -> Bool
  - notElem :: (Eq a, a ~ Element c) => Element c -> c -> Bool
  - maximum :: (Ord a, a ~ Element c) => NonEmpty c -> Element c
  - minimum :: (Ord a, a ~ Element c) => NonEmpty c -> Element c
  - any :: (Element c -> Bool) -> c -> Bool
  - all :: (Element c -> Bool) -> c -> Bool
- and :: (Collection col, Element col ~ Bool) => col -> Bool
- or :: (Collection col, Element col ~ Bool) => col -> Bool
- class (IsList c, Item c ~ Element c, Monoid c, Collection c) => Sequential c where
  - take :: CountOf (Element c) -> c -> c
  - revTake :: CountOf (Element c) -> c -> c
  - drop :: CountOf (Element c) -> c -> c
  - revDrop :: CountOf (Element c) -> c -> c
  - splitAt :: CountOf (Element c) -> c -> (c, c)
  - revSplitAt :: CountOf (Element c) -> c -> (c, c)
  - splitOn :: (Element c -> Bool) -> c -> [c]
  - break :: (Element c -> Bool) -> c -> (c, c)
  - breakEnd :: (Element c -> Bool) -> c -> (c, c)
  - breakElem :: Element c -> c -> (c, c)
  - takeWhile :: (Element c -> Bool) -> c -> c
  - dropWhile :: (Element c -> Bool) -> c -> c
  - intersperse :: Element c -> c -> c
  - intercalate :: Element c -> c -> Element c
  - span :: (Element c -> Bool) -> c -> (c, c)
  - spanEnd :: (Element c -> Bool) -> c -> (c, c)
  - filter :: (Element c -> Bool) -> c -> c
  - partition :: (Element c -> Bool) -> c -> (c, c)
  - reverse :: c -> c
  - uncons :: c -> Maybe (Element c, c)
  - unsnoc :: c -> Maybe (c, Element c)
  - snoc :: c -> Element c -> c
  - cons :: Element c -> c -> c
  - find :: (Element c -> Bool) -> c -> Maybe (Element c)
  - sortBy :: (Element c -> Element c -> Ordering) -> c -> c
  - singleton :: Element c -> c
  - head :: NonEmpty c -> Element c
  - last :: NonEmpty c -> Element c
  - tail :: NonEmpty c -> c
  - init :: NonEmpty c -> c
  - replicate :: CountOf (Element c) -> Element c -> c
  - isPrefixOf :: c -> c -> Bool
  - isSuffixOf :: c -> c -> Bool
  - isInfixOf :: c -> c -> Bool
  - stripPrefix :: c -> c -> Maybe c
  - stripSuffix :: c -> c -> Maybe c
- data NonEmpty a
- nonEmpty :: Collection c => c -> Maybe (NonEmpty c)
- class Foldable collection where
  - foldl' :: (a -> Element collection -> a) -> a -> collection -> a
  - foldr :: (Element collection -> a -> a) -> a -> collection -> a
  - foldr' :: (Element collection -> a -> a) -> a -> collection -> a
- mapMaybe :: (a -> Maybe b) -> [a] -> [b]
- catMaybes :: [Maybe a] -> [a]
- fromMaybe :: a -> Maybe a -> a
- isJust :: Maybe a -> Bool
- isNothing :: Maybe a -> Bool
- listToMaybe :: [a] -> Maybe a
- maybeToList :: Maybe a -> [a]
- partitionEithers :: [Either a b] -> ([a], [b])
- lefts :: [Either a b] -> [a]
- rights :: [Either a b] -> [b]
- on :: (b -> b -> c) -> (a -> b) -> a -> a -> c
- (<$>) :: Functor f => (a -> b) -> f a -> f b
- (<|>) :: Alternative f => f a -> f a -> f a
- (>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c
- class (Typeable e, Show e) => Exception e where
  - toException :: e -> SomeException
  - fromException :: SomeException -> Maybe e
  - displayException :: e -> String
  - backtraceDesired :: e -> Bool
- class Typeable (a :: k)
- data SomeException
- data IOException
- data Proxy (t :: k) = Proxy
- asProxyTypeOf :: a -> proxy a -> a
- data Partial a
- partial :: a -> Partial a
- data PartialError
- fromPartial :: Partial a -> a
- ifThenElse :: Bool -> a -> a -> a
- type LString = String

# Standard

## Operators

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

``($)`` is the function application operator.

Applying ``($)`` to a function `f` and an argument `x` gives the same result as applying `f` to `x` directly. The definition is akin to this:

    ($) :: (a -> b) -> a -> b
    ($) f x = f x

This is ``id`` specialized from `a -> a` to `(a -> b) -> (a -> b)` which by the associativity of `(->)` is the same as `(a -> b) -> a -> b`.

On the face of it, this may appear pointless! But it's actually one of the most useful and important operators in Haskell.

The order of operations is very different between `($)` and normal function application. Normal function application has precedence 10 - higher than any operator - and associates to the left. So these two definitions are equivalent:

    expr = min 5 1 + 5
    expr = ((min 5) 1) + 5

`($)` has precedence 0 (the lowest) and associates to the right, so these are equivalent:

    expr = min 5 $ 1 + 5
    expr = (min 5) (1 + 5)

#### Examples

Expand

A common use cases of `($)` is to avoid parentheses in complex expressions.

For example, instead of using nested parentheses in the following Haskell function:

    -- | Sum numbers in a string: strSum "100  5 -7" == 98
    strSum :: String -> Int
    strSum s = sum (mapMaybe readMaybe (words s))

we can deploy the function application operator:

    -- | Sum numbers in a string: strSum "100  5 -7" == 98
    strSum :: String -> Int
    strSum s = sum $ mapMaybe readMaybe $ words s

`($)` is also used as a section (a partially applied operator), in order to indicate that we wish to apply some yet-unspecified function to a given value. For example, to apply the argument `5` to a list of functions:

    applyFive :: [Int]
    applyFive = map ($ 5) [(+1), (2^)]
    >>> [6, 32]

#### Technical Remark (Representation Polymorphism)

Expand

`($)` is fully representation-polymorphic. This allows it to also be used with arguments of unlifted and even unboxed kinds, such as unboxed integers:

    fastMod :: Int -> Int -> Int
    fastMod (I# x) (I# m) = I# $ remInt# x m

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

Strict (call-by-value) application operator. It takes a function and an argument, evaluates the argument to weak head normal form (WHNF), then calls the function with that value.

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

Boolean "and", lazy in the second argument

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

Boolean "or", lazy in the second argument

(.) :: forall (b :: k) (c :: k) (a :: k). Category cat => cat b c -> cat a b -> cat a c infixr 9 #

morphism composition

## Functions

not :: Bool -> Bool #

Boolean "not"

otherwise :: Bool #

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

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

class Fstable a where #

Class of product types that have a first element

Associated Types

type ProductFirst a #

Methods

fst :: a -> ProductFirst a #

#### Instances

Instances details

Fstable (Tuple2 a b) # |
Instance details Defined in Foundation.Tuple Associated Types
type ProductFirst (Tuple2 a b) |
Instance details Defined in Foundation.Tuple type ProductFirst (Tuple2 a b) = a
Methods fst :: Tuple2 a b -> ProductFirst (Tuple2 a b) #
Fstable (a, b) # |
Instance details Defined in Foundation.Tuple Associated Types
type ProductFirst (a, b) |
Instance details Defined in Foundation.Tuple type ProductFirst (a, b) = a
Methods fst :: (a, b) -> ProductFirst (a, b) #
Fstable (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple Associated Types
type ProductFirst (Tuple3 a b c) |
Instance details Defined in Foundation.Tuple type ProductFirst (Tuple3 a b c) = a
Methods fst :: Tuple3 a b c -> ProductFirst (Tuple3 a b c) #
Fstable (a, b, c) # |
Instance details Defined in Foundation.Tuple Associated Types
type ProductFirst (a, b, c) |
Instance details Defined in Foundation.Tuple type ProductFirst (a, b, c) = a
Methods fst :: (a, b, c) -> ProductFirst (a, b, c) #
Fstable (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple Associated Types
type ProductFirst (Tuple4 a b c d) |
Instance details Defined in Foundation.Tuple type ProductFirst (Tuple4 a b c d) = a
Methods fst :: Tuple4 a b c d -> ProductFirst (Tuple4 a b c d) #
Fstable (a, b, c, d) # |
Instance details Defined in Foundation.Tuple Associated Types
type ProductFirst (a, b, c, d) |
Instance details Defined in Foundation.Tuple type ProductFirst (a, b, c, d) = a
Methods fst :: (a, b, c, d) -> ProductFirst (a, b, c, d) #

class Sndable a where #

Class of product types that have a second element

Associated Types

type ProductSecond a #

Methods

snd :: a -> ProductSecond a #

#### Instances

Instances details

Sndable (Tuple2 a b) # |
Instance details Defined in Foundation.Tuple Associated Types
type ProductSecond (Tuple2 a b) |
Instance details Defined in Foundation.Tuple type ProductSecond (Tuple2 a b) = b
Methods snd :: Tuple2 a b -> ProductSecond (Tuple2 a b) #
Sndable (a, b) # |
Instance details Defined in Foundation.Tuple Associated Types
type ProductSecond (a, b) |
Instance details Defined in Foundation.Tuple type ProductSecond (a, b) = b
Methods snd :: (a, b) -> ProductSecond (a, b) #
Sndable (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple Associated Types
type ProductSecond (Tuple3 a b c) |
Instance details Defined in Foundation.Tuple type ProductSecond (Tuple3 a b c) = b
Methods snd :: Tuple3 a b c -> ProductSecond (Tuple3 a b c) #
Sndable (a, b, c) # |
Instance details Defined in Foundation.Tuple Associated Types
type ProductSecond (a, b, c) |
Instance details Defined in Foundation.Tuple type ProductSecond (a, b, c) = b
Methods snd :: (a, b, c) -> ProductSecond (a, b, c) #
Sndable (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple Associated Types
type ProductSecond (Tuple4 a b c d) |
Instance details Defined in Foundation.Tuple type ProductSecond (Tuple4 a b c d) = b
Methods snd :: Tuple4 a b c d -> ProductSecond (Tuple4 a b c d) #
Sndable (a, b, c, d) # |
Instance details Defined in Foundation.Tuple Associated Types
type ProductSecond (a, b, c, d) |
Instance details Defined in Foundation.Tuple type ProductSecond (a, b, c, d) = b
Methods snd :: (a, b, c, d) -> ProductSecond (a, b, c, d) #

data Tuple2 a b #

Strict tuple (a,b)

Constructors

Tuple2 !a !b |

#### Instances

Instances details

Nthable 1 (Tuple2 a b) # |
Instance details Defined in Foundation.Tuple.Nth Associated Types
type NthTy 1 (Tuple2 a b) |
Instance details Defined in Foundation.Tuple.Nth type NthTy 1 (Tuple2 a b) = a
Methods nth :: proxy 1 -> Tuple2 a b -> NthTy 1 (Tuple2 a b) #
Nthable 2 (Tuple2 a b) # |
Instance details Defined in Foundation.Tuple.Nth Associated Types
type NthTy 2 (Tuple2 a b) |
Instance details Defined in Foundation.Tuple.Nth type NthTy 2 (Tuple2 a b) = b
Methods nth :: proxy 2 -> Tuple2 a b -> NthTy 2 (Tuple2 a b) #
(NormalForm a, NormalForm b) => NormalForm (Tuple2 a b) # |
Instance details Defined in Foundation.Tuple Methods toNormalForm :: Tuple2 a b -> () #
(Hashable a, Hashable b) => Hashable (Tuple2 a b) # |
Instance details Defined in Foundation.Hashing.Hashable Methods hashMix :: Hasher st => Tuple2 a b -> st -> st #
Fstable (Tuple2 a b) # |
Instance details Defined in Foundation.Tuple Associated Types
type ProductFirst (Tuple2 a b) |
Instance details Defined in Foundation.Tuple type ProductFirst (Tuple2 a b) = a
Methods fst :: Tuple2 a b -> ProductFirst (Tuple2 a b) #
Sndable (Tuple2 a b) # |
Instance details Defined in Foundation.Tuple Associated Types
type ProductSecond (Tuple2 a b) |
Instance details Defined in Foundation.Tuple type ProductSecond (Tuple2 a b) = b
Methods snd :: Tuple2 a b -> ProductSecond (Tuple2 a b) #
(Data a, Data b) => Data (Tuple2 a b) # |
Instance details Defined in Foundation.Tuple Methods gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Tuple2 a b -> c (Tuple2 a b) # gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Tuple2 a b) # toConstr :: Tuple2 a b -> Constr # dataTypeOf :: Tuple2 a b -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Tuple2 a b)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Tuple2 a b)) # gmapT :: (forall b0. Data b0 => b0 -> b0) -> Tuple2 a b -> Tuple2 a b # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Tuple2 a b -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Tuple2 a b -> r # gmapQ :: (forall d. Data d => d -> u) -> Tuple2 a b -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Tuple2 a b -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Tuple2 a b -> m (Tuple2 a b) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Tuple2 a b -> m (Tuple2 a b) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Tuple2 a b -> m (Tuple2 a b) #
Generic (Tuple2 a b) # |
Instance details Defined in Foundation.Tuple Associated Types
type Rep (Tuple2 a b) |
Instance details Defined in Foundation.Tuple type Rep (Tuple2 a b) = D1 ('MetaData "Tuple2" "Foundation.Tuple" "foundation-0.0.30-410Msgl8Y3yCAXq1zpEi0p" 'False) (C1 ('MetaCons "Tuple2" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)))
Methods from :: Tuple2 a b -> Rep (Tuple2 a b) x # to :: Rep (Tuple2 a b) x -> Tuple2 a b #
(Show a, Show b) => Show (Tuple2 a b) # |
Instance details Defined in Foundation.Tuple Methods showsPrec :: Int -> Tuple2 a b -> ShowS # show :: Tuple2 a b -> String # showList :: [Tuple2 a b] -> ShowS #
(Eq a, Eq b) => Eq (Tuple2 a b) # |
Instance details Defined in Foundation.Tuple Methods (==) :: Tuple2 a b -> Tuple2 a b -> Bool # (/=) :: Tuple2 a b -> Tuple2 a b -> Bool #
(Ord a, Ord b) => Ord (Tuple2 a b) # |
Instance details Defined in Foundation.Tuple Methods compare :: Tuple2 a b -> Tuple2 a b -> Ordering # (<) :: Tuple2 a b -> Tuple2 a b -> Bool # (<=) :: Tuple2 a b -> Tuple2 a b -> Bool # (>) :: Tuple2 a b -> Tuple2 a b -> Bool # (>=) :: Tuple2 a b -> Tuple2 a b -> Bool # max :: Tuple2 a b -> Tuple2 a b -> Tuple2 a b # min :: Tuple2 a b -> Tuple2 a b -> Tuple2 a b #
type NthTy 1 (Tuple2 a b) # |
Instance details Defined in Foundation.Tuple.Nth type NthTy 1 (Tuple2 a b) = a
type NthTy 2 (Tuple2 a b) # |
Instance details Defined in Foundation.Tuple.Nth type NthTy 2 (Tuple2 a b) = b
type ProductFirst (Tuple2 a b) # |
Instance details Defined in Foundation.Tuple type ProductFirst (Tuple2 a b) = a
type ProductSecond (Tuple2 a b) # |
Instance details Defined in Foundation.Tuple type ProductSecond (Tuple2 a b) = b
type Rep (Tuple2 a b) # |
Instance details Defined in Foundation.Tuple type Rep (Tuple2 a b) = D1 ('MetaData "Tuple2" "Foundation.Tuple" "foundation-0.0.30-410Msgl8Y3yCAXq1zpEi0p" 'False) (C1 ('MetaCons "Tuple2" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)))

data Tuple3 a b c #

Strict tuple (a,b,c)

Constructors

Tuple3 !a !b !c |

#### Instances

Instances details

Nthable 1 (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple.Nth Associated Types
type NthTy 1 (Tuple3 a b c) |
Instance details Defined in Foundation.Tuple.Nth type NthTy 1 (Tuple3 a b c) = a
Methods nth :: proxy 1 -> Tuple3 a b c -> NthTy 1 (Tuple3 a b c) #
Nthable 2 (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple.Nth Associated Types
type NthTy 2 (Tuple3 a b c) |
Instance details Defined in Foundation.Tuple.Nth type NthTy 2 (Tuple3 a b c) = b
Methods nth :: proxy 2 -> Tuple3 a b c -> NthTy 2 (Tuple3 a b c) #
Nthable 3 (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple.Nth Associated Types
type NthTy 3 (Tuple3 a b c) |
Instance details Defined in Foundation.Tuple.Nth type NthTy 3 (Tuple3 a b c) = c
Methods nth :: proxy 3 -> Tuple3 a b c -> NthTy 3 (Tuple3 a b c) #
(NormalForm a, NormalForm b, NormalForm c) => NormalForm (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple Methods toNormalForm :: Tuple3 a b c -> () #
(Hashable a, Hashable b, Hashable c) => Hashable (Tuple3 a b c) # |
Instance details Defined in Foundation.Hashing.Hashable Methods hashMix :: Hasher st => Tuple3 a b c -> st -> st #
Fstable (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple Associated Types
type ProductFirst (Tuple3 a b c) |
Instance details Defined in Foundation.Tuple type ProductFirst (Tuple3 a b c) = a
Methods fst :: Tuple3 a b c -> ProductFirst (Tuple3 a b c) #
Sndable (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple Associated Types
type ProductSecond (Tuple3 a b c) |
Instance details Defined in Foundation.Tuple type ProductSecond (Tuple3 a b c) = b
Methods snd :: Tuple3 a b c -> ProductSecond (Tuple3 a b c) #
Thdable (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple Associated Types
type ProductThird (Tuple3 a b c) |
Instance details Defined in Foundation.Tuple type ProductThird (Tuple3 a b c) = c
Methods thd :: Tuple3 a b c -> ProductThird (Tuple3 a b c) #
(Data a, Data b, Data c) => Data (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple Methods gfoldl :: (forall d b0. Data d => c0 (d -> b0) -> d -> c0 b0) -> (forall g. g -> c0 g) -> Tuple3 a b c -> c0 (Tuple3 a b c) # gunfold :: (forall b0 r. Data b0 => c0 (b0 -> r) -> c0 r) -> (forall r. r -> c0 r) -> Constr -> c0 (Tuple3 a b c) # toConstr :: Tuple3 a b c -> Constr # dataTypeOf :: Tuple3 a b c -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c0 (t d)) -> Maybe (c0 (Tuple3 a b c)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c0 (t d e)) -> Maybe (c0 (Tuple3 a b c)) # gmapT :: (forall b0. Data b0 => b0 -> b0) -> Tuple3 a b c -> Tuple3 a b c # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Tuple3 a b c -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Tuple3 a b c -> r # gmapQ :: (forall d. Data d => d -> u) -> Tuple3 a b c -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Tuple3 a b c -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Tuple3 a b c -> m (Tuple3 a b c) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Tuple3 a b c -> m (Tuple3 a b c) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Tuple3 a b c -> m (Tuple3 a b c) #
Generic (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple Associated Types
type Rep (Tuple3 a b c) |
Instance details Defined in Foundation.Tuple type Rep (Tuple3 a b c) = D1 ('MetaData "Tuple3" "Foundation.Tuple" "foundation-0.0.30-410Msgl8Y3yCAXq1zpEi0p" 'False) (C1 ('MetaCons "Tuple3" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 c))))
Methods from :: Tuple3 a b c -> Rep (Tuple3 a b c) x # to :: Rep (Tuple3 a b c) x -> Tuple3 a b c #
(Show a, Show b, Show c) => Show (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple Methods showsPrec :: Int -> Tuple3 a b c -> ShowS # show :: Tuple3 a b c -> String # showList :: [Tuple3 a b c] -> ShowS #
(Eq a, Eq b, Eq c) => Eq (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple Methods (==) :: Tuple3 a b c -> Tuple3 a b c -> Bool # (/=) :: Tuple3 a b c -> Tuple3 a b c -> Bool #
(Ord a, Ord b, Ord c) => Ord (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple Methods compare :: Tuple3 a b c -> Tuple3 a b c -> Ordering # (<) :: Tuple3 a b c -> Tuple3 a b c -> Bool # (<=) :: Tuple3 a b c -> Tuple3 a b c -> Bool # (>) :: Tuple3 a b c -> Tuple3 a b c -> Bool # (>=) :: Tuple3 a b c -> Tuple3 a b c -> Bool # max :: Tuple3 a b c -> Tuple3 a b c -> Tuple3 a b c # min :: Tuple3 a b c -> Tuple3 a b c -> Tuple3 a b c #
type NthTy 1 (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple.Nth type NthTy 1 (Tuple3 a b c) = a
type NthTy 2 (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple.Nth type NthTy 2 (Tuple3 a b c) = b
type NthTy 3 (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple.Nth type NthTy 3 (Tuple3 a b c) = c
type ProductFirst (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple type ProductFirst (Tuple3 a b c) = a
type ProductSecond (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple type ProductSecond (Tuple3 a b c) = b
type ProductThird (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple type ProductThird (Tuple3 a b c) = c
type Rep (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple type Rep (Tuple3 a b c) = D1 ('MetaData "Tuple3" "Foundation.Tuple" "foundation-0.0.30-410Msgl8Y3yCAXq1zpEi0p" 'False) (C1 ('MetaCons "Tuple3" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 c))))

data Tuple4 a b c d #

Strict tuple (a,b,c,d)

Constructors

Tuple4 !a !b !c !d |

#### Instances

Instances details

Nthable 1 (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple.Nth Associated Types
type NthTy 1 (Tuple4 a b c d) |
Instance details Defined in Foundation.Tuple.Nth type NthTy 1 (Tuple4 a b c d) = a
Methods nth :: proxy 1 -> Tuple4 a b c d -> NthTy 1 (Tuple4 a b c d) #
Nthable 2 (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple.Nth Associated Types
type NthTy 2 (Tuple4 a b c d) |
Instance details Defined in Foundation.Tuple.Nth type NthTy 2 (Tuple4 a b c d) = b
Methods nth :: proxy 2 -> Tuple4 a b c d -> NthTy 2 (Tuple4 a b c d) #
Nthable 3 (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple.Nth Associated Types
type NthTy 3 (Tuple4 a b c d) |
Instance details Defined in Foundation.Tuple.Nth type NthTy 3 (Tuple4 a b c d) = c
Methods nth :: proxy 3 -> Tuple4 a b c d -> NthTy 3 (Tuple4 a b c d) #
Nthable 4 (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple.Nth Associated Types
type NthTy 4 (Tuple4 a b c d) |
Instance details Defined in Foundation.Tuple.Nth type NthTy 4 (Tuple4 a b c d) = d
Methods nth :: proxy 4 -> Tuple4 a b c d -> NthTy 4 (Tuple4 a b c d) #
(NormalForm a, NormalForm b, NormalForm c, NormalForm d) => NormalForm (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple Methods toNormalForm :: Tuple4 a b c d -> () #
(Hashable a, Hashable b, Hashable c, Hashable d) => Hashable (Tuple4 a b c d) # |
Instance details Defined in Foundation.Hashing.Hashable Methods hashMix :: Hasher st => Tuple4 a b c d -> st -> st #
Fstable (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple Associated Types
type ProductFirst (Tuple4 a b c d) |
Instance details Defined in Foundation.Tuple type ProductFirst (Tuple4 a b c d) = a
Methods fst :: Tuple4 a b c d -> ProductFirst (Tuple4 a b c d) #
Sndable (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple Associated Types
type ProductSecond (Tuple4 a b c d) |
Instance details Defined in Foundation.Tuple type ProductSecond (Tuple4 a b c d) = b
Methods snd :: Tuple4 a b c d -> ProductSecond (Tuple4 a b c d) #
Thdable (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple Associated Types
type ProductThird (Tuple4 a b c d) |
Instance details Defined in Foundation.Tuple type ProductThird (Tuple4 a b c d) = c
Methods thd :: Tuple4 a b c d -> ProductThird (Tuple4 a b c d) #
(Data a, Data b, Data c, Data d) => Data (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple Methods gfoldl :: (forall d0 b0. Data d0 => c0 (d0 -> b0) -> d0 -> c0 b0) -> (forall g. g -> c0 g) -> Tuple4 a b c d -> c0 (Tuple4 a b c d) # gunfold :: (forall b0 r. Data b0 => c0 (b0 -> r) -> c0 r) -> (forall r. r -> c0 r) -> Constr -> c0 (Tuple4 a b c d) # toConstr :: Tuple4 a b c d -> Constr # dataTypeOf :: Tuple4 a b c d -> DataType # dataCast1 :: Typeable t => (forall d0. Data d0 => c0 (t d0)) -> Maybe (c0 (Tuple4 a b c d)) # dataCast2 :: Typeable t => (forall d0 e. (Data d0, Data e) => c0 (t d0 e)) -> Maybe (c0 (Tuple4 a b c d)) # gmapT :: (forall b0. Data b0 => b0 -> b0) -> Tuple4 a b c d -> Tuple4 a b c d # gmapQl :: (r -> r' -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> Tuple4 a b c d -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> Tuple4 a b c d -> r # gmapQ :: (forall d0. Data d0 => d0 -> u) -> Tuple4 a b c d -> [u] # gmapQi :: Int -> (forall d0. Data d0 => d0 -> u) -> Tuple4 a b c d -> u # gmapM :: Monad m => (forall d0. Data d0 => d0 -> m d0) -> Tuple4 a b c d -> m (Tuple4 a b c d) # gmapMp :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> Tuple4 a b c d -> m (Tuple4 a b c d) # gmapMo :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> Tuple4 a b c d -> m (Tuple4 a b c d) #
Generic (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple Associated Types
type Rep (Tuple4 a b c d) |
Instance details Defined in Foundation.Tuple type Rep (Tuple4 a b c d) = D1 ('MetaData "Tuple4" "Foundation.Tuple" "foundation-0.0.30-410Msgl8Y3yCAXq1zpEi0p" 'False) (C1 ('MetaCons "Tuple4" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 c) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 d))))
Methods from :: Tuple4 a b c d -> Rep (Tuple4 a b c d) x # to :: Rep (Tuple4 a b c d) x -> Tuple4 a b c d #
(Show a, Show b, Show c, Show d) => Show (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple Methods showsPrec :: Int -> Tuple4 a b c d -> ShowS # show :: Tuple4 a b c d -> String # showList :: [Tuple4 a b c d] -> ShowS #
(Eq a, Eq b, Eq c, Eq d) => Eq (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple Methods (==) :: Tuple4 a b c d -> Tuple4 a b c d -> Bool # (/=) :: Tuple4 a b c d -> Tuple4 a b c d -> Bool #
(Ord a, Ord b, Ord c, Ord d) => Ord (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple Methods compare :: Tuple4 a b c d -> Tuple4 a b c d -> Ordering # (<) :: Tuple4 a b c d -> Tuple4 a b c d -> Bool # (<=) :: Tuple4 a b c d -> Tuple4 a b c d -> Bool # (>) :: Tuple4 a b c d -> Tuple4 a b c d -> Bool # (>=) :: Tuple4 a b c d -> Tuple4 a b c d -> Bool # max :: Tuple4 a b c d -> Tuple4 a b c d -> Tuple4 a b c d # min :: Tuple4 a b c d -> Tuple4 a b c d -> Tuple4 a b c d #
type NthTy 1 (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple.Nth type NthTy 1 (Tuple4 a b c d) = a
type NthTy 2 (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple.Nth type NthTy 2 (Tuple4 a b c d) = b
type NthTy 3 (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple.Nth type NthTy 3 (Tuple4 a b c d) = c
type NthTy 4 (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple.Nth type NthTy 4 (Tuple4 a b c d) = d
type ProductFirst (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple type ProductFirst (Tuple4 a b c d) = a
type ProductSecond (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple type ProductSecond (Tuple4 a b c d) = b
type ProductThird (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple type ProductThird (Tuple4 a b c d) = c
type Rep (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple type Rep (Tuple4 a b c d) = D1 ('MetaData "Tuple4" "Foundation.Tuple" "foundation-0.0.30-410Msgl8Y3yCAXq1zpEi0p" 'False) (C1 ('MetaCons "Tuple4" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 c) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 d))))

class Thdable a where #

Class of product types that have a third element

Associated Types

type ProductThird a #

Methods

thd :: a -> ProductThird a #

#### Instances

Instances details

Thdable (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple Associated Types
type ProductThird (Tuple3 a b c) |
Instance details Defined in Foundation.Tuple type ProductThird (Tuple3 a b c) = c
Methods thd :: Tuple3 a b c -> ProductThird (Tuple3 a b c) #
Thdable (a, b, c) # |
Instance details Defined in Foundation.Tuple Associated Types
type ProductThird (a, b, c) |
Instance details Defined in Foundation.Tuple type ProductThird (a, b, c) = c
Methods thd :: (a, b, c) -> ProductThird (a, b, c) #
Thdable (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple Associated Types
type ProductThird (Tuple4 a b c d) |
Instance details Defined in Foundation.Tuple type ProductThird (Tuple4 a b c d) = c
Methods thd :: Tuple4 a b c d -> ProductThird (Tuple4 a b c d) #
Thdable (a, b, c, d) # |
Instance details Defined in Foundation.Tuple Associated Types
type ProductThird (a, b, c, d) |
Instance details Defined in Foundation.Tuple type ProductThird (a, b, c, d) = c
Methods thd :: (a, b, c, d) -> ProductThird (a, b, c, d) #

type family ProductFirst a #

#### Instances

Instances details

type ProductFirst (Tuple2 a b) # |
Instance details Defined in Foundation.Tuple type ProductFirst (Tuple2 a b) = a
type ProductFirst (a, b) # |
Instance details Defined in Foundation.Tuple type ProductFirst (a, b) = a
type ProductFirst (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple type ProductFirst (Tuple3 a b c) = a
type ProductFirst (a, b, c) # |
Instance details Defined in Foundation.Tuple type ProductFirst (a, b, c) = a
type ProductFirst (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple type ProductFirst (Tuple4 a b c d) = a
type ProductFirst (a, b, c, d) # |
Instance details Defined in Foundation.Tuple type ProductFirst (a, b, c, d) = a

type family ProductSecond a #

#### Instances

Instances details

type ProductSecond (Tuple2 a b) # |
Instance details Defined in Foundation.Tuple type ProductSecond (Tuple2 a b) = b
type ProductSecond (a, b) # |
Instance details Defined in Foundation.Tuple type ProductSecond (a, b) = b
type ProductSecond (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple type ProductSecond (Tuple3 a b c) = b
type ProductSecond (a, b, c) # |
Instance details Defined in Foundation.Tuple type ProductSecond (a, b, c) = b
type ProductSecond (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple type ProductSecond (Tuple4 a b c d) = b
type ProductSecond (a, b, c, d) # |
Instance details Defined in Foundation.Tuple type ProductSecond (a, b, c, d) = b

type family ProductThird a #

#### Instances

Instances details

type ProductThird (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple type ProductThird (Tuple3 a b c) = c
type ProductThird (a, b, c) # |
Instance details Defined in Foundation.Tuple type ProductThird (a, b, c) = c
type ProductThird (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple type ProductThird (Tuple4 a b c d) = c
type ProductThird (a, b, c, d) # |
Instance details Defined in Foundation.Tuple type ProductThird (a, b, c, d) = c

id :: forall (a :: k). Category cat => cat a a #

the identity morphism

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

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

#### Examples

Expand

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 GHC.Internal.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
    ""

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

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

#### Examples

Expand

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

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

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

    flip f x y = f y x

    flip . flip = id

#### Examples

Expand

    >>> flip (++) "hello" "world"
    "worldhello"

    >>> let (.>) = flip (.) in (+1) .> show $ 5
    "6"

const :: a -> b -> a #

`const x y` always evaluates to `x`, ignoring its second argument.

    const x = \_ -> x

This function might seem useless at first glance, but it can be very useful in a higher order context.

#### Examples

Expand

    >>> const 42 "hello"
    42

    >>> map (const 42) [0..3]
    [42,42,42,42]

error :: HasCallStack => String -> a #

stop execution and displays an error message

putStr :: String -> IO () #

Print a string to standard output

putStrLn :: String -> IO () #

Print a string with a newline to standard output

getArgs :: IO [String] #

Returns a list of the program's command line arguments (not including the program name).

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

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

#### Examples

Expand

    >>> uncurry (+) (1,2)
    3

    >>> uncurry ($) (show, 1)
    "1"

    >>> map (uncurry max) [(1,2), (3,4), (6,8)]
    [2,4,8]

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

Convert an uncurried function to a curried function.

#### Examples

Expand

    >>> curry fst 1 2
    1

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

Swap the components of a pair.

until :: (a -> Bool) -> (a -> a) -> a -> a #

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

asTypeOf :: a -> a -> a #

`asTypeOf` is a type-restricted version of `const`. It is usually used as an infix operator, and its typing forces its first argument (which is usually overloaded) to have the same type as the second.

undefined :: HasCallStack => a #

A special case of `error`. It is expected that compilers will recognize this and insert error messages which are more appropriate to the context in which `undefined` appears.

seq :: a -> b -> b infixr 0 #

The value of ``seq` a b` is bottom if `a` is bottom, and otherwise equal to `b`. In other words, it evaluates the first argument `a` to weak head normal form (WHNF). `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.

class NormalForm a #

Data that can be fully evaluated in Normal Form

Minimal complete definition

toNormalForm

#### Instances

Instances details

NormalForm Char7 |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Char7 -> () #
NormalForm Word128 |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Word128 -> () #
NormalForm Word256 |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Word256 -> () #
NormalForm String |
Instance details Defined in Basement.UTF8.Base Methods toNormalForm :: String -> () #
NormalForm CSV # |
Instance details Defined in Foundation.Format.CSV.Types Methods toNormalForm :: CSV -> () #
NormalForm Escaping # |
Instance details Defined in Foundation.Format.CSV.Types Methods toNormalForm :: Escaping -> () #
NormalForm Field # |
Instance details Defined in Foundation.Format.CSV.Types Methods toNormalForm :: Field -> () #
NormalForm Row # |
Instance details Defined in Foundation.Format.CSV.Types Methods toNormalForm :: Row -> () #
NormalForm IPv4 # |
Instance details Defined in Foundation.Network.IPv4 Methods toNormalForm :: IPv4 -> () #
NormalForm IPv6 # |
Instance details Defined in Foundation.Network.IPv6 Methods toNormalForm :: IPv6 -> () #
NormalForm UUID # |
Instance details Defined in Foundation.UUID Methods toNormalForm :: UUID -> () #
NormalForm CChar |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: CChar -> () #
NormalForm CDouble |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: CDouble -> () #
NormalForm CFloat |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: CFloat -> () #
NormalForm CInt |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: CInt -> () #
NormalForm CLLong |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: CLLong -> () #
NormalForm CLong |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: CLong -> () #
NormalForm CSChar |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: CSChar -> () #
NormalForm CShort |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: CShort -> () #
NormalForm CUChar |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: CUChar -> () #
NormalForm CUInt |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: CUInt -> () #
NormalForm CULLong |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: CULLong -> () #
NormalForm CULong |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: CULong -> () #
NormalForm CUShort |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: CUShort -> () #
NormalForm Int16 |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Int16 -> () #
NormalForm Int32 |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Int32 -> () #
NormalForm Int64 |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Int64 -> () #
NormalForm Int8 |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Int8 -> () #
NormalForm Word16 |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Word16 -> () #
NormalForm Word32 |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Word32 -> () #
NormalForm Word64 |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Word64 -> () #
NormalForm Word8 |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Word8 -> () #
NormalForm Integer |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Integer -> () #
NormalForm Natural |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Natural -> () #
NormalForm () |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: () -> () #
NormalForm Bool |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Bool -> () #
NormalForm Char |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Char -> () #
NormalForm Double |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Double -> () #
NormalForm Float |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Float -> () #
NormalForm Int |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Int -> () #
NormalForm Word |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Word -> () #
NormalForm (Block ty) |
Instance details Defined in Basement.Block.Base Methods toNormalForm :: Block ty -> () #
NormalForm (Zn n) |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Zn n -> () #
NormalForm (Zn64 n) |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Zn64 n -> () #
NormalForm a => NormalForm (Array a) |
Instance details Defined in Basement.BoxedArray Methods toNormalForm :: Array a -> () #
NormalForm a => NormalForm (BE a) |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: BE a -> () #
NormalForm a => NormalForm (LE a) |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: LE a -> () #
NormalForm (CountOf a) |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: CountOf a -> () #
NormalForm (Offset a) |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Offset a -> () #
NormalForm (UArray ty) |
Instance details Defined in Basement.UArray.Base Methods toNormalForm :: UArray ty -> () #
NormalForm (ChunkedUArray ty) # |
Instance details Defined in Foundation.Array.Chunked.Unboxed Methods toNormalForm :: ChunkedUArray ty -> () #
NormalForm (Ptr a) |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Ptr a -> () #
NormalForm a => NormalForm (Maybe a) |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Maybe a -> () #
NormalForm a => NormalForm [a] |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: [a] -> () #
NormalForm (BlockN n a) |
Instance details Defined in Basement.Sized.Block Methods toNormalForm :: BlockN n a -> () #
NormalForm a => NormalForm (ListN n a) |
Instance details Defined in Basement.Sized.List Methods toNormalForm :: ListN n a -> () #
NormalForm (UVect n a) |
Instance details Defined in Basement.Sized.UVect Methods toNormalForm :: UVect n a -> () #
NormalForm a => NormalForm (Vect n a) |
Instance details Defined in Basement.Sized.Vect Methods toNormalForm :: Vect n a -> () #
(NormalForm a, NormalForm b) => NormalForm (These a b) |
Instance details Defined in Basement.These Methods toNormalForm :: These a b -> () #
(NormalForm a, NormalForm b) => NormalForm (Tuple2 a b) # |
Instance details Defined in Foundation.Tuple Methods toNormalForm :: Tuple2 a b -> () #
(NormalForm l, NormalForm r) => NormalForm (Either l r) |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Either l r -> () #
(NormalForm a, NormalForm b) => NormalForm (a, b) |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: (a, b) -> () #
(NormalForm a, NormalForm b, NormalForm c) => NormalForm (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple Methods toNormalForm :: Tuple3 a b c -> () #
(NormalForm a, NormalForm b, NormalForm c) => NormalForm (a, b, c) |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: (a, b, c) -> () #
(NormalForm a, NormalForm b, NormalForm c, NormalForm d) => NormalForm (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple Methods toNormalForm :: Tuple4 a b c d -> () #
(NormalForm a, NormalForm b, NormalForm c, NormalForm d) => NormalForm (a, b, c, d) |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: (a, b, c, d) -> () #
(NormalForm a, NormalForm b, NormalForm c, NormalForm d, NormalForm e) => NormalForm (a, b, c, d, e) |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: (a, b, c, d, e) -> () #
(NormalForm a, NormalForm b, NormalForm c, NormalForm d, NormalForm e, NormalForm f) => NormalForm (a, b, c, d, e, f) |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: (a, b, c, d, e, f) -> () #
(NormalForm a, NormalForm b, NormalForm c, NormalForm d, NormalForm e, NormalForm f, NormalForm g) => NormalForm (a, b, c, d, e, f, g) |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: (a, b, c, d, e, f, g) -> () #
(NormalForm a, NormalForm b, NormalForm c, NormalForm d, NormalForm e, NormalForm f, NormalForm g, NormalForm h) => NormalForm (a, b, c, d, e, f, g, h) |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: (a, b, c, d, e, f, g, h) -> () #

deepseq :: NormalForm a => a -> b -> b #

force :: NormalForm a => a -> a #

## Type classes

class Show a #

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

#### Instances

Instances details

Show ByteArray | Since: base-4.17.0.0
Instance details Defined in Data.Array.Byte Methods showsPrec :: Int -> ByteArray -> ShowS # show :: ByteArray -> String # showList :: [ByteArray] -> ShowS #
Show Timeout | Since: base-4.0
Instance details Defined in System.Timeout Methods showsPrec :: Int -> Timeout -> ShowS # show :: Timeout -> String # showList :: [Timeout] -> ShowS #
Show Endianness |
Instance details Defined in Basement.Endianness Methods showsPrec :: Int -> Endianness -> ShowS # show :: Endianness -> String # showList :: [Endianness] -> ShowS #
Show InvalidRecast |
Instance details Defined in Basement.Exception Methods showsPrec :: Int -> InvalidRecast -> ShowS # show :: InvalidRecast -> String # showList :: [InvalidRecast] -> ShowS #
Show NonEmptyCollectionIsEmpty |
Instance details Defined in Basement.Exception Methods showsPrec :: Int -> NonEmptyCollectionIsEmpty -> ShowS # show :: NonEmptyCollectionIsEmpty -> String # showList :: [NonEmptyCollectionIsEmpty] -> ShowS #
Show OutOfBound |
Instance details Defined in Basement.Exception Methods showsPrec :: Int -> OutOfBound -> ShowS # show :: OutOfBound -> String # showList :: [OutOfBound] -> ShowS #
Show OutOfBoundOperation |
Instance details Defined in Basement.Exception Methods showsPrec :: Int -> OutOfBoundOperation -> ShowS # show :: OutOfBoundOperation -> String # showList :: [OutOfBoundOperation] -> ShowS #
Show RecastDestinationSize |
Instance details Defined in Basement.Exception Methods showsPrec :: Int -> RecastDestinationSize -> ShowS # show :: RecastDestinationSize -> String # showList :: [RecastDestinationSize] -> ShowS #
Show RecastSourceSize |
Instance details Defined in Basement.Exception Methods showsPrec :: Int -> RecastSourceSize -> ShowS # show :: RecastSourceSize -> String # showList :: [RecastSourceSize] -> ShowS #
Show Encoding |
Instance details Defined in Basement.String Methods showsPrec :: Int -> Encoding -> ShowS # show :: Encoding -> String # showList :: [Encoding] -> ShowS #
Show ASCII7_Invalid |
Instance details Defined in Basement.String.Encoding.ASCII7 Methods showsPrec :: Int -> ASCII7_Invalid -> ShowS # show :: ASCII7_Invalid -> String # showList :: [ASCII7_Invalid] -> ShowS #
Show ISO_8859_1_Invalid |
Instance details Defined in Basement.String.Encoding.ISO_8859_1 Methods showsPrec :: Int -> ISO_8859_1_Invalid -> ShowS # show :: ISO_8859_1_Invalid -> String # showList :: [ISO_8859_1_Invalid] -> ShowS #
Show UTF16_Invalid |
Instance details Defined in Basement.String.Encoding.UTF16 Methods showsPrec :: Int -> UTF16_Invalid -> ShowS # show :: UTF16_Invalid -> String # showList :: [UTF16_Invalid] -> ShowS #
Show UTF32_Invalid |
Instance details Defined in Basement.String.Encoding.UTF32 Methods showsPrec :: Int -> UTF32_Invalid -> ShowS # show :: UTF32_Invalid -> String # showList :: [UTF32_Invalid] -> ShowS #
Show AsciiString |
Instance details Defined in Basement.Types.AsciiString Methods showsPrec :: Int -> AsciiString -> ShowS # show :: AsciiString -> String # showList :: [AsciiString] -> ShowS #
Show Char7 |
Instance details Defined in Basement.Types.Char7 Methods showsPrec :: Int -> Char7 -> ShowS # show :: Char7 -> String # showList :: [Char7] -> ShowS #
Show FileSize |
Instance details Defined in Basement.Types.OffsetSize Methods showsPrec :: Int -> FileSize -> ShowS # show :: FileSize -> String # showList :: [FileSize] -> ShowS #
Show Word128 |
Instance details Defined in Basement.Types.Word128 Methods showsPrec :: Int -> Word128 -> ShowS # show :: Word128 -> String # showList :: [Word128] -> ShowS #
Show Word256 |
Instance details Defined in Basement.Types.Word256 Methods showsPrec :: Int -> Word256 -> ShowS # show :: Word256 -> String # showList :: [Word256] -> ShowS #
Show String |
Instance details Defined in Basement.UTF8.Base Methods showsPrec :: Int -> String -> ShowS # show :: String -> String # showList :: [String] -> ShowS #
Show ValidationFailure |
Instance details Defined in Basement.UTF8.Types Methods showsPrec :: Int -> ValidationFailure -> ShowS # show :: ValidationFailure -> String # showList :: [ValidationFailure] -> ShowS #
Show Bitmap # |
Instance details Defined in Foundation.Array.Bitmap Methods showsPrec :: Int -> Bitmap -> ShowS # show :: Bitmap -> String # showList :: [Bitmap] -> ShowS #
Show CSV # |
Instance details Defined in Foundation.Format.CSV.Types Methods showsPrec :: Int -> CSV -> ShowS # show :: CSV -> String # showList :: [CSV] -> ShowS #
Show Escaping # |
Instance details Defined in Foundation.Format.CSV.Types Methods showsPrec :: Int -> Escaping -> ShowS # show :: Escaping -> String # showList :: [Escaping] -> ShowS #
Show Field # |
Instance details Defined in Foundation.Format.CSV.Types Methods showsPrec :: Int -> Field -> ShowS # show :: Field -> String # showList :: [Field] -> ShowS #
Show Row # |
Instance details Defined in Foundation.Format.CSV.Types Methods showsPrec :: Int -> Row -> ShowS # show :: Row -> String # showList :: [Row] -> ShowS #
Show IPv4 # |
Instance details Defined in Foundation.Network.IPv4 Methods showsPrec :: Int -> IPv4 -> ShowS # show :: IPv4 -> String # showList :: [IPv4] -> ShowS #
Show IPv6 # |
Instance details Defined in Foundation.Network.IPv6 Methods showsPrec :: Int -> IPv6 -> ShowS # show :: IPv6 -> String # showList :: [IPv6] -> ShowS #
Show And # |
Instance details Defined in Foundation.Parser Methods showsPrec :: Int -> And -> ShowS # show :: And -> String # showList :: [And] -> ShowS #
Show Condition # |
Instance details Defined in Foundation.Parser Methods showsPrec :: Int -> Condition -> ShowS # show :: Condition -> String # showList :: [Condition] -> ShowS #
Show PartialError # |
Instance details Defined in Foundation.Partial Methods showsPrec :: Int -> PartialError -> ShowS # show :: PartialError -> String # showList :: [PartialError] -> ShowS #
Show Arch # |
Instance details Defined in Foundation.System.Info Methods showsPrec :: Int -> Arch -> ShowS # show :: Arch -> String # showList :: [Arch] -> ShowS #
Show OS # |
Instance details Defined in Foundation.System.Info Methods showsPrec :: Int -> OS -> ShowS # show :: OS -> String # showList :: [OS] -> ShowS #
Show NanoSeconds # |
Instance details Defined in Foundation.Time.Types Methods showsPrec :: Int -> NanoSeconds -> ShowS # show :: NanoSeconds -> String # showList :: [NanoSeconds] -> ShowS #
Show Seconds # |
Instance details Defined in Foundation.Time.Types Methods showsPrec :: Int -> Seconds -> ShowS # show :: Seconds -> String # showList :: [Seconds] -> ShowS #
Show UUID # |
Instance details Defined in Foundation.UUID Methods showsPrec :: Int -> UUID -> ShowS # show :: UUID -> String # showList :: [UUID] -> ShowS #
Show FileName # |
Instance details Defined in Foundation.VFS.FilePath Methods showsPrec :: Int -> FileName -> ShowS # show :: FileName -> String # showList :: [FileName] -> ShowS #
Show FilePath # |
Instance details Defined in Foundation.VFS.FilePath Methods showsPrec :: Int -> FilePath -> ShowS # show :: FilePath -> String # showList :: [FilePath] -> ShowS #
Show Relativity # |
Instance details Defined in Foundation.VFS.FilePath Methods showsPrec :: Int -> Relativity -> ShowS # show :: Relativity -> String # showList :: [Relativity] -> ShowS #
Show Void | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> Void -> ShowS # show :: Void -> String # showList :: [Void] -> ShowS #
Show BlockReason | @since base-4.3.0.0
Instance details Defined in GHC.Internal.Conc.Sync Methods showsPrec :: Int -> BlockReason -> ShowS # show :: BlockReason -> String # showList :: [BlockReason] -> ShowS #
Show ThreadId | @since base-4.2.0.0
Instance details Defined in GHC.Internal.Conc.Sync Methods showsPrec :: Int -> ThreadId -> ShowS # show :: ThreadId -> String # showList :: [ThreadId] -> ShowS #
Show ThreadStatus | @since base-4.3.0.0
Instance details Defined in GHC.Internal.Conc.Sync Methods showsPrec :: Int -> ThreadStatus -> ShowS # show :: ThreadStatus -> String # showList :: [ThreadStatus] -> ShowS #
Show NestedAtomically | @since base-4.0
Instance details Defined in GHC.Internal.Control.Exception.Base Methods showsPrec :: Int -> NestedAtomically -> ShowS # show :: NestedAtomically -> String # showList :: [NestedAtomically] -> ShowS #
Show NoMatchingContinuationPrompt | @since base-4.18
Instance details Defined in GHC.Internal.Control.Exception.Base Methods showsPrec :: Int -> NoMatchingContinuationPrompt -> ShowS # show :: NoMatchingContinuationPrompt -> String # showList :: [NoMatchingContinuationPrompt] -> ShowS #
Show NoMethodError | @since base-4.0
Instance details Defined in GHC.Internal.Control.Exception.Base Methods showsPrec :: Int -> NoMethodError -> ShowS # show :: NoMethodError -> String # showList :: [NoMethodError] -> ShowS #
Show NonTermination | @since base-4.0
Instance details Defined in GHC.Internal.Control.Exception.Base Methods showsPrec :: Int -> NonTermination -> ShowS # show :: NonTermination -> String # showList :: [NonTermination] -> ShowS #
Show PatternMatchFail | @since base-4.0
Instance details Defined in GHC.Internal.Control.Exception.Base Methods showsPrec :: Int -> PatternMatchFail -> ShowS # show :: PatternMatchFail -> String # showList :: [PatternMatchFail] -> ShowS #
Show RecConError | @since base-4.0
Instance details Defined in GHC.Internal.Control.Exception.Base Methods showsPrec :: Int -> RecConError -> ShowS # show :: RecConError -> String # showList :: [RecConError] -> ShowS #
Show RecSelError | @since base-4.0
Instance details Defined in GHC.Internal.Control.Exception.Base Methods showsPrec :: Int -> RecSelError -> ShowS # show :: RecSelError -> String # showList :: [RecSelError] -> ShowS #
Show RecUpdError | @since base-4.0
Instance details Defined in GHC.Internal.Control.Exception.Base Methods showsPrec :: Int -> RecUpdError -> ShowS # show :: RecUpdError -> String # showList :: [RecUpdError] -> ShowS #
Show TypeError | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Control.Exception.Base Methods showsPrec :: Int -> TypeError -> ShowS # show :: TypeError -> String # showList :: [TypeError] -> ShowS #
Show Constr | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods showsPrec :: Int -> Constr -> ShowS # show :: Constr -> String # showList :: [Constr] -> ShowS #
Show ConstrRep | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods showsPrec :: Int -> ConstrRep -> ShowS # show :: ConstrRep -> String # showList :: [ConstrRep] -> ShowS #
Show DataRep | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods showsPrec :: Int -> DataRep -> ShowS # show :: DataRep -> String # showList :: [DataRep] -> ShowS #
Show DataType | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods showsPrec :: Int -> DataType -> ShowS # show :: DataType -> String # showList :: [DataType] -> ShowS #
Show Fixity | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods showsPrec :: Int -> Fixity -> ShowS # show :: Fixity -> String # showList :: [Fixity] -> ShowS #
Show All | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods showsPrec :: Int -> All -> ShowS # show :: All -> String # showList :: [All] -> ShowS #
Show Any | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods showsPrec :: Int -> Any -> ShowS # show :: Any -> String # showList :: [Any] -> ShowS #
Show SomeTypeRep | @since base-4.10.0.0
Instance details Defined in GHC.Internal.Data.Typeable.Internal Methods showsPrec :: Int -> SomeTypeRep -> ShowS # show :: SomeTypeRep -> String # showList :: [SomeTypeRep] -> ShowS #
Show Version | @since base-2.01
Instance details Defined in GHC.Internal.Data.Version Methods showsPrec :: Int -> Version -> ShowS # show :: Version -> String # showList :: [Version] -> ShowS #
Show ErrorCall | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Exception Methods showsPrec :: Int -> ErrorCall -> ShowS # show :: ErrorCall -> String # showList :: [ErrorCall] -> ShowS #
Show ArithException | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Exception.Type Methods showsPrec :: Int -> ArithException -> ShowS # show :: ArithException -> String # showList :: [ArithException] -> ShowS #
Show SomeException | Since: ghc-internal-3.0
Instance details Defined in GHC.Internal.Exception.Type Methods showsPrec :: Int -> SomeException -> ShowS # show :: SomeException -> String # showList :: [SomeException] -> ShowS #
Show CBool |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CBool -> ShowS # show :: CBool -> String # showList :: [CBool] -> ShowS #
Show CChar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CChar -> ShowS # show :: CChar -> String # showList :: [CChar] -> ShowS #
Show CClock |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CClock -> ShowS # show :: CClock -> String # showList :: [CClock] -> ShowS #
Show CDouble |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CDouble -> ShowS # show :: CDouble -> String # showList :: [CDouble] -> ShowS #
Show CFloat |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CFloat -> ShowS # show :: CFloat -> String # showList :: [CFloat] -> ShowS #
Show CInt |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CInt -> ShowS # show :: CInt -> String # showList :: [CInt] -> ShowS #
Show CIntMax |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CIntMax -> ShowS # show :: CIntMax -> String # showList :: [CIntMax] -> ShowS #
Show CIntPtr |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CIntPtr -> ShowS # show :: CIntPtr -> String # showList :: [CIntPtr] -> ShowS #
Show CLLong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CLLong -> ShowS # show :: CLLong -> String # showList :: [CLLong] -> ShowS #
Show CLong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CLong -> ShowS # show :: CLong -> String # showList :: [CLong] -> ShowS #
Show CPtrdiff |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CPtrdiff -> ShowS # show :: CPtrdiff -> String # showList :: [CPtrdiff] -> ShowS #
Show CSChar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CSChar -> ShowS # show :: CSChar -> String # showList :: [CSChar] -> ShowS #
Show CSUSeconds |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CSUSeconds -> ShowS # show :: CSUSeconds -> String # showList :: [CSUSeconds] -> ShowS #
Show CShort |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CShort -> ShowS # show :: CShort -> String # showList :: [CShort] -> ShowS #
Show CSigAtomic |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CSigAtomic -> ShowS # show :: CSigAtomic -> String # showList :: [CSigAtomic] -> ShowS #
Show CSize |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CSize -> ShowS # show :: CSize -> String # showList :: [CSize] -> ShowS #
Show CTime |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CTime -> ShowS # show :: CTime -> String # showList :: [CTime] -> ShowS #
Show CUChar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CUChar -> ShowS # show :: CUChar -> String # showList :: [CUChar] -> ShowS #
Show CUInt |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CUInt -> ShowS # show :: CUInt -> String # showList :: [CUInt] -> ShowS #
Show CUIntMax |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CUIntMax -> ShowS # show :: CUIntMax -> String # showList :: [CUIntMax] -> ShowS #
Show CUIntPtr |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CUIntPtr -> ShowS # show :: CUIntPtr -> String # showList :: [CUIntPtr] -> ShowS #
Show CULLong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CULLong -> ShowS # show :: CULLong -> String # showList :: [CULLong] -> ShowS #
Show CULong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CULong -> ShowS # show :: CULong -> String # showList :: [CULong] -> ShowS #
Show CUSeconds |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CUSeconds -> ShowS # show :: CUSeconds -> String # showList :: [CUSeconds] -> ShowS #
Show CUShort |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CUShort -> ShowS # show :: CUShort -> String # showList :: [CUShort] -> ShowS #
Show CWchar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods showsPrec :: Int -> CWchar -> ShowS # show :: CWchar -> String # showList :: [CWchar] -> ShowS #
Show Associativity | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> Associativity -> ShowS # show :: Associativity -> String # showList :: [Associativity] -> ShowS #
Show DecidedStrictness | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> DecidedStrictness -> ShowS # show :: DecidedStrictness -> String # showList :: [DecidedStrictness] -> ShowS #
Show Fixity | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> Fixity -> ShowS # show :: Fixity -> String # showList :: [Fixity] -> ShowS #
Show SourceStrictness | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> SourceStrictness -> ShowS # show :: SourceStrictness -> String # showList :: [SourceStrictness] -> ShowS #
Show SourceUnpackedness | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> SourceUnpackedness -> ShowS # show :: SourceUnpackedness -> String # showList :: [SourceUnpackedness] -> ShowS #
Show MaskingState | @since base-4.3.0.0
Instance details Defined in GHC.Internal.IO Methods showsPrec :: Int -> MaskingState -> ShowS # show :: MaskingState -> String # showList :: [MaskingState] -> ShowS #
Show SeekMode | @since base-4.2.0.0
Instance details Defined in GHC.Internal.IO.Device Methods showsPrec :: Int -> SeekMode -> ShowS # show :: SeekMode -> String # showList :: [SeekMode] -> ShowS #
Show AllocationLimitExceeded | @since base-4.7.1.0
Instance details Defined in GHC.Internal.IO.Exception Methods showsPrec :: Int -> AllocationLimitExceeded -> ShowS # show :: AllocationLimitExceeded -> String # showList :: [AllocationLimitExceeded] -> ShowS #
Show ArrayException | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods showsPrec :: Int -> ArrayException -> ShowS # show :: ArrayException -> String # showList :: [ArrayException] -> ShowS #
Show AssertionFailed | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods showsPrec :: Int -> AssertionFailed -> ShowS # show :: AssertionFailed -> String # showList :: [AssertionFailed] -> ShowS #
Show AsyncException | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods showsPrec :: Int -> AsyncException -> ShowS # show :: AsyncException -> String # showList :: [AsyncException] -> ShowS #
Show BlockedIndefinitelyOnMVar | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods showsPrec :: Int -> BlockedIndefinitelyOnMVar -> ShowS # show :: BlockedIndefinitelyOnMVar -> String # showList :: [BlockedIndefinitelyOnMVar] -> ShowS #
Show BlockedIndefinitelyOnSTM | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods showsPrec :: Int -> BlockedIndefinitelyOnSTM -> ShowS # show :: BlockedIndefinitelyOnSTM -> String # showList :: [BlockedIndefinitelyOnSTM] -> ShowS #
Show CompactionFailed | @since base-4.10.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods showsPrec :: Int -> CompactionFailed -> ShowS # show :: CompactionFailed -> String # showList :: [CompactionFailed] -> ShowS #
Show Deadlock | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods showsPrec :: Int -> Deadlock -> ShowS # show :: Deadlock -> String # showList :: [Deadlock] -> ShowS #
Show ExitCode |
Instance details Defined in GHC.Internal.IO.Exception Methods showsPrec :: Int -> ExitCode -> ShowS # show :: ExitCode -> String # showList :: [ExitCode] -> ShowS #
Show FixIOException | @since base-4.11.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods showsPrec :: Int -> FixIOException -> ShowS # show :: FixIOException -> String # showList :: [FixIOException] -> ShowS #
Show IOErrorType | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods showsPrec :: Int -> IOErrorType -> ShowS # show :: IOErrorType -> String # showList :: [IOErrorType] -> ShowS #
Show IOException | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods showsPrec :: Int -> IOException -> ShowS # show :: IOException -> String # showList :: [IOException] -> ShowS #
Show SomeAsyncException | @since base-4.7.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods showsPrec :: Int -> SomeAsyncException -> ShowS # show :: SomeAsyncException -> String # showList :: [SomeAsyncException] -> ShowS #
Show FD | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.FD Methods showsPrec :: Int -> FD -> ShowS # show :: FD -> String # showList :: [FD] -> ShowS #
Show HandlePosn | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Handle Methods showsPrec :: Int -> HandlePosn -> ShowS # show :: HandlePosn -> String # showList :: [HandlePosn] -> ShowS #
Show BufferMode | @since base-4.2.0.0
Instance details Defined in GHC.Internal.IO.Handle.Types Methods showsPrec :: Int -> BufferMode -> ShowS # show :: BufferMode -> String # showList :: [BufferMode] -> ShowS #
Show Handle | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Handle.Types Methods showsPrec :: Int -> Handle -> ShowS # show :: Handle -> String # showList :: [Handle] -> ShowS #
Show HandleType | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Handle.Types Methods showsPrec :: Int -> HandleType -> ShowS # show :: HandleType -> String # showList :: [HandleType] -> ShowS #
Show Newline | @since base-4.3.0.0
Instance details Defined in GHC.Internal.IO.Handle.Types Methods showsPrec :: Int -> Newline -> ShowS # show :: Newline -> String # showList :: [Newline] -> ShowS #
Show NewlineMode | @since base-4.3.0.0
Instance details Defined in GHC.Internal.IO.Handle.Types Methods showsPrec :: Int -> NewlineMode -> ShowS # show :: NewlineMode -> String # showList :: [NewlineMode] -> ShowS #
Show IOMode | @since base-4.2.0.0
Instance details Defined in GHC.Internal.IO.IOMode Methods showsPrec :: Int -> IOMode -> ShowS # show :: IOMode -> String # showList :: [IOMode] -> ShowS #
Show Int16 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods showsPrec :: Int -> Int16 -> ShowS # show :: Int16 -> String # showList :: [Int16] -> ShowS #
Show Int32 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods showsPrec :: Int -> Int32 -> ShowS # show :: Int32 -> String # showList :: [Int32] -> ShowS #
Show Int64 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods showsPrec :: Int -> Int64 -> ShowS # show :: Int64 -> String # showList :: [Int64] -> ShowS #
Show Int8 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods showsPrec :: Int -> Int8 -> ShowS # show :: Int8 -> String # showList :: [Int8] -> ShowS #
Show CCFlags | @since base-4.8.0.0
Instance details Defined in GHC.Internal.RTS.Flags Methods showsPrec :: Int -> CCFlags -> ShowS # show :: CCFlags -> String # showList :: [CCFlags] -> ShowS #
Show ConcFlags | @since base-4.8.0.0
Instance details Defined in GHC.Internal.RTS.Flags Methods showsPrec :: Int -> ConcFlags -> ShowS # show :: ConcFlags -> String # showList :: [ConcFlags] -> ShowS #
Show DebugFlags | @since base-4.8.0.0
Instance details Defined in GHC.Internal.RTS.Flags Methods showsPrec :: Int -> DebugFlags -> ShowS # show :: DebugFlags -> String # showList :: [DebugFlags] -> ShowS #
Show DoCostCentres | @since base-4.8.0.0
Instance details Defined in GHC.Internal.RTS.Flags Methods showsPrec :: Int -> DoCostCentres -> ShowS # show :: DoCostCentres -> String # showList :: [DoCostCentres] -> ShowS #
Show DoHeapProfile | @since base-4.8.0.0
Instance details Defined in GHC.Internal.RTS.Flags Methods showsPrec :: Int -> DoHeapProfile -> ShowS # show :: DoHeapProfile -> String # showList :: [DoHeapProfile] -> ShowS #
Show DoTrace | @since base-4.8.0.0
Instance details Defined in GHC.Internal.RTS.Flags Methods showsPrec :: Int -> DoTrace -> ShowS # show :: DoTrace -> String # showList :: [DoTrace] -> ShowS #
Show GCFlags | @since base-4.8.0.0
Instance details Defined in GHC.Internal.RTS.Flags Methods showsPrec :: Int -> GCFlags -> ShowS # show :: GCFlags -> String # showList :: [GCFlags] -> ShowS #
Show GiveGCStats | @since base-4.8.0.0
Instance details Defined in GHC.Internal.RTS.Flags Methods showsPrec :: Int -> GiveGCStats -> ShowS # show :: GiveGCStats -> String # showList :: [GiveGCStats] -> ShowS #
Show HpcFlags | @since base-4.20.0.0
Instance details Defined in GHC.Internal.RTS.Flags Methods showsPrec :: Int -> HpcFlags -> ShowS # show :: HpcFlags -> String # showList :: [HpcFlags] -> ShowS #
Show IoSubSystem |
Instance details Defined in GHC.Internal.RTS.Flags Methods showsPrec :: Int -> IoSubSystem -> ShowS # show :: IoSubSystem -> String # showList :: [IoSubSystem] -> ShowS #
Show MiscFlags | @since base-4.8.0.0
Instance details Defined in GHC.Internal.RTS.Flags Methods showsPrec :: Int -> MiscFlags -> ShowS # show :: MiscFlags -> String # showList :: [MiscFlags] -> ShowS #
Show ParFlags | @since base-4.8.0.0
Instance details Defined in GHC.Internal.RTS.Flags Methods showsPrec :: Int -> ParFlags -> ShowS # show :: ParFlags -> String # showList :: [ParFlags] -> ShowS #
Show ProfFlags | @since base-4.8.0.0
Instance details Defined in GHC.Internal.RTS.Flags Methods showsPrec :: Int -> ProfFlags -> ShowS # show :: ProfFlags -> String # showList :: [ProfFlags] -> ShowS #
Show RTSFlags | @since base-4.8.0.0
Instance details Defined in GHC.Internal.RTS.Flags Methods showsPrec :: Int -> RTSFlags -> ShowS # show :: RTSFlags -> String # showList :: [RTSFlags] -> ShowS #
Show TickyFlags | @since base-4.8.0.0
Instance details Defined in GHC.Internal.RTS.Flags Methods showsPrec :: Int -> TickyFlags -> ShowS # show :: TickyFlags -> String # showList :: [TickyFlags] -> ShowS #
Show TraceFlags | @since base-4.8.0.0
Instance details Defined in GHC.Internal.RTS.Flags Methods showsPrec :: Int -> TraceFlags -> ShowS # show :: TraceFlags -> String # showList :: [TraceFlags] -> ShowS #
Show FractionalExponentBase |
Instance details Defined in GHC.Internal.Real Methods showsPrec :: Int -> FractionalExponentBase -> ShowS # show :: FractionalExponentBase -> String # showList :: [FractionalExponentBase] -> ShowS #
Show CallStack | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> CallStack -> ShowS # show :: CallStack -> String # showList :: [CallStack] -> ShowS #
Show SrcLoc | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> SrcLoc -> ShowS # show :: SrcLoc -> String # showList :: [SrcLoc] -> ShowS #
Show GCDetails | @since base-4.10.0.0
Instance details Defined in GHC.Internal.Stats Methods showsPrec :: Int -> GCDetails -> ShowS # show :: GCDetails -> String # showList :: [GCDetails] -> ShowS #
Show RTSStats | @since base-4.10.0.0
Instance details Defined in GHC.Internal.Stats Methods showsPrec :: Int -> RTSStats -> ShowS # show :: RTSStats -> String # showList :: [RTSStats] -> ShowS #
Show CBlkCnt |
Instance details Defined in GHC.Internal.System.Posix.Types Methods showsPrec :: Int -> CBlkCnt -> ShowS # show :: CBlkCnt -> String # showList :: [CBlkCnt] -> ShowS #
Show CBlkSize |
Instance details Defined in GHC.Internal.System.Posix.Types Methods showsPrec :: Int -> CBlkSize -> ShowS # show :: CBlkSize -> String # showList :: [CBlkSize] -> ShowS #
Show CCc |
Instance details Defined in GHC.Internal.System.Posix.Types Methods showsPrec :: Int -> CCc -> ShowS # show :: CCc -> String # showList :: [CCc] -> ShowS #
Show CClockId |
Instance details Defined in GHC.Internal.System.Posix.Types Methods showsPrec :: Int -> CClockId -> ShowS # show :: CClockId -> String # showList :: [CClockId] -> ShowS #
Show CDev |
Instance details Defined in GHC.Internal.System.Posix.Types Methods showsPrec :: Int -> CDev -> ShowS # show :: CDev -> String # showList :: [CDev] -> ShowS #
Show CFsBlkCnt |
Instance details Defined in GHC.Internal.System.Posix.Types Methods showsPrec :: Int -> CFsBlkCnt -> ShowS # show :: CFsBlkCnt -> String # showList :: [CFsBlkCnt] -> ShowS #
Show CFsFilCnt |
Instance details Defined in GHC.Internal.System.Posix.Types Methods showsPrec :: Int -> CFsFilCnt -> ShowS # show :: CFsFilCnt -> String # showList :: [CFsFilCnt] -> ShowS #
Show CGid |
Instance details Defined in GHC.Internal.System.Posix.Types Methods showsPrec :: Int -> CGid -> ShowS # show :: CGid -> String # showList :: [CGid] -> ShowS #
Show CId |
Instance details Defined in GHC.Internal.System.Posix.Types Methods showsPrec :: Int -> CId -> ShowS # show :: CId -> String # showList :: [CId] -> ShowS #
Show CIno |
Instance details Defined in GHC.Internal.System.Posix.Types Methods showsPrec :: Int -> CIno -> ShowS # show :: CIno -> String # showList :: [CIno] -> ShowS #
Show CKey |
Instance details Defined in GHC.Internal.System.Posix.Types Methods showsPrec :: Int -> CKey -> ShowS # show :: CKey -> String # showList :: [CKey] -> ShowS #
Show CMode |
Instance details Defined in GHC.Internal.System.Posix.Types Methods showsPrec :: Int -> CMode -> ShowS # show :: CMode -> String # showList :: [CMode] -> ShowS #
Show CNfds |
Instance details Defined in GHC.Internal.System.Posix.Types Methods showsPrec :: Int -> CNfds -> ShowS # show :: CNfds -> String # showList :: [CNfds] -> ShowS #
Show CNlink |
Instance details Defined in GHC.Internal.System.Posix.Types Methods showsPrec :: Int -> CNlink -> ShowS # show :: CNlink -> String # showList :: [CNlink] -> ShowS #
Show COff |
Instance details Defined in GHC.Internal.System.Posix.Types Methods showsPrec :: Int -> COff -> ShowS # show :: COff -> String # showList :: [COff] -> ShowS #
Show CPid |
Instance details Defined in GHC.Internal.System.Posix.Types Methods showsPrec :: Int -> CPid -> ShowS # show :: CPid -> String # showList :: [CPid] -> ShowS #
Show CRLim |
Instance details Defined in GHC.Internal.System.Posix.Types Methods showsPrec :: Int -> CRLim -> ShowS # show :: CRLim -> String # showList :: [CRLim] -> ShowS #
Show CSocklen |
Instance details Defined in GHC.Internal.System.Posix.Types Methods showsPrec :: Int -> CSocklen -> ShowS # show :: CSocklen -> String # showList :: [CSocklen] -> ShowS #
Show CSpeed |
Instance details Defined in GHC.Internal.System.Posix.Types Methods showsPrec :: Int -> CSpeed -> ShowS # show :: CSpeed -> String # showList :: [CSpeed] -> ShowS #
Show CSsize |
Instance details Defined in GHC.Internal.System.Posix.Types Methods showsPrec :: Int -> CSsize -> ShowS # show :: CSsize -> String # showList :: [CSsize] -> ShowS #
Show CTcflag |
Instance details Defined in GHC.Internal.System.Posix.Types Methods showsPrec :: Int -> CTcflag -> ShowS # show :: CTcflag -> String # showList :: [CTcflag] -> ShowS #
Show CTimer |
Instance details Defined in GHC.Internal.System.Posix.Types Methods showsPrec :: Int -> CTimer -> ShowS # show :: CTimer -> String # showList :: [CTimer] -> ShowS #
Show CUid |
Instance details Defined in GHC.Internal.System.Posix.Types Methods showsPrec :: Int -> CUid -> ShowS # show :: CUid -> String # showList :: [CUid] -> ShowS #
Show Fd |
Instance details Defined in GHC.Internal.System.Posix.Types Methods showsPrec :: Int -> Fd -> ShowS # show :: Fd -> String # showList :: [Fd] -> ShowS #
Show SomeNat | @since base-4.7.0.0
Instance details Defined in GHC.Internal.TypeNats Methods showsPrec :: Int -> SomeNat -> ShowS # show :: SomeNat -> String # showList :: [SomeNat] -> ShowS #
Show GeneralCategory | @since base-2.01
Instance details Defined in GHC.Internal.Unicode Methods showsPrec :: Int -> GeneralCategory -> ShowS # show :: GeneralCategory -> String # showList :: [GeneralCategory] -> ShowS #
Show Word16 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods showsPrec :: Int -> Word16 -> ShowS # show :: Word16 -> String # showList :: [Word16] -> ShowS #
Show Word32 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods showsPrec :: Int -> Word32 -> ShowS # show :: Word32 -> String # showList :: [Word32] -> ShowS #
Show Word64 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods showsPrec :: Int -> Word64 -> ShowS # show :: Word64 -> String # showList :: [Word64] -> ShowS #
Show Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods showsPrec :: Int -> Word8 -> ShowS # show :: Word8 -> String # showList :: [Word8] -> ShowS #
Show KindRep |
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> KindRep -> ShowS # show :: KindRep -> String # showList :: [KindRep] -> ShowS #
Show Module | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> Module -> ShowS # show :: Module -> String # showList :: [Module] -> ShowS #
Show Ordering | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> Ordering -> ShowS # show :: Ordering -> String # showList :: [Ordering] -> ShowS #
Show TrName | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> TrName -> ShowS # show :: TrName -> String # showList :: [TrName] -> ShowS #
Show TyCon | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> TyCon -> ShowS # show :: TyCon -> String # showList :: [TyCon] -> ShowS #
Show TypeLitSort | @since base-4.11.0.0
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> TypeLitSort -> ShowS # show :: TypeLitSort -> String # showList :: [TypeLitSort] -> ShowS #
Show Integer | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> Integer -> ShowS # show :: Integer -> String # showList :: [Integer] -> ShowS #
Show Natural | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> Natural -> ShowS # show :: Natural -> String # showList :: [Natural] -> ShowS #
Show () | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> () -> ShowS # show :: () -> String # showList :: [()] -> ShowS #
Show Bool | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> Bool -> ShowS # show :: Bool -> String # showList :: [Bool] -> ShowS #
Show Char | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> Char -> ShowS # show :: Char -> String # showList :: [Char] -> ShowS #
Show Int | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> Int -> ShowS # show :: Int -> String # showList :: [Int] -> ShowS #
Show Levity | @since base-4.15.0.0
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> Levity -> ShowS # show :: Levity -> String # showList :: [Levity] -> ShowS #
Show RuntimeRep | @since base-4.11.0.0
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> RuntimeRep -> ShowS # show :: RuntimeRep -> String # showList :: [RuntimeRep] -> ShowS #
Show VecCount | @since base-4.11.0.0
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> VecCount -> ShowS # show :: VecCount -> String # showList :: [VecCount] -> ShowS #
Show VecElem | @since base-4.11.0.0
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> VecElem -> ShowS # show :: VecElem -> String # showList :: [VecElem] -> ShowS #
Show Word | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> Word -> ShowS # show :: Word -> String # showList :: [Word] -> ShowS #
Show a => Show (Complex a) | Since: base-2.1
Instance details Defined in Data.Complex Methods showsPrec :: Int -> Complex a -> ShowS # show :: Complex a -> String # showList :: [Complex a] -> ShowS #
Show a => Show (First a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods showsPrec :: Int -> First a -> ShowS # show :: First a -> String # showList :: [First a] -> ShowS #
Show a => Show (Last a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods showsPrec :: Int -> Last a -> ShowS # show :: Last a -> String # showList :: [Last a] -> ShowS #
Show a => Show (Max a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods showsPrec :: Int -> Max a -> ShowS # show :: Max a -> String # showList :: [Max a] -> ShowS #
Show a => Show (Min a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods showsPrec :: Int -> Min a -> ShowS # show :: Min a -> String # showList :: [Min a] -> ShowS #
Show m => Show (WrappedMonoid m) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods showsPrec :: Int -> WrappedMonoid m -> ShowS # show :: WrappedMonoid m -> String # showList :: [WrappedMonoid m] -> ShowS #
Show (Bits n) |
Instance details Defined in Basement.Bits Methods showsPrec :: Int -> Bits n -> ShowS # show :: Bits n -> String # showList :: [Bits n] -> ShowS #
(PrimType ty, Show ty) => Show (Block ty) |
Instance details Defined in Basement.Block.Base Methods showsPrec :: Int -> Block ty -> ShowS # show :: Block ty -> String # showList :: [Block ty] -> ShowS #
Show (Zn n) |
Instance details Defined in Basement.Bounded Methods showsPrec :: Int -> Zn n -> ShowS # show :: Zn n -> String # showList :: [Zn n] -> ShowS #
Show (Zn64 n) |
Instance details Defined in Basement.Bounded Methods showsPrec :: Int -> Zn64 n -> ShowS # show :: Zn64 n -> String # showList :: [Zn64 n] -> ShowS #
Show a => Show (Array a) |
Instance details Defined in Basement.BoxedArray Methods showsPrec :: Int -> Array a -> ShowS # show :: Array a -> String # showList :: [Array a] -> ShowS #
Show a => Show (BE a) |
Instance details Defined in Basement.Endianness Methods showsPrec :: Int -> BE a -> ShowS # show :: BE a -> String # showList :: [BE a] -> ShowS #
Show a => Show (LE a) |
Instance details Defined in Basement.Endianness Methods showsPrec :: Int -> LE a -> ShowS # show :: LE a -> String # showList :: [LE a] -> ShowS #
Show (FinalPtr a) |
Instance details Defined in Basement.FinalPtr Methods showsPrec :: Int -> FinalPtr a -> ShowS # show :: FinalPtr a -> String # showList :: [FinalPtr a] -> ShowS #
Show a => Show (NonEmpty a) |
Instance details Defined in Basement.NonEmpty Methods showsPrec :: Int -> NonEmpty a -> ShowS # show :: NonEmpty a -> String # showList :: [NonEmpty a] -> ShowS #
Show (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize Methods showsPrec :: Int -> CountOf ty -> ShowS # show :: CountOf ty -> String # showList :: [CountOf ty] -> ShowS #
Show (Offset ty) |
Instance details Defined in Basement.Types.OffsetSize Methods showsPrec :: Int -> Offset ty -> ShowS # show :: Offset ty -> String # showList :: [Offset ty] -> ShowS #
(PrimType ty, Show ty) => Show (UArray ty) |
Instance details Defined in Basement.UArray.Base Methods showsPrec :: Int -> UArray ty -> ShowS # show :: UArray ty -> String # showList :: [UArray ty] -> ShowS #
(PrimType ty, Show ty) => Show (ChunkedUArray ty) # |
Instance details Defined in Foundation.Array.Chunked.Unboxed Methods showsPrec :: Int -> ChunkedUArray ty -> ShowS # show :: ChunkedUArray ty -> String # showList :: [ChunkedUArray ty] -> ShowS #
Show a => Show (DList a) # |
Instance details Defined in Foundation.List.DList Methods showsPrec :: Int -> DList a -> ShowS # show :: DList a -> String # showList :: [DList a] -> ShowS #
Show (ParseError String) # |
Instance details Defined in Foundation.Parser Methods showsPrec :: Int -> ParseError String -> ShowS # show :: ParseError String -> String # showList :: [ParseError String] -> ShowS #
Show input => Show (ParseError input) # |
Instance details Defined in Foundation.Parser Methods showsPrec :: Int -> ParseError input -> ShowS # show :: ParseError input -> String # showList :: [ParseError input] -> ShowS #
Show a => Show (NonEmpty a) | @since base-4.11.0.0
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> NonEmpty a -> ShowS # show :: NonEmpty a -> String # showList :: [NonEmpty a] -> ShowS #
Show a => Show (Identity a) | This instance would be equivalent to the derived instances of the `Identity` newtype if the `runIdentity` field were removed @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Functor.Identity Methods showsPrec :: Int -> Identity a -> ShowS # show :: Identity a -> String # showList :: [Identity a] -> ShowS #
Show a => Show (First a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Monoid Methods showsPrec :: Int -> First a -> ShowS # show :: First a -> String # showList :: [First a] -> ShowS #
Show a => Show (Last a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Monoid Methods showsPrec :: Int -> Last a -> ShowS # show :: Last a -> String # showList :: [Last a] -> ShowS #
Show a => Show (Dual a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods showsPrec :: Int -> Dual a -> ShowS # show :: Dual a -> String # showList :: [Dual a] -> ShowS #
Show a => Show (Product a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods showsPrec :: Int -> Product a -> ShowS # show :: Product a -> String # showList :: [Product a] -> ShowS #
Show a => Show (Sum a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods showsPrec :: Int -> Sum a -> ShowS # show :: Sum a -> String # showList :: [Sum a] -> ShowS #
Show a => Show (ExceptionWithContext a) |
Instance details Defined in GHC.Internal.Exception.Type Methods showsPrec :: Int -> ExceptionWithContext a -> ShowS # show :: ExceptionWithContext a -> String # showList :: [ExceptionWithContext a] -> ShowS #
Show e => Show (NoBacktrace e) |
Instance details Defined in GHC.Internal.Exception.Type Methods showsPrec :: Int -> NoBacktrace e -> ShowS # show :: NoBacktrace e -> String # showList :: [NoBacktrace e] -> ShowS #
Show (ForeignPtr a) | @since base-2.01
Instance details Defined in GHC.Internal.ForeignPtr Methods showsPrec :: Int -> ForeignPtr a -> ShowS # show :: ForeignPtr a -> String # showList :: [ForeignPtr a] -> ShowS #
Show a => Show (ZipList a) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Functor.ZipList Methods showsPrec :: Int -> ZipList a -> ShowS # show :: ZipList a -> String # showList :: [ZipList a] -> ShowS #
Show p => Show (Par1 p) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> Par1 p -> ShowS # show :: Par1 p -> String # showList :: [Par1 p] -> ShowS #
Show (FunPtr a) | @since base-2.01
Instance details Defined in GHC.Internal.Ptr Methods showsPrec :: Int -> FunPtr a -> ShowS # show :: FunPtr a -> String # showList :: [FunPtr a] -> ShowS #
Show (Ptr a) | @since base-2.01
Instance details Defined in GHC.Internal.Ptr Methods showsPrec :: Int -> Ptr a -> ShowS # show :: Ptr a -> String # showList :: [Ptr a] -> ShowS #
Show a => Show (Ratio a) | @since base-2.0.1
Instance details Defined in GHC.Internal.Real Methods showsPrec :: Int -> Ratio a -> ShowS # show :: Ratio a -> String # showList :: [Ratio a] -> ShowS #
Show (SNat n) | @since base-4.18.0.0
Instance details Defined in GHC.Internal.TypeNats Methods showsPrec :: Int -> SNat n -> ShowS # show :: SNat n -> String # showList :: [SNat n] -> ShowS #
Show a => Show (Maybe a) | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> Maybe a -> ShowS # show :: Maybe a -> String # showList :: [Maybe a] -> ShowS #
Show a => Show (Solo a) | @since base-4.15
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> Solo a -> ShowS # show :: Solo a -> String # showList :: [Solo a] -> ShowS #
Show a => Show [a] | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> [a] -> ShowS # show :: [a] -> String # showList :: [[a]] -> ShowS #
HasResolution a => Show (Fixed a) | Since: base-2.1
Instance details Defined in Data.Fixed Methods showsPrec :: Int -> Fixed a -> ShowS # show :: Fixed a -> String # showList :: [Fixed a] -> ShowS #
(Show a, Show b) => Show (Arg a b) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods showsPrec :: Int -> Arg a b -> ShowS # show :: Arg a b -> String # showList :: [Arg a b] -> ShowS #
(PrimType a, Show a) => Show (BlockN n a) |
Instance details Defined in Basement.Sized.Block Methods showsPrec :: Int -> BlockN n a -> ShowS # show :: BlockN n a -> String # showList :: [BlockN n a] -> ShowS #
Show a => Show (ListN n a) |
Instance details Defined in Basement.Sized.List Methods showsPrec :: Int -> ListN n a -> ShowS # show :: ListN n a -> String # showList :: [ListN n a] -> ShowS #
(PrimType a, Show a) => Show (UVect n a) |
Instance details Defined in Basement.Sized.UVect Methods showsPrec :: Int -> UVect n a -> ShowS # show :: UVect n a -> String # showList :: [UVect n a] -> ShowS #
Show a => Show (Vect n a) |
Instance details Defined in Basement.Sized.Vect Methods showsPrec :: Int -> Vect n a -> ShowS # show :: Vect n a -> String # showList :: [Vect n a] -> ShowS #
(Show a, Show b) => Show (These a b) |
Instance details Defined in Basement.These Methods showsPrec :: Int -> These a b -> ShowS # show :: These a b -> String # showList :: [These a b] -> ShowS #
(Show k, Show input) => Show (Result input k) # |
Instance details Defined in Foundation.Parser Methods showsPrec :: Int -> Result input k -> ShowS # show :: Result input k -> String # showList :: [Result input k] -> ShowS #
(Show a, Show b) => Show (Tuple2 a b) # |
Instance details Defined in Foundation.Tuple Methods showsPrec :: Int -> Tuple2 a b -> ShowS # show :: Tuple2 a b -> String # showList :: [Tuple2 a b] -> ShowS #
(Show a, Show b) => Show (Either a b) | @since base-3.0
Instance details Defined in GHC.Internal.Data.Either Methods showsPrec :: Int -> Either a b -> ShowS # show :: Either a b -> String # showList :: [Either a b] -> ShowS #
Show (Proxy s) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Proxy Methods showsPrec :: Int -> Proxy s -> ShowS # show :: Proxy s -> String # showList :: [Proxy s] -> ShowS #
Show (TypeRep a) |
Instance details Defined in GHC.Internal.Data.Typeable.Internal Methods showsPrec :: Int -> TypeRep a -> ShowS # show :: TypeRep a -> String # showList :: [TypeRep a] -> ShowS #
Show (U1 p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> U1 p -> ShowS # show :: U1 p -> String # showList :: [U1 p] -> ShowS #
Show (V1 p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> V1 p -> ShowS # show :: V1 p -> String # showList :: [V1 p] -> ShowS #
Show (ST s a) | @since base-2.01
Instance details Defined in GHC.Internal.ST Methods showsPrec :: Int -> ST s a -> ShowS # show :: ST s a -> String # showList :: [ST s a] -> ShowS #
(Show a, Show b) => Show (a, b) | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> (a, b) -> ShowS # show :: (a, b) -> String # showList :: [(a, b)] -> ShowS #
(Show a, Show b, Show c) => Show (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple Methods showsPrec :: Int -> Tuple3 a b c -> ShowS # show :: Tuple3 a b c -> String # showList :: [Tuple3 a b c] -> ShowS #
Show a => Show (Const a b) | This instance would be equivalent to the derived instances of the `Const` newtype if the `getConst` field were removed @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Functor.Const Methods showsPrec :: Int -> Const a b -> ShowS # show :: Const a b -> String # showList :: [Const a b] -> ShowS #
Show (f a) => Show (Ap f a) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Data.Monoid Methods showsPrec :: Int -> Ap f a -> ShowS # show :: Ap f a -> String # showList :: [Ap f a] -> ShowS #
Show (f a) => Show (Alt f a) | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods showsPrec :: Int -> Alt f a -> ShowS # show :: Alt f a -> String # showList :: [Alt f a] -> ShowS #
Show (OrderingI a b) |
Instance details Defined in GHC.Internal.Data.Type.Ord Methods showsPrec :: Int -> OrderingI a b -> ShowS # show :: OrderingI a b -> String # showList :: [OrderingI a b] -> ShowS #
Show (f p) => Show (Rec1 f p) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> Rec1 f p -> ShowS # show :: Rec1 f p -> String # showList :: [Rec1 f p] -> ShowS #
Show (URec Char p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> URec Char p -> ShowS # show :: URec Char p -> String # showList :: [URec Char p] -> ShowS #
Show (URec Double p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> URec Double p -> ShowS # show :: URec Double p -> String # showList :: [URec Double p] -> ShowS #
Show (URec Float p) |
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> URec Float p -> ShowS # show :: URec Float p -> String # showList :: [URec Float p] -> ShowS #
Show (URec Int p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> URec Int p -> ShowS # show :: URec Int p -> String # showList :: [URec Int p] -> ShowS #
Show (URec Word p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> URec Word p -> ShowS # show :: URec Word p -> String # showList :: [URec Word p] -> ShowS #
(Show a, Show b, Show c) => Show (a, b, c) | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> (a, b, c) -> ShowS # show :: (a, b, c) -> String # showList :: [(a, b, c)] -> ShowS #
(Show (f a), Show (g a)) => Show (Product f g a) | Since: base-4.18.0.0
Instance details Defined in Data.Functor.Product Methods showsPrec :: Int -> Product f g a -> ShowS # show :: Product f g a -> String # showList :: [Product f g a] -> ShowS #
(Show (f a), Show (g a)) => Show (Sum f g a) | Since: base-4.18.0.0
Instance details Defined in Data.Functor.Sum Methods showsPrec :: Int -> Sum f g a -> ShowS # show :: Sum f g a -> String # showList :: [Sum f g a] -> ShowS #
(Show a, Show b, Show c, Show d) => Show (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple Methods showsPrec :: Int -> Tuple4 a b c d -> ShowS # show :: Tuple4 a b c d -> String # showList :: [Tuple4 a b c d] -> ShowS #
(Show (f p), Show (g p)) => Show ((f :*: g) p) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> (f :*: g) p -> ShowS # show :: (f :*: g) p -> String # showList :: [(f :*: g) p] -> ShowS #
(Show (f p), Show (g p)) => Show ((f :+: g) p) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> (f :+: g) p -> ShowS # show :: (f :+: g) p -> String # showList :: [(f :+: g) p] -> ShowS #
Show c => Show (K1 i c p) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> K1 i c p -> ShowS # show :: K1 i c p -> String # showList :: [K1 i c p] -> ShowS #
(Show a, Show b, Show c, Show d) => Show (a, b, c, d) | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> (a, b, c, d) -> ShowS # show :: (a, b, c, d) -> String # showList :: [(a, b, c, d)] -> ShowS #
Show (f (g a)) => Show (Compose f g a) | Since: base-4.18.0.0
Instance details Defined in Data.Functor.Compose Methods showsPrec :: Int -> Compose f g a -> ShowS # show :: Compose f g a -> String # showList :: [Compose f g a] -> ShowS #
Show (f (g p)) => Show ((f :.: g) p) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> (f :.: g) p -> ShowS # show :: (f :.: g) p -> String # showList :: [(f :.: g) p] -> ShowS #
Show (f p) => Show (M1 i c f p) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> M1 i c f p -> ShowS # show :: M1 i c f p -> String # showList :: [M1 i c f p] -> ShowS #
(Show a, Show b, Show c, Show d, Show e) => Show (a, b, c, d, e) | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> (a, b, c, d, e) -> ShowS # show :: (a, b, c, d, e) -> String # showList :: [(a, b, c, d, e)] -> ShowS #
(Show a, Show b, Show c, Show d, Show e, Show f) => Show (a, b, c, d, e, f) | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> (a, b, c, d, e, f) -> ShowS # show :: (a, b, c, d, e, f) -> String # showList :: [(a, b, c, d, e, f)] -> ShowS #
(Show a, Show b, Show c, Show d, Show e, Show f, Show g) => Show (a, b, c, d, e, f, g) | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> (a, b, c, d, e, f, g) -> ShowS # show :: (a, b, c, d, e, f, g) -> String # showList :: [(a, b, c, d, e, f, g)] -> ShowS #
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h) => Show (a, b, c, d, e, f, g, h) | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> (a, b, c, d, e, f, g, h) -> ShowS # show :: (a, b, c, d, e, f, g, h) -> String # showList :: [(a, b, c, d, e, f, g, h)] -> ShowS #
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i) => Show (a, b, c, d, e, f, g, h, i) | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> (a, b, c, d, e, f, g, h, i) -> ShowS # show :: (a, b, c, d, e, f, g, h, i) -> String # showList :: [(a, b, c, d, e, f, g, h, i)] -> ShowS #
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j) => Show (a, b, c, d, e, f, g, h, i, j) | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j) -> ShowS # show :: (a, b, c, d, e, f, g, h, i, j) -> String # showList :: [(a, b, c, d, e, f, g, h, i, j)] -> ShowS #
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k) => Show (a, b, c, d, e, f, g, h, i, j, k) | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k) -> ShowS # show :: (a, b, c, d, e, f, g, h, i, j, k) -> String # showList :: [(a, b, c, d, e, f, g, h, i, j, k)] -> ShowS #
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l) => Show (a, b, c, d, e, f, g, h, i, j, k, l) | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l) -> ShowS # show :: (a, b, c, d, e, f, g, h, i, j, k, l) -> String # showList :: [(a, b, c, d, e, f, g, h, i, j, k, l)] -> ShowS #
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m) => Show (a, b, c, d, e, f, g, h, i, j, k, l, m) | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> ShowS # show :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> String # showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m)] -> ShowS #
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n) => Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n) | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> ShowS # show :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> String # showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] -> ShowS #
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o) => Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> ShowS # show :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> String # showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] -> ShowS #

show :: Show a => a -> String #

Use the Show class to create a String.

Note that this is not efficient, since an intermediate [Char] is going to be created before turning into a real String.

class Eq a => Ord a where #

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.

`Ord`, as defined by the Haskell report, implements a total order and has the following properties:

Comparability
  `x <= y || y <= x` = `True`
Transitivity
  if `x <= y && y <= z` = `True`, then `x <= z` = `True`
Reflexivity
  `x <= x` = `True`
Antisymmetry
  if `x <= y && y <= x` = `True`, then `x == y` = `True`

The following operator interactions are expected to hold:

1. `x >= y` = `y <= x`
2. `x < y` = `x <= y && x /= y`
3. `x > y` = `y < x`
4. `x < y` = `compare x y == LT`
5. `x > y` = `compare x y == GT`
6. `x == y` = `compare x y == EQ`
7. `min x y == if x <= y then x else y` = `True`
8. `max x y == if x >= y then x else y` = `True`

Note that (7.) and (8.) do not require `min` and `max` to return either of their arguments. The result is merely required to equal one of the arguments in terms of `(==)`.

Minimal complete definition: either `compare` or `<=`. Using `compare` can be more efficient for complex types.

Minimal complete definition

compare | (<=)

Methods

compare :: a -> a -> Ordering #

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

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

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

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

max :: a -> a -> a #

min :: a -> a -> a #

#### Instances

Instances details

Ord ByteArray | Non-lexicographic ordering. This compares the lengths of the byte arrays first and uses a lexicographic ordering if the lengths are equal. Subject to change between major versions. Since: base-4.17.0.0
Instance details Defined in Data.Array.Byte Methods compare :: ByteArray -> ByteArray -> Ordering # (<) :: ByteArray -> ByteArray -> Bool # (<=) :: ByteArray -> ByteArray -> Bool # (>) :: ByteArray -> ByteArray -> Bool # (>=) :: ByteArray -> ByteArray -> Bool # max :: ByteArray -> ByteArray -> ByteArray # min :: ByteArray -> ByteArray -> ByteArray #
Ord Encoding |
Instance details Defined in Basement.String Methods compare :: Encoding -> Encoding -> Ordering # (<) :: Encoding -> Encoding -> Bool # (<=) :: Encoding -> Encoding -> Bool # (>) :: Encoding -> Encoding -> Bool # (>=) :: Encoding -> Encoding -> Bool # max :: Encoding -> Encoding -> Encoding # min :: Encoding -> Encoding -> Encoding #
Ord UTF32_Invalid |
Instance details Defined in Basement.String.Encoding.UTF32 Methods compare :: UTF32_Invalid -> UTF32_Invalid -> Ordering # (<) :: UTF32_Invalid -> UTF32_Invalid -> Bool # (<=) :: UTF32_Invalid -> UTF32_Invalid -> Bool # (>) :: UTF32_Invalid -> UTF32_Invalid -> Bool # (>=) :: UTF32_Invalid -> UTF32_Invalid -> Bool # max :: UTF32_Invalid -> UTF32_Invalid -> UTF32_Invalid # min :: UTF32_Invalid -> UTF32_Invalid -> UTF32_Invalid #
Ord AsciiString |
Instance details Defined in Basement.Types.AsciiString Methods compare :: AsciiString -> AsciiString -> Ordering # (<) :: AsciiString -> AsciiString -> Bool # (<=) :: AsciiString -> AsciiString -> Bool # (>) :: AsciiString -> AsciiString -> Bool # (>=) :: AsciiString -> AsciiString -> Bool # max :: AsciiString -> AsciiString -> AsciiString # min :: AsciiString -> AsciiString -> AsciiString #
Ord Char7 |
Instance details Defined in Basement.Types.Char7 Methods compare :: Char7 -> Char7 -> Ordering # (<) :: Char7 -> Char7 -> Bool # (<=) :: Char7 -> Char7 -> Bool # (>) :: Char7 -> Char7 -> Bool # (>=) :: Char7 -> Char7 -> Bool # max :: Char7 -> Char7 -> Char7 # min :: Char7 -> Char7 -> Char7 #
Ord FileSize |
Instance details Defined in Basement.Types.OffsetSize Methods compare :: FileSize -> FileSize -> Ordering # (<) :: FileSize -> FileSize -> Bool # (<=) :: FileSize -> FileSize -> Bool # (>) :: FileSize -> FileSize -> Bool # (>=) :: FileSize -> FileSize -> Bool # max :: FileSize -> FileSize -> FileSize # min :: FileSize -> FileSize -> FileSize #
Ord Addr |
Instance details Defined in Basement.Types.Ptr Methods compare :: Addr -> Addr -> Ordering # (<) :: Addr -> Addr -> Bool # (<=) :: Addr -> Addr -> Bool # (>) :: Addr -> Addr -> Bool # (>=) :: Addr -> Addr -> Bool # max :: Addr -> Addr -> Addr # min :: Addr -> Addr -> Addr #
Ord Word128 |
Instance details Defined in Basement.Types.Word128 Methods compare :: Word128 -> Word128 -> Ordering # (<) :: Word128 -> Word128 -> Bool # (<=) :: Word128 -> Word128 -> Bool # (>) :: Word128 -> Word128 -> Bool # (>=) :: Word128 -> Word128 -> Bool # max :: Word128 -> Word128 -> Word128 # min :: Word128 -> Word128 -> Word128 #
Ord Word256 |
Instance details Defined in Basement.Types.Word256 Methods compare :: Word256 -> Word256 -> Ordering # (<) :: Word256 -> Word256 -> Bool # (<=) :: Word256 -> Word256 -> Bool # (>) :: Word256 -> Word256 -> Bool # (>=) :: Word256 -> Word256 -> Bool # max :: Word256 -> Word256 -> Word256 # min :: Word256 -> Word256 -> Word256 #
Ord String |
Instance details Defined in Basement.UTF8.Base Methods compare :: String -> String -> Ordering # (<) :: String -> String -> Bool # (<=) :: String -> String -> Bool # (>) :: String -> String -> Bool # (>=) :: String -> String -> Bool # max :: String -> String -> String # min :: String -> String -> String #
Ord Bitmap # |
Instance details Defined in Foundation.Array.Bitmap Methods compare :: Bitmap -> Bitmap -> Ordering # (<) :: Bitmap -> Bitmap -> Bool # (<=) :: Bitmap -> Bitmap -> Bool # (>) :: Bitmap -> Bitmap -> Bool # (>=) :: Bitmap -> Bitmap -> Bool # max :: Bitmap -> Bitmap -> Bitmap # min :: Bitmap -> Bitmap -> Bitmap #
Ord Escaping # |
Instance details Defined in Foundation.Format.CSV.Types Methods compare :: Escaping -> Escaping -> Ordering # (<) :: Escaping -> Escaping -> Bool # (<=) :: Escaping -> Escaping -> Bool # (>) :: Escaping -> Escaping -> Bool # (>=) :: Escaping -> Escaping -> Bool # max :: Escaping -> Escaping -> Escaping # min :: Escaping -> Escaping -> Escaping #
Ord IPv4 # |
Instance details Defined in Foundation.Network.IPv4 Methods compare :: IPv4 -> IPv4 -> Ordering # (<) :: IPv4 -> IPv4 -> Bool # (<=) :: IPv4 -> IPv4 -> Bool # (>) :: IPv4 -> IPv4 -> Bool # (>=) :: IPv4 -> IPv4 -> Bool # max :: IPv4 -> IPv4 -> IPv4 # min :: IPv4 -> IPv4 -> IPv4 #
Ord IPv6 # |
Instance details Defined in Foundation.Network.IPv6 Methods compare :: IPv6 -> IPv6 -> Ordering # (<) :: IPv6 -> IPv6 -> Bool # (<=) :: IPv6 -> IPv6 -> Bool # (>) :: IPv6 -> IPv6 -> Bool # (>=) :: IPv6 -> IPv6 -> Bool # max :: IPv6 -> IPv6 -> IPv6 # min :: IPv6 -> IPv6 -> IPv6 #
Ord Arch # |
Instance details Defined in Foundation.System.Info Methods compare :: Arch -> Arch -> Ordering # (<) :: Arch -> Arch -> Bool # (<=) :: Arch -> Arch -> Bool # (>) :: Arch -> Arch -> Bool # (>=) :: Arch -> Arch -> Bool # max :: Arch -> Arch -> Arch # min :: Arch -> Arch -> Arch #
Ord OS # |
Instance details Defined in Foundation.System.Info Methods compare :: OS -> OS -> Ordering # (<) :: OS -> OS -> Bool # (<=) :: OS -> OS -> Bool # (>) :: OS -> OS -> Bool # (>=) :: OS -> OS -> Bool # max :: OS -> OS -> OS # min :: OS -> OS -> OS #
Ord NanoSeconds # |
Instance details Defined in Foundation.Time.Types Methods compare :: NanoSeconds -> NanoSeconds -> Ordering # (<) :: NanoSeconds -> NanoSeconds -> Bool # (<=) :: NanoSeconds -> NanoSeconds -> Bool # (>) :: NanoSeconds -> NanoSeconds -> Bool # (>=) :: NanoSeconds -> NanoSeconds -> Bool # max :: NanoSeconds -> NanoSeconds -> NanoSeconds # min :: NanoSeconds -> NanoSeconds -> NanoSeconds #
Ord Seconds # |
Instance details Defined in Foundation.Time.Types Methods compare :: Seconds -> Seconds -> Ordering # (<) :: Seconds -> Seconds -> Bool # (<=) :: Seconds -> Seconds -> Bool # (>) :: Seconds -> Seconds -> Bool # (>=) :: Seconds -> Seconds -> Bool # max :: Seconds -> Seconds -> Seconds # min :: Seconds -> Seconds -> Seconds #
Ord UUID # |
Instance details Defined in Foundation.UUID Methods compare :: UUID -> UUID -> Ordering # (<) :: UUID -> UUID -> Bool # (<=) :: UUID -> UUID -> Bool # (>) :: UUID -> UUID -> Bool # (>=) :: UUID -> UUID -> Bool # max :: UUID -> UUID -> UUID # min :: UUID -> UUID -> UUID #
Ord FilePath # |
Instance details Defined in Foundation.VFS.FilePath Methods compare :: FilePath -> FilePath -> Ordering # (<) :: FilePath -> FilePath -> Bool # (<=) :: FilePath -> FilePath -> Bool # (>) :: FilePath -> FilePath -> Bool # (>=) :: FilePath -> FilePath -> Bool # max :: FilePath -> FilePath -> FilePath # min :: FilePath -> FilePath -> FilePath #
Ord BigNat |
Instance details Defined in GHC.Num.BigNat Methods compare :: BigNat -> BigNat -> Ordering # (<) :: BigNat -> BigNat -> Bool # (<=) :: BigNat -> BigNat -> Bool # (>) :: BigNat -> BigNat -> Bool # (>=) :: BigNat -> BigNat -> Bool # max :: BigNat -> BigNat -> BigNat # min :: BigNat -> BigNat -> BigNat #
Ord Void | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Base Methods compare :: Void -> Void -> Ordering # (<) :: Void -> Void -> Bool # (<=) :: Void -> Void -> Bool # (>) :: Void -> Void -> Bool # (>=) :: Void -> Void -> Bool # max :: Void -> Void -> Void # min :: Void -> Void -> Void #
Ord BlockReason | @since base-4.3.0.0
Instance details Defined in GHC.Internal.Conc.Sync Methods compare :: BlockReason -> BlockReason -> Ordering # (<) :: BlockReason -> BlockReason -> Bool # (<=) :: BlockReason -> BlockReason -> Bool # (>) :: BlockReason -> BlockReason -> Bool # (>=) :: BlockReason -> BlockReason -> Bool # max :: BlockReason -> BlockReason -> BlockReason # min :: BlockReason -> BlockReason -> BlockReason #
Ord ThreadId | @since base-4.2.0.0
Instance details Defined in GHC.Internal.Conc.Sync Methods compare :: ThreadId -> ThreadId -> Ordering # (<) :: ThreadId -> ThreadId -> Bool # (<=) :: ThreadId -> ThreadId -> Bool # (>) :: ThreadId -> ThreadId -> Bool # (>=) :: ThreadId -> ThreadId -> Bool # max :: ThreadId -> ThreadId -> ThreadId # min :: ThreadId -> ThreadId -> ThreadId #
Ord ThreadStatus | @since base-4.3.0.0
Instance details Defined in GHC.Internal.Conc.Sync Methods compare :: ThreadStatus -> ThreadStatus -> Ordering # (<) :: ThreadStatus -> ThreadStatus -> Bool # (<=) :: ThreadStatus -> ThreadStatus -> Bool # (>) :: ThreadStatus -> ThreadStatus -> Bool # (>=) :: ThreadStatus -> ThreadStatus -> Bool # max :: ThreadStatus -> ThreadStatus -> ThreadStatus # min :: ThreadStatus -> ThreadStatus -> ThreadStatus #
Ord All | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods compare :: All -> All -> Ordering # (<) :: All -> All -> Bool # (<=) :: All -> All -> Bool # (>) :: All -> All -> Bool # (>=) :: All -> All -> Bool # max :: All -> All -> All # min :: All -> All -> All #
Ord Any | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods compare :: Any -> Any -> Ordering # (<) :: Any -> Any -> Bool # (<=) :: Any -> Any -> Bool # (>) :: Any -> Any -> Bool # (>=) :: Any -> Any -> Bool # max :: Any -> Any -> Any # min :: Any -> Any -> Any #
Ord SomeTypeRep |
Instance details Defined in GHC.Internal.Data.Typeable.Internal Methods compare :: SomeTypeRep -> SomeTypeRep -> Ordering # (<) :: SomeTypeRep -> SomeTypeRep -> Bool # (<=) :: SomeTypeRep -> SomeTypeRep -> Bool # (>) :: SomeTypeRep -> SomeTypeRep -> Bool # (>=) :: SomeTypeRep -> SomeTypeRep -> Bool # max :: SomeTypeRep -> SomeTypeRep -> SomeTypeRep # min :: SomeTypeRep -> SomeTypeRep -> SomeTypeRep #
Ord Version | @since base-2.01
Instance details Defined in GHC.Internal.Data.Version Methods compare :: Version -> Version -> Ordering # (<) :: Version -> Version -> Bool # (<=) :: Version -> Version -> Bool # (>) :: Version -> Version -> Bool # (>=) :: Version -> Version -> Bool # max :: Version -> Version -> Version # min :: Version -> Version -> Version #
Ord ErrorCall | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Exception Methods compare :: ErrorCall -> ErrorCall -> Ordering # (<) :: ErrorCall -> ErrorCall -> Bool # (<=) :: ErrorCall -> ErrorCall -> Bool # (>) :: ErrorCall -> ErrorCall -> Bool # (>=) :: ErrorCall -> ErrorCall -> Bool # max :: ErrorCall -> ErrorCall -> ErrorCall # min :: ErrorCall -> ErrorCall -> ErrorCall #
Ord ArithException | @since base-3.0
Instance details Defined in GHC.Internal.Exception.Type Methods compare :: ArithException -> ArithException -> Ordering # (<) :: ArithException -> ArithException -> Bool # (<=) :: ArithException -> ArithException -> Bool # (>) :: ArithException -> ArithException -> Bool # (>=) :: ArithException -> ArithException -> Bool # max :: ArithException -> ArithException -> ArithException # min :: ArithException -> ArithException -> ArithException #
Ord CBool |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CBool -> CBool -> Ordering # (<) :: CBool -> CBool -> Bool # (<=) :: CBool -> CBool -> Bool # (>) :: CBool -> CBool -> Bool # (>=) :: CBool -> CBool -> Bool # max :: CBool -> CBool -> CBool # min :: CBool -> CBool -> CBool #
Ord CChar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CChar -> CChar -> Ordering # (<) :: CChar -> CChar -> Bool # (<=) :: CChar -> CChar -> Bool # (>) :: CChar -> CChar -> Bool # (>=) :: CChar -> CChar -> Bool # max :: CChar -> CChar -> CChar # min :: CChar -> CChar -> CChar #
Ord CClock |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CClock -> CClock -> Ordering # (<) :: CClock -> CClock -> Bool # (<=) :: CClock -> CClock -> Bool # (>) :: CClock -> CClock -> Bool # (>=) :: CClock -> CClock -> Bool # max :: CClock -> CClock -> CClock # min :: CClock -> CClock -> CClock #
Ord CDouble |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CDouble -> CDouble -> Ordering # (<) :: CDouble -> CDouble -> Bool # (<=) :: CDouble -> CDouble -> Bool # (>) :: CDouble -> CDouble -> Bool # (>=) :: CDouble -> CDouble -> Bool # max :: CDouble -> CDouble -> CDouble # min :: CDouble -> CDouble -> CDouble #
Ord CFloat |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CFloat -> CFloat -> Ordering # (<) :: CFloat -> CFloat -> Bool # (<=) :: CFloat -> CFloat -> Bool # (>) :: CFloat -> CFloat -> Bool # (>=) :: CFloat -> CFloat -> Bool # max :: CFloat -> CFloat -> CFloat # min :: CFloat -> CFloat -> CFloat #
Ord CInt |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CInt -> CInt -> Ordering # (<) :: CInt -> CInt -> Bool # (<=) :: CInt -> CInt -> Bool # (>) :: CInt -> CInt -> Bool # (>=) :: CInt -> CInt -> Bool # max :: CInt -> CInt -> CInt # min :: CInt -> CInt -> CInt #
Ord CIntMax |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CIntMax -> CIntMax -> Ordering # (<) :: CIntMax -> CIntMax -> Bool # (<=) :: CIntMax -> CIntMax -> Bool # (>) :: CIntMax -> CIntMax -> Bool # (>=) :: CIntMax -> CIntMax -> Bool # max :: CIntMax -> CIntMax -> CIntMax # min :: CIntMax -> CIntMax -> CIntMax #
Ord CIntPtr |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CIntPtr -> CIntPtr -> Ordering # (<) :: CIntPtr -> CIntPtr -> Bool # (<=) :: CIntPtr -> CIntPtr -> Bool # (>) :: CIntPtr -> CIntPtr -> Bool # (>=) :: CIntPtr -> CIntPtr -> Bool # max :: CIntPtr -> CIntPtr -> CIntPtr # min :: CIntPtr -> CIntPtr -> CIntPtr #
Ord CLLong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CLLong -> CLLong -> Ordering # (<) :: CLLong -> CLLong -> Bool # (<=) :: CLLong -> CLLong -> Bool # (>) :: CLLong -> CLLong -> Bool # (>=) :: CLLong -> CLLong -> Bool # max :: CLLong -> CLLong -> CLLong # min :: CLLong -> CLLong -> CLLong #
Ord CLong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CLong -> CLong -> Ordering # (<) :: CLong -> CLong -> Bool # (<=) :: CLong -> CLong -> Bool # (>) :: CLong -> CLong -> Bool # (>=) :: CLong -> CLong -> Bool # max :: CLong -> CLong -> CLong # min :: CLong -> CLong -> CLong #
Ord CPtrdiff |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CPtrdiff -> CPtrdiff -> Ordering # (<) :: CPtrdiff -> CPtrdiff -> Bool # (<=) :: CPtrdiff -> CPtrdiff -> Bool # (>) :: CPtrdiff -> CPtrdiff -> Bool # (>=) :: CPtrdiff -> CPtrdiff -> Bool # max :: CPtrdiff -> CPtrdiff -> CPtrdiff # min :: CPtrdiff -> CPtrdiff -> CPtrdiff #
Ord CSChar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CSChar -> CSChar -> Ordering # (<) :: CSChar -> CSChar -> Bool # (<=) :: CSChar -> CSChar -> Bool # (>) :: CSChar -> CSChar -> Bool # (>=) :: CSChar -> CSChar -> Bool # max :: CSChar -> CSChar -> CSChar # min :: CSChar -> CSChar -> CSChar #
Ord CSUSeconds |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CSUSeconds -> CSUSeconds -> Ordering # (<) :: CSUSeconds -> CSUSeconds -> Bool # (<=) :: CSUSeconds -> CSUSeconds -> Bool # (>) :: CSUSeconds -> CSUSeconds -> Bool # (>=) :: CSUSeconds -> CSUSeconds -> Bool # max :: CSUSeconds -> CSUSeconds -> CSUSeconds # min :: CSUSeconds -> CSUSeconds -> CSUSeconds #
Ord CShort |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CShort -> CShort -> Ordering # (<) :: CShort -> CShort -> Bool # (<=) :: CShort -> CShort -> Bool # (>) :: CShort -> CShort -> Bool # (>=) :: CShort -> CShort -> Bool # max :: CShort -> CShort -> CShort # min :: CShort -> CShort -> CShort #
Ord CSigAtomic |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CSigAtomic -> CSigAtomic -> Ordering # (<) :: CSigAtomic -> CSigAtomic -> Bool # (<=) :: CSigAtomic -> CSigAtomic -> Bool # (>) :: CSigAtomic -> CSigAtomic -> Bool # (>=) :: CSigAtomic -> CSigAtomic -> Bool # max :: CSigAtomic -> CSigAtomic -> CSigAtomic # min :: CSigAtomic -> CSigAtomic -> CSigAtomic #
Ord CSize |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CSize -> CSize -> Ordering # (<) :: CSize -> CSize -> Bool # (<=) :: CSize -> CSize -> Bool # (>) :: CSize -> CSize -> Bool # (>=) :: CSize -> CSize -> Bool # max :: CSize -> CSize -> CSize # min :: CSize -> CSize -> CSize #
Ord CTime |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CTime -> CTime -> Ordering # (<) :: CTime -> CTime -> Bool # (<=) :: CTime -> CTime -> Bool # (>) :: CTime -> CTime -> Bool # (>=) :: CTime -> CTime -> Bool # max :: CTime -> CTime -> CTime # min :: CTime -> CTime -> CTime #
Ord CUChar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CUChar -> CUChar -> Ordering # (<) :: CUChar -> CUChar -> Bool # (<=) :: CUChar -> CUChar -> Bool # (>) :: CUChar -> CUChar -> Bool # (>=) :: CUChar -> CUChar -> Bool # max :: CUChar -> CUChar -> CUChar # min :: CUChar -> CUChar -> CUChar #
Ord CUInt |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CUInt -> CUInt -> Ordering # (<) :: CUInt -> CUInt -> Bool # (<=) :: CUInt -> CUInt -> Bool # (>) :: CUInt -> CUInt -> Bool # (>=) :: CUInt -> CUInt -> Bool # max :: CUInt -> CUInt -> CUInt # min :: CUInt -> CUInt -> CUInt #
Ord CUIntMax |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CUIntMax -> CUIntMax -> Ordering # (<) :: CUIntMax -> CUIntMax -> Bool # (<=) :: CUIntMax -> CUIntMax -> Bool # (>) :: CUIntMax -> CUIntMax -> Bool # (>=) :: CUIntMax -> CUIntMax -> Bool # max :: CUIntMax -> CUIntMax -> CUIntMax # min :: CUIntMax -> CUIntMax -> CUIntMax #
Ord CUIntPtr |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CUIntPtr -> CUIntPtr -> Ordering # (<) :: CUIntPtr -> CUIntPtr -> Bool # (<=) :: CUIntPtr -> CUIntPtr -> Bool # (>) :: CUIntPtr -> CUIntPtr -> Bool # (>=) :: CUIntPtr -> CUIntPtr -> Bool # max :: CUIntPtr -> CUIntPtr -> CUIntPtr # min :: CUIntPtr -> CUIntPtr -> CUIntPtr #
Ord CULLong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CULLong -> CULLong -> Ordering # (<) :: CULLong -> CULLong -> Bool # (<=) :: CULLong -> CULLong -> Bool # (>) :: CULLong -> CULLong -> Bool # (>=) :: CULLong -> CULLong -> Bool # max :: CULLong -> CULLong -> CULLong # min :: CULLong -> CULLong -> CULLong #
Ord CULong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CULong -> CULong -> Ordering # (<) :: CULong -> CULong -> Bool # (<=) :: CULong -> CULong -> Bool # (>) :: CULong -> CULong -> Bool # (>=) :: CULong -> CULong -> Bool # max :: CULong -> CULong -> CULong # min :: CULong -> CULong -> CULong #
Ord CUSeconds |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CUSeconds -> CUSeconds -> Ordering # (<) :: CUSeconds -> CUSeconds -> Bool # (<=) :: CUSeconds -> CUSeconds -> Bool # (>) :: CUSeconds -> CUSeconds -> Bool # (>=) :: CUSeconds -> CUSeconds -> Bool # max :: CUSeconds -> CUSeconds -> CUSeconds # min :: CUSeconds -> CUSeconds -> CUSeconds #
Ord CUShort |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CUShort -> CUShort -> Ordering # (<) :: CUShort -> CUShort -> Bool # (<=) :: CUShort -> CUShort -> Bool # (>) :: CUShort -> CUShort -> Bool # (>=) :: CUShort -> CUShort -> Bool # max :: CUShort -> CUShort -> CUShort # min :: CUShort -> CUShort -> CUShort #
Ord CWchar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods compare :: CWchar -> CWchar -> Ordering # (<) :: CWchar -> CWchar -> Bool # (<=) :: CWchar -> CWchar -> Bool # (>) :: CWchar -> CWchar -> Bool # (>=) :: CWchar -> CWchar -> Bool # max :: CWchar -> CWchar -> CWchar # min :: CWchar -> CWchar -> CWchar #
Ord Associativity | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Generics Methods compare :: Associativity -> Associativity -> Ordering # (<) :: Associativity -> Associativity -> Bool # (<=) :: Associativity -> Associativity -> Bool # (>) :: Associativity -> Associativity -> Bool # (>=) :: Associativity -> Associativity -> Bool # max :: Associativity -> Associativity -> Associativity # min :: Associativity -> Associativity -> Associativity #
Ord DecidedStrictness | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods compare :: DecidedStrictness -> DecidedStrictness -> Ordering # (<) :: DecidedStrictness -> DecidedStrictness -> Bool # (<=) :: DecidedStrictness -> DecidedStrictness -> Bool # (>) :: DecidedStrictness -> DecidedStrictness -> Bool # (>=) :: DecidedStrictness -> DecidedStrictness -> Bool # max :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness # min :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness #
Ord Fixity | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Generics Methods compare :: Fixity -> Fixity -> Ordering # (<) :: Fixity -> Fixity -> Bool # (<=) :: Fixity -> Fixity -> Bool # (>) :: Fixity -> Fixity -> Bool # (>=) :: Fixity -> Fixity -> Bool # max :: Fixity -> Fixity -> Fixity # min :: Fixity -> Fixity -> Fixity #
Ord SourceStrictness | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods compare :: SourceStrictness -> SourceStrictness -> Ordering # (<) :: SourceStrictness -> SourceStrictness -> Bool # (<=) :: SourceStrictness -> SourceStrictness -> Bool # (>) :: SourceStrictness -> SourceStrictness -> Bool # (>=) :: SourceStrictness -> SourceStrictness -> Bool # max :: SourceStrictness -> SourceStrictness -> SourceStrictness # min :: SourceStrictness -> SourceStrictness -> SourceStrictness #
Ord SourceUnpackedness | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods compare :: SourceUnpackedness -> SourceUnpackedness -> Ordering # (<) :: SourceUnpackedness -> SourceUnpackedness -> Bool # (<=) :: SourceUnpackedness -> SourceUnpackedness -> Bool # (>) :: SourceUnpackedness -> SourceUnpackedness -> Bool # (>=) :: SourceUnpackedness -> SourceUnpackedness -> Bool # max :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness # min :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness #
Ord SeekMode | @since base-4.2.0.0
Instance details Defined in GHC.Internal.IO.Device Methods compare :: SeekMode -> SeekMode -> Ordering # (<) :: SeekMode -> SeekMode -> Bool # (<=) :: SeekMode -> SeekMode -> Bool # (>) :: SeekMode -> SeekMode -> Bool # (>=) :: SeekMode -> SeekMode -> Bool # max :: SeekMode -> SeekMode -> SeekMode # min :: SeekMode -> SeekMode -> SeekMode #
Ord ArrayException | @since base-4.2.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods compare :: ArrayException -> ArrayException -> Ordering # (<) :: ArrayException -> ArrayException -> Bool # (<=) :: ArrayException -> ArrayException -> Bool # (>) :: ArrayException -> ArrayException -> Bool # (>=) :: ArrayException -> ArrayException -> Bool # max :: ArrayException -> ArrayException -> ArrayException # min :: ArrayException -> ArrayException -> ArrayException #
Ord AsyncException | @since base-4.2.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods compare :: AsyncException -> AsyncException -> Ordering # (<) :: AsyncException -> AsyncException -> Bool # (<=) :: AsyncException -> AsyncException -> Bool # (>) :: AsyncException -> AsyncException -> Bool # (>=) :: AsyncException -> AsyncException -> Bool # max :: AsyncException -> AsyncException -> AsyncException # min :: AsyncException -> AsyncException -> AsyncException #
Ord ExitCode |
Instance details Defined in GHC.Internal.IO.Exception Methods compare :: ExitCode -> ExitCode -> Ordering # (<) :: ExitCode -> ExitCode -> Bool # (<=) :: ExitCode -> ExitCode -> Bool # (>) :: ExitCode -> ExitCode -> Bool # (>=) :: ExitCode -> ExitCode -> Bool # max :: ExitCode -> ExitCode -> ExitCode # min :: ExitCode -> ExitCode -> ExitCode #
Ord BufferMode | @since base-4.2.0.0
Instance details Defined in GHC.Internal.IO.Handle.Types Methods compare :: BufferMode -> BufferMode -> Ordering # (<) :: BufferMode -> BufferMode -> Bool # (<=) :: BufferMode -> BufferMode -> Bool # (>) :: BufferMode -> BufferMode -> Bool # (>=) :: BufferMode -> BufferMode -> Bool # max :: BufferMode -> BufferMode -> BufferMode # min :: BufferMode -> BufferMode -> BufferMode #
Ord Newline | @since base-4.3.0.0
Instance details Defined in GHC.Internal.IO.Handle.Types Methods compare :: Newline -> Newline -> Ordering # (<) :: Newline -> Newline -> Bool # (<=) :: Newline -> Newline -> Bool # (>) :: Newline -> Newline -> Bool # (>=) :: Newline -> Newline -> Bool # max :: Newline -> Newline -> Newline # min :: Newline -> Newline -> Newline #
Ord NewlineMode | @since base-4.3.0.0
Instance details Defined in GHC.Internal.IO.Handle.Types Methods compare :: NewlineMode -> NewlineMode -> Ordering # (<) :: NewlineMode -> NewlineMode -> Bool # (<=) :: NewlineMode -> NewlineMode -> Bool # (>) :: NewlineMode -> NewlineMode -> Bool # (>=) :: NewlineMode -> NewlineMode -> Bool # max :: NewlineMode -> NewlineMode -> NewlineMode # min :: NewlineMode -> NewlineMode -> NewlineMode #
Ord IOMode | @since base-4.2.0.0
Instance details Defined in GHC.Internal.IO.IOMode Methods compare :: IOMode -> IOMode -> Ordering # (<) :: IOMode -> IOMode -> Bool # (<=) :: IOMode -> IOMode -> Bool # (>) :: IOMode -> IOMode -> Bool # (>=) :: IOMode -> IOMode -> Bool # max :: IOMode -> IOMode -> IOMode # min :: IOMode -> IOMode -> IOMode #
Ord Int16 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods compare :: Int16 -> Int16 -> Ordering # (<) :: Int16 -> Int16 -> Bool # (<=) :: Int16 -> Int16 -> Bool # (>) :: Int16 -> Int16 -> Bool # (>=) :: Int16 -> Int16 -> Bool # max :: Int16 -> Int16 -> Int16 # min :: Int16 -> Int16 -> Int16 #
Ord Int32 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods compare :: Int32 -> Int32 -> Ordering # (<) :: Int32 -> Int32 -> Bool # (<=) :: Int32 -> Int32 -> Bool # (>) :: Int32 -> Int32 -> Bool # (>=) :: Int32 -> Int32 -> Bool # max :: Int32 -> Int32 -> Int32 # min :: Int32 -> Int32 -> Int32 #
Ord Int64 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods compare :: Int64 -> Int64 -> Ordering # (<) :: Int64 -> Int64 -> Bool # (<=) :: Int64 -> Int64 -> Bool # (>) :: Int64 -> Int64 -> Bool # (>=) :: Int64 -> Int64 -> Bool # max :: Int64 -> Int64 -> Int64 # min :: Int64 -> Int64 -> Int64 #
Ord Int8 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods compare :: Int8 -> Int8 -> Ordering # (<) :: Int8 -> Int8 -> Bool # (<=) :: Int8 -> Int8 -> Bool # (>) :: Int8 -> Int8 -> Bool # (>=) :: Int8 -> Int8 -> Bool # max :: Int8 -> Int8 -> Int8 # min :: Int8 -> Int8 -> Int8 #
Ord CBlkCnt |
Instance details Defined in GHC.Internal.System.Posix.Types Methods compare :: CBlkCnt -> CBlkCnt -> Ordering # (<) :: CBlkCnt -> CBlkCnt -> Bool # (<=) :: CBlkCnt -> CBlkCnt -> Bool # (>) :: CBlkCnt -> CBlkCnt -> Bool # (>=) :: CBlkCnt -> CBlkCnt -> Bool # max :: CBlkCnt -> CBlkCnt -> CBlkCnt # min :: CBlkCnt -> CBlkCnt -> CBlkCnt #
Ord CBlkSize |
Instance details Defined in GHC.Internal.System.Posix.Types Methods compare :: CBlkSize -> CBlkSize -> Ordering # (<) :: CBlkSize -> CBlkSize -> Bool # (<=) :: CBlkSize -> CBlkSize -> Bool # (>) :: CBlkSize -> CBlkSize -> Bool # (>=) :: CBlkSize -> CBlkSize -> Bool # max :: CBlkSize -> CBlkSize -> CBlkSize # min :: CBlkSize -> CBlkSize -> CBlkSize #
Ord CCc |
Instance details Defined in GHC.Internal.System.Posix.Types Methods compare :: CCc -> CCc -> Ordering # (<) :: CCc -> CCc -> Bool # (<=) :: CCc -> CCc -> Bool # (>) :: CCc -> CCc -> Bool # (>=) :: CCc -> CCc -> Bool # max :: CCc -> CCc -> CCc # min :: CCc -> CCc -> CCc #
Ord CClockId |
Instance details Defined in GHC.Internal.System.Posix.Types Methods compare :: CClockId -> CClockId -> Ordering # (<) :: CClockId -> CClockId -> Bool # (<=) :: CClockId -> CClockId -> Bool # (>) :: CClockId -> CClockId -> Bool # (>=) :: CClockId -> CClockId -> Bool # max :: CClockId -> CClockId -> CClockId # min :: CClockId -> CClockId -> CClockId #
Ord CDev |
Instance details Defined in GHC.Internal.System.Posix.Types Methods compare :: CDev -> CDev -> Ordering # (<) :: CDev -> CDev -> Bool # (<=) :: CDev -> CDev -> Bool # (>) :: CDev -> CDev -> Bool # (>=) :: CDev -> CDev -> Bool # max :: CDev -> CDev -> CDev # min :: CDev -> CDev -> CDev #
Ord CFsBlkCnt |
Instance details Defined in GHC.Internal.System.Posix.Types Methods compare :: CFsBlkCnt -> CFsBlkCnt -> Ordering # (<) :: CFsBlkCnt -> CFsBlkCnt -> Bool # (<=) :: CFsBlkCnt -> CFsBlkCnt -> Bool # (>) :: CFsBlkCnt -> CFsBlkCnt -> Bool # (>=) :: CFsBlkCnt -> CFsBlkCnt -> Bool # max :: CFsBlkCnt -> CFsBlkCnt -> CFsBlkCnt # min :: CFsBlkCnt -> CFsBlkCnt -> CFsBlkCnt #
Ord CFsFilCnt |
Instance details Defined in GHC.Internal.System.Posix.Types Methods compare :: CFsFilCnt -> CFsFilCnt -> Ordering # (<) :: CFsFilCnt -> CFsFilCnt -> Bool # (<=) :: CFsFilCnt -> CFsFilCnt -> Bool # (>) :: CFsFilCnt -> CFsFilCnt -> Bool # (>=) :: CFsFilCnt -> CFsFilCnt -> Bool # max :: CFsFilCnt -> CFsFilCnt -> CFsFilCnt # min :: CFsFilCnt -> CFsFilCnt -> CFsFilCnt #
Ord CGid |
Instance details Defined in GHC.Internal.System.Posix.Types Methods compare :: CGid -> CGid -> Ordering # (<) :: CGid -> CGid -> Bool # (<=) :: CGid -> CGid -> Bool # (>) :: CGid -> CGid -> Bool # (>=) :: CGid -> CGid -> Bool # max :: CGid -> CGid -> CGid # min :: CGid -> CGid -> CGid #
Ord CId |
Instance details Defined in GHC.Internal.System.Posix.Types Methods compare :: CId -> CId -> Ordering # (<) :: CId -> CId -> Bool # (<=) :: CId -> CId -> Bool # (>) :: CId -> CId -> Bool # (>=) :: CId -> CId -> Bool # max :: CId -> CId -> CId # min :: CId -> CId -> CId #
Ord CIno |
Instance details Defined in GHC.Internal.System.Posix.Types Methods compare :: CIno -> CIno -> Ordering # (<) :: CIno -> CIno -> Bool # (<=) :: CIno -> CIno -> Bool # (>) :: CIno -> CIno -> Bool # (>=) :: CIno -> CIno -> Bool # max :: CIno -> CIno -> CIno # min :: CIno -> CIno -> CIno #
Ord CKey |
Instance details Defined in GHC.Internal.System.Posix.Types Methods compare :: CKey -> CKey -> Ordering # (<) :: CKey -> CKey -> Bool # (<=) :: CKey -> CKey -> Bool # (>) :: CKey -> CKey -> Bool # (>=) :: CKey -> CKey -> Bool # max :: CKey -> CKey -> CKey # min :: CKey -> CKey -> CKey #
Ord CMode |
Instance details Defined in GHC.Internal.System.Posix.Types Methods compare :: CMode -> CMode -> Ordering # (<) :: CMode -> CMode -> Bool # (<=) :: CMode -> CMode -> Bool # (>) :: CMode -> CMode -> Bool # (>=) :: CMode -> CMode -> Bool # max :: CMode -> CMode -> CMode # min :: CMode -> CMode -> CMode #
Ord CNfds |
Instance details Defined in GHC.Internal.System.Posix.Types Methods compare :: CNfds -> CNfds -> Ordering # (<) :: CNfds -> CNfds -> Bool # (<=) :: CNfds -> CNfds -> Bool # (>) :: CNfds -> CNfds -> Bool # (>=) :: CNfds -> CNfds -> Bool # max :: CNfds -> CNfds -> CNfds # min :: CNfds -> CNfds -> CNfds #
Ord CNlink |
Instance details Defined in GHC.Internal.System.Posix.Types Methods compare :: CNlink -> CNlink -> Ordering # (<) :: CNlink -> CNlink -> Bool # (<=) :: CNlink -> CNlink -> Bool # (>) :: CNlink -> CNlink -> Bool # (>=) :: CNlink -> CNlink -> Bool # max :: CNlink -> CNlink -> CNlink # min :: CNlink -> CNlink -> CNlink #
Ord COff |
Instance details Defined in GHC.Internal.System.Posix.Types Methods compare :: COff -> COff -> Ordering # (<) :: COff -> COff -> Bool # (<=) :: COff -> COff -> Bool # (>) :: COff -> COff -> Bool # (>=) :: COff -> COff -> Bool # max :: COff -> COff -> COff # min :: COff -> COff -> COff #
Ord CPid |
Instance details Defined in GHC.Internal.System.Posix.Types Methods compare :: CPid -> CPid -> Ordering # (<) :: CPid -> CPid -> Bool # (<=) :: CPid -> CPid -> Bool # (>) :: CPid -> CPid -> Bool # (>=) :: CPid -> CPid -> Bool # max :: CPid -> CPid -> CPid # min :: CPid -> CPid -> CPid #
Ord CRLim |
Instance details Defined in GHC.Internal.System.Posix.Types Methods compare :: CRLim -> CRLim -> Ordering # (<) :: CRLim -> CRLim -> Bool # (<=) :: CRLim -> CRLim -> Bool # (>) :: CRLim -> CRLim -> Bool # (>=) :: CRLim -> CRLim -> Bool # max :: CRLim -> CRLim -> CRLim # min :: CRLim -> CRLim -> CRLim #
Ord CSocklen |
Instance details Defined in GHC.Internal.System.Posix.Types Methods compare :: CSocklen -> CSocklen -> Ordering # (<) :: CSocklen -> CSocklen -> Bool # (<=) :: CSocklen -> CSocklen -> Bool # (>) :: CSocklen -> CSocklen -> Bool # (>=) :: CSocklen -> CSocklen -> Bool # max :: CSocklen -> CSocklen -> CSocklen # min :: CSocklen -> CSocklen -> CSocklen #
Ord CSpeed |
Instance details Defined in GHC.Internal.System.Posix.Types Methods compare :: CSpeed -> CSpeed -> Ordering # (<) :: CSpeed -> CSpeed -> Bool # (<=) :: CSpeed -> CSpeed -> Bool # (>) :: CSpeed -> CSpeed -> Bool # (>=) :: CSpeed -> CSpeed -> Bool # max :: CSpeed -> CSpeed -> CSpeed # min :: CSpeed -> CSpeed -> CSpeed #
Ord CSsize |
Instance details Defined in GHC.Internal.System.Posix.Types Methods compare :: CSsize -> CSsize -> Ordering # (<) :: CSsize -> CSsize -> Bool # (<=) :: CSsize -> CSsize -> Bool # (>) :: CSsize -> CSsize -> Bool # (>=) :: CSsize -> CSsize -> Bool # max :: CSsize -> CSsize -> CSsize # min :: CSsize -> CSsize -> CSsize #
Ord CTcflag |
Instance details Defined in GHC.Internal.System.Posix.Types Methods compare :: CTcflag -> CTcflag -> Ordering # (<) :: CTcflag -> CTcflag -> Bool # (<=) :: CTcflag -> CTcflag -> Bool # (>) :: CTcflag -> CTcflag -> Bool # (>=) :: CTcflag -> CTcflag -> Bool # max :: CTcflag -> CTcflag -> CTcflag # min :: CTcflag -> CTcflag -> CTcflag #
Ord CTimer |
Instance details Defined in GHC.Internal.System.Posix.Types Methods compare :: CTimer -> CTimer -> Ordering # (<) :: CTimer -> CTimer -> Bool # (<=) :: CTimer -> CTimer -> Bool # (>) :: CTimer -> CTimer -> Bool # (>=) :: CTimer -> CTimer -> Bool # max :: CTimer -> CTimer -> CTimer # min :: CTimer -> CTimer -> CTimer #
Ord CUid |
Instance details Defined in GHC.Internal.System.Posix.Types Methods compare :: CUid -> CUid -> Ordering # (<) :: CUid -> CUid -> Bool # (<=) :: CUid -> CUid -> Bool # (>) :: CUid -> CUid -> Bool # (>=) :: CUid -> CUid -> Bool # max :: CUid -> CUid -> CUid # min :: CUid -> CUid -> CUid #
Ord Fd |
Instance details Defined in GHC.Internal.System.Posix.Types Methods compare :: Fd -> Fd -> Ordering # (<) :: Fd -> Fd -> Bool # (<=) :: Fd -> Fd -> Bool # (>) :: Fd -> Fd -> Bool # (>=) :: Fd -> Fd -> Bool # max :: Fd -> Fd -> Fd # min :: Fd -> Fd -> Fd #
Ord SomeNat | @since base-4.7.0.0
Instance details Defined in GHC.Internal.TypeNats Methods compare :: SomeNat -> SomeNat -> Ordering # (<) :: SomeNat -> SomeNat -> Bool # (<=) :: SomeNat -> SomeNat -> Bool # (>) :: SomeNat -> SomeNat -> Bool # (>=) :: SomeNat -> SomeNat -> Bool # max :: SomeNat -> SomeNat -> SomeNat # min :: SomeNat -> SomeNat -> SomeNat #
Ord GeneralCategory | @since base-2.01
Instance details Defined in GHC.Internal.Unicode Methods compare :: GeneralCategory -> GeneralCategory -> Ordering # (<) :: GeneralCategory -> GeneralCategory -> Bool # (<=) :: GeneralCategory -> GeneralCategory -> Bool # (>) :: GeneralCategory -> GeneralCategory -> Bool # (>=) :: GeneralCategory -> GeneralCategory -> Bool # max :: GeneralCategory -> GeneralCategory -> GeneralCategory # min :: GeneralCategory -> GeneralCategory -> GeneralCategory #
Ord Word16 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods compare :: Word16 -> Word16 -> Ordering # (<) :: Word16 -> Word16 -> Bool # (<=) :: Word16 -> Word16 -> Bool # (>) :: Word16 -> Word16 -> Bool # (>=) :: Word16 -> Word16 -> Bool # max :: Word16 -> Word16 -> Word16 # min :: Word16 -> Word16 -> Word16 #
Ord Word32 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods compare :: Word32 -> Word32 -> Ordering # (<) :: Word32 -> Word32 -> Bool # (<=) :: Word32 -> Word32 -> Bool # (>) :: Word32 -> Word32 -> Bool # (>=) :: Word32 -> Word32 -> Bool # max :: Word32 -> Word32 -> Word32 # min :: Word32 -> Word32 -> Word32 #
Ord Word64 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods compare :: Word64 -> Word64 -> Ordering # (<) :: Word64 -> Word64 -> Bool # (<=) :: Word64 -> Word64 -> Bool # (>) :: Word64 -> Word64 -> Bool # (>=) :: Word64 -> Word64 -> Bool # max :: Word64 -> Word64 -> Word64 # min :: Word64 -> Word64 -> Word64 #
Ord Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods compare :: Word8 -> Word8 -> Ordering # (<) :: Word8 -> Word8 -> Bool # (<=) :: Word8 -> Word8 -> Bool # (>) :: Word8 -> Word8 -> Bool # (>=) :: Word8 -> Word8 -> Bool # max :: Word8 -> Word8 -> Word8 # min :: Word8 -> Word8 -> Word8 #
Ord Ordering |
Instance details Defined in GHC.Classes Methods compare :: Ordering -> Ordering -> Ordering # (<) :: Ordering -> Ordering -> Bool # (<=) :: Ordering -> Ordering -> Bool # (>) :: Ordering -> Ordering -> Bool # (>=) :: Ordering -> Ordering -> Bool # max :: Ordering -> Ordering -> Ordering # min :: Ordering -> Ordering -> Ordering #
Ord TyCon |
Instance details Defined in GHC.Classes Methods compare :: TyCon -> TyCon -> Ordering # (<) :: TyCon -> TyCon -> Bool # (<=) :: TyCon -> TyCon -> Bool # (>) :: TyCon -> TyCon -> Bool # (>=) :: TyCon -> TyCon -> Bool # max :: TyCon -> TyCon -> TyCon # min :: TyCon -> TyCon -> TyCon #
Ord Integer |
Instance details Defined in GHC.Num.Integer Methods compare :: Integer -> Integer -> Ordering # (<) :: Integer -> Integer -> Bool # (<=) :: Integer -> Integer -> Bool # (>) :: Integer -> Integer -> Bool # (>=) :: Integer -> Integer -> Bool # max :: Integer -> Integer -> Integer # min :: Integer -> Integer -> Integer #
Ord Natural |
Instance details Defined in GHC.Num.Natural Methods compare :: Natural -> Natural -> Ordering # (<) :: Natural -> Natural -> Bool # (<=) :: Natural -> Natural -> Bool # (>) :: Natural -> Natural -> Bool # (>=) :: Natural -> Natural -> Bool # max :: Natural -> Natural -> Natural # min :: Natural -> Natural -> Natural #
Ord () |
Instance details Defined in GHC.Classes Methods compare :: () -> () -> Ordering # (<) :: () -> () -> Bool # (<=) :: () -> () -> Bool # (>) :: () -> () -> Bool # (>=) :: () -> () -> Bool # max :: () -> () -> () # min :: () -> () -> () #
Ord Bool |
Instance details Defined in GHC.Classes Methods compare :: Bool -> Bool -> Ordering # (<) :: Bool -> Bool -> Bool # (<=) :: Bool -> Bool -> Bool # (>) :: Bool -> Bool -> Bool # (>=) :: Bool -> Bool -> Bool # max :: Bool -> Bool -> Bool # min :: Bool -> Bool -> Bool #
Ord Char |
Instance details Defined in GHC.Classes Methods compare :: Char -> Char -> Ordering # (<) :: Char -> Char -> Bool # (<=) :: Char -> Char -> Bool # (>) :: Char -> Char -> Bool # (>=) :: Char -> Char -> Bool # max :: Char -> Char -> Char # min :: Char -> Char -> Char #
Ord Double | IEEE 754 `Double`-precision type includes not only numbers, but also positive and negative infinities and a special element called `NaN` (which can be quiet or signal). IEEE 754-2008, section 5.11 requires that if at least one of arguments of `<=`, `<`, `>`, `>=` is `NaN` then the result of the comparison is `False`, and `instance` `Ord` `Double` complies with this requirement. This violates the reflexivity: both `NaN` `<=` `NaN` and `NaN` `>=` `NaN` are `False`. IEEE 754-2008, section 5.10 defines `totalOrder` predicate. Unfortunately, `compare` on `Double`s violates the IEEE standard and does not define a total order. More specifically, both `compare` `NaN` `x` and `compare` `x` `NaN` always return `GT`. Thus, users must be extremely cautious when using `instance` `Ord` `Double`. For instance, one should avoid ordered containers with keys represented by `Double`, because data loss and corruption may happen. An IEEE-compliant `compare` is available in `fp-ieee` package as `TotallyOrdered` newtype. Moving further, the behaviour of `min` and `max` with regards to `NaN` is also non-compliant. IEEE 754-2008, section 5.3.1 defines that quiet `NaN` should be treated as a missing data by `minNum` and `maxNum` functions, for example, `minNum(NaN, 1) = minNum(1, NaN) = 1`. Some languages such as Java deviate from the standard implementing `minNum(NaN, 1) = minNum(1, NaN) = NaN`. However, `min` / `max` in `base` are even worse: `min` `NaN` 1 is 1, but `min` 1 `NaN` is `NaN`. IEEE 754-2008 compliant `min` / `max` can be found in `ieee754` package under `minNum` / `maxNum` names. Implementations compliant with `minimumNumber` / `maximumNumber` from a newer IEEE 754-2019, section 9.6 are available from `fp-ieee` package.
Instance details Defined in GHC.Classes Methods compare :: Double -> Double -> Ordering # (<) :: Double -> Double -> Bool # (<=) :: Double -> Double -> Bool # (>) :: Double -> Double -> Bool # (>=) :: Double -> Double -> Bool # max :: Double -> Double -> Double # min :: Double -> Double -> Double #
Ord Float | See `instance` `Ord` `Double` for discussion of deviations from IEEE 754 standard.
Instance details Defined in GHC.Classes Methods compare :: Float -> Float -> Ordering # (<) :: Float -> Float -> Bool # (<=) :: Float -> Float -> Bool # (>) :: Float -> Float -> Bool # (>=) :: Float -> Float -> Bool # max :: Float -> Float -> Float # min :: Float -> Float -> Float #
Ord Int |
Instance details Defined in GHC.Classes Methods compare :: Int -> Int -> Ordering # (<) :: Int -> Int -> Bool # (<=) :: Int -> Int -> Bool # (>) :: Int -> Int -> Bool # (>=) :: Int -> Int -> Bool # max :: Int -> Int -> Int # min :: Int -> Int -> Int #
Ord Word |
Instance details Defined in GHC.Classes Methods compare :: Word -> Word -> Ordering # (<) :: Word -> Word -> Bool # (<=) :: Word -> Word -> Bool # (>) :: Word -> Word -> Bool # (>=) :: Word -> Word -> Bool # max :: Word -> Word -> Word # min :: Word -> Word -> Word #
Ord a => Ord (First a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods compare :: First a -> First a -> Ordering # (<) :: First a -> First a -> Bool # (<=) :: First a -> First a -> Bool # (>) :: First a -> First a -> Bool # (>=) :: First a -> First a -> Bool # max :: First a -> First a -> First a # min :: First a -> First a -> First a #
Ord a => Ord (Last a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods compare :: Last a -> Last a -> Ordering # (<) :: Last a -> Last a -> Bool # (<=) :: Last a -> Last a -> Bool # (>) :: Last a -> Last a -> Bool # (>=) :: Last a -> Last a -> Bool # max :: Last a -> Last a -> Last a # min :: Last a -> Last a -> Last a #
Ord a => Ord (Max a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods compare :: Max a -> Max a -> Ordering # (<) :: Max a -> Max a -> Bool # (<=) :: Max a -> Max a -> Bool # (>) :: Max a -> Max a -> Bool # (>=) :: Max a -> Max a -> Bool # max :: Max a -> Max a -> Max a # min :: Max a -> Max a -> Max a #
Ord a => Ord (Min a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods compare :: Min a -> Min a -> Ordering # (<) :: Min a -> Min a -> Bool # (<=) :: Min a -> Min a -> Bool # (>) :: Min a -> Min a -> Bool # (>=) :: Min a -> Min a -> Bool # max :: Min a -> Min a -> Min a # min :: Min a -> Min a -> Min a #
Ord m => Ord (WrappedMonoid m) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods compare :: WrappedMonoid m -> WrappedMonoid m -> Ordering # (<) :: WrappedMonoid m -> WrappedMonoid m -> Bool # (<=) :: WrappedMonoid m -> WrappedMonoid m -> Bool # (>) :: WrappedMonoid m -> WrappedMonoid m -> Bool # (>=) :: WrappedMonoid m -> WrappedMonoid m -> Bool # max :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m # min :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m #
Ord (Bits n) |
Instance details Defined in Basement.Bits Methods compare :: Bits n -> Bits n -> Ordering # (<) :: Bits n -> Bits n -> Bool # (<=) :: Bits n -> Bits n -> Bool # (>) :: Bits n -> Bits n -> Bool # (>=) :: Bits n -> Bits n -> Bool # max :: Bits n -> Bits n -> Bits n # min :: Bits n -> Bits n -> Bits n #
(PrimType ty, Ord ty) => Ord (Block ty) |
Instance details Defined in Basement.Block.Base Methods compare :: Block ty -> Block ty -> Ordering # (<) :: Block ty -> Block ty -> Bool # (<=) :: Block ty -> Block ty -> Bool # (>) :: Block ty -> Block ty -> Bool # (>=) :: Block ty -> Block ty -> Bool # max :: Block ty -> Block ty -> Block ty # min :: Block ty -> Block ty -> Block ty #
Ord (Zn n) |
Instance details Defined in Basement.Bounded Methods compare :: Zn n -> Zn n -> Ordering # (<) :: Zn n -> Zn n -> Bool # (<=) :: Zn n -> Zn n -> Bool # (>) :: Zn n -> Zn n -> Bool # (>=) :: Zn n -> Zn n -> Bool # max :: Zn n -> Zn n -> Zn n # min :: Zn n -> Zn n -> Zn n #
Ord (Zn64 n) |
Instance details Defined in Basement.Bounded Methods compare :: Zn64 n -> Zn64 n -> Ordering # (<) :: Zn64 n -> Zn64 n -> Bool # (<=) :: Zn64 n -> Zn64 n -> Bool # (>) :: Zn64 n -> Zn64 n -> Bool # (>=) :: Zn64 n -> Zn64 n -> Bool # max :: Zn64 n -> Zn64 n -> Zn64 n # min :: Zn64 n -> Zn64 n -> Zn64 n #
Ord a => Ord (Array a) |
Instance details Defined in Basement.BoxedArray Methods compare :: Array a -> Array a -> Ordering # (<) :: Array a -> Array a -> Bool # (<=) :: Array a -> Array a -> Bool # (>) :: Array a -> Array a -> Bool # (>=) :: Array a -> Array a -> Bool # max :: Array a -> Array a -> Array a # min :: Array a -> Array a -> Array a #
(ByteSwap a, Ord a) => Ord (BE a) |
Instance details Defined in Basement.Endianness Methods compare :: BE a -> BE a -> Ordering # (<) :: BE a -> BE a -> Bool # (<=) :: BE a -> BE a -> Bool # (>) :: BE a -> BE a -> Bool # (>=) :: BE a -> BE a -> Bool # max :: BE a -> BE a -> BE a # min :: BE a -> BE a -> BE a #
(ByteSwap a, Ord a) => Ord (LE a) |
Instance details Defined in Basement.Endianness Methods compare :: LE a -> LE a -> Ordering # (<) :: LE a -> LE a -> Bool # (<=) :: LE a -> LE a -> Bool # (>) :: LE a -> LE a -> Bool # (>=) :: LE a -> LE a -> Bool # max :: LE a -> LE a -> LE a # min :: LE a -> LE a -> LE a #
Ord (FinalPtr a) |
Instance details Defined in Basement.FinalPtr Methods compare :: FinalPtr a -> FinalPtr a -> Ordering # (<) :: FinalPtr a -> FinalPtr a -> Bool # (<=) :: FinalPtr a -> FinalPtr a -> Bool # (>) :: FinalPtr a -> FinalPtr a -> Bool # (>=) :: FinalPtr a -> FinalPtr a -> Bool # max :: FinalPtr a -> FinalPtr a -> FinalPtr a # min :: FinalPtr a -> FinalPtr a -> FinalPtr a #
Ord (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize Methods compare :: CountOf ty -> CountOf ty -> Ordering # (<) :: CountOf ty -> CountOf ty -> Bool # (<=) :: CountOf ty -> CountOf ty -> Bool # (>) :: CountOf ty -> CountOf ty -> Bool # (>=) :: CountOf ty -> CountOf ty -> Bool # max :: CountOf ty -> CountOf ty -> CountOf ty # min :: CountOf ty -> CountOf ty -> CountOf ty #
Ord (Offset ty) |
Instance details Defined in Basement.Types.OffsetSize Methods compare :: Offset ty -> Offset ty -> Ordering # (<) :: Offset ty -> Offset ty -> Bool # (<=) :: Offset ty -> Offset ty -> Bool # (>) :: Offset ty -> Offset ty -> Bool # (>=) :: Offset ty -> Offset ty -> Bool # max :: Offset ty -> Offset ty -> Offset ty # min :: Offset ty -> Offset ty -> Offset ty #
(PrimType ty, Ord ty) => Ord (UArray ty) |
Instance details Defined in Basement.UArray.Base Methods compare :: UArray ty -> UArray ty -> Ordering # (<) :: UArray ty -> UArray ty -> Bool # (<=) :: UArray ty -> UArray ty -> Bool # (>) :: UArray ty -> UArray ty -> Bool # (>=) :: UArray ty -> UArray ty -> Bool # max :: UArray ty -> UArray ty -> UArray ty # min :: UArray ty -> UArray ty -> UArray ty #
(PrimType ty, Ord ty) => Ord (ChunkedUArray ty) # |
Instance details Defined in Foundation.Array.Chunked.Unboxed Methods compare :: ChunkedUArray ty -> ChunkedUArray ty -> Ordering # (<) :: ChunkedUArray ty -> ChunkedUArray ty -> Bool # (<=) :: ChunkedUArray ty -> ChunkedUArray ty -> Bool # (>) :: ChunkedUArray ty -> ChunkedUArray ty -> Bool # (>=) :: ChunkedUArray ty -> ChunkedUArray ty -> Bool # max :: ChunkedUArray ty -> ChunkedUArray ty -> ChunkedUArray ty # min :: ChunkedUArray ty -> ChunkedUArray ty -> ChunkedUArray ty #
Ord a => Ord (DList a) # |
Instance details Defined in Foundation.List.DList Methods compare :: DList a -> DList a -> Ordering # (<) :: DList a -> DList a -> Bool # (<=) :: DList a -> DList a -> Bool # (>) :: DList a -> DList a -> Bool # (>=) :: DList a -> DList a -> Bool # max :: DList a -> DList a -> DList a # min :: DList a -> DList a -> DList a #
Ord a => Ord (NonEmpty a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Base Methods compare :: NonEmpty a -> NonEmpty a -> Ordering # (<) :: NonEmpty a -> NonEmpty a -> Bool # (<=) :: NonEmpty a -> NonEmpty a -> Bool # (>) :: NonEmpty a -> NonEmpty a -> Bool # (>=) :: NonEmpty a -> NonEmpty a -> Bool # max :: NonEmpty a -> NonEmpty a -> NonEmpty a # min :: NonEmpty a -> NonEmpty a -> NonEmpty a #
Ord a => Ord (Identity a) | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Functor.Identity Methods compare :: Identity a -> Identity a -> Ordering # (<) :: Identity a -> Identity a -> Bool # (<=) :: Identity a -> Identity a -> Bool # (>) :: Identity a -> Identity a -> Bool # (>=) :: Identity a -> Identity a -> Bool # max :: Identity a -> Identity a -> Identity a # min :: Identity a -> Identity a -> Identity a #
Ord a => Ord (First a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Monoid Methods compare :: First a -> First a -> Ordering # (<) :: First a -> First a -> Bool # (<=) :: First a -> First a -> Bool # (>) :: First a -> First a -> Bool # (>=) :: First a -> First a -> Bool # max :: First a -> First a -> First a # min :: First a -> First a -> First a #
Ord a => Ord (Last a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Monoid Methods compare :: Last a -> Last a -> Ordering # (<) :: Last a -> Last a -> Bool # (<=) :: Last a -> Last a -> Bool # (>) :: Last a -> Last a -> Bool # (>=) :: Last a -> Last a -> Bool # max :: Last a -> Last a -> Last a # min :: Last a -> Last a -> Last a #
Ord a => Ord (Dual a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods compare :: Dual a -> Dual a -> Ordering # (<) :: Dual a -> Dual a -> Bool # (<=) :: Dual a -> Dual a -> Bool # (>) :: Dual a -> Dual a -> Bool # (>=) :: Dual a -> Dual a -> Bool # max :: Dual a -> Dual a -> Dual a # min :: Dual a -> Dual a -> Dual a #
Ord a => Ord (Product a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods compare :: Product a -> Product a -> Ordering # (<) :: Product a -> Product a -> Bool # (<=) :: Product a -> Product a -> Bool # (>) :: Product a -> Product a -> Bool # (>=) :: Product a -> Product a -> Bool # max :: Product a -> Product a -> Product a # min :: Product a -> Product a -> Product a #
Ord a => Ord (Sum a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods compare :: Sum a -> Sum a -> Ordering # (<) :: Sum a -> Sum a -> Bool # (<=) :: Sum a -> Sum a -> Bool # (>) :: Sum a -> Sum a -> Bool # (>=) :: Sum a -> Sum a -> Bool # max :: Sum a -> Sum a -> Sum a # min :: Sum a -> Sum a -> Sum a #
Ord (ForeignPtr a) | @since base-2.01
Instance details Defined in GHC.Internal.ForeignPtr Methods compare :: ForeignPtr a -> ForeignPtr a -> Ordering # (<) :: ForeignPtr a -> ForeignPtr a -> Bool # (<=) :: ForeignPtr a -> ForeignPtr a -> Bool # (>) :: ForeignPtr a -> ForeignPtr a -> Bool # (>=) :: ForeignPtr a -> ForeignPtr a -> Bool # max :: ForeignPtr a -> ForeignPtr a -> ForeignPtr a # min :: ForeignPtr a -> ForeignPtr a -> ForeignPtr a #
Ord a => Ord (ZipList a) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Functor.ZipList Methods compare :: ZipList a -> ZipList a -> Ordering # (<) :: ZipList a -> ZipList a -> Bool # (<=) :: ZipList a -> ZipList a -> Bool # (>) :: ZipList a -> ZipList a -> Bool # (>=) :: ZipList a -> ZipList a -> Bool # max :: ZipList a -> ZipList a -> ZipList a # min :: ZipList a -> ZipList a -> ZipList a #
Ord p => Ord (Par1 p) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Generics Methods compare :: Par1 p -> Par1 p -> Ordering # (<) :: Par1 p -> Par1 p -> Bool # (<=) :: Par1 p -> Par1 p -> Bool # (>) :: Par1 p -> Par1 p -> Bool # (>=) :: Par1 p -> Par1 p -> Bool # max :: Par1 p -> Par1 p -> Par1 p # min :: Par1 p -> Par1 p -> Par1 p #
Ord (FunPtr a) |
Instance details Defined in GHC.Internal.Ptr Methods compare :: FunPtr a -> FunPtr a -> Ordering # (<) :: FunPtr a -> FunPtr a -> Bool # (<=) :: FunPtr a -> FunPtr a -> Bool # (>) :: FunPtr a -> FunPtr a -> Bool # (>=) :: FunPtr a -> FunPtr a -> Bool # max :: FunPtr a -> FunPtr a -> FunPtr a # min :: FunPtr a -> FunPtr a -> FunPtr a #
Ord (Ptr a) | @since base-2.01
Instance details Defined in GHC.Internal.Ptr Methods compare :: Ptr a -> Ptr a -> Ordering # (<) :: Ptr a -> Ptr a -> Bool # (<=) :: Ptr a -> Ptr a -> Bool # (>) :: Ptr a -> Ptr a -> Bool # (>=) :: Ptr a -> Ptr a -> Bool # max :: Ptr a -> Ptr a -> Ptr a # min :: Ptr a -> Ptr a -> Ptr a #
Integral a => Ord (Ratio a) | @since base-2.0.1
Instance details Defined in GHC.Internal.Real Methods compare :: Ratio a -> Ratio a -> Ordering # (<) :: Ratio a -> Ratio a -> Bool # (<=) :: Ratio a -> Ratio a -> Bool # (>) :: Ratio a -> Ratio a -> Bool # (>=) :: Ratio a -> Ratio a -> Bool # max :: Ratio a -> Ratio a -> Ratio a # min :: Ratio a -> Ratio a -> Ratio a #
Ord (SNat n) | @since base-4.19.0.0
Instance details Defined in GHC.Internal.TypeNats Methods compare :: SNat n -> SNat n -> Ordering # (<) :: SNat n -> SNat n -> Bool # (<=) :: SNat n -> SNat n -> Bool # (>) :: SNat n -> SNat n -> Bool # (>=) :: SNat n -> SNat n -> Bool # max :: SNat n -> SNat n -> SNat n # min :: SNat n -> SNat n -> SNat n #
Ord a => Ord (Maybe a) | @since base-2.01
Instance details Defined in GHC.Internal.Maybe Methods compare :: Maybe a -> Maybe a -> Ordering # (<) :: Maybe a -> Maybe a -> Bool # (<=) :: Maybe a -> Maybe a -> Bool # (>) :: Maybe a -> Maybe a -> Bool # (>=) :: Maybe a -> Maybe a -> Bool # max :: Maybe a -> Maybe a -> Maybe a # min :: Maybe a -> Maybe a -> Maybe a #
Ord a => Ord (Solo a) |
Instance details Defined in GHC.Classes Methods compare :: Solo a -> Solo a -> Ordering # (<) :: Solo a -> Solo a -> Bool # (<=) :: Solo a -> Solo a -> Bool # (>) :: Solo a -> Solo a -> Bool # (>=) :: Solo a -> Solo a -> Bool # max :: Solo a -> Solo a -> Solo a # min :: Solo a -> Solo a -> Solo a #
Ord a => Ord [a] |
Instance details Defined in GHC.Classes Methods compare :: [a] -> [a] -> Ordering # (<) :: [a] -> [a] -> Bool # (<=) :: [a] -> [a] -> Bool # (>) :: [a] -> [a] -> Bool # (>=) :: [a] -> [a] -> Bool # max :: [a] -> [a] -> [a] # min :: [a] -> [a] -> [a] #
Ord (Fixed a) | Since: base-2.1
Instance details Defined in Data.Fixed Methods compare :: Fixed a -> Fixed a -> Ordering # (<) :: Fixed a -> Fixed a -> Bool # (<=) :: Fixed a -> Fixed a -> Bool # (>) :: Fixed a -> Fixed a -> Bool # (>=) :: Fixed a -> Fixed a -> Bool # max :: Fixed a -> Fixed a -> Fixed a # min :: Fixed a -> Fixed a -> Fixed a #
Ord a => Ord (Arg a b) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods compare :: Arg a b -> Arg a b -> Ordering # (<) :: Arg a b -> Arg a b -> Bool # (<=) :: Arg a b -> Arg a b -> Bool # (>) :: Arg a b -> Arg a b -> Bool # (>=) :: Arg a b -> Arg a b -> Bool # max :: Arg a b -> Arg a b -> Arg a b # min :: Arg a b -> Arg a b -> Arg a b #
(PrimType a, Ord a) => Ord (BlockN n a) |
Instance details Defined in Basement.Sized.Block Methods compare :: BlockN n a -> BlockN n a -> Ordering # (<) :: BlockN n a -> BlockN n a -> Bool # (<=) :: BlockN n a -> BlockN n a -> Bool # (>) :: BlockN n a -> BlockN n a -> Bool # (>=) :: BlockN n a -> BlockN n a -> Bool # max :: BlockN n a -> BlockN n a -> BlockN n a # min :: BlockN n a -> BlockN n a -> BlockN n a #
Ord a => Ord (ListN n a) |
Instance details Defined in Basement.Sized.List Methods compare :: ListN n a -> ListN n a -> Ordering # (<) :: ListN n a -> ListN n a -> Bool # (<=) :: ListN n a -> ListN n a -> Bool # (>) :: ListN n a -> ListN n a -> Bool # (>=) :: ListN n a -> ListN n a -> Bool # max :: ListN n a -> ListN n a -> ListN n a # min :: ListN n a -> ListN n a -> ListN n a #
(Ord a, Ord b) => Ord (These a b) |
Instance details Defined in Basement.These Methods compare :: These a b -> These a b -> Ordering # (<) :: These a b -> These a b -> Bool # (<=) :: These a b -> These a b -> Bool # (>) :: These a b -> These a b -> Bool # (>=) :: These a b -> These a b -> Bool # max :: These a b -> These a b -> These a b # min :: These a b -> These a b -> These a b #
(Ord a, Ord b) => Ord (Tuple2 a b) # |
Instance details Defined in Foundation.Tuple Methods compare :: Tuple2 a b -> Tuple2 a b -> Ordering # (<) :: Tuple2 a b -> Tuple2 a b -> Bool # (<=) :: Tuple2 a b -> Tuple2 a b -> Bool # (>) :: Tuple2 a b -> Tuple2 a b -> Bool # (>=) :: Tuple2 a b -> Tuple2 a b -> Bool # max :: Tuple2 a b -> Tuple2 a b -> Tuple2 a b # min :: Tuple2 a b -> Tuple2 a b -> Tuple2 a b #
(Ord a, Ord b) => Ord (Either a b) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Either Methods compare :: Either a b -> Either a b -> Ordering # (<) :: Either a b -> Either a b -> Bool # (<=) :: Either a b -> Either a b -> Bool # (>) :: Either a b -> Either a b -> Bool # (>=) :: Either a b -> Either a b -> Bool # max :: Either a b -> Either a b -> Either a b # min :: Either a b -> Either a b -> Either a b #
Ord (Proxy s) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Proxy Methods compare :: Proxy s -> Proxy s -> Ordering # (<) :: Proxy s -> Proxy s -> Bool # (<=) :: Proxy s -> Proxy s -> Bool # (>) :: Proxy s -> Proxy s -> Bool # (>=) :: Proxy s -> Proxy s -> Bool # max :: Proxy s -> Proxy s -> Proxy s # min :: Proxy s -> Proxy s -> Proxy s #
Ord (TypeRep a) | @since base-4.4.0.0
Instance details Defined in GHC.Internal.Data.Typeable.Internal Methods compare :: TypeRep a -> TypeRep a -> Ordering # (<) :: TypeRep a -> TypeRep a -> Bool # (<=) :: TypeRep a -> TypeRep a -> Bool # (>) :: TypeRep a -> TypeRep a -> Bool # (>=) :: TypeRep a -> TypeRep a -> Bool # max :: TypeRep a -> TypeRep a -> TypeRep a # min :: TypeRep a -> TypeRep a -> TypeRep a #
Ord (U1 p) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Generics Methods compare :: U1 p -> U1 p -> Ordering # (<) :: U1 p -> U1 p -> Bool # (<=) :: U1 p -> U1 p -> Bool # (>) :: U1 p -> U1 p -> Bool # (>=) :: U1 p -> U1 p -> Bool # max :: U1 p -> U1 p -> U1 p # min :: U1 p -> U1 p -> U1 p #
Ord (V1 p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods compare :: V1 p -> V1 p -> Ordering # (<) :: V1 p -> V1 p -> Bool # (<=) :: V1 p -> V1 p -> Bool # (>) :: V1 p -> V1 p -> Bool # (>=) :: V1 p -> V1 p -> Bool # max :: V1 p -> V1 p -> V1 p # min :: V1 p -> V1 p -> V1 p #
(Ord a, Ord b) => Ord (a, b) |
Instance details Defined in GHC.Classes Methods compare :: (a, b) -> (a, b) -> Ordering # (<) :: (a, b) -> (a, b) -> Bool # (<=) :: (a, b) -> (a, b) -> Bool # (>) :: (a, b) -> (a, b) -> Bool # (>=) :: (a, b) -> (a, b) -> Bool # max :: (a, b) -> (a, b) -> (a, b) # min :: (a, b) -> (a, b) -> (a, b) #
(Ord a, Ord b, Ord c) => Ord (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple Methods compare :: Tuple3 a b c -> Tuple3 a b c -> Ordering # (<) :: Tuple3 a b c -> Tuple3 a b c -> Bool # (<=) :: Tuple3 a b c -> Tuple3 a b c -> Bool # (>) :: Tuple3 a b c -> Tuple3 a b c -> Bool # (>=) :: Tuple3 a b c -> Tuple3 a b c -> Bool # max :: Tuple3 a b c -> Tuple3 a b c -> Tuple3 a b c # min :: Tuple3 a b c -> Tuple3 a b c -> Tuple3 a b c #
Ord a => Ord (Const a b) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Functor.Const Methods compare :: Const a b -> Const a b -> Ordering # (<) :: Const a b -> Const a b -> Bool # (<=) :: Const a b -> Const a b -> Bool # (>) :: Const a b -> Const a b -> Bool # (>=) :: Const a b -> Const a b -> Bool # max :: Const a b -> Const a b -> Const a b # min :: Const a b -> Const a b -> Const a b #
Ord (f a) => Ord (Ap f a) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Data.Monoid Methods compare :: Ap f a -> Ap f a -> Ordering # (<) :: Ap f a -> Ap f a -> Bool # (<=) :: Ap f a -> Ap f a -> Bool # (>) :: Ap f a -> Ap f a -> Bool # (>=) :: Ap f a -> Ap f a -> Bool # max :: Ap f a -> Ap f a -> Ap f a # min :: Ap f a -> Ap f a -> Ap f a #
Ord (f a) => Ord (Alt f a) | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods compare :: Alt f a -> Alt f a -> Ordering # (<) :: Alt f a -> Alt f a -> Bool # (<=) :: Alt f a -> Alt f a -> Bool # (>) :: Alt f a -> Alt f a -> Bool # (>=) :: Alt f a -> Alt f a -> Bool # max :: Alt f a -> Alt f a -> Alt f a # min :: Alt f a -> Alt f a -> Alt f a #
(Generic1 f, Ord (Rep1 f a)) => Ord (Generically1 f a) | @since base-4.18.0.0
Instance details Defined in GHC.Internal.Generics Methods compare :: Generically1 f a -> Generically1 f a -> Ordering # (<) :: Generically1 f a -> Generically1 f a -> Bool # (<=) :: Generically1 f a -> Generically1 f a -> Bool # (>) :: Generically1 f a -> Generically1 f a -> Bool # (>=) :: Generically1 f a -> Generically1 f a -> Bool # max :: Generically1 f a -> Generically1 f a -> Generically1 f a # min :: Generically1 f a -> Generically1 f a -> Generically1 f a #
Ord (f p) => Ord (Rec1 f p) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Generics Methods compare :: Rec1 f p -> Rec1 f p -> Ordering # (<) :: Rec1 f p -> Rec1 f p -> Bool # (<=) :: Rec1 f p -> Rec1 f p -> Bool # (>) :: Rec1 f p -> Rec1 f p -> Bool # (>=) :: Rec1 f p -> Rec1 f p -> Bool # max :: Rec1 f p -> Rec1 f p -> Rec1 f p # min :: Rec1 f p -> Rec1 f p -> Rec1 f p #
Ord (URec (Ptr ()) p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods compare :: URec (Ptr ()) p -> URec (Ptr ()) p -> Ordering # (<) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool # (<=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool # (>) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool # (>=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool # max :: URec (Ptr ()) p -> URec (Ptr ()) p -> URec (Ptr ()) p # min :: URec (Ptr ()) p -> URec (Ptr ()) p -> URec (Ptr ()) p #
Ord (URec Char p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods compare :: URec Char p -> URec Char p -> Ordering # (<) :: URec Char p -> URec Char p -> Bool # (<=) :: URec Char p -> URec Char p -> Bool # (>) :: URec Char p -> URec Char p -> Bool # (>=) :: URec Char p -> URec Char p -> Bool # max :: URec Char p -> URec Char p -> URec Char p # min :: URec Char p -> URec Char p -> URec Char p #
Ord (URec Double p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods compare :: URec Double p -> URec Double p -> Ordering # (<) :: URec Double p -> URec Double p -> Bool # (<=) :: URec Double p -> URec Double p -> Bool # (>) :: URec Double p -> URec Double p -> Bool # (>=) :: URec Double p -> URec Double p -> Bool # max :: URec Double p -> URec Double p -> URec Double p # min :: URec Double p -> URec Double p -> URec Double p #
Ord (URec Float p) |
Instance details Defined in GHC.Internal.Generics Methods compare :: URec Float p -> URec Float p -> Ordering # (<) :: URec Float p -> URec Float p -> Bool # (<=) :: URec Float p -> URec Float p -> Bool # (>) :: URec Float p -> URec Float p -> Bool # (>=) :: URec Float p -> URec Float p -> Bool # max :: URec Float p -> URec Float p -> URec Float p # min :: URec Float p -> URec Float p -> URec Float p #
Ord (URec Int p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods compare :: URec Int p -> URec Int p -> Ordering # (<) :: URec Int p -> URec Int p -> Bool # (<=) :: URec Int p -> URec Int p -> Bool # (>) :: URec Int p -> URec Int p -> Bool # (>=) :: URec Int p -> URec Int p -> Bool # max :: URec Int p -> URec Int p -> URec Int p # min :: URec Int p -> URec Int p -> URec Int p #
Ord (URec Word p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods compare :: URec Word p -> URec Word p -> Ordering # (<) :: URec Word p -> URec Word p -> Bool # (<=) :: URec Word p -> URec Word p -> Bool # (>) :: URec Word p -> URec Word p -> Bool # (>=) :: URec Word p -> URec Word p -> Bool # max :: URec Word p -> URec Word p -> URec Word p # min :: URec Word p -> URec Word p -> URec Word p #
(Ord a, Ord b, Ord c) => Ord (a, b, c) |
Instance details Defined in GHC.Classes Methods compare :: (a, b, c) -> (a, b, c) -> Ordering # (<) :: (a, b, c) -> (a, b, c) -> Bool # (<=) :: (a, b, c) -> (a, b, c) -> Bool # (>) :: (a, b, c) -> (a, b, c) -> Bool # (>=) :: (a, b, c) -> (a, b, c) -> Bool # max :: (a, b, c) -> (a, b, c) -> (a, b, c) # min :: (a, b, c) -> (a, b, c) -> (a, b, c) #
(Ord (f a), Ord (g a)) => Ord (Product f g a) | Since: base-4.18.0.0
Instance details Defined in Data.Functor.Product Methods compare :: Product f g a -> Product f g a -> Ordering # (<) :: Product f g a -> Product f g a -> Bool # (<=) :: Product f g a -> Product f g a -> Bool # (>) :: Product f g a -> Product f g a -> Bool # (>=) :: Product f g a -> Product f g a -> Bool # max :: Product f g a -> Product f g a -> Product f g a # min :: Product f g a -> Product f g a -> Product f g a #
(Ord (f a), Ord (g a)) => Ord (Sum f g a) | Since: base-4.18.0.0
Instance details Defined in Data.Functor.Sum Methods compare :: Sum f g a -> Sum f g a -> Ordering # (<) :: Sum f g a -> Sum f g a -> Bool # (<=) :: Sum f g a -> Sum f g a -> Bool # (>) :: Sum f g a -> Sum f g a -> Bool # (>=) :: Sum f g a -> Sum f g a -> Bool # max :: Sum f g a -> Sum f g a -> Sum f g a # min :: Sum f g a -> Sum f g a -> Sum f g a #
(Ord a, Ord b, Ord c, Ord d) => Ord (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple Methods compare :: Tuple4 a b c d -> Tuple4 a b c d -> Ordering # (<) :: Tuple4 a b c d -> Tuple4 a b c d -> Bool # (<=) :: Tuple4 a b c d -> Tuple4 a b c d -> Bool # (>) :: Tuple4 a b c d -> Tuple4 a b c d -> Bool # (>=) :: Tuple4 a b c d -> Tuple4 a b c d -> Bool # max :: Tuple4 a b c d -> Tuple4 a b c d -> Tuple4 a b c d # min :: Tuple4 a b c d -> Tuple4 a b c d -> Tuple4 a b c d #
(Ord (f p), Ord (g p)) => Ord ((f :*: g) p) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Generics Methods compare :: (f :*: g) p -> (f :*: g) p -> Ordering # (<) :: (f :*: g) p -> (f :*: g) p -> Bool # (<=) :: (f :*: g) p -> (f :*: g) p -> Bool # (>) :: (f :*: g) p -> (f :*: g) p -> Bool # (>=) :: (f :*: g) p -> (f :*: g) p -> Bool # max :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p # min :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p #
(Ord (f p), Ord (g p)) => Ord ((f :+: g) p) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Generics Methods compare :: (f :+: g) p -> (f :+: g) p -> Ordering # (<) :: (f :+: g) p -> (f :+: g) p -> Bool # (<=) :: (f :+: g) p -> (f :+: g) p -> Bool # (>) :: (f :+: g) p -> (f :+: g) p -> Bool # (>=) :: (f :+: g) p -> (f :+: g) p -> Bool # max :: (f :+: g) p -> (f :+: g) p -> (f :+: g) p # min :: (f :+: g) p -> (f :+: g) p -> (f :+: g) p #
Ord c => Ord (K1 i c p) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Generics Methods compare :: K1 i c p -> K1 i c p -> Ordering # (<) :: K1 i c p -> K1 i c p -> Bool # (<=) :: K1 i c p -> K1 i c p -> Bool # (>) :: K1 i c p -> K1 i c p -> Bool # (>=) :: K1 i c p -> K1 i c p -> Bool # max :: K1 i c p -> K1 i c p -> K1 i c p # min :: K1 i c p -> K1 i c p -> K1 i c p #
(Ord a, Ord b, Ord c, Ord d) => Ord (a, b, c, d) |
Instance details Defined in GHC.Classes Methods compare :: (a, b, c, d) -> (a, b, c, d) -> Ordering # (<) :: (a, b, c, d) -> (a, b, c, d) -> Bool # (<=) :: (a, b, c, d) -> (a, b, c, d) -> Bool # (>) :: (a, b, c, d) -> (a, b, c, d) -> Bool # (>=) :: (a, b, c, d) -> (a, b, c, d) -> Bool # max :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) # min :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) #
Ord (f (g a)) => Ord (Compose f g a) | Since: base-4.18.0.0
Instance details Defined in Data.Functor.Compose Methods compare :: Compose f g a -> Compose f g a -> Ordering # (<) :: Compose f g a -> Compose f g a -> Bool # (<=) :: Compose f g a -> Compose f g a -> Bool # (>) :: Compose f g a -> Compose f g a -> Bool # (>=) :: Compose f g a -> Compose f g a -> Bool # max :: Compose f g a -> Compose f g a -> Compose f g a # min :: Compose f g a -> Compose f g a -> Compose f g a #
Ord (f (g p)) => Ord ((f :.: g) p) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Generics Methods compare :: (f :.: g) p -> (f :.: g) p -> Ordering # (<) :: (f :.: g) p -> (f :.: g) p -> Bool # (<=) :: (f :.: g) p -> (f :.: g) p -> Bool # (>) :: (f :.: g) p -> (f :.: g) p -> Bool # (>=) :: (f :.: g) p -> (f :.: g) p -> Bool # max :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p # min :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p #
Ord (f p) => Ord (M1 i c f p) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Generics Methods compare :: M1 i c f p -> M1 i c f p -> Ordering # (<) :: M1 i c f p -> M1 i c f p -> Bool # (<=) :: M1 i c f p -> M1 i c f p -> Bool # (>) :: M1 i c f p -> M1 i c f p -> Bool # (>=) :: M1 i c f p -> M1 i c f p -> Bool # max :: M1 i c f p -> M1 i c f p -> M1 i c f p # min :: M1 i c f p -> M1 i c f p -> M1 i c f p #
(Ord a, Ord b, Ord c, Ord d, Ord e) => Ord (a, b, c, d, e) |
Instance details Defined in GHC.Classes Methods compare :: (a, b, c, d, e) -> (a, b, c, d, e) -> Ordering # (<) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool # (<=) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool # (>) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool # (>=) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool # max :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) # min :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f) => Ord (a, b, c, d, e, f) |
Instance details Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Ordering # (<) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool # (<=) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool # (>) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool # (>=) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool # max :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) # min :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) #
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g) => Ord (a, b, c, d, e, f, g) |
Instance details Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Ordering # (<) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool # (<=) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool # (>) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool # (>=) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool # max :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) # min :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) #
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h) => Ord (a, b, c, d, e, f, g, h) |
Instance details Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Ordering # (<) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool # (<=) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool # (>) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool # (>=) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool # max :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) # min :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) #
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i) => Ord (a, b, c, d, e, f, g, h, i) |
Instance details Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Ordering # (<) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool # (<=) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool # (>) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool # (>=) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool # max :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) # min :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) #
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j) => Ord (a, b, c, d, e, f, g, h, i, j) |
Instance details Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Ordering # (<) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool # (<=) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool # (>) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool # (>=) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool # max :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) # min :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) #
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k) => Ord (a, b, c, d, e, f, g, h, i, j, k) |
Instance details Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Ordering # (<) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool # (<=) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool # (>) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool # (>=) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool # max :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) # min :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) #
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l) => Ord (a, b, c, d, e, f, g, h, i, j, k, l) |
Instance details Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Ordering # (<) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool # (<=) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool # (>) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool # (>=) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool # max :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) # min :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) #
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m) |
Instance details Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Ordering # (<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool # (<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool # (>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool # (>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool # max :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) # min :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) #
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m, Ord n) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m, n) |
Instance details Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Ordering # (<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool # (<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool # (>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool # (>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool # max :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) # min :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) #
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m, Ord n, Ord o) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) |
Instance details Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Ordering # (<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool # (<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool # (>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool # (>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool # max :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) # min :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #

class Eq a where #

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

The Haskell Report defines no laws for `Eq`. However, instances are encouraged to follow these properties:

Reflexivity
  `x == x` = `True`
Symmetry
  `x == y` = `y == x`
Transitivity
  if `x == y && y == z` = `True`, then `x == z` = `True`
Extensionality
  if `x == y` = `True` and `f` is a function whose return type is an instance of `Eq`, then `f x == f y` = `True`
Negation
  `x /= y` = `not (x == y)`

Minimal complete definition

(==) | (/=)

Methods

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

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

#### Instances

Instances details

Eq ByteArray | Since: base-4.17.0.0
Instance details Defined in Data.Array.Byte Methods (==) :: ByteArray -> ByteArray -> Bool # (/=) :: ByteArray -> ByteArray -> Bool #
Eq Timeout |
Instance details Defined in System.Timeout Methods (==) :: Timeout -> Timeout -> Bool # (/=) :: Timeout -> Timeout -> Bool #
Eq PinnedStatus |
Instance details Defined in Basement.Compat.Primitive Methods (==) :: PinnedStatus -> PinnedStatus -> Bool # (/=) :: PinnedStatus -> PinnedStatus -> Bool #
Eq Endianness |
Instance details Defined in Basement.Endianness Methods (==) :: Endianness -> Endianness -> Bool # (/=) :: Endianness -> Endianness -> Bool #
Eq OutOfBoundOperation |
Instance details Defined in Basement.Exception Methods (==) :: OutOfBoundOperation -> OutOfBoundOperation -> Bool # (/=) :: OutOfBoundOperation -> OutOfBoundOperation -> Bool #
Eq RecastDestinationSize |
Instance details Defined in Basement.Exception Methods (==) :: RecastDestinationSize -> RecastDestinationSize -> Bool # (/=) :: RecastDestinationSize -> RecastDestinationSize -> Bool #
Eq RecastSourceSize |
Instance details Defined in Basement.Exception Methods (==) :: RecastSourceSize -> RecastSourceSize -> Bool # (/=) :: RecastSourceSize -> RecastSourceSize -> Bool #
Eq Encoding |
Instance details Defined in Basement.String Methods (==) :: Encoding -> Encoding -> Bool # (/=) :: Encoding -> Encoding -> Bool #
Eq ASCII7_Invalid |
Instance details Defined in Basement.String.Encoding.ASCII7 Methods (==) :: ASCII7_Invalid -> ASCII7_Invalid -> Bool # (/=) :: ASCII7_Invalid -> ASCII7_Invalid -> Bool #
Eq ISO_8859_1_Invalid |
Instance details Defined in Basement.String.Encoding.ISO_8859_1 Methods (==) :: ISO_8859_1_Invalid -> ISO_8859_1_Invalid -> Bool # (/=) :: ISO_8859_1_Invalid -> ISO_8859_1_Invalid -> Bool #
Eq UTF16_Invalid |
Instance details Defined in Basement.String.Encoding.UTF16 Methods (==) :: UTF16_Invalid -> UTF16_Invalid -> Bool # (/=) :: UTF16_Invalid -> UTF16_Invalid -> Bool #
Eq UTF32_Invalid |
Instance details Defined in Basement.String.Encoding.UTF32 Methods (==) :: UTF32_Invalid -> UTF32_Invalid -> Bool # (/=) :: UTF32_Invalid -> UTF32_Invalid -> Bool #
Eq AsciiString |
Instance details Defined in Basement.Types.AsciiString Methods (==) :: AsciiString -> AsciiString -> Bool # (/=) :: AsciiString -> AsciiString -> Bool #
Eq Char7 |
Instance details Defined in Basement.Types.Char7 Methods (==) :: Char7 -> Char7 -> Bool # (/=) :: Char7 -> Char7 -> Bool #
Eq FileSize |
Instance details Defined in Basement.Types.OffsetSize Methods (==) :: FileSize -> FileSize -> Bool # (/=) :: FileSize -> FileSize -> Bool #
Eq Addr |
Instance details Defined in Basement.Types.Ptr Methods (==) :: Addr -> Addr -> Bool # (/=) :: Addr -> Addr -> Bool #
Eq Word128 |
Instance details Defined in Basement.Types.Word128 Methods (==) :: Word128 -> Word128 -> Bool # (/=) :: Word128 -> Word128 -> Bool #
Eq Word256 |
Instance details Defined in Basement.Types.Word256 Methods (==) :: Word256 -> Word256 -> Bool # (/=) :: Word256 -> Word256 -> Bool #
Eq String |
Instance details Defined in Basement.UTF8.Base Methods (==) :: String -> String -> Bool # (/=) :: String -> String -> Bool #
Eq CM |
Instance details Defined in Basement.UTF8.Types Methods (==) :: CM -> CM -> Bool # (/=) :: CM -> CM -> Bool #
Eq ValidationFailure |
Instance details Defined in Basement.UTF8.Types Methods (==) :: ValidationFailure -> ValidationFailure -> Bool # (/=) :: ValidationFailure -> ValidationFailure -> Bool #
Eq Bitmap # |
Instance details Defined in Foundation.Array.Bitmap Methods (==) :: Bitmap -> Bitmap -> Bool # (/=) :: Bitmap -> Bitmap -> Bool #
Eq CSV # |
Instance details Defined in Foundation.Format.CSV.Types Methods (==) :: CSV -> CSV -> Bool # (/=) :: CSV -> CSV -> Bool #
Eq Escaping # |
Instance details Defined in Foundation.Format.CSV.Types Methods (==) :: Escaping -> Escaping -> Bool # (/=) :: Escaping -> Escaping -> Bool #
Eq Field # |
Instance details Defined in Foundation.Format.CSV.Types Methods (==) :: Field -> Field -> Bool # (/=) :: Field -> Field -> Bool #
Eq Row # |
Instance details Defined in Foundation.Format.CSV.Types Methods (==) :: Row -> Row -> Bool # (/=) :: Row -> Row -> Bool #
Eq IPv4 # |
Instance details Defined in Foundation.Network.IPv4 Methods (==) :: IPv4 -> IPv4 -> Bool # (/=) :: IPv4 -> IPv4 -> Bool #
Eq IPv6 # |
Instance details Defined in Foundation.Network.IPv6 Methods (==) :: IPv6 -> IPv6 -> Bool # (/=) :: IPv6 -> IPv6 -> Bool #
Eq Sign # |
Instance details Defined in Foundation.Numerical Methods (==) :: Sign -> Sign -> Bool # (/=) :: Sign -> Sign -> Bool #
Eq And # |
Instance details Defined in Foundation.Parser Methods (==) :: And -> And -> Bool # (/=) :: And -> And -> Bool #
Eq Condition # |
Instance details Defined in Foundation.Parser Methods (==) :: Condition -> Condition -> Bool # (/=) :: Condition -> Condition -> Bool #
Eq PartialError # |
Instance details Defined in Foundation.Partial Methods (==) :: PartialError -> PartialError -> Bool # (/=) :: PartialError -> PartialError -> Bool #
Eq Arch # |
Instance details Defined in Foundation.System.Info Methods (==) :: Arch -> Arch -> Bool # (/=) :: Arch -> Arch -> Bool #
Eq OS # |
Instance details Defined in Foundation.System.Info Methods (==) :: OS -> OS -> Bool # (/=) :: OS -> OS -> Bool #
Eq NanoSeconds # |
Instance details Defined in Foundation.Time.Types Methods (==) :: NanoSeconds -> NanoSeconds -> Bool # (/=) :: NanoSeconds -> NanoSeconds -> Bool #
Eq Seconds # |
Instance details Defined in Foundation.Time.Types Methods (==) :: Seconds -> Seconds -> Bool # (/=) :: Seconds -> Seconds -> Bool #
Eq UUID # |
Instance details Defined in Foundation.UUID Methods (==) :: UUID -> UUID -> Bool # (/=) :: UUID -> UUID -> Bool #
Eq FileName # |
Instance details Defined in Foundation.VFS.FilePath Methods (==) :: FileName -> FileName -> Bool # (/=) :: FileName -> FileName -> Bool #
Eq FilePath # |
Instance details Defined in Foundation.VFS.FilePath Methods (==) :: FilePath -> FilePath -> Bool # (/=) :: FilePath -> FilePath -> Bool #
Eq Relativity # |
Instance details Defined in Foundation.VFS.FilePath Methods (==) :: Relativity -> Relativity -> Bool # (/=) :: Relativity -> Relativity -> Bool #
Eq BigNat |
Instance details Defined in GHC.Num.BigNat Methods (==) :: BigNat -> BigNat -> Bool # (/=) :: BigNat -> BigNat -> Bool #
Eq Void | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Base Methods (==) :: Void -> Void -> Bool # (/=) :: Void -> Void -> Bool #
Eq BlockReason | @since base-4.3.0.0
Instance details Defined in GHC.Internal.Conc.Sync Methods (==) :: BlockReason -> BlockReason -> Bool # (/=) :: BlockReason -> BlockReason -> Bool #
Eq ThreadId | @since base-4.2.0.0
Instance details Defined in GHC.Internal.Conc.Sync Methods (==) :: ThreadId -> ThreadId -> Bool # (/=) :: ThreadId -> ThreadId -> Bool #
Eq ThreadStatus | @since base-4.3.0.0
Instance details Defined in GHC.Internal.Conc.Sync Methods (==) :: ThreadStatus -> ThreadStatus -> Bool # (/=) :: ThreadStatus -> ThreadStatus -> Bool #
Eq Constr | Equality of constructors @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods (==) :: Constr -> Constr -> Bool # (/=) :: Constr -> Constr -> Bool #
Eq ConstrRep | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods (==) :: ConstrRep -> ConstrRep -> Bool # (/=) :: ConstrRep -> ConstrRep -> Bool #
Eq DataRep | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods (==) :: DataRep -> DataRep -> Bool # (/=) :: DataRep -> DataRep -> Bool #
Eq Fixity | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods (==) :: Fixity -> Fixity -> Bool # (/=) :: Fixity -> Fixity -> Bool #
Eq All | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods (==) :: All -> All -> Bool # (/=) :: All -> All -> Bool #
Eq Any | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods (==) :: Any -> Any -> Bool # (/=) :: Any -> Any -> Bool #
Eq SomeTypeRep |
Instance details Defined in GHC.Internal.Data.Typeable.Internal Methods (==) :: SomeTypeRep -> SomeTypeRep -> Bool # (/=) :: SomeTypeRep -> SomeTypeRep -> Bool #
Eq Version | @since base-2.01
Instance details Defined in GHC.Internal.Data.Version Methods (==) :: Version -> Version -> Bool # (/=) :: Version -> Version -> Bool #
Eq ErrorCall | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Exception Methods (==) :: ErrorCall -> ErrorCall -> Bool # (/=) :: ErrorCall -> ErrorCall -> Bool #
Eq ArithException | @since base-3.0
Instance details Defined in GHC.Internal.Exception.Type Methods (==) :: ArithException -> ArithException -> Bool # (/=) :: ArithException -> ArithException -> Bool #
Eq Errno | @since base-2.01
Instance details Defined in GHC.Internal.Foreign.C.Error Methods (==) :: Errno -> Errno -> Bool # (/=) :: Errno -> Errno -> Bool #
Eq CBool |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CBool -> CBool -> Bool # (/=) :: CBool -> CBool -> Bool #
Eq CChar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CChar -> CChar -> Bool # (/=) :: CChar -> CChar -> Bool #
Eq CClock |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CClock -> CClock -> Bool # (/=) :: CClock -> CClock -> Bool #
Eq CDouble |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CDouble -> CDouble -> Bool # (/=) :: CDouble -> CDouble -> Bool #
Eq CFloat |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CFloat -> CFloat -> Bool # (/=) :: CFloat -> CFloat -> Bool #
Eq CInt |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CInt -> CInt -> Bool # (/=) :: CInt -> CInt -> Bool #
Eq CIntMax |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CIntMax -> CIntMax -> Bool # (/=) :: CIntMax -> CIntMax -> Bool #
Eq CIntPtr |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CIntPtr -> CIntPtr -> Bool # (/=) :: CIntPtr -> CIntPtr -> Bool #
Eq CLLong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CLLong -> CLLong -> Bool # (/=) :: CLLong -> CLLong -> Bool #
Eq CLong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CLong -> CLong -> Bool # (/=) :: CLong -> CLong -> Bool #
Eq CPtrdiff |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CPtrdiff -> CPtrdiff -> Bool # (/=) :: CPtrdiff -> CPtrdiff -> Bool #
Eq CSChar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CSChar -> CSChar -> Bool # (/=) :: CSChar -> CSChar -> Bool #
Eq CSUSeconds |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CSUSeconds -> CSUSeconds -> Bool # (/=) :: CSUSeconds -> CSUSeconds -> Bool #
Eq CShort |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CShort -> CShort -> Bool # (/=) :: CShort -> CShort -> Bool #
Eq CSigAtomic |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CSigAtomic -> CSigAtomic -> Bool # (/=) :: CSigAtomic -> CSigAtomic -> Bool #
Eq CSize |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CSize -> CSize -> Bool # (/=) :: CSize -> CSize -> Bool #
Eq CTime |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CTime -> CTime -> Bool # (/=) :: CTime -> CTime -> Bool #
Eq CUChar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CUChar -> CUChar -> Bool # (/=) :: CUChar -> CUChar -> Bool #
Eq CUInt |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CUInt -> CUInt -> Bool # (/=) :: CUInt -> CUInt -> Bool #
Eq CUIntMax |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CUIntMax -> CUIntMax -> Bool # (/=) :: CUIntMax -> CUIntMax -> Bool #
Eq CUIntPtr |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CUIntPtr -> CUIntPtr -> Bool # (/=) :: CUIntPtr -> CUIntPtr -> Bool #
Eq CULLong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CULLong -> CULLong -> Bool # (/=) :: CULLong -> CULLong -> Bool #
Eq CULong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CULong -> CULong -> Bool # (/=) :: CULong -> CULong -> Bool #
Eq CUSeconds |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CUSeconds -> CUSeconds -> Bool # (/=) :: CUSeconds -> CUSeconds -> Bool #
Eq CUShort |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CUShort -> CUShort -> Bool # (/=) :: CUShort -> CUShort -> Bool #
Eq CWchar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (==) :: CWchar -> CWchar -> Bool # (/=) :: CWchar -> CWchar -> Bool #
Eq Associativity | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: Associativity -> Associativity -> Bool # (/=) :: Associativity -> Associativity -> Bool #
Eq DecidedStrictness | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: DecidedStrictness -> DecidedStrictness -> Bool # (/=) :: DecidedStrictness -> DecidedStrictness -> Bool #
Eq Fixity | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: Fixity -> Fixity -> Bool # (/=) :: Fixity -> Fixity -> Bool #
Eq SourceStrictness | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: SourceStrictness -> SourceStrictness -> Bool # (/=) :: SourceStrictness -> SourceStrictness -> Bool #
Eq SourceUnpackedness | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: SourceUnpackedness -> SourceUnpackedness -> Bool # (/=) :: SourceUnpackedness -> SourceUnpackedness -> Bool #
Eq MaskingState | @since base-4.3.0.0
Instance details Defined in GHC.Internal.IO Methods (==) :: MaskingState -> MaskingState -> Bool # (/=) :: MaskingState -> MaskingState -> Bool #
Eq IODeviceType | @since base-4.2.0.0
Instance details Defined in GHC.Internal.IO.Device Methods (==) :: IODeviceType -> IODeviceType -> Bool # (/=) :: IODeviceType -> IODeviceType -> Bool #
Eq SeekMode | @since base-4.2.0.0
Instance details Defined in GHC.Internal.IO.Device Methods (==) :: SeekMode -> SeekMode -> Bool # (/=) :: SeekMode -> SeekMode -> Bool #
Eq ArrayException | @since base-4.2.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods (==) :: ArrayException -> ArrayException -> Bool # (/=) :: ArrayException -> ArrayException -> Bool #
Eq AsyncException | @since base-4.2.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods (==) :: AsyncException -> AsyncException -> Bool # (/=) :: AsyncException -> AsyncException -> Bool #
Eq ExitCode |
Instance details Defined in GHC.Internal.IO.Exception Methods (==) :: ExitCode -> ExitCode -> Bool # (/=) :: ExitCode -> ExitCode -> Bool #
Eq IOErrorType | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods (==) :: IOErrorType -> IOErrorType -> Bool # (/=) :: IOErrorType -> IOErrorType -> Bool #
Eq IOException | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods (==) :: IOException -> IOException -> Bool # (/=) :: IOException -> IOException -> Bool #
Eq HandlePosn | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Handle Methods (==) :: HandlePosn -> HandlePosn -> Bool # (/=) :: HandlePosn -> HandlePosn -> Bool #
Eq BufferMode | @since base-4.2.0.0
Instance details Defined in GHC.Internal.IO.Handle.Types Methods (==) :: BufferMode -> BufferMode -> Bool # (/=) :: BufferMode -> BufferMode -> Bool #
Eq Handle | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Handle.Types Methods (==) :: Handle -> Handle -> Bool # (/=) :: Handle -> Handle -> Bool #
Eq Newline | @since base-4.2.0.0
Instance details Defined in GHC.Internal.IO.Handle.Types Methods (==) :: Newline -> Newline -> Bool # (/=) :: Newline -> Newline -> Bool #
Eq NewlineMode | @since base-4.2.0.0
Instance details Defined in GHC.Internal.IO.Handle.Types Methods (==) :: NewlineMode -> NewlineMode -> Bool # (/=) :: NewlineMode -> NewlineMode -> Bool #
Eq IOMode | @since base-4.2.0.0
Instance details Defined in GHC.Internal.IO.IOMode Methods (==) :: IOMode -> IOMode -> Bool # (/=) :: IOMode -> IOMode -> Bool #
Eq Int16 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods (==) :: Int16 -> Int16 -> Bool # (/=) :: Int16 -> Int16 -> Bool #
Eq Int32 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods (==) :: Int32 -> Int32 -> Bool # (/=) :: Int32 -> Int32 -> Bool #
Eq Int64 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods (==) :: Int64 -> Int64 -> Bool # (/=) :: Int64 -> Int64 -> Bool #
Eq Int8 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods (==) :: Int8 -> Int8 -> Bool # (/=) :: Int8 -> Int8 -> Bool #
Eq IoSubSystem |
Instance details Defined in GHC.Internal.RTS.Flags Methods (==) :: IoSubSystem -> IoSubSystem -> Bool # (/=) :: IoSubSystem -> IoSubSystem -> Bool #
Eq SrcLoc | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Stack.Types Methods (==) :: SrcLoc -> SrcLoc -> Bool # (/=) :: SrcLoc -> SrcLoc -> Bool #
Eq CBlkCnt |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (==) :: CBlkCnt -> CBlkCnt -> Bool # (/=) :: CBlkCnt -> CBlkCnt -> Bool #
Eq CBlkSize |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (==) :: CBlkSize -> CBlkSize -> Bool # (/=) :: CBlkSize -> CBlkSize -> Bool #
Eq CCc |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (==) :: CCc -> CCc -> Bool # (/=) :: CCc -> CCc -> Bool #
Eq CClockId |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (==) :: CClockId -> CClockId -> Bool # (/=) :: CClockId -> CClockId -> Bool #
Eq CDev |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (==) :: CDev -> CDev -> Bool # (/=) :: CDev -> CDev -> Bool #
Eq CFsBlkCnt |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (==) :: CFsBlkCnt -> CFsBlkCnt -> Bool # (/=) :: CFsBlkCnt -> CFsBlkCnt -> Bool #
Eq CFsFilCnt |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (==) :: CFsFilCnt -> CFsFilCnt -> Bool # (/=) :: CFsFilCnt -> CFsFilCnt -> Bool #
Eq CGid |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (==) :: CGid -> CGid -> Bool # (/=) :: CGid -> CGid -> Bool #
Eq CId |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (==) :: CId -> CId -> Bool # (/=) :: CId -> CId -> Bool #
Eq CIno |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (==) :: CIno -> CIno -> Bool # (/=) :: CIno -> CIno -> Bool #
Eq CKey |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (==) :: CKey -> CKey -> Bool # (/=) :: CKey -> CKey -> Bool #
Eq CMode |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (==) :: CMode -> CMode -> Bool # (/=) :: CMode -> CMode -> Bool #
Eq CNfds |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (==) :: CNfds -> CNfds -> Bool # (/=) :: CNfds -> CNfds -> Bool #
Eq CNlink |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (==) :: CNlink -> CNlink -> Bool # (/=) :: CNlink -> CNlink -> Bool #
Eq COff |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (==) :: COff -> COff -> Bool # (/=) :: COff -> COff -> Bool #
Eq CPid |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (==) :: CPid -> CPid -> Bool # (/=) :: CPid -> CPid -> Bool #
Eq CRLim |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (==) :: CRLim -> CRLim -> Bool # (/=) :: CRLim -> CRLim -> Bool #
Eq CSocklen |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (==) :: CSocklen -> CSocklen -> Bool # (/=) :: CSocklen -> CSocklen -> Bool #
Eq CSpeed |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (==) :: CSpeed -> CSpeed -> Bool # (/=) :: CSpeed -> CSpeed -> Bool #
Eq CSsize |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (==) :: CSsize -> CSsize -> Bool # (/=) :: CSsize -> CSsize -> Bool #
Eq CTcflag |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (==) :: CTcflag -> CTcflag -> Bool # (/=) :: CTcflag -> CTcflag -> Bool #
Eq CTimer |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (==) :: CTimer -> CTimer -> Bool # (/=) :: CTimer -> CTimer -> Bool #
Eq CUid |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (==) :: CUid -> CUid -> Bool # (/=) :: CUid -> CUid -> Bool #
Eq Fd |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (==) :: Fd -> Fd -> Bool # (/=) :: Fd -> Fd -> Bool #
Eq SomeNat | @since base-4.7.0.0
Instance details Defined in GHC.Internal.TypeNats Methods (==) :: SomeNat -> SomeNat -> Bool # (/=) :: SomeNat -> SomeNat -> Bool #
Eq GeneralCategory | @since base-2.01
Instance details Defined in GHC.Internal.Unicode Methods (==) :: GeneralCategory -> GeneralCategory -> Bool # (/=) :: GeneralCategory -> GeneralCategory -> Bool #
Eq Word16 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods (==) :: Word16 -> Word16 -> Bool # (/=) :: Word16 -> Word16 -> Bool #
Eq Word32 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods (==) :: Word32 -> Word32 -> Bool # (/=) :: Word32 -> Word32 -> Bool #
Eq Word64 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods (==) :: Word64 -> Word64 -> Bool # (/=) :: Word64 -> Word64 -> Bool #
Eq Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods (==) :: Word8 -> Word8 -> Bool # (/=) :: Word8 -> Word8 -> Bool #
Eq Module |
Instance details Defined in GHC.Classes Methods (==) :: Module -> Module -> Bool # (/=) :: Module -> Module -> Bool #
Eq Ordering |
Instance details Defined in GHC.Classes Methods (==) :: Ordering -> Ordering -> Bool # (/=) :: Ordering -> Ordering -> Bool #
Eq TrName |
Instance details Defined in GHC.Classes Methods (==) :: TrName -> TrName -> Bool # (/=) :: TrName -> TrName -> Bool #
Eq TyCon |
Instance details Defined in GHC.Classes Methods (==) :: TyCon -> TyCon -> Bool # (/=) :: TyCon -> TyCon -> Bool #
Eq Integer |
Instance details Defined in GHC.Num.Integer Methods (==) :: Integer -> Integer -> Bool # (/=) :: Integer -> Integer -> Bool #
Eq Natural |
Instance details Defined in GHC.Num.Natural Methods (==) :: Natural -> Natural -> Bool # (/=) :: Natural -> Natural -> Bool #
Eq () |
Instance details Defined in GHC.Classes Methods (==) :: () -> () -> Bool # (/=) :: () -> () -> Bool #
Eq Bool |
Instance details Defined in GHC.Classes Methods (==) :: Bool -> Bool -> Bool # (/=) :: Bool -> Bool -> Bool #
Eq Char |
Instance details Defined in GHC.Classes Methods (==) :: Char -> Char -> Bool # (/=) :: Char -> Char -> Bool #
Eq Double | Note that due to the presence of `NaN`, `Double`'s `Eq` instance does not satisfy reflexivity.
    >>> 0/0 == (0/0 :: Double)
    False
Also note that `Double`'s `Eq` instance does not satisfy substitutivity:
    >>> 0 == (-0 :: Double)
    True
    >>> recip 0 == recip (-0 :: Double)
    False
Instance details Defined in GHC.Classes Methods (==) :: Double -> Double -> Bool # (/=) :: Double -> Double -> Bool #
Eq Float | Note that due to the presence of `NaN`, `Float`'s `Eq` instance does not satisfy reflexivity.
    >>> 0/0 == (0/0 :: Float)
    False
Also note that `Float`'s `Eq` instance does not satisfy extensionality:
    >>> 0 == (-0 :: Float)
    True
    >>> recip 0 == recip (-0 :: Float)
    False
Instance details Defined in GHC.Classes Methods (==) :: Float -> Float -> Bool # (/=) :: Float -> Float -> Bool #
Eq Int |
Instance details Defined in GHC.Classes Methods (==) :: Int -> Int -> Bool # (/=) :: Int -> Int -> Bool #
Eq Word |
Instance details Defined in GHC.Classes Methods (==) :: Word -> Word -> Bool # (/=) :: Word -> Word -> Bool #
Eq (Chan a) | Since: base-4.4.0.0
Instance details Defined in Control.Concurrent.Chan Methods (==) :: Chan a -> Chan a -> Bool # (/=) :: Chan a -> Chan a -> Bool #
Eq (MutableByteArray s) | Since: base-4.17.0.0
Instance details Defined in Data.Array.Byte Methods (==) :: MutableByteArray s -> MutableByteArray s -> Bool # (/=) :: MutableByteArray s -> MutableByteArray s -> Bool #
Eq a => Eq (Complex a) | Since: base-2.1
Instance details Defined in Data.Complex Methods (==) :: Complex a -> Complex a -> Bool # (/=) :: Complex a -> Complex a -> Bool #
Eq a => Eq (First a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods (==) :: First a -> First a -> Bool # (/=) :: First a -> First a -> Bool #
Eq a => Eq (Last a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods (==) :: Last a -> Last a -> Bool # (/=) :: Last a -> Last a -> Bool #
Eq a => Eq (Max a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods (==) :: Max a -> Max a -> Bool # (/=) :: Max a -> Max a -> Bool #
Eq a => Eq (Min a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods (==) :: Min a -> Min a -> Bool # (/=) :: Min a -> Min a -> Bool #
Eq m => Eq (WrappedMonoid m) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods (==) :: WrappedMonoid m -> WrappedMonoid m -> Bool # (/=) :: WrappedMonoid m -> WrappedMonoid m -> Bool #
Eq (Bits n) |
Instance details Defined in Basement.Bits Methods (==) :: Bits n -> Bits n -> Bool # (/=) :: Bits n -> Bits n -> Bool #
(PrimType ty, Eq ty) => Eq (Block ty) |
Instance details Defined in Basement.Block.Base Methods (==) :: Block ty -> Block ty -> Bool # (/=) :: Block ty -> Block ty -> Bool #
Eq (Zn n) |
Instance details Defined in Basement.Bounded Methods (==) :: Zn n -> Zn n -> Bool # (/=) :: Zn n -> Zn n -> Bool #
Eq (Zn64 n) |
Instance details Defined in Basement.Bounded Methods (==) :: Zn64 n -> Zn64 n -> Bool # (/=) :: Zn64 n -> Zn64 n -> Bool #
Eq a => Eq (Array a) |
Instance details Defined in Basement.BoxedArray Methods (==) :: Array a -> Array a -> Bool # (/=) :: Array a -> Array a -> Bool #
Eq a => Eq (BE a) |
Instance details Defined in Basement.Endianness Methods (==) :: BE a -> BE a -> Bool # (/=) :: BE a -> BE a -> Bool #
Eq a => Eq (LE a) |
Instance details Defined in Basement.Endianness Methods (==) :: LE a -> LE a -> Bool # (/=) :: LE a -> LE a -> Bool #
Eq (FinalPtr a) |
Instance details Defined in Basement.FinalPtr Methods (==) :: FinalPtr a -> FinalPtr a -> Bool # (/=) :: FinalPtr a -> FinalPtr a -> Bool #
Eq a => Eq (NonEmpty a) |
Instance details Defined in Basement.NonEmpty Methods (==) :: NonEmpty a -> NonEmpty a -> Bool # (/=) :: NonEmpty a -> NonEmpty a -> Bool #
Eq (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize Methods (==) :: CountOf ty -> CountOf ty -> Bool # (/=) :: CountOf ty -> CountOf ty -> Bool #
Eq (Offset ty) |
Instance details Defined in Basement.Types.OffsetSize Methods (==) :: Offset ty -> Offset ty -> Bool # (/=) :: Offset ty -> Offset ty -> Bool #
(PrimType ty, Eq ty) => Eq (UArray ty) |
Instance details Defined in Basement.UArray.Base Methods (==) :: UArray ty -> UArray ty -> Bool # (/=) :: UArray ty -> UArray ty -> Bool #
PrimType ty => Eq (ChunkedUArray ty) # |
Instance details Defined in Foundation.Array.Chunked.Unboxed Methods (==) :: ChunkedUArray ty -> ChunkedUArray ty -> Bool # (/=) :: ChunkedUArray ty -> ChunkedUArray ty -> Bool #
Eq a => Eq (DList a) # |
Instance details Defined in Foundation.List.DList Methods (==) :: DList a -> DList a -> Bool # (/=) :: DList a -> DList a -> Bool #
Eq a => Eq (NonEmpty a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Base Methods (==) :: NonEmpty a -> NonEmpty a -> Bool # (/=) :: NonEmpty a -> NonEmpty a -> Bool #
Eq (TVar a) | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Conc.Sync Methods (==) :: TVar a -> TVar a -> Bool # (/=) :: TVar a -> TVar a -> Bool #
Eq a => Eq (Identity a) | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Functor.Identity Methods (==) :: Identity a -> Identity a -> Bool # (/=) :: Identity a -> Identity a -> Bool #
Eq a => Eq (First a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Monoid Methods (==) :: First a -> First a -> Bool # (/=) :: First a -> First a -> Bool #
Eq a => Eq (Last a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Monoid Methods (==) :: Last a -> Last a -> Bool # (/=) :: Last a -> Last a -> Bool #
Eq a => Eq (Dual a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods (==) :: Dual a -> Dual a -> Bool # (/=) :: Dual a -> Dual a -> Bool #
Eq a => Eq (Product a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods (==) :: Product a -> Product a -> Bool # (/=) :: Product a -> Product a -> Bool #
Eq a => Eq (Sum a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods (==) :: Sum a -> Sum a -> Bool # (/=) :: Sum a -> Sum a -> Bool #
Eq (ForeignPtr a) | @since base-2.01
Instance details Defined in GHC.Internal.ForeignPtr Methods (==) :: ForeignPtr a -> ForeignPtr a -> Bool # (/=) :: ForeignPtr a -> ForeignPtr a -> Bool #
Eq a => Eq (ZipList a) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Functor.ZipList Methods (==) :: ZipList a -> ZipList a -> Bool # (/=) :: ZipList a -> ZipList a -> Bool #
Eq p => Eq (Par1 p) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: Par1 p -> Par1 p -> Bool # (/=) :: Par1 p -> Par1 p -> Bool #
Eq (IORef a) | Pointer equality. @since base-4.0.0.0
Instance details Defined in GHC.Internal.IORef Methods (==) :: IORef a -> IORef a -> Bool # (/=) :: IORef a -> IORef a -> Bool #
Eq (FunPtr a) |
Instance details Defined in GHC.Internal.Ptr Methods (==) :: FunPtr a -> FunPtr a -> Bool # (/=) :: FunPtr a -> FunPtr a -> Bool #
Eq (Ptr a) | @since base-2.01
Instance details Defined in GHC.Internal.Ptr Methods (==) :: Ptr a -> Ptr a -> Bool # (/=) :: Ptr a -> Ptr a -> Bool #
Eq a => Eq (Ratio a) | @since base-2.01
Instance details Defined in GHC.Internal.Real Methods (==) :: Ratio a -> Ratio a -> Bool # (/=) :: Ratio a -> Ratio a -> Bool #
Eq (SNat n) | @since base-4.19.0.0
Instance details Defined in GHC.Internal.TypeNats Methods (==) :: SNat n -> SNat n -> Bool # (/=) :: SNat n -> SNat n -> Bool #
Eq a => Eq (Maybe a) | @since base-2.01
Instance details Defined in GHC.Internal.Maybe Methods (==) :: Maybe a -> Maybe a -> Bool # (/=) :: Maybe a -> Maybe a -> Bool #
Eq a => Eq (Solo a) |
Instance details Defined in GHC.Classes Methods (==) :: Solo a -> Solo a -> Bool # (/=) :: Solo a -> Solo a -> Bool #
Eq a => Eq [a] |
Instance details Defined in GHC.Classes Methods (==) :: [a] -> [a] -> Bool # (/=) :: [a] -> [a] -> Bool #
Eq (Fixed a) | Since: base-2.1
Instance details Defined in Data.Fixed Methods (==) :: Fixed a -> Fixed a -> Bool # (/=) :: Fixed a -> Fixed a -> Bool #
Eq a => Eq (Arg a b) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods (==) :: Arg a b -> Arg a b -> Bool # (/=) :: Arg a b -> Arg a b -> Bool #
PrimType a => Eq (BlockN n a) |
Instance details Defined in Basement.Sized.Block Methods (==) :: BlockN n a -> BlockN n a -> Bool # (/=) :: BlockN n a -> BlockN n a -> Bool #
Eq a => Eq (ListN n a) |
Instance details Defined in Basement.Sized.List Methods (==) :: ListN n a -> ListN n a -> Bool # (/=) :: ListN n a -> ListN n a -> Bool #
PrimType a => Eq (UVect n a) |
Instance details Defined in Basement.Sized.UVect Methods (==) :: UVect n a -> UVect n a -> Bool # (/=) :: UVect n a -> UVect n a -> Bool #
Eq a => Eq (Vect n a) |
Instance details Defined in Basement.Sized.Vect Methods (==) :: Vect n a -> Vect n a -> Bool # (/=) :: Vect n a -> Vect n a -> Bool #
(Eq a, Eq b) => Eq (These a b) |
Instance details Defined in Basement.These Methods (==) :: These a b -> These a b -> Bool # (/=) :: These a b -> These a b -> Bool #
(Eq a, Eq b) => Eq (Tuple2 a b) # |
Instance details Defined in Foundation.Tuple Methods (==) :: Tuple2 a b -> Tuple2 a b -> Bool # (/=) :: Tuple2 a b -> Tuple2 a b -> Bool #
(Eq a, Eq b) => Eq (Either a b) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Either Methods (==) :: Either a b -> Either a b -> Bool # (/=) :: Either a b -> Either a b -> Bool #
Eq (Proxy s) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Proxy Methods (==) :: Proxy s -> Proxy s -> Bool # (/=) :: Proxy s -> Proxy s -> Bool #
Eq (TypeRep a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Typeable.Internal Methods (==) :: TypeRep a -> TypeRep a -> Bool # (/=) :: TypeRep a -> TypeRep a -> Bool #
Eq (U1 p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: U1 p -> U1 p -> Bool # (/=) :: U1 p -> U1 p -> Bool #
Eq (V1 p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: V1 p -> V1 p -> Bool # (/=) :: V1 p -> V1 p -> Bool #
(Eq a, Eq b) => Eq (a, b) |
Instance details Defined in GHC.Classes Methods (==) :: (a, b) -> (a, b) -> Bool # (/=) :: (a, b) -> (a, b) -> Bool #
(Eq a, Eq b, Eq c) => Eq (Tuple3 a b c) # |
Instance details Defined in Foundation.Tuple Methods (==) :: Tuple3 a b c -> Tuple3 a b c -> Bool # (/=) :: Tuple3 a b c -> Tuple3 a b c -> Bool #
Eq a => Eq (Const a b) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Functor.Const Methods (==) :: Const a b -> Const a b -> Bool # (/=) :: Const a b -> Const a b -> Bool #
Eq (f a) => Eq (Ap f a) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Data.Monoid Methods (==) :: Ap f a -> Ap f a -> Bool # (/=) :: Ap f a -> Ap f a -> Bool #
Eq (f a) => Eq (Alt f a) | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods (==) :: Alt f a -> Alt f a -> Bool # (/=) :: Alt f a -> Alt f a -> Bool #
Eq (OrderingI a b) |
Instance details Defined in GHC.Internal.Data.Type.Ord Methods (==) :: OrderingI a b -> OrderingI a b -> Bool # (/=) :: OrderingI a b -> OrderingI a b -> Bool #
(Generic1 f, Eq (Rep1 f a)) => Eq (Generically1 f a) | @since base-4.18.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: Generically1 f a -> Generically1 f a -> Bool # (/=) :: Generically1 f a -> Generically1 f a -> Bool #
Eq (f p) => Eq (Rec1 f p) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: Rec1 f p -> Rec1 f p -> Bool # (/=) :: Rec1 f p -> Rec1 f p -> Bool #
Eq (URec (Ptr ()) p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool # (/=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #
Eq (URec Char p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: URec Char p -> URec Char p -> Bool # (/=) :: URec Char p -> URec Char p -> Bool #
Eq (URec Double p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: URec Double p -> URec Double p -> Bool # (/=) :: URec Double p -> URec Double p -> Bool #
Eq (URec Float p) |
Instance details Defined in GHC.Internal.Generics Methods (==) :: URec Float p -> URec Float p -> Bool # (/=) :: URec Float p -> URec Float p -> Bool #
Eq (URec Int p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: URec Int p -> URec Int p -> Bool # (/=) :: URec Int p -> URec Int p -> Bool #
Eq (URec Word p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: URec Word p -> URec Word p -> Bool # (/=) :: URec Word p -> URec Word p -> Bool #
(Eq a, Eq b, Eq c) => Eq (a, b, c) |
Instance details Defined in GHC.Classes Methods (==) :: (a, b, c) -> (a, b, c) -> Bool # (/=) :: (a, b, c) -> (a, b, c) -> Bool #
(Eq (f a), Eq (g a)) => Eq (Product f g a) | Since: base-4.18.0.0
Instance details Defined in Data.Functor.Product Methods (==) :: Product f g a -> Product f g a -> Bool # (/=) :: Product f g a -> Product f g a -> Bool #
(Eq (f a), Eq (g a)) => Eq (Sum f g a) | Since: base-4.18.0.0
Instance details Defined in Data.Functor.Sum Methods (==) :: Sum f g a -> Sum f g a -> Bool # (/=) :: Sum f g a -> Sum f g a -> Bool #
(Eq a, Eq b, Eq c, Eq d) => Eq (Tuple4 a b c d) # |
Instance details Defined in Foundation.Tuple Methods (==) :: Tuple4 a b c d -> Tuple4 a b c d -> Bool # (/=) :: Tuple4 a b c d -> Tuple4 a b c d -> Bool #
(Eq (f p), Eq (g p)) => Eq ((f :*: g) p) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: (f :*: g) p -> (f :*: g) p -> Bool # (/=) :: (f :*: g) p -> (f :*: g) p -> Bool #
(Eq (f p), Eq (g p)) => Eq ((f :+: g) p) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: (f :+: g) p -> (f :+: g) p -> Bool # (/=) :: (f :+: g) p -> (f :+: g) p -> Bool #
Eq c => Eq (K1 i c p) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: K1 i c p -> K1 i c p -> Bool # (/=) :: K1 i c p -> K1 i c p -> Bool #
(Eq a, Eq b, Eq c, Eq d) => Eq (a, b, c, d) |
Instance details Defined in GHC.Classes Methods (==) :: (a, b, c, d) -> (a, b, c, d) -> Bool # (/=) :: (a, b, c, d) -> (a, b, c, d) -> Bool #
Eq (f (g a)) => Eq (Compose f g a) | Since: base-4.18.0.0
Instance details Defined in Data.Functor.Compose Methods (==) :: Compose f g a -> Compose f g a -> Bool # (/=) :: Compose f g a -> Compose f g a -> Bool #
Eq (f (g p)) => Eq ((f :.: g) p) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: (f :.: g) p -> (f :.: g) p -> Bool # (/=) :: (f :.: g) p -> (f :.: g) p -> Bool #
Eq (f p) => Eq (M1 i c f p) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: M1 i c f p -> M1 i c f p -> Bool # (/=) :: M1 i c f p -> M1 i c f p -> Bool #
(Eq a, Eq b, Eq c, Eq d, Eq e) => Eq (a, b, c, d, e) |
Instance details Defined in GHC.Classes Methods (==) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool # (/=) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool #
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f) => Eq (a, b, c, d, e, f) |
Instance details Defined in GHC.Classes Methods (==) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool # (/=) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool #
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g) => Eq (a, b, c, d, e, f, g) |
Instance details Defined in GHC.Classes Methods (==) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool # (/=) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool #
(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) |
Instance details Defined in GHC.Classes Methods (==) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool # (/=) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool #
(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) |
Instance details Defined in GHC.Classes Methods (==) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool # (/=) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool #
(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) |
Instance details Defined in GHC.Classes Methods (==) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool # (/=) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool #
(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) |
Instance details Defined in GHC.Classes Methods (==) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool # (/=) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool #
(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) |
Instance details Defined in GHC.Classes 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 # (/=) :: (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 #
(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) |
Instance details Defined in GHC.Classes 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 # (/=) :: (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 #
(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) |
Instance details Defined in GHC.Classes 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 # (/=) :: (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 #
(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) |
Instance details Defined in GHC.Classes 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 # (/=) :: (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 #

class Bounded a where #

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

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

Methods

minBound :: a #

maxBound :: a #

#### Instances

Instances details

Bounded Encoding |
Instance details Defined in Basement.String Methods minBound :: Encoding # maxBound :: Encoding #
Bounded UTF32_Invalid |
Instance details Defined in Basement.String.Encoding.UTF32 Methods minBound :: UTF32_Invalid # maxBound :: UTF32_Invalid #
Bounded Word128 |
Instance details Defined in Basement.Types.Word128 Methods minBound :: Word128 # maxBound :: Word128 #
Bounded Word256 |
Instance details Defined in Basement.Types.Word256 Methods minBound :: Word256 # maxBound :: Word256 #
Bounded Escaping # |
Instance details Defined in Foundation.Format.CSV.Types Methods minBound :: Escaping # maxBound :: Escaping #
Bounded Arch # |
Instance details Defined in Foundation.System.Info Methods minBound :: Arch # maxBound :: Arch #
Bounded OS # |
Instance details Defined in Foundation.System.Info Methods minBound :: OS # maxBound :: OS #
Bounded NanoSeconds # |
Instance details Defined in Foundation.Time.Types Methods minBound :: NanoSeconds # maxBound :: NanoSeconds #
Bounded Seconds # |
Instance details Defined in Foundation.Time.Types Methods minBound :: Seconds # maxBound :: Seconds #
Bounded All | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods minBound :: All # maxBound :: All #
Bounded Any | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods minBound :: Any # maxBound :: Any #
Bounded CBool |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods minBound :: CBool # maxBound :: CBool #
Bounded CChar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods minBound :: CChar # maxBound :: CChar #
Bounded CInt |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods minBound :: CInt # maxBound :: CInt #
Bounded CIntMax |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods minBound :: CIntMax # maxBound :: CIntMax #
Bounded CIntPtr |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods minBound :: CIntPtr # maxBound :: CIntPtr #
Bounded CLLong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods minBound :: CLLong # maxBound :: CLLong #
Bounded CLong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods minBound :: CLong # maxBound :: CLong #
Bounded CPtrdiff |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods minBound :: CPtrdiff # maxBound :: CPtrdiff #
Bounded CSChar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods minBound :: CSChar # maxBound :: CSChar #
Bounded CShort |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods minBound :: CShort # maxBound :: CShort #
Bounded CSigAtomic |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods minBound :: CSigAtomic # maxBound :: CSigAtomic #
Bounded CSize |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods minBound :: CSize # maxBound :: CSize #
Bounded CUChar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods minBound :: CUChar # maxBound :: CUChar #
Bounded CUInt |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods minBound :: CUInt # maxBound :: CUInt #
Bounded CUIntMax |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods minBound :: CUIntMax # maxBound :: CUIntMax #
Bounded CUIntPtr |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods minBound :: CUIntPtr # maxBound :: CUIntPtr #
Bounded CULLong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods minBound :: CULLong # maxBound :: CULLong #
Bounded CULong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods minBound :: CULong # maxBound :: CULong #
Bounded CUShort |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods minBound :: CUShort # maxBound :: CUShort #
Bounded CWchar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods minBound :: CWchar # maxBound :: CWchar #
Bounded Associativity | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods minBound :: Associativity # maxBound :: Associativity #
Bounded DecidedStrictness | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods minBound :: DecidedStrictness # maxBound :: DecidedStrictness #
Bounded SourceStrictness | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods minBound :: SourceStrictness # maxBound :: SourceStrictness #
Bounded SourceUnpackedness | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods minBound :: SourceUnpackedness # maxBound :: SourceUnpackedness #
Bounded Int16 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods minBound :: Int16 # maxBound :: Int16 #
Bounded Int32 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods minBound :: Int32 # maxBound :: Int32 #
Bounded Int64 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods minBound :: Int64 # maxBound :: Int64 #
Bounded Int8 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods minBound :: Int8 # maxBound :: Int8 #
Bounded CBlkCnt |
Instance details Defined in GHC.Internal.System.Posix.Types Methods minBound :: CBlkCnt # maxBound :: CBlkCnt #
Bounded CBlkSize |
Instance details Defined in GHC.Internal.System.Posix.Types Methods minBound :: CBlkSize # maxBound :: CBlkSize #
Bounded CClockId |
Instance details Defined in GHC.Internal.System.Posix.Types Methods minBound :: CClockId # maxBound :: CClockId #
Bounded CDev |
Instance details Defined in GHC.Internal.System.Posix.Types Methods minBound :: CDev # maxBound :: CDev #
Bounded CFsBlkCnt |
Instance details Defined in GHC.Internal.System.Posix.Types Methods minBound :: CFsBlkCnt # maxBound :: CFsBlkCnt #
Bounded CFsFilCnt |
Instance details Defined in GHC.Internal.System.Posix.Types Methods minBound :: CFsFilCnt # maxBound :: CFsFilCnt #
Bounded CGid |
Instance details Defined in GHC.Internal.System.Posix.Types Methods minBound :: CGid # maxBound :: CGid #
Bounded CId |
Instance details Defined in GHC.Internal.System.Posix.Types Methods minBound :: CId # maxBound :: CId #
Bounded CIno |
Instance details Defined in GHC.Internal.System.Posix.Types Methods minBound :: CIno # maxBound :: CIno #
Bounded CKey |
Instance details Defined in GHC.Internal.System.Posix.Types Methods minBound :: CKey # maxBound :: CKey #
Bounded CMode |
Instance details Defined in GHC.Internal.System.Posix.Types Methods minBound :: CMode # maxBound :: CMode #
Bounded CNfds |
Instance details Defined in GHC.Internal.System.Posix.Types Methods minBound :: CNfds # maxBound :: CNfds #
Bounded CNlink |
Instance details Defined in GHC.Internal.System.Posix.Types Methods minBound :: CNlink # maxBound :: CNlink #
Bounded COff |
Instance details Defined in GHC.Internal.System.Posix.Types Methods minBound :: COff # maxBound :: COff #
Bounded CPid |
Instance details Defined in GHC.Internal.System.Posix.Types Methods minBound :: CPid # maxBound :: CPid #
Bounded CRLim |
Instance details Defined in GHC.Internal.System.Posix.Types Methods minBound :: CRLim # maxBound :: CRLim #
Bounded CSocklen |
Instance details Defined in GHC.Internal.System.Posix.Types Methods minBound :: CSocklen # maxBound :: CSocklen #
Bounded CSsize |
Instance details Defined in GHC.Internal.System.Posix.Types Methods minBound :: CSsize # maxBound :: CSsize #
Bounded CTcflag |
Instance details Defined in GHC.Internal.System.Posix.Types Methods minBound :: CTcflag # maxBound :: CTcflag #
Bounded CUid |
Instance details Defined in GHC.Internal.System.Posix.Types Methods minBound :: CUid # maxBound :: CUid #
Bounded Fd |
Instance details Defined in GHC.Internal.System.Posix.Types Methods minBound :: Fd # maxBound :: Fd #
Bounded GeneralCategory | @since base-2.01
Instance details Defined in GHC.Internal.Unicode Methods minBound :: GeneralCategory # maxBound :: GeneralCategory #
Bounded Word16 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods minBound :: Word16 # maxBound :: Word16 #
Bounded Word32 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods minBound :: Word32 # maxBound :: Word32 #
Bounded Word64 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods minBound :: Word64 # maxBound :: Word64 #
Bounded Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods minBound :: Word8 # maxBound :: Word8 #
Bounded Ordering | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: Ordering # maxBound :: Ordering #
Bounded () | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: () # maxBound :: () #
Bounded Bool | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: Bool # maxBound :: Bool #
Bounded Char | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: Char # maxBound :: Char #
Bounded Int | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: Int # maxBound :: Int #
Bounded Levity | @since base-4.16.0.0
Instance details Defined in GHC.Internal.Enum Methods minBound :: Levity # maxBound :: Levity #
Bounded VecCount | @since base-4.10.0.0
Instance details Defined in GHC.Internal.Enum Methods minBound :: VecCount # maxBound :: VecCount #
Bounded VecElem | @since base-4.10.0.0
Instance details Defined in GHC.Internal.Enum Methods minBound :: VecElem # maxBound :: VecElem #
Bounded Word | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: Word # maxBound :: Word #
Bounded a => Bounded (First a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods minBound :: First a # maxBound :: First a #
Bounded a => Bounded (Last a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods minBound :: Last a # maxBound :: Last a #
Bounded a => Bounded (Max a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods minBound :: Max a # maxBound :: Max a #
Bounded a => Bounded (Min a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods minBound :: Min a # maxBound :: Min a #
Bounded m => Bounded (WrappedMonoid m) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods minBound :: WrappedMonoid m # maxBound :: WrappedMonoid m #
SizeValid n => Bounded (Bits n) |
Instance details Defined in Basement.Bits Methods minBound :: Bits n # maxBound :: Bits n #
Bounded a => Bounded (Identity a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Functor.Identity Methods minBound :: Identity a # maxBound :: Identity a #
Bounded a => Bounded (Dual a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods minBound :: Dual a # maxBound :: Dual a #
Bounded a => Bounded (Product a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods minBound :: Product a # maxBound :: Product a #
Bounded a => Bounded (Sum a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods minBound :: Sum a # maxBound :: Sum a #
Bounded a => Bounded (Solo a) |
Instance details Defined in GHC.Internal.Enum Methods minBound :: Solo a # maxBound :: Solo a #
Bounded (Proxy t) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Proxy Methods minBound :: Proxy t # maxBound :: Proxy t #
(Bounded a, Bounded b) => Bounded (a, b) | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: (a, b) # maxBound :: (a, b) #
Bounded a => Bounded (Const a b) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Functor.Const Methods minBound :: Const a b # maxBound :: Const a b #
(Applicative f, Bounded a) => Bounded (Ap f a) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Data.Monoid Methods minBound :: Ap f a # maxBound :: Ap f a #
(Bounded a, Bounded b, Bounded c) => Bounded (a, b, c) | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: (a, b, c) # maxBound :: (a, b, c) #
(Bounded a, Bounded b, Bounded c, Bounded d) => Bounded (a, b, c, d) | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: (a, b, c, d) # maxBound :: (a, b, c, d) #
Bounded (f (g a)) => Bounded (Compose f g a) | Since: base-4.19.0.0
Instance details Defined in Data.Functor.Compose Methods minBound :: Compose f g a # maxBound :: Compose f g a #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e) => Bounded (a, b, c, d, e) | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: (a, b, c, d, e) # maxBound :: (a, b, c, d, e) #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f) => Bounded (a, b, c, d, e, f) | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: (a, b, c, d, e, f) # maxBound :: (a, b, c, d, e, f) #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g) => Bounded (a, b, c, d, e, f, g) | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: (a, b, c, d, e, f, g) # maxBound :: (a, b, c, d, e, f, g) #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h) => Bounded (a, b, c, d, e, f, g, h) | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: (a, b, c, d, e, f, g, h) # maxBound :: (a, b, c, d, e, f, g, h) #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i) => Bounded (a, b, c, d, e, f, g, h, i) | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: (a, b, c, d, e, f, g, h, i) # maxBound :: (a, b, c, d, e, f, g, h, i) #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j) => Bounded (a, b, c, d, e, f, g, h, i, j) | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: (a, b, c, d, e, f, g, h, i, j) # maxBound :: (a, b, c, d, e, f, g, h, i, j) #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k) => Bounded (a, b, c, d, e, f, g, h, i, j, k) | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: (a, b, c, d, e, f, g, h, i, j, k) # maxBound :: (a, b, c, d, e, f, g, h, i, j, k) #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l) | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: (a, b, c, d, e, f, g, h, i, j, k, l) # maxBound :: (a, b, c, d, e, f, g, h, i, j, k, l) #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l, Bounded m) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l, m) | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m) # maxBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m) #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l, Bounded m, Bounded n) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l, m, n) | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) # maxBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) #
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l, Bounded m, Bounded n, Bounded o) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) # maxBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #

class Enum a where #

Class `Enum` defines operations on sequentially ordered types.

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

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

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

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

       enumFrom     x   = enumFromTo     x maxBound
       enumFromThen x y = enumFromThenTo x y bound
         where
           bound | fromEnum y >= fromEnum x = maxBound
                 | otherwise                = minBound

Minimal complete definition

toEnum, fromEnum

Methods

succ :: a -> a #

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

pred :: a -> a #

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

toEnum :: Int -> a #

Convert from an `Int`.

fromEnum :: a -> Int #

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

enumFrom :: a -> [a] #

Used in Haskell's translation of `[n..]` with `[n..] = enumFrom n`, a possible implementation being `enumFrom n = n : enumFrom (succ n)`.

#### Examples

Expand

-     enumFrom 4 :: [Integer] = [4,5,6,7,...]

-     enumFrom 6 :: [Int] = [6,7,8,9,...,maxBound :: Int]

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

Used in Haskell's translation of `[n,n'..]` with `[n,n'..] = enumFromThen n n'`, a possible implementation being `enumFromThen n n' = n : n' : worker (f x) (f x n')`, `worker s v = v : worker s (s v)`, `x = fromEnum n' - fromEnum n` and

      f n y
        | n > 0 = f (n - 1) (succ y)
        | n < 0 = f (n + 1) (pred y)
        | otherwise = y

#### Examples

Expand

-     enumFromThen 4 6 :: [Integer] = [4,6,8,10...]

-     enumFromThen 6 2 :: [Int] = [6,2,-2,-6,...,minBound :: Int]

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

Used in Haskell's translation of `[n..m]` with `[n..m] = enumFromTo n m`, a possible implementation being

      enumFromTo n m
         | n <= m = n : enumFromTo (succ n) m
         | otherwise = []

#### Examples

Expand

-     enumFromTo 6 10 :: [Int] = [6,7,8,9,10]

-     enumFromTo 42 1 :: [Integer] = []

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

Used in Haskell's translation of `[n,n'..m]` with `[n,n'..m] = enumFromThenTo n n' m`, a possible implementation being `enumFromThenTo n n' m = worker (f x) (c x) n m`, `x = fromEnum n' - fromEnum n`, `c x = bool (>=) ((x 0)`

      f n y
         | n > 0 = f (n - 1) (succ y)
         | n < 0 = f (n + 1) (pred y)
         | otherwise = y

and

      worker s c v m
         | c v m = v : worker s c (s v) m
         | otherwise = []

#### Examples

Expand

-     enumFromThenTo 4 2 -6 :: [Integer] = [4,2,0,-2,-4,-6]

-     enumFromThenTo 6 8 2 :: [Int] = []

#### Instances

Instances details

Enum Encoding |
Instance details Defined in Basement.String Methods succ :: Encoding -> Encoding # pred :: Encoding -> Encoding # toEnum :: Int -> Encoding # fromEnum :: Encoding -> Int # enumFrom :: Encoding -> [Encoding] # enumFromThen :: Encoding -> Encoding -> [Encoding] # enumFromTo :: Encoding -> Encoding -> [Encoding] # enumFromThenTo :: Encoding -> Encoding -> Encoding -> [Encoding] #
Enum UTF32_Invalid |
Instance details Defined in Basement.String.Encoding.UTF32 Methods succ :: UTF32_Invalid -> UTF32_Invalid # pred :: UTF32_Invalid -> UTF32_Invalid # toEnum :: Int -> UTF32_Invalid # fromEnum :: UTF32_Invalid -> Int # enumFrom :: UTF32_Invalid -> [UTF32_Invalid] # enumFromThen :: UTF32_Invalid -> UTF32_Invalid -> [UTF32_Invalid] # enumFromTo :: UTF32_Invalid -> UTF32_Invalid -> [UTF32_Invalid] # enumFromThenTo :: UTF32_Invalid -> UTF32_Invalid -> UTF32_Invalid -> [UTF32_Invalid] #
Enum Word128 |
Instance details Defined in Basement.Types.Word128 Methods succ :: Word128 -> Word128 # pred :: Word128 -> Word128 # toEnum :: Int -> Word128 # fromEnum :: Word128 -> Int # enumFrom :: Word128 -> [Word128] # enumFromThen :: Word128 -> Word128 -> [Word128] # enumFromTo :: Word128 -> Word128 -> [Word128] # enumFromThenTo :: Word128 -> Word128 -> Word128 -> [Word128] #
Enum Word256 |
Instance details Defined in Basement.Types.Word256 Methods succ :: Word256 -> Word256 # pred :: Word256 -> Word256 # toEnum :: Int -> Word256 # fromEnum :: Word256 -> Int # enumFrom :: Word256 -> [Word256] # enumFromThen :: Word256 -> Word256 -> [Word256] # enumFromTo :: Word256 -> Word256 -> [Word256] # enumFromThenTo :: Word256 -> Word256 -> Word256 -> [Word256] #
Enum Escaping # |
Instance details Defined in Foundation.Format.CSV.Types Methods succ :: Escaping -> Escaping # pred :: Escaping -> Escaping # toEnum :: Int -> Escaping # fromEnum :: Escaping -> Int # enumFrom :: Escaping -> [Escaping] # enumFromThen :: Escaping -> Escaping -> [Escaping] # enumFromTo :: Escaping -> Escaping -> [Escaping] # enumFromThenTo :: Escaping -> Escaping -> Escaping -> [Escaping] #
Enum Arch # |
Instance details Defined in Foundation.System.Info Methods succ :: Arch -> Arch # pred :: Arch -> Arch # toEnum :: Int -> Arch # fromEnum :: Arch -> Int # enumFrom :: Arch -> [Arch] # enumFromThen :: Arch -> Arch -> [Arch] # enumFromTo :: Arch -> Arch -> [Arch] # enumFromThenTo :: Arch -> Arch -> Arch -> [Arch] #
Enum OS # |
Instance details Defined in Foundation.System.Info Methods succ :: OS -> OS # pred :: OS -> OS # toEnum :: Int -> OS # fromEnum :: OS -> Int # enumFrom :: OS -> [OS] # enumFromThen :: OS -> OS -> [OS] # enumFromTo :: OS -> OS -> [OS] # enumFromThenTo :: OS -> OS -> OS -> [OS] #
Enum NanoSeconds # |
Instance details Defined in Foundation.Time.Types Methods succ :: NanoSeconds -> NanoSeconds # pred :: NanoSeconds -> NanoSeconds # toEnum :: Int -> NanoSeconds # fromEnum :: NanoSeconds -> Int # enumFrom :: NanoSeconds -> [NanoSeconds] # enumFromThen :: NanoSeconds -> NanoSeconds -> [NanoSeconds] # enumFromTo :: NanoSeconds -> NanoSeconds -> [NanoSeconds] # enumFromThenTo :: NanoSeconds -> NanoSeconds -> NanoSeconds -> [NanoSeconds] #
Enum Seconds # |
Instance details Defined in Foundation.Time.Types Methods succ :: Seconds -> Seconds # pred :: Seconds -> Seconds # toEnum :: Int -> Seconds # fromEnum :: Seconds -> Int # enumFrom :: Seconds -> [Seconds] # enumFromThen :: Seconds -> Seconds -> [Seconds] # enumFromTo :: Seconds -> Seconds -> [Seconds] # enumFromThenTo :: Seconds -> Seconds -> Seconds -> [Seconds] #
Enum CBool |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CBool -> CBool # pred :: CBool -> CBool # toEnum :: Int -> CBool # fromEnum :: CBool -> Int # enumFrom :: CBool -> [CBool] # enumFromThen :: CBool -> CBool -> [CBool] # enumFromTo :: CBool -> CBool -> [CBool] # enumFromThenTo :: CBool -> CBool -> CBool -> [CBool] #
Enum CChar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CChar -> CChar # pred :: CChar -> CChar # toEnum :: Int -> CChar # fromEnum :: CChar -> Int # enumFrom :: CChar -> [CChar] # enumFromThen :: CChar -> CChar -> [CChar] # enumFromTo :: CChar -> CChar -> [CChar] # enumFromThenTo :: CChar -> CChar -> CChar -> [CChar] #
Enum CClock |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CClock -> CClock # pred :: CClock -> CClock # toEnum :: Int -> CClock # fromEnum :: CClock -> Int # enumFrom :: CClock -> [CClock] # enumFromThen :: CClock -> CClock -> [CClock] # enumFromTo :: CClock -> CClock -> [CClock] # enumFromThenTo :: CClock -> CClock -> CClock -> [CClock] #
Enum CDouble |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CDouble -> CDouble # pred :: CDouble -> CDouble # toEnum :: Int -> CDouble # fromEnum :: CDouble -> Int # enumFrom :: CDouble -> [CDouble] # enumFromThen :: CDouble -> CDouble -> [CDouble] # enumFromTo :: CDouble -> CDouble -> [CDouble] # enumFromThenTo :: CDouble -> CDouble -> CDouble -> [CDouble] #
Enum CFloat |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CFloat -> CFloat # pred :: CFloat -> CFloat # toEnum :: Int -> CFloat # fromEnum :: CFloat -> Int # enumFrom :: CFloat -> [CFloat] # enumFromThen :: CFloat -> CFloat -> [CFloat] # enumFromTo :: CFloat -> CFloat -> [CFloat] # enumFromThenTo :: CFloat -> CFloat -> CFloat -> [CFloat] #
Enum CInt |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CInt -> CInt # pred :: CInt -> CInt # toEnum :: Int -> CInt # fromEnum :: CInt -> Int # enumFrom :: CInt -> [CInt] # enumFromThen :: CInt -> CInt -> [CInt] # enumFromTo :: CInt -> CInt -> [CInt] # enumFromThenTo :: CInt -> CInt -> CInt -> [CInt] #
Enum CIntMax |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CIntMax -> CIntMax # pred :: CIntMax -> CIntMax # toEnum :: Int -> CIntMax # fromEnum :: CIntMax -> Int # enumFrom :: CIntMax -> [CIntMax] # enumFromThen :: CIntMax -> CIntMax -> [CIntMax] # enumFromTo :: CIntMax -> CIntMax -> [CIntMax] # enumFromThenTo :: CIntMax -> CIntMax -> CIntMax -> [CIntMax] #
Enum CIntPtr |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CIntPtr -> CIntPtr # pred :: CIntPtr -> CIntPtr # toEnum :: Int -> CIntPtr # fromEnum :: CIntPtr -> Int # enumFrom :: CIntPtr -> [CIntPtr] # enumFromThen :: CIntPtr -> CIntPtr -> [CIntPtr] # enumFromTo :: CIntPtr -> CIntPtr -> [CIntPtr] # enumFromThenTo :: CIntPtr -> CIntPtr -> CIntPtr -> [CIntPtr] #
Enum CLLong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CLLong -> CLLong # pred :: CLLong -> CLLong # toEnum :: Int -> CLLong # fromEnum :: CLLong -> Int # enumFrom :: CLLong -> [CLLong] # enumFromThen :: CLLong -> CLLong -> [CLLong] # enumFromTo :: CLLong -> CLLong -> [CLLong] # enumFromThenTo :: CLLong -> CLLong -> CLLong -> [CLLong] #
Enum CLong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CLong -> CLong # pred :: CLong -> CLong # toEnum :: Int -> CLong # fromEnum :: CLong -> Int # enumFrom :: CLong -> [CLong] # enumFromThen :: CLong -> CLong -> [CLong] # enumFromTo :: CLong -> CLong -> [CLong] # enumFromThenTo :: CLong -> CLong -> CLong -> [CLong] #
Enum CPtrdiff |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CPtrdiff -> CPtrdiff # pred :: CPtrdiff -> CPtrdiff # toEnum :: Int -> CPtrdiff # fromEnum :: CPtrdiff -> Int # enumFrom :: CPtrdiff -> [CPtrdiff] # enumFromThen :: CPtrdiff -> CPtrdiff -> [CPtrdiff] # enumFromTo :: CPtrdiff -> CPtrdiff -> [CPtrdiff] # enumFromThenTo :: CPtrdiff -> CPtrdiff -> CPtrdiff -> [CPtrdiff] #
Enum CSChar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CSChar -> CSChar # pred :: CSChar -> CSChar # toEnum :: Int -> CSChar # fromEnum :: CSChar -> Int # enumFrom :: CSChar -> [CSChar] # enumFromThen :: CSChar -> CSChar -> [CSChar] # enumFromTo :: CSChar -> CSChar -> [CSChar] # enumFromThenTo :: CSChar -> CSChar -> CSChar -> [CSChar] #
Enum CSUSeconds |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CSUSeconds -> CSUSeconds # pred :: CSUSeconds -> CSUSeconds # toEnum :: Int -> CSUSeconds # fromEnum :: CSUSeconds -> Int # enumFrom :: CSUSeconds -> [CSUSeconds] # enumFromThen :: CSUSeconds -> CSUSeconds -> [CSUSeconds] # enumFromTo :: CSUSeconds -> CSUSeconds -> [CSUSeconds] # enumFromThenTo :: CSUSeconds -> CSUSeconds -> CSUSeconds -> [CSUSeconds] #
Enum CShort |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CShort -> CShort # pred :: CShort -> CShort # toEnum :: Int -> CShort # fromEnum :: CShort -> Int # enumFrom :: CShort -> [CShort] # enumFromThen :: CShort -> CShort -> [CShort] # enumFromTo :: CShort -> CShort -> [CShort] # enumFromThenTo :: CShort -> CShort -> CShort -> [CShort] #
Enum CSigAtomic |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CSigAtomic -> CSigAtomic # pred :: CSigAtomic -> CSigAtomic # toEnum :: Int -> CSigAtomic # fromEnum :: CSigAtomic -> Int # enumFrom :: CSigAtomic -> [CSigAtomic] # enumFromThen :: CSigAtomic -> CSigAtomic -> [CSigAtomic] # enumFromTo :: CSigAtomic -> CSigAtomic -> [CSigAtomic] # enumFromThenTo :: CSigAtomic -> CSigAtomic -> CSigAtomic -> [CSigAtomic] #
Enum CSize |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CSize -> CSize # pred :: CSize -> CSize # toEnum :: Int -> CSize # fromEnum :: CSize -> Int # enumFrom :: CSize -> [CSize] # enumFromThen :: CSize -> CSize -> [CSize] # enumFromTo :: CSize -> CSize -> [CSize] # enumFromThenTo :: CSize -> CSize -> CSize -> [CSize] #
Enum CTime |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CTime -> CTime # pred :: CTime -> CTime # toEnum :: Int -> CTime # fromEnum :: CTime -> Int # enumFrom :: CTime -> [CTime] # enumFromThen :: CTime -> CTime -> [CTime] # enumFromTo :: CTime -> CTime -> [CTime] # enumFromThenTo :: CTime -> CTime -> CTime -> [CTime] #
Enum CUChar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CUChar -> CUChar # pred :: CUChar -> CUChar # toEnum :: Int -> CUChar # fromEnum :: CUChar -> Int # enumFrom :: CUChar -> [CUChar] # enumFromThen :: CUChar -> CUChar -> [CUChar] # enumFromTo :: CUChar -> CUChar -> [CUChar] # enumFromThenTo :: CUChar -> CUChar -> CUChar -> [CUChar] #
Enum CUInt |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CUInt -> CUInt # pred :: CUInt -> CUInt # toEnum :: Int -> CUInt # fromEnum :: CUInt -> Int # enumFrom :: CUInt -> [CUInt] # enumFromThen :: CUInt -> CUInt -> [CUInt] # enumFromTo :: CUInt -> CUInt -> [CUInt] # enumFromThenTo :: CUInt -> CUInt -> CUInt -> [CUInt] #
Enum CUIntMax |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CUIntMax -> CUIntMax # pred :: CUIntMax -> CUIntMax # toEnum :: Int -> CUIntMax # fromEnum :: CUIntMax -> Int # enumFrom :: CUIntMax -> [CUIntMax] # enumFromThen :: CUIntMax -> CUIntMax -> [CUIntMax] # enumFromTo :: CUIntMax -> CUIntMax -> [CUIntMax] # enumFromThenTo :: CUIntMax -> CUIntMax -> CUIntMax -> [CUIntMax] #
Enum CUIntPtr |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CUIntPtr -> CUIntPtr # pred :: CUIntPtr -> CUIntPtr # toEnum :: Int -> CUIntPtr # fromEnum :: CUIntPtr -> Int # enumFrom :: CUIntPtr -> [CUIntPtr] # enumFromThen :: CUIntPtr -> CUIntPtr -> [CUIntPtr] # enumFromTo :: CUIntPtr -> CUIntPtr -> [CUIntPtr] # enumFromThenTo :: CUIntPtr -> CUIntPtr -> CUIntPtr -> [CUIntPtr] #
Enum CULLong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CULLong -> CULLong # pred :: CULLong -> CULLong # toEnum :: Int -> CULLong # fromEnum :: CULLong -> Int # enumFrom :: CULLong -> [CULLong] # enumFromThen :: CULLong -> CULLong -> [CULLong] # enumFromTo :: CULLong -> CULLong -> [CULLong] # enumFromThenTo :: CULLong -> CULLong -> CULLong -> [CULLong] #
Enum CULong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CULong -> CULong # pred :: CULong -> CULong # toEnum :: Int -> CULong # fromEnum :: CULong -> Int # enumFrom :: CULong -> [CULong] # enumFromThen :: CULong -> CULong -> [CULong] # enumFromTo :: CULong -> CULong -> [CULong] # enumFromThenTo :: CULong -> CULong -> CULong -> [CULong] #
Enum CUSeconds |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CUSeconds -> CUSeconds # pred :: CUSeconds -> CUSeconds # toEnum :: Int -> CUSeconds # fromEnum :: CUSeconds -> Int # enumFrom :: CUSeconds -> [CUSeconds] # enumFromThen :: CUSeconds -> CUSeconds -> [CUSeconds] # enumFromTo :: CUSeconds -> CUSeconds -> [CUSeconds] # enumFromThenTo :: CUSeconds -> CUSeconds -> CUSeconds -> [CUSeconds] #
Enum CUShort |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CUShort -> CUShort # pred :: CUShort -> CUShort # toEnum :: Int -> CUShort # fromEnum :: CUShort -> Int # enumFrom :: CUShort -> [CUShort] # enumFromThen :: CUShort -> CUShort -> [CUShort] # enumFromTo :: CUShort -> CUShort -> [CUShort] # enumFromThenTo :: CUShort -> CUShort -> CUShort -> [CUShort] #
Enum CWchar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods succ :: CWchar -> CWchar # pred :: CWchar -> CWchar # toEnum :: Int -> CWchar # fromEnum :: CWchar -> Int # enumFrom :: CWchar -> [CWchar] # enumFromThen :: CWchar -> CWchar -> [CWchar] # enumFromTo :: CWchar -> CWchar -> [CWchar] # enumFromThenTo :: CWchar -> CWchar -> CWchar -> [CWchar] #
Enum Associativity | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods succ :: Associativity -> Associativity # pred :: Associativity -> Associativity # toEnum :: Int -> Associativity # fromEnum :: Associativity -> Int # enumFrom :: Associativity -> [Associativity] # enumFromThen :: Associativity -> Associativity -> [Associativity] # enumFromTo :: Associativity -> Associativity -> [Associativity] # enumFromThenTo :: Associativity -> Associativity -> Associativity -> [Associativity] #
Enum DecidedStrictness | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods succ :: DecidedStrictness -> DecidedStrictness # pred :: DecidedStrictness -> DecidedStrictness # toEnum :: Int -> DecidedStrictness # fromEnum :: DecidedStrictness -> Int # enumFrom :: DecidedStrictness -> [DecidedStrictness] # enumFromThen :: DecidedStrictness -> DecidedStrictness -> [DecidedStrictness] # enumFromTo :: DecidedStrictness -> DecidedStrictness -> [DecidedStrictness] # enumFromThenTo :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness -> [DecidedStrictness] #
Enum SourceStrictness | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods succ :: SourceStrictness -> SourceStrictness # pred :: SourceStrictness -> SourceStrictness # toEnum :: Int -> SourceStrictness # fromEnum :: SourceStrictness -> Int # enumFrom :: SourceStrictness -> [SourceStrictness] # enumFromThen :: SourceStrictness -> SourceStrictness -> [SourceStrictness] # enumFromTo :: SourceStrictness -> SourceStrictness -> [SourceStrictness] # enumFromThenTo :: SourceStrictness -> SourceStrictness -> SourceStrictness -> [SourceStrictness] #
Enum SourceUnpackedness | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods succ :: SourceUnpackedness -> SourceUnpackedness # pred :: SourceUnpackedness -> SourceUnpackedness # toEnum :: Int -> SourceUnpackedness # fromEnum :: SourceUnpackedness -> Int # enumFrom :: SourceUnpackedness -> [SourceUnpackedness] # enumFromThen :: SourceUnpackedness -> SourceUnpackedness -> [SourceUnpackedness] # enumFromTo :: SourceUnpackedness -> SourceUnpackedness -> [SourceUnpackedness] # enumFromThenTo :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness -> [SourceUnpackedness] #
Enum SeekMode | @since base-4.2.0.0
Instance details Defined in GHC.Internal.IO.Device Methods succ :: SeekMode -> SeekMode # pred :: SeekMode -> SeekMode # toEnum :: Int -> SeekMode # fromEnum :: SeekMode -> Int # enumFrom :: SeekMode -> [SeekMode] # enumFromThen :: SeekMode -> SeekMode -> [SeekMode] # enumFromTo :: SeekMode -> SeekMode -> [SeekMode] # enumFromThenTo :: SeekMode -> SeekMode -> SeekMode -> [SeekMode] #
Enum IOMode | @since base-4.2.0.0
Instance details Defined in GHC.Internal.IO.IOMode Methods succ :: IOMode -> IOMode # pred :: IOMode -> IOMode # toEnum :: Int -> IOMode # fromEnum :: IOMode -> Int # enumFrom :: IOMode -> [IOMode] # enumFromThen :: IOMode -> IOMode -> [IOMode] # enumFromTo :: IOMode -> IOMode -> [IOMode] # enumFromThenTo :: IOMode -> IOMode -> IOMode -> [IOMode] #
Enum Int16 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods succ :: Int16 -> Int16 # pred :: Int16 -> Int16 # toEnum :: Int -> Int16 # fromEnum :: Int16 -> Int # enumFrom :: Int16 -> [Int16] # enumFromThen :: Int16 -> Int16 -> [Int16] # enumFromTo :: Int16 -> Int16 -> [Int16] # enumFromThenTo :: Int16 -> Int16 -> Int16 -> [Int16] #
Enum Int32 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods succ :: Int32 -> Int32 # pred :: Int32 -> Int32 # toEnum :: Int -> Int32 # fromEnum :: Int32 -> Int # enumFrom :: Int32 -> [Int32] # enumFromThen :: Int32 -> Int32 -> [Int32] # enumFromTo :: Int32 -> Int32 -> [Int32] # enumFromThenTo :: Int32 -> Int32 -> Int32 -> [Int32] #
Enum Int64 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods succ :: Int64 -> Int64 # pred :: Int64 -> Int64 # toEnum :: Int -> Int64 # fromEnum :: Int64 -> Int # enumFrom :: Int64 -> [Int64] # enumFromThen :: Int64 -> Int64 -> [Int64] # enumFromTo :: Int64 -> Int64 -> [Int64] # enumFromThenTo :: Int64 -> Int64 -> Int64 -> [Int64] #
Enum Int8 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods succ :: Int8 -> Int8 # pred :: Int8 -> Int8 # toEnum :: Int -> Int8 # fromEnum :: Int8 -> Int # enumFrom :: Int8 -> [Int8] # enumFromThen :: Int8 -> Int8 -> [Int8] # enumFromTo :: Int8 -> Int8 -> [Int8] # enumFromThenTo :: Int8 -> Int8 -> Int8 -> [Int8] #
Enum DoCostCentres | @since base-4.8.0.0
Instance details Defined in GHC.Internal.RTS.Flags Methods succ :: DoCostCentres -> DoCostCentres # pred :: DoCostCentres -> DoCostCentres # toEnum :: Int -> DoCostCentres # fromEnum :: DoCostCentres -> Int # enumFrom :: DoCostCentres -> [DoCostCentres] # enumFromThen :: DoCostCentres -> DoCostCentres -> [DoCostCentres] # enumFromTo :: DoCostCentres -> DoCostCentres -> [DoCostCentres] # enumFromThenTo :: DoCostCentres -> DoCostCentres -> DoCostCentres -> [DoCostCentres] #
Enum DoHeapProfile | @since base-4.8.0.0
Instance details Defined in GHC.Internal.RTS.Flags Methods succ :: DoHeapProfile -> DoHeapProfile # pred :: DoHeapProfile -> DoHeapProfile # toEnum :: Int -> DoHeapProfile # fromEnum :: DoHeapProfile -> Int # enumFrom :: DoHeapProfile -> [DoHeapProfile] # enumFromThen :: DoHeapProfile -> DoHeapProfile -> [DoHeapProfile] # enumFromTo :: DoHeapProfile -> DoHeapProfile -> [DoHeapProfile] # enumFromThenTo :: DoHeapProfile -> DoHeapProfile -> DoHeapProfile -> [DoHeapProfile] #
Enum DoTrace | @since base-4.8.0.0
Instance details Defined in GHC.Internal.RTS.Flags Methods succ :: DoTrace -> DoTrace # pred :: DoTrace -> DoTrace # toEnum :: Int -> DoTrace # fromEnum :: DoTrace -> Int # enumFrom :: DoTrace -> [DoTrace] # enumFromThen :: DoTrace -> DoTrace -> [DoTrace] # enumFromTo :: DoTrace -> DoTrace -> [DoTrace] # enumFromThenTo :: DoTrace -> DoTrace -> DoTrace -> [DoTrace] #
Enum GiveGCStats | @since base-4.8.0.0
Instance details Defined in GHC.Internal.RTS.Flags Methods succ :: GiveGCStats -> GiveGCStats # pred :: GiveGCStats -> GiveGCStats # toEnum :: Int -> GiveGCStats # fromEnum :: GiveGCStats -> Int # enumFrom :: GiveGCStats -> [GiveGCStats] # enumFromThen :: GiveGCStats -> GiveGCStats -> [GiveGCStats] # enumFromTo :: GiveGCStats -> GiveGCStats -> [GiveGCStats] # enumFromThenTo :: GiveGCStats -> GiveGCStats -> GiveGCStats -> [GiveGCStats] #
Enum IoSubSystem | @since base-4.9.0.0
Instance details Defined in GHC.Internal.RTS.Flags Methods succ :: IoSubSystem -> IoSubSystem # pred :: IoSubSystem -> IoSubSystem # toEnum :: Int -> IoSubSystem # fromEnum :: IoSubSystem -> Int # enumFrom :: IoSubSystem -> [IoSubSystem] # enumFromThen :: IoSubSystem -> IoSubSystem -> [IoSubSystem] # enumFromTo :: IoSubSystem -> IoSubSystem -> [IoSubSystem] # enumFromThenTo :: IoSubSystem -> IoSubSystem -> IoSubSystem -> [IoSubSystem] #
Enum CBlkCnt |
Instance details Defined in GHC.Internal.System.Posix.Types Methods succ :: CBlkCnt -> CBlkCnt # pred :: CBlkCnt -> CBlkCnt # toEnum :: Int -> CBlkCnt # fromEnum :: CBlkCnt -> Int # enumFrom :: CBlkCnt -> [CBlkCnt] # enumFromThen :: CBlkCnt -> CBlkCnt -> [CBlkCnt] # enumFromTo :: CBlkCnt -> CBlkCnt -> [CBlkCnt] # enumFromThenTo :: CBlkCnt -> CBlkCnt -> CBlkCnt -> [CBlkCnt] #
Enum CBlkSize |
Instance details Defined in GHC.Internal.System.Posix.Types Methods succ :: CBlkSize -> CBlkSize # pred :: CBlkSize -> CBlkSize # toEnum :: Int -> CBlkSize # fromEnum :: CBlkSize -> Int # enumFrom :: CBlkSize -> [CBlkSize] # enumFromThen :: CBlkSize -> CBlkSize -> [CBlkSize] # enumFromTo :: CBlkSize -> CBlkSize -> [CBlkSize] # enumFromThenTo :: CBlkSize -> CBlkSize -> CBlkSize -> [CBlkSize] #
Enum CCc |
Instance details Defined in GHC.Internal.System.Posix.Types Methods succ :: CCc -> CCc # pred :: CCc -> CCc # toEnum :: Int -> CCc # fromEnum :: CCc -> Int # enumFrom :: CCc -> [CCc] # enumFromThen :: CCc -> CCc -> [CCc] # enumFromTo :: CCc -> CCc -> [CCc] # enumFromThenTo :: CCc -> CCc -> CCc -> [CCc] #
Enum CClockId |
Instance details Defined in GHC.Internal.System.Posix.Types Methods succ :: CClockId -> CClockId # pred :: CClockId -> CClockId # toEnum :: Int -> CClockId # fromEnum :: CClockId -> Int # enumFrom :: CClockId -> [CClockId] # enumFromThen :: CClockId -> CClockId -> [CClockId] # enumFromTo :: CClockId -> CClockId -> [CClockId] # enumFromThenTo :: CClockId -> CClockId -> CClockId -> [CClockId] #
Enum CDev |
Instance details Defined in GHC.Internal.System.Posix.Types Methods succ :: CDev -> CDev # pred :: CDev -> CDev # toEnum :: Int -> CDev # fromEnum :: CDev -> Int # enumFrom :: CDev -> [CDev] # enumFromThen :: CDev -> CDev -> [CDev] # enumFromTo :: CDev -> CDev -> [CDev] # enumFromThenTo :: CDev -> CDev -> CDev -> [CDev] #
Enum CFsBlkCnt |
Instance details Defined in GHC.Internal.System.Posix.Types Methods succ :: CFsBlkCnt -> CFsBlkCnt # pred :: CFsBlkCnt -> CFsBlkCnt # toEnum :: Int -> CFsBlkCnt # fromEnum :: CFsBlkCnt -> Int # enumFrom :: CFsBlkCnt -> [CFsBlkCnt] # enumFromThen :: CFsBlkCnt -> CFsBlkCnt -> [CFsBlkCnt] # enumFromTo :: CFsBlkCnt -> CFsBlkCnt -> [CFsBlkCnt] # enumFromThenTo :: CFsBlkCnt -> CFsBlkCnt -> CFsBlkCnt -> [CFsBlkCnt] #
Enum CFsFilCnt |
Instance details Defined in GHC.Internal.System.Posix.Types Methods succ :: CFsFilCnt -> CFsFilCnt # pred :: CFsFilCnt -> CFsFilCnt # toEnum :: Int -> CFsFilCnt # fromEnum :: CFsFilCnt -> Int # enumFrom :: CFsFilCnt -> [CFsFilCnt] # enumFromThen :: CFsFilCnt -> CFsFilCnt -> [CFsFilCnt] # enumFromTo :: CFsFilCnt -> CFsFilCnt -> [CFsFilCnt] # enumFromThenTo :: CFsFilCnt -> CFsFilCnt -> CFsFilCnt -> [CFsFilCnt] #
Enum CGid |
Instance details Defined in GHC.Internal.System.Posix.Types Methods succ :: CGid -> CGid # pred :: CGid -> CGid # toEnum :: Int -> CGid # fromEnum :: CGid -> Int # enumFrom :: CGid -> [CGid] # enumFromThen :: CGid -> CGid -> [CGid] # enumFromTo :: CGid -> CGid -> [CGid] # enumFromThenTo :: CGid -> CGid -> CGid -> [CGid] #
Enum CId |
Instance details Defined in GHC.Internal.System.Posix.Types Methods succ :: CId -> CId # pred :: CId -> CId # toEnum :: Int -> CId # fromEnum :: CId -> Int # enumFrom :: CId -> [CId] # enumFromThen :: CId -> CId -> [CId] # enumFromTo :: CId -> CId -> [CId] # enumFromThenTo :: CId -> CId -> CId -> [CId] #
Enum CIno |
Instance details Defined in GHC.Internal.System.Posix.Types Methods succ :: CIno -> CIno # pred :: CIno -> CIno # toEnum :: Int -> CIno # fromEnum :: CIno -> Int # enumFrom :: CIno -> [CIno] # enumFromThen :: CIno -> CIno -> [CIno] # enumFromTo :: CIno -> CIno -> [CIno] # enumFromThenTo :: CIno -> CIno -> CIno -> [CIno] #
Enum CKey |
Instance details Defined in GHC.Internal.System.Posix.Types Methods succ :: CKey -> CKey # pred :: CKey -> CKey # toEnum :: Int -> CKey # fromEnum :: CKey -> Int # enumFrom :: CKey -> [CKey] # enumFromThen :: CKey -> CKey -> [CKey] # enumFromTo :: CKey -> CKey -> [CKey] # enumFromThenTo :: CKey -> CKey -> CKey -> [CKey] #
Enum CMode |
Instance details Defined in GHC.Internal.System.Posix.Types Methods succ :: CMode -> CMode # pred :: CMode -> CMode # toEnum :: Int -> CMode # fromEnum :: CMode -> Int # enumFrom :: CMode -> [CMode] # enumFromThen :: CMode -> CMode -> [CMode] # enumFromTo :: CMode -> CMode -> [CMode] # enumFromThenTo :: CMode -> CMode -> CMode -> [CMode] #
Enum CNfds |
Instance details Defined in GHC.Internal.System.Posix.Types Methods succ :: CNfds -> CNfds # pred :: CNfds -> CNfds # toEnum :: Int -> CNfds # fromEnum :: CNfds -> Int # enumFrom :: CNfds -> [CNfds] # enumFromThen :: CNfds -> CNfds -> [CNfds] # enumFromTo :: CNfds -> CNfds -> [CNfds] # enumFromThenTo :: CNfds -> CNfds -> CNfds -> [CNfds] #
Enum CNlink |
Instance details Defined in GHC.Internal.System.Posix.Types Methods succ :: CNlink -> CNlink # pred :: CNlink -> CNlink # toEnum :: Int -> CNlink # fromEnum :: CNlink -> Int # enumFrom :: CNlink -> [CNlink] # enumFromThen :: CNlink -> CNlink -> [CNlink] # enumFromTo :: CNlink -> CNlink -> [CNlink] # enumFromThenTo :: CNlink -> CNlink -> CNlink -> [CNlink] #
Enum COff |
Instance details Defined in GHC.Internal.System.Posix.Types Methods succ :: COff -> COff # pred :: COff -> COff # toEnum :: Int -> COff # fromEnum :: COff -> Int # enumFrom :: COff -> [COff] # enumFromThen :: COff -> COff -> [COff] # enumFromTo :: COff -> COff -> [COff] # enumFromThenTo :: COff -> COff -> COff -> [COff] #
Enum CPid |
Instance details Defined in GHC.Internal.System.Posix.Types Methods succ :: CPid -> CPid # pred :: CPid -> CPid # toEnum :: Int -> CPid # fromEnum :: CPid -> Int # enumFrom :: CPid -> [CPid] # enumFromThen :: CPid -> CPid -> [CPid] # enumFromTo :: CPid -> CPid -> [CPid] # enumFromThenTo :: CPid -> CPid -> CPid -> [CPid] #
Enum CRLim |
Instance details Defined in GHC.Internal.System.Posix.Types Methods succ :: CRLim -> CRLim # pred :: CRLim -> CRLim # toEnum :: Int -> CRLim # fromEnum :: CRLim -> Int # enumFrom :: CRLim -> [CRLim] # enumFromThen :: CRLim -> CRLim -> [CRLim] # enumFromTo :: CRLim -> CRLim -> [CRLim] # enumFromThenTo :: CRLim -> CRLim -> CRLim -> [CRLim] #
Enum CSocklen |
Instance details Defined in GHC.Internal.System.Posix.Types Methods succ :: CSocklen -> CSocklen # pred :: CSocklen -> CSocklen # toEnum :: Int -> CSocklen # fromEnum :: CSocklen -> Int # enumFrom :: CSocklen -> [CSocklen] # enumFromThen :: CSocklen -> CSocklen -> [CSocklen] # enumFromTo :: CSocklen -> CSocklen -> [CSocklen] # enumFromThenTo :: CSocklen -> CSocklen -> CSocklen -> [CSocklen] #
Enum CSpeed |
Instance details Defined in GHC.Internal.System.Posix.Types Methods succ :: CSpeed -> CSpeed # pred :: CSpeed -> CSpeed # toEnum :: Int -> CSpeed # fromEnum :: CSpeed -> Int # enumFrom :: CSpeed -> [CSpeed] # enumFromThen :: CSpeed -> CSpeed -> [CSpeed] # enumFromTo :: CSpeed -> CSpeed -> [CSpeed] # enumFromThenTo :: CSpeed -> CSpeed -> CSpeed -> [CSpeed] #
Enum CSsize |
Instance details Defined in GHC.Internal.System.Posix.Types Methods succ :: CSsize -> CSsize # pred :: CSsize -> CSsize # toEnum :: Int -> CSsize # fromEnum :: CSsize -> Int # enumFrom :: CSsize -> [CSsize] # enumFromThen :: CSsize -> CSsize -> [CSsize] # enumFromTo :: CSsize -> CSsize -> [CSsize] # enumFromThenTo :: CSsize -> CSsize -> CSsize -> [CSsize] #
Enum CTcflag |
Instance details Defined in GHC.Internal.System.Posix.Types Methods succ :: CTcflag -> CTcflag # pred :: CTcflag -> CTcflag # toEnum :: Int -> CTcflag # fromEnum :: CTcflag -> Int # enumFrom :: CTcflag -> [CTcflag] # enumFromThen :: CTcflag -> CTcflag -> [CTcflag] # enumFromTo :: CTcflag -> CTcflag -> [CTcflag] # enumFromThenTo :: CTcflag -> CTcflag -> CTcflag -> [CTcflag] #
Enum CUid |
Instance details Defined in GHC.Internal.System.Posix.Types Methods succ :: CUid -> CUid # pred :: CUid -> CUid # toEnum :: Int -> CUid # fromEnum :: CUid -> Int # enumFrom :: CUid -> [CUid] # enumFromThen :: CUid -> CUid -> [CUid] # enumFromTo :: CUid -> CUid -> [CUid] # enumFromThenTo :: CUid -> CUid -> CUid -> [CUid] #
Enum Fd |
Instance details Defined in GHC.Internal.System.Posix.Types Methods succ :: Fd -> Fd # pred :: Fd -> Fd # toEnum :: Int -> Fd # fromEnum :: Fd -> Int # enumFrom :: Fd -> [Fd] # enumFromThen :: Fd -> Fd -> [Fd] # enumFromTo :: Fd -> Fd -> [Fd] # enumFromThenTo :: Fd -> Fd -> Fd -> [Fd] #
Enum GeneralCategory | @since base-2.01
Instance details Defined in GHC.Internal.Unicode Methods succ :: GeneralCategory -> GeneralCategory # pred :: GeneralCategory -> GeneralCategory # toEnum :: Int -> GeneralCategory # fromEnum :: GeneralCategory -> Int # enumFrom :: GeneralCategory -> [GeneralCategory] # enumFromThen :: GeneralCategory -> GeneralCategory -> [GeneralCategory] # enumFromTo :: GeneralCategory -> GeneralCategory -> [GeneralCategory] # enumFromThenTo :: GeneralCategory -> GeneralCategory -> GeneralCategory -> [GeneralCategory] #
Enum Word16 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods succ :: Word16 -> Word16 # pred :: Word16 -> Word16 # toEnum :: Int -> Word16 # fromEnum :: Word16 -> Int # enumFrom :: Word16 -> [Word16] # enumFromThen :: Word16 -> Word16 -> [Word16] # enumFromTo :: Word16 -> Word16 -> [Word16] # enumFromThenTo :: Word16 -> Word16 -> Word16 -> [Word16] #
Enum Word32 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods succ :: Word32 -> Word32 # pred :: Word32 -> Word32 # toEnum :: Int -> Word32 # fromEnum :: Word32 -> Int # enumFrom :: Word32 -> [Word32] # enumFromThen :: Word32 -> Word32 -> [Word32] # enumFromTo :: Word32 -> Word32 -> [Word32] # enumFromThenTo :: Word32 -> Word32 -> Word32 -> [Word32] #
Enum Word64 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods succ :: Word64 -> Word64 # pred :: Word64 -> Word64 # toEnum :: Int -> Word64 # fromEnum :: Word64 -> Int # enumFrom :: Word64 -> [Word64] # enumFromThen :: Word64 -> Word64 -> [Word64] # enumFromTo :: Word64 -> Word64 -> [Word64] # enumFromThenTo :: Word64 -> Word64 -> Word64 -> [Word64] #
Enum Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods succ :: Word8 -> Word8 # pred :: Word8 -> Word8 # toEnum :: Int -> Word8 # fromEnum :: Word8 -> Int # enumFrom :: Word8 -> [Word8] # enumFromThen :: Word8 -> Word8 -> [Word8] # enumFromTo :: Word8 -> Word8 -> [Word8] # enumFromThenTo :: Word8 -> Word8 -> Word8 -> [Word8] #
Enum Ordering | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods succ :: Ordering -> Ordering # pred :: Ordering -> Ordering # toEnum :: Int -> Ordering # fromEnum :: Ordering -> Int # enumFrom :: Ordering -> [Ordering] # enumFromThen :: Ordering -> Ordering -> [Ordering] # enumFromTo :: Ordering -> Ordering -> [Ordering] # enumFromThenTo :: Ordering -> Ordering -> Ordering -> [Ordering] #
Enum Integer | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods succ :: Integer -> Integer # pred :: Integer -> Integer # toEnum :: Int -> Integer # fromEnum :: Integer -> Int # enumFrom :: Integer -> [Integer] # enumFromThen :: Integer -> Integer -> [Integer] # enumFromTo :: Integer -> Integer -> [Integer] # enumFromThenTo :: Integer -> Integer -> Integer -> [Integer] #
Enum Natural | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Enum Methods succ :: Natural -> Natural # pred :: Natural -> Natural # toEnum :: Int -> Natural # fromEnum :: Natural -> Int # enumFrom :: Natural -> [Natural] # enumFromThen :: Natural -> Natural -> [Natural] # enumFromTo :: Natural -> Natural -> [Natural] # enumFromThenTo :: Natural -> Natural -> Natural -> [Natural] #
Enum () | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods succ :: () -> () # pred :: () -> () # toEnum :: Int -> () # fromEnum :: () -> Int # enumFrom :: () -> [()] # enumFromThen :: () -> () -> [()] # enumFromTo :: () -> () -> [()] # enumFromThenTo :: () -> () -> () -> [()] #
Enum Bool | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods succ :: Bool -> Bool # pred :: Bool -> Bool # toEnum :: Int -> Bool # fromEnum :: Bool -> Int # enumFrom :: Bool -> [Bool] # enumFromThen :: Bool -> Bool -> [Bool] # enumFromTo :: Bool -> Bool -> [Bool] # enumFromThenTo :: Bool -> Bool -> Bool -> [Bool] #
Enum Char | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods succ :: Char -> Char # pred :: Char -> Char # toEnum :: Int -> Char # fromEnum :: Char -> Int # enumFrom :: Char -> [Char] # enumFromThen :: Char -> Char -> [Char] # enumFromTo :: Char -> Char -> [Char] # enumFromThenTo :: Char -> Char -> Char -> [Char] #
Enum Int | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods succ :: Int -> Int # pred :: Int -> Int # toEnum :: Int -> Int # fromEnum :: Int -> Int # enumFrom :: Int -> [Int] # enumFromThen :: Int -> Int -> [Int] # enumFromTo :: Int -> Int -> [Int] # enumFromThenTo :: Int -> Int -> Int -> [Int] #
Enum Levity | @since base-4.16.0.0
Instance details Defined in GHC.Internal.Enum Methods succ :: Levity -> Levity # pred :: Levity -> Levity # toEnum :: Int -> Levity # fromEnum :: Levity -> Int # enumFrom :: Levity -> [Levity] # enumFromThen :: Levity -> Levity -> [Levity] # enumFromTo :: Levity -> Levity -> [Levity] # enumFromThenTo :: Levity -> Levity -> Levity -> [Levity] #
Enum VecCount | @since base-4.10.0.0
Instance details Defined in GHC.Internal.Enum Methods succ :: VecCount -> VecCount # pred :: VecCount -> VecCount # toEnum :: Int -> VecCount # fromEnum :: VecCount -> Int # enumFrom :: VecCount -> [VecCount] # enumFromThen :: VecCount -> VecCount -> [VecCount] # enumFromTo :: VecCount -> VecCount -> [VecCount] # enumFromThenTo :: VecCount -> VecCount -> VecCount -> [VecCount] #
Enum VecElem | @since base-4.10.0.0
Instance details Defined in GHC.Internal.Enum Methods succ :: VecElem -> VecElem # pred :: VecElem -> VecElem # toEnum :: Int -> VecElem # fromEnum :: VecElem -> Int # enumFrom :: VecElem -> [VecElem] # enumFromThen :: VecElem -> VecElem -> [VecElem] # enumFromTo :: VecElem -> VecElem -> [VecElem] # enumFromThenTo :: VecElem -> VecElem -> VecElem -> [VecElem] #
Enum Word | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods succ :: Word -> Word # pred :: Word -> Word # toEnum :: Int -> Word # fromEnum :: Word -> Int # enumFrom :: Word -> [Word] # enumFromThen :: Word -> Word -> [Word] # enumFromTo :: Word -> Word -> [Word] # enumFromThenTo :: Word -> Word -> Word -> [Word] #
Enum a => Enum (First a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods succ :: First a -> First a # pred :: First a -> First a # toEnum :: Int -> First a # fromEnum :: First a -> Int # enumFrom :: First a -> [First a] # enumFromThen :: First a -> First a -> [First a] # enumFromTo :: First a -> First a -> [First a] # enumFromThenTo :: First a -> First a -> First a -> [First a] #
Enum a => Enum (Last a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods succ :: Last a -> Last a # pred :: Last a -> Last a # toEnum :: Int -> Last a # fromEnum :: Last a -> Int # enumFrom :: Last a -> [Last a] # enumFromThen :: Last a -> Last a -> [Last a] # enumFromTo :: Last a -> Last a -> [Last a] # enumFromThenTo :: Last a -> Last a -> Last a -> [Last a] #
Enum a => Enum (Max a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods succ :: Max a -> Max a # pred :: Max a -> Max a # toEnum :: Int -> Max a # fromEnum :: Max a -> Int # enumFrom :: Max a -> [Max a] # enumFromThen :: Max a -> Max a -> [Max a] # enumFromTo :: Max a -> Max a -> [Max a] # enumFromThenTo :: Max a -> Max a -> Max a -> [Max a] #
Enum a => Enum (Min a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods succ :: Min a -> Min a # pred :: Min a -> Min a # toEnum :: Int -> Min a # fromEnum :: Min a -> Int # enumFrom :: Min a -> [Min a] # enumFromThen :: Min a -> Min a -> [Min a] # enumFromTo :: Min a -> Min a -> [Min a] # enumFromThenTo :: Min a -> Min a -> Min a -> [Min a] #
Enum a => Enum (WrappedMonoid a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods succ :: WrappedMonoid a -> WrappedMonoid a # pred :: WrappedMonoid a -> WrappedMonoid a # toEnum :: Int -> WrappedMonoid a # fromEnum :: WrappedMonoid a -> Int # enumFrom :: WrappedMonoid a -> [WrappedMonoid a] # enumFromThen :: WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] # enumFromTo :: WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] # enumFromThenTo :: WrappedMonoid a -> WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] #
SizeValid n => Enum (Bits n) |
Instance details Defined in Basement.Bits Methods succ :: Bits n -> Bits n # pred :: Bits n -> Bits n # toEnum :: Int -> Bits n # fromEnum :: Bits n -> Int # enumFrom :: Bits n -> [Bits n] # enumFromThen :: Bits n -> Bits n -> [Bits n] # enumFromTo :: Bits n -> Bits n -> [Bits n] # enumFromThenTo :: Bits n -> Bits n -> Bits n -> [Bits n] #
Enum (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize Methods succ :: CountOf ty -> CountOf ty # pred :: CountOf ty -> CountOf ty # toEnum :: Int -> CountOf ty # fromEnum :: CountOf ty -> Int # enumFrom :: CountOf ty -> [CountOf ty] # enumFromThen :: CountOf ty -> CountOf ty -> [CountOf ty] # enumFromTo :: CountOf ty -> CountOf ty -> [CountOf ty] # enumFromThenTo :: CountOf ty -> CountOf ty -> CountOf ty -> [CountOf ty] #
Enum (Offset ty) |
Instance details Defined in Basement.Types.OffsetSize Methods succ :: Offset ty -> Offset ty # pred :: Offset ty -> Offset ty # toEnum :: Int -> Offset ty # fromEnum :: Offset ty -> Int # enumFrom :: Offset ty -> [Offset ty] # enumFromThen :: Offset ty -> Offset ty -> [Offset ty] # enumFromTo :: Offset ty -> Offset ty -> [Offset ty] # enumFromThenTo :: Offset ty -> Offset ty -> Offset ty -> [Offset ty] #
Enum a => Enum (Identity a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Functor.Identity Methods succ :: Identity a -> Identity a # pred :: Identity a -> Identity a # toEnum :: Int -> Identity a # fromEnum :: Identity a -> Int # enumFrom :: Identity a -> [Identity a] # enumFromThen :: Identity a -> Identity a -> [Identity a] # enumFromTo :: Identity a -> Identity a -> [Identity a] # enumFromThenTo :: Identity a -> Identity a -> Identity a -> [Identity a] #
Integral a => Enum (Ratio a) | @since base-2.0.1
Instance details Defined in GHC.Internal.Real Methods succ :: Ratio a -> Ratio a # pred :: Ratio a -> Ratio a # toEnum :: Int -> Ratio a # fromEnum :: Ratio a -> Int # enumFrom :: Ratio a -> [Ratio a] # enumFromThen :: Ratio a -> Ratio a -> [Ratio a] # enumFromTo :: Ratio a -> Ratio a -> [Ratio a] # enumFromThenTo :: Ratio a -> Ratio a -> Ratio a -> [Ratio a] #
Enum a => Enum (Solo a) |
Instance details Defined in GHC.Internal.Enum Methods succ :: Solo a -> Solo a # pred :: Solo a -> Solo a # toEnum :: Int -> Solo a # fromEnum :: Solo a -> Int # enumFrom :: Solo a -> [Solo a] # enumFromThen :: Solo a -> Solo a -> [Solo a] # enumFromTo :: Solo a -> Solo a -> [Solo a] # enumFromThenTo :: Solo a -> Solo a -> Solo a -> [Solo a] #
Enum (Fixed a) | Recall that, for numeric types, `succ` and `pred` typically add and subtract `1`, respectively. This is not true in the case of `Fixed`, whose successor and predecessor functions intuitively return the "next" and "previous" values in the enumeration. The results of these functions thus depend on the resolution of the `Fixed` value. For example, when enumerating values of resolution `10^-3` of `type Milli = Fixed E3`,
    >>> succ (0.000 :: Milli)
    0.001
and likewise
    >>> pred (0.000 :: Milli)
    -0.001
In other words, `succ` and `pred` increment and decrement a fixed-precision value by the least amount such that the value's resolution is unchanged. For example, `10^-12` is the smallest (positive) amount that can be added to a value of `type Pico = Fixed E12` without changing its resolution, and so
    >>> succ (0.000000000000 :: Pico)
    0.000000000001
and similarly
    >>> pred (0.000000000000 :: Pico)
    -0.000000000001
This is worth bearing in mind when defining `Fixed` arithmetic sequences. In particular, you may be forgiven for thinking the sequence
      [1..10] :: [Pico]
evaluates to `[1, 2, 3, 4, 5, 6, 7, 8, 9, 10] :: [Pico]`. However, this is not true. On the contrary, similarly to the above implementations of `succ` and `pred`, `enumFromTo :: Pico -> Pico -> [Pico]` has a "step size" of `10^-12`. Hence, the list `[1..10] :: [Pico]` has the form
      [1.000000000000, 1.00000000001, 1.00000000002, ..., 10.000000000000]
and contains `9 * 10^12 + 1` values. Since: base-2.1
Instance details Defined in Data.Fixed Methods succ :: Fixed a -> Fixed a # pred :: Fixed a -> Fixed a # toEnum :: Int -> Fixed a # fromEnum :: Fixed a -> Int # enumFrom :: Fixed a -> [Fixed a] # enumFromThen :: Fixed a -> Fixed a -> [Fixed a] # enumFromTo :: Fixed a -> Fixed a -> [Fixed a] # enumFromThenTo :: Fixed a -> Fixed a -> Fixed a -> [Fixed a] #
Enum (Proxy s) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Proxy Methods succ :: Proxy s -> Proxy s # pred :: Proxy s -> Proxy s # toEnum :: Int -> Proxy s # fromEnum :: Proxy s -> Int # enumFrom :: Proxy s -> [Proxy s] # enumFromThen :: Proxy s -> Proxy s -> [Proxy s] # enumFromTo :: Proxy s -> Proxy s -> [Proxy s] # enumFromThenTo :: Proxy s -> Proxy s -> Proxy s -> [Proxy s] #
Enum a => Enum (Const a b) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Functor.Const Methods succ :: Const a b -> Const a b # pred :: Const a b -> Const a b # toEnum :: Int -> Const a b # fromEnum :: Const a b -> Int # enumFrom :: Const a b -> [Const a b] # enumFromThen :: Const a b -> Const a b -> [Const a b] # enumFromTo :: Const a b -> Const a b -> [Const a b] # enumFromThenTo :: Const a b -> Const a b -> Const a b -> [Const a b] #
Enum (f a) => Enum (Ap f a) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Data.Monoid Methods succ :: Ap f a -> Ap f a # pred :: Ap f a -> Ap f a # toEnum :: Int -> Ap f a # fromEnum :: Ap f a -> Int # enumFrom :: Ap f a -> [Ap f a] # enumFromThen :: Ap f a -> Ap f a -> [Ap f a] # enumFromTo :: Ap f a -> Ap f a -> [Ap f a] # enumFromThenTo :: Ap f a -> Ap f a -> Ap f a -> [Ap f a] #
Enum (f a) => Enum (Alt f a) | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods succ :: Alt f a -> Alt f a # pred :: Alt f a -> Alt f a # toEnum :: Int -> Alt f a # fromEnum :: Alt f a -> Int # enumFrom :: Alt f a -> [Alt f a] # enumFromThen :: Alt f a -> Alt f a -> [Alt f a] # enumFromTo :: Alt f a -> Alt f a -> [Alt f a] # enumFromThenTo :: Alt f a -> Alt f a -> Alt f a -> [Alt f a] #
Enum (f (g a)) => Enum (Compose f g a) | Since: base-4.19.0.0
Instance details Defined in Data.Functor.Compose Methods succ :: Compose f g a -> Compose f g a # pred :: Compose f g a -> Compose f g a # toEnum :: Int -> Compose f g a # fromEnum :: Compose f g a -> Int # enumFrom :: Compose f g a -> [Compose f g a] # enumFromThen :: Compose f g a -> Compose f g a -> [Compose f g a] # enumFromTo :: Compose f g a -> Compose f g a -> [Compose f g a] # enumFromThenTo :: Compose f g a -> Compose f g a -> Compose f g a -> [Compose f g a] #

class Functor (f :: Type -> Type) where #

A type `f` is a Functor if it provides a function `fmap` which, given any types `a` and `b` lets you apply any function from `(a -> b)` to turn an `f a` into an `f b`, preserving the structure of `f`. Furthermore `f` needs to adhere to the following:

Identity
  ``fmap` `id` == `id``
Composition
  ``fmap` (f . g) == `fmap` f . `fmap` g`

Note, that the second law follows from the free theorem of the type `fmap` and the first law, so you need only check that the former condition holds. See these articles by School of Haskell or David Luposchainsky for an explanation.

Minimal complete definition

fmap

Methods

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

`fmap` is used to apply a function of type `(a -> b)` to a value of type `f a`, where f is a functor, to produce a value of type `f b`. Note that for any type constructor with more than one parameter (e.g., `Either`), only the last type parameter can be modified with `fmap` (e.g., `b` in `Either a b`).

Some type constructors with two parameters or more have a ``Bifunctor`` instance that allows both the last and the penultimate parameters to be mapped over.

#### Examples

Expand

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

    >>> fmap show Nothing
    Nothing
    >>> fmap show (Just 3)
    Just "3"

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

    >>> fmap show (Left 17)
    Left 17
    >>> fmap show (Right 17)
    Right "17"

Double each element of a list:

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

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

    >>> fmap even (2,2)
    (2,True)

It may seem surprising that the function is only applied to the last element of the tuple compared to the list example above which applies it to every element in the list. To understand, remember that tuples are type constructors with multiple type parameters: a tuple of 3 elements `(a,b,c)` can also be written `(,,) a b c` and its `Functor` instance is defined for `Functor ((,,) a b)` (i.e., only the third parameter is free to be mapped over with `fmap`).

It explains why `fmap` can be used with tuples containing values of different types as in the following example:

    >>> fmap even ("hello", 1.0, 4)
    ("hello",1.0,True)

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

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

#### Examples

Expand

Perform a computation with `Maybe` and replace the result with a constant value if it is `Just`:

    >>> 'a' <$ Just 2
    Just 'a'
    >>> 'a' <$ Nothing
    Nothing

#### Instances

Instances details

Functor Complex | Since: base-4.9.0.0
Instance details Defined in Data.Complex Methods fmap :: (a -> b) -> Complex a -> Complex b # (<$) :: a -> Complex b -> Complex a #
Functor First | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods fmap :: (a -> b) -> First a -> First b # (<$) :: a -> First b -> First a #
Functor Last | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods fmap :: (a -> b) -> Last a -> Last b # (<$) :: a -> Last b -> Last a #
Functor Max | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods fmap :: (a -> b) -> Max a -> Max b # (<$) :: a -> Max b -> Max a #
Functor Min | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods fmap :: (a -> b) -> Min a -> Min b # (<$) :: a -> Min b -> Min a #
Functor ArgDescr | Since: base-4.7.0.0
Instance details Defined in System.Console.GetOpt Methods fmap :: (a -> b) -> ArgDescr a -> ArgDescr b # (<$) :: a -> ArgDescr b -> ArgDescr a #
Functor ArgOrder | Since: base-4.7.0.0
Instance details Defined in System.Console.GetOpt Methods fmap :: (a -> b) -> ArgOrder a -> ArgOrder b # (<$) :: a -> ArgOrder b -> ArgOrder a #
Functor OptDescr | Since: base-4.7.0.0
Instance details Defined in System.Console.GetOpt Methods fmap :: (a -> b) -> OptDescr a -> OptDescr b # (<$) :: a -> OptDescr b -> OptDescr a #
Functor Array |
Instance details Defined in Basement.BoxedArray Methods fmap :: (a -> b) -> Array a -> Array b # (<$) :: a -> Array b -> Array a #
Functor Gen # |
Instance details Defined in Foundation.Check.Gen Methods fmap :: (a -> b) -> Gen a -> Gen b # (<$) :: a -> Gen b -> Gen a #
Functor Check # |
Instance details Defined in Foundation.Check.Types Methods fmap :: (a -> b) -> Check a -> Check b # (<$) :: a -> Check b -> Check a #
Functor DList # |
Instance details Defined in Foundation.List.DList Methods fmap :: (a -> b) -> DList a -> DList b # (<$) :: a -> DList b -> DList a #
Functor Partial # |
Instance details Defined in Foundation.Partial Methods fmap :: (a -> b) -> Partial a -> Partial b # (<$) :: a -> Partial b -> Partial a #
Functor NonEmpty | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Base Methods fmap :: (a -> b) -> NonEmpty a -> NonEmpty b # (<$) :: a -> NonEmpty b -> NonEmpty a #
Functor STM | @since base-4.3.0.0
Instance details Defined in GHC.Internal.Conc.Sync Methods fmap :: (a -> b) -> STM a -> STM b # (<$) :: a -> STM b -> STM a #
Functor Identity | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Functor.Identity Methods fmap :: (a -> b) -> Identity a -> Identity b # (<$) :: a -> Identity b -> Identity a #
Functor First | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Monoid Methods fmap :: (a -> b) -> First a -> First b # (<$) :: a -> First b -> First a #
Functor Last | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Monoid Methods fmap :: (a -> b) -> Last a -> Last b # (<$) :: a -> Last b -> Last a #
Functor Dual | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods fmap :: (a -> b) -> Dual a -> Dual b # (<$) :: a -> Dual b -> Dual a #
Functor Product | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods fmap :: (a -> b) -> Product a -> Product b # (<$) :: a -> Product b -> Product a #
Functor Sum | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods fmap :: (a -> b) -> Sum a -> Sum b # (<$) :: a -> Sum b -> Sum a #
Functor ZipList | @since base-2.01
Instance details Defined in GHC.Internal.Functor.ZipList Methods fmap :: (a -> b) -> ZipList a -> ZipList b # (<$) :: a -> ZipList b -> ZipList a #
Functor Par1 | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods fmap :: (a -> b) -> Par1 a -> Par1 b # (<$) :: a -> Par1 b -> Par1 a #
Functor P | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Text.ParserCombinators.ReadP Methods fmap :: (a -> b) -> P a -> P b # (<$) :: a -> P b -> P a #
Functor ReadP | @since base-2.01
Instance details Defined in GHC.Internal.Text.ParserCombinators.ReadP Methods fmap :: (a -> b) -> ReadP a -> ReadP b # (<$) :: a -> ReadP b -> ReadP a #
Functor IO | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods fmap :: (a -> b) -> IO a -> IO b # (<$) :: a -> IO b -> IO a #
Functor Maybe | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods fmap :: (a -> b) -> Maybe a -> Maybe b # (<$) :: a -> Maybe b -> Maybe a #
Functor Solo | @since base-4.15
Instance details Defined in GHC.Internal.Base Methods fmap :: (a -> b) -> Solo a -> Solo b # (<$) :: a -> Solo b -> Solo a #
Functor [] | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods fmap :: (a -> b) -> [a] -> [b] # (<$) :: a -> [b] -> [a] #
Monad m => Functor (WrappedMonad m) | Since: base-2.1
Instance details Defined in Control.Applicative Methods fmap :: (a -> b) -> WrappedMonad m a -> WrappedMonad m b # (<$) :: a -> WrappedMonad m b -> WrappedMonad m a #
Functor (Arg a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods fmap :: (a0 -> b) -> Arg a a0 -> Arg a b # (<$) :: a0 -> Arg a b -> Arg a a0 #
Functor (Vect n) |
Instance details Defined in Basement.Sized.Vect Methods fmap :: (a -> b) -> Vect n a -> Vect n b # (<$) :: a -> Vect n b -> Vect n a #
Functor m => Functor (ResourceT m) # |
Instance details Defined in Foundation.Conduit.Internal Methods fmap :: (a -> b) -> ResourceT m a -> ResourceT m b # (<$) :: a -> ResourceT m b -> ResourceT m a #
Functor (Parser input) # |
Instance details Defined in Foundation.Parser Methods fmap :: (a -> b) -> Parser input a -> Parser input b # (<$) :: a -> Parser input b -> Parser input a #
Functor (Result input) # |
Instance details Defined in Foundation.Parser Methods fmap :: (a -> b) -> Result input a -> Result input b # (<$) :: a -> Result input b -> Result input a #
Functor (MonadRandomState gen) # |
Instance details Defined in Foundation.Random.DRG Methods fmap :: (a -> b) -> MonadRandomState gen a -> MonadRandomState gen b # (<$) :: a -> MonadRandomState gen b -> MonadRandomState gen a #
Arrow a => Functor (ArrowMonad a) | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Control.Arrow Methods fmap :: (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b # (<$) :: a0 -> ArrowMonad a b -> ArrowMonad a a0 #
Functor (Either a) | @since base-3.0
Instance details Defined in GHC.Internal.Data.Either Methods fmap :: (a0 -> b) -> Either a a0 -> Either a b # (<$) :: a0 -> Either a b -> Either a a0 #
Functor (Proxy :: Type -> Type) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Proxy Methods fmap :: (a -> b) -> Proxy a -> Proxy b # (<$) :: a -> Proxy b -> Proxy a #
Functor (U1 :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods fmap :: (a -> b) -> U1 a -> U1 b # (<$) :: a -> U1 b -> U1 a #
Functor (V1 :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods fmap :: (a -> b) -> V1 a -> V1 b # (<$) :: a -> V1 b -> V1 a #
Functor (ST s) | @since base-2.01
Instance details Defined in GHC.Internal.ST Methods fmap :: (a -> b) -> ST s a -> ST s b # (<$) :: a -> ST s b -> ST s a #
Functor ((,) a) | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods fmap :: (a0 -> b) -> (a, a0) -> (a, b) # (<$) :: a0 -> (a, b) -> (a, a0) #
Arrow a => Functor (WrappedArrow a b) | Since: base-2.1
Instance details Defined in Control.Applicative Methods fmap :: (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 # (<$) :: a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 #
Monad m => Functor (Reader r m) |
Instance details Defined in Basement.Compat.MonadTrans Methods fmap :: (a -> b) -> Reader r m a -> Reader r m b # (<$) :: a -> Reader r m b -> Reader r m a #
Monad m => Functor (State s m) |
Instance details Defined in Basement.Compat.MonadTrans Methods fmap :: (a -> b) -> State s m a -> State s m b # (<$) :: a -> State s m b -> State s m a #
Monad m => Functor (ZipSink i m) # |
Instance details Defined in Foundation.Conduit.Internal Methods fmap :: (a -> b) -> ZipSink i m a -> ZipSink i m b # (<$) :: a -> ZipSink i m b -> ZipSink i m a #
Functor m => Functor (ExceptT e m) # |
Instance details Defined in Foundation.Monad.Except Methods fmap :: (a -> b) -> ExceptT e m a -> ExceptT e m b # (<$) :: a -> ExceptT e m b -> ExceptT e m a #
Functor m => Functor (ReaderT r m) # |
Instance details Defined in Foundation.Monad.Reader Methods fmap :: (a -> b) -> ReaderT r m a -> ReaderT r m b # (<$) :: a -> ReaderT r m b -> ReaderT r m a #
Functor m => Functor (StateT s m) # |
Instance details Defined in Foundation.Monad.State Methods fmap :: (a -> b) -> StateT s m a -> StateT s m b # (<$) :: a -> StateT s m b -> StateT s m a #
Functor m => Functor (Kleisli m a) | @since base-4.14.0.0
Instance details Defined in GHC.Internal.Control.Arrow Methods fmap :: (a0 -> b) -> Kleisli m a a0 -> Kleisli m a b # (<$) :: a0 -> Kleisli m a b -> Kleisli m a a0 #
Functor (Const m :: Type -> Type) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Functor.Const Methods fmap :: (a -> b) -> Const m a -> Const m b # (<$) :: a -> Const m b -> Const m a #
Functor f => Functor (Ap f) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Data.Monoid Methods fmap :: (a -> b) -> Ap f a -> Ap f b # (<$) :: a -> Ap f b -> Ap f a #
Functor f => Functor (Alt f) | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods fmap :: (a -> b) -> Alt f a -> Alt f b # (<$) :: a -> Alt f b -> Alt f a #
(Generic1 f, Functor (Rep1 f)) => Functor (Generically1 f) | @since base-4.17.0.0
Instance details Defined in GHC.Internal.Generics Methods fmap :: (a -> b) -> Generically1 f a -> Generically1 f b # (<$) :: a -> Generically1 f b -> Generically1 f a #
Functor f => Functor (Rec1 f) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods fmap :: (a -> b) -> Rec1 f a -> Rec1 f b # (<$) :: a -> Rec1 f b -> Rec1 f a #
Functor (URec (Ptr ()) :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods fmap :: (a -> b) -> URec (Ptr ()) a -> URec (Ptr ()) b # (<$) :: a -> URec (Ptr ()) b -> URec (Ptr ()) a #
Functor (URec Char :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods fmap :: (a -> b) -> URec Char a -> URec Char b # (<$) :: a -> URec Char b -> URec Char a #
Functor (URec Double :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods fmap :: (a -> b) -> URec Double a -> URec Double b # (<$) :: a -> URec Double b -> URec Double a #
Functor (URec Float :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods fmap :: (a -> b) -> URec Float a -> URec Float b # (<$) :: a -> URec Float b -> URec Float a #
Functor (URec Int :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods fmap :: (a -> b) -> URec Int a -> URec Int b # (<$) :: a -> URec Int b -> URec Int a #
Functor (URec Word :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods fmap :: (a -> b) -> URec Word a -> URec Word b # (<$) :: a -> URec Word b -> URec Word a #
Functor ((,,) a b) | @since base-4.14.0.0
Instance details Defined in GHC.Internal.Base Methods fmap :: (a0 -> b0) -> (a, b, a0) -> (a, b, b0) # (<$) :: a0 -> (a, b, b0) -> (a, b, a0) #
(Functor f, Functor g) => Functor (Product f g) | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Product Methods fmap :: (a -> b) -> Product f g a -> Product f g b # (<$) :: a -> Product f g b -> Product f g a #
(Functor f, Functor g) => Functor (Sum f g) | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Sum Methods fmap :: (a -> b) -> Sum f g a -> Sum f g b # (<$) :: a -> Sum f g b -> Sum f g a #
Functor (Conduit i o m) # |
Instance details Defined in Foundation.Conduit.Internal Methods fmap :: (a -> b) -> Conduit i o m a -> Conduit i o m b # (<$) :: a -> Conduit i o m b -> Conduit i o m a #
(Functor f, Functor g) => Functor (f :*: g) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods fmap :: (a -> b) -> (f :*: g) a -> (f :*: g) b # (<$) :: a -> (f :*: g) b -> (f :*: g) a #
(Functor f, Functor g) => Functor (f :+: g) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods fmap :: (a -> b) -> (f :+: g) a -> (f :+: g) b # (<$) :: a -> (f :+: g) b -> (f :+: g) a #
Functor (K1 i c :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods fmap :: (a -> b) -> K1 i c a -> K1 i c b # (<$) :: a -> K1 i c b -> K1 i c a #
Functor ((,,,) a b c) | @since base-4.14.0.0
Instance details Defined in GHC.Internal.Base Methods fmap :: (a0 -> b0) -> (a, b, c, a0) -> (a, b, c, b0) # (<$) :: a0 -> (a, b, c, b0) -> (a, b, c, a0) #
Functor ((->) r) | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods fmap :: (a -> b) -> (r -> a) -> r -> b # (<$) :: a -> (r -> b) -> r -> a #
(Functor f, Functor g) => Functor (Compose f g) | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Compose Methods fmap :: (a -> b) -> Compose f g a -> Compose f g b # (<$) :: a -> Compose f g b -> Compose f g a #
(Functor f, Functor g) => Functor (f :.: g) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods fmap :: (a -> b) -> (f :.: g) a -> (f :.: g) b # (<$) :: a -> (f :.: g) b -> (f :.: g) a #
Functor f => Functor (M1 i c f) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods fmap :: (a -> b) -> M1 i c f a -> M1 i c f b # (<$) :: a -> M1 i c f b -> M1 i c f a #
Functor ((,,,,) a b c d) | @since base-4.18.0.0
Instance details Defined in GHC.Internal.Base Methods fmap :: (a0 -> b0) -> (a, b, c, d, a0) -> (a, b, c, d, b0) # (<$) :: a0 -> (a, b, c, d, b0) -> (a, b, c, d, a0) #
Monad state => Functor (Builder collection mutCollection step state err) |
Instance details Defined in Basement.MutableBuilder Methods fmap :: (a -> b) -> Builder collection mutCollection step state err a -> Builder collection mutCollection step state err b # (<$) :: a -> Builder collection mutCollection step state err b -> Builder collection mutCollection step state err a #
Functor ((,,,,,) a b c d e) | @since base-4.18.0.0
Instance details Defined in GHC.Internal.Base Methods fmap :: (a0 -> b0) -> (a, b, c, d, e, a0) -> (a, b, c, d, e, b0) # (<$) :: a0 -> (a, b, c, d, e, b0) -> (a, b, c, d, e, a0) #
Functor ((,,,,,,) a b c d e f) | @since base-4.18.0.0
Instance details Defined in GHC.Internal.Base Methods fmap :: (a0 -> b0) -> (a, b, c, d, e, f, a0) -> (a, b, c, d, e, f, b0) # (<$) :: a0 -> (a, b, c, d, e, f, b0) -> (a, b, c, d, e, f, a0) #

class Integral a where #

Integral Literal support

e.g. 123 :: Integer 123 :: Word8

Methods

fromInteger :: Integer -> a #

#### Instances

Instances details

Integral Word128 |
Instance details Defined in Basement.Types.Word128 Methods fromInteger :: Integer -> Word128 #
Integral Word256 |
Instance details Defined in Basement.Types.Word256 Methods fromInteger :: Integer -> Word256 #
Integral CBool |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CBool #
Integral CChar |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CChar #
Integral CClock |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CClock #
Integral CDouble |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CDouble #
Integral CFloat |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CFloat #
Integral CInt |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CInt #
Integral CIntMax |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CIntMax #
Integral CIntPtr |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CIntPtr #
Integral CLLong |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CLLong #
Integral CLong |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CLong #
Integral CPtrdiff |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CPtrdiff #
Integral CSChar |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CSChar #
Integral CSUSeconds |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CSUSeconds #
Integral CShort |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CShort #
Integral CSigAtomic |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CSigAtomic #
Integral CSize |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CSize #
Integral CTime |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CTime #
Integral CUChar |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CUChar #
Integral CUInt |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CUInt #
Integral CUIntMax |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CUIntMax #
Integral CUIntPtr |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CUIntPtr #
Integral CULLong |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CULLong #
Integral CULong |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CULong #
Integral CUSeconds |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CUSeconds #
Integral CUShort |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CUShort #
Integral CWchar |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> CWchar #
Integral IntPtr |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> IntPtr #
Integral Int16 |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Int16 #
Integral Int32 |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Int32 #
Integral Int64 |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Int64 #
Integral Int8 |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Int8 #
Integral COff |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> COff #
Integral Word16 |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Word16 #
Integral Word32 |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Word32 #
Integral Word64 |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Word64 #
Integral Word8 |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Word8 #
Integral Integer |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Integer #
Integral Natural |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Natural #
Integral Double |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Double #
Integral Float |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Float #
Integral Int |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Int #
Integral Word |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Word #
KnownNat n => Integral (Zn n) |
Instance details Defined in Basement.Bounded Methods fromInteger :: Integer -> Zn n #
(KnownNat n, NatWithinBound Word64 n) => Integral (Zn64 n) |
Instance details Defined in Basement.Bounded Methods fromInteger :: Integer -> Zn64 n #
Integral (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize Methods fromInteger :: Integer -> CountOf ty #
Integral (Offset ty) |
Instance details Defined in Basement.Types.OffsetSize Methods fromInteger :: Integer -> Offset ty #

class Fractional a where #

Fractional Literal support

e.g. 1.2 :: Double 0.03 :: Float

Methods

fromRational :: Rational -> a #

#### Instances

Instances details

Fractional CDouble |
Instance details Defined in Basement.Compat.NumLiteral Methods fromRational :: Rational -> CDouble #
Fractional CFloat |
Instance details Defined in Basement.Compat.NumLiteral Methods fromRational :: Rational -> CFloat #
Fractional Rational |
Instance details Defined in Basement.Compat.NumLiteral Methods fromRational :: Rational -> Rational #
Fractional Double |
Instance details Defined in Basement.Compat.NumLiteral Methods fromRational :: Rational -> Double #
Fractional Float |
Instance details Defined in Basement.Compat.NumLiteral Methods fromRational :: Rational -> Float #

class HasNegation a where #

Negation support

e.g. -(f x)

Methods

negate :: a -> a #

#### Instances

Instances details

HasNegation Word128 |
Instance details Defined in Basement.Types.Word128 Methods negate :: Word128 -> Word128 #
HasNegation Word256 |
Instance details Defined in Basement.Types.Word256 Methods negate :: Word256 -> Word256 #
HasNegation CChar |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: CChar -> CChar #
HasNegation CDouble |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: CDouble -> CDouble #
HasNegation CFloat |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: CFloat -> CFloat #
HasNegation CInt |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: CInt -> CInt #
HasNegation CIntMax |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: CIntMax -> CIntMax #
HasNegation CLLong |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: CLLong -> CLLong #
HasNegation CLong |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: CLong -> CLong #
HasNegation CPtrdiff |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: CPtrdiff -> CPtrdiff #
HasNegation CSChar |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: CSChar -> CSChar #
HasNegation CShort |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: CShort -> CShort #
HasNegation CWchar |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: CWchar -> CWchar #
HasNegation Int16 |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Int16 -> Int16 #
HasNegation Int32 |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Int32 -> Int32 #
HasNegation Int64 |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Int64 -> Int64 #
HasNegation Int8 |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Int8 -> Int8 #
HasNegation Word16 |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Word16 -> Word16 #
HasNegation Word32 |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Word32 -> Word32 #
HasNegation Word64 |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Word64 -> Word64 #
HasNegation Word8 |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Word8 -> Word8 #
HasNegation Integer |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Integer -> Integer #
HasNegation Double |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Double -> Double #
HasNegation Float |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Float -> Float #
HasNegation Int |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Int -> Int #
HasNegation Word |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Word -> Word #

class (forall a. Functor (p a)) => Bifunctor (p :: Type -> Type -> Type) where #

A bifunctor is a type constructor that takes two type arguments and is a functor in both arguments. That is, unlike with `Functor`, a type constructor such as `Either` does not need to be partially applied for a `Bifunctor` instance, and the methods in this class permit mapping functions over the `Left` value or the `Right` value, or both at the same time.

Formally, the class `Bifunctor` represents a bifunctor from `Hask` -> `Hask`.

Intuitively it is a bifunctor where both the first and second arguments are covariant.

The class definition of a `Bifunctor` `p` uses the QuantifiedConstraints language extension to quantify over the first type argument `a` in its context. The context requires that `p a` must be a `Functor` for all `a`. In other words a partially applied `Bifunctor` must be a `Functor`. This makes `Functor` a superclass of `Bifunctor` such that a function with a `Bifunctor` constraint may use `fmap` in its implementation. `Functor` has been a quantified superclass of `Bifunctor` since base-4.18.0.0.

You can define a `Bifunctor` by either defining `bimap` or by defining both `first` and `second`. The `second` method must agree with `fmap`:

    second ≡ fmap

From this it follows that:

    second id ≡ id

If you supply `bimap`, you should ensure that:

    bimap id id ≡ id

If you supply `first` and `second`, ensure:

    first id ≡ id
    second id ≡ id

If you supply both, you should also ensure:

    bimap f g ≡ first f . second g

These ensure by parametricity:

    bimap  (f . g) (h . i) ≡ bimap f h . bimap g i
    first  (f . g) ≡ first  f . first  g
    second (f . g) ≡ second f . second g

Since: base-4.8.0.0

Minimal complete definition

bimap | first, second

Methods

bimap :: (a -> b) -> (c -> d) -> p a c -> p b d #

Map over both arguments at the same time.

    bimap f g ≡ first f . second g

#### Examples

Expand

    >>> bimap toUpper (+1) ('j', 3)
    ('J',4)

    >>> bimap toUpper (+1) (Left 'j')
    Left 'J'

    >>> bimap toUpper (+1) (Right 3)
    Right 4

first :: (a -> b) -> p a c -> p b c #

Map covariantly over the first argument.

    first f ≡ bimap f id

#### Examples

Expand

    >>> first toUpper ('j', 3)
    ('J',3)

    >>> first toUpper (Left 'j')
    Left 'J'

second :: (b -> c) -> p a b -> p a c #

Map covariantly over the second argument.

    second ≡ bimap id

#### Examples

Expand

    >>> second (+1) ('j', 3)
    ('j',4)

    >>> second (+1) (Right 3)
    Right 4

#### Instances

Instances details

Bifunctor Arg | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods bimap :: (a -> b) -> (c -> d) -> Arg a c -> Arg b d # first :: (a -> b) -> Arg a c -> Arg b c # second :: (b -> c) -> Arg a b -> Arg a c #
Bifunctor Either | Since: base-4.8.0.0
Instance details Defined in Data.Bifunctor Methods bimap :: (a -> b) -> (c -> d) -> Either a c -> Either b d # first :: (a -> b) -> Either a c -> Either b c # second :: (b -> c) -> Either a b -> Either a c #
Bifunctor (,) | Class laws for tuples hold only up to laziness. Both `first` `id` and `second` `id` are lazier than `id` (and `fmap` `id`):
    >>> first id (undefined :: (Int, Word)) `seq` ()
    ()
    >>> second id (undefined :: (Int, Word)) `seq` ()
    ()
    >>> id (undefined :: (Int, Word)) `seq` ()
    *** Exception: Prelude.undefined
Since: base-4.8.0.0
Instance details Defined in Data.Bifunctor Methods bimap :: (a -> b) -> (c -> d) -> (a, c) -> (b, d) # first :: (a -> b) -> (a, c) -> (b, c) # second :: (b -> c) -> (a, b) -> (a, c) #
Bifunctor (Const :: Type -> Type -> Type) | Since: base-4.8.0.0
Instance details Defined in Data.Bifunctor Methods bimap :: (a -> b) -> (c -> d) -> Const a c -> Const b d # first :: (a -> b) -> Const a c -> Const b c # second :: (b -> c) -> Const a b -> Const a c #
Bifunctor ((,,) x1) | Since: base-4.8.0.0
Instance details Defined in Data.Bifunctor Methods bimap :: (a -> b) -> (c -> d) -> (x1, a, c) -> (x1, b, d) # first :: (a -> b) -> (x1, a, c) -> (x1, b, c) # second :: (b -> c) -> (x1, a, b) -> (x1, a, c) #
Bifunctor (K1 i :: Type -> Type -> Type) | Since: base-4.9.0.0
Instance details Defined in Data.Bifunctor Methods bimap :: (a -> b) -> (c -> d) -> K1 i a c -> K1 i b d # first :: (a -> b) -> K1 i a c -> K1 i b c # second :: (b -> c) -> K1 i a b -> K1 i a c #
Bifunctor ((,,,) x1 x2) | Since: base-4.8.0.0
Instance details Defined in Data.Bifunctor Methods bimap :: (a -> b) -> (c -> d) -> (x1, x2, a, c) -> (x1, x2, b, d) # first :: (a -> b) -> (x1, x2, a, c) -> (x1, x2, b, c) # second :: (b -> c) -> (x1, x2, a, b) -> (x1, x2, a, c) #
Bifunctor ((,,,,) x1 x2 x3) | Since: base-4.8.0.0
Instance details Defined in Data.Bifunctor Methods bimap :: (a -> b) -> (c -> d) -> (x1, x2, x3, a, c) -> (x1, x2, x3, b, d) # first :: (a -> b) -> (x1, x2, x3, a, c) -> (x1, x2, x3, b, c) # second :: (b -> c) -> (x1, x2, x3, a, b) -> (x1, x2, x3, a, c) #
Bifunctor ((,,,,,) x1 x2 x3 x4) | Since: base-4.8.0.0
Instance details Defined in Data.Bifunctor Methods bimap :: (a -> b) -> (c -> d) -> (x1, x2, x3, x4, a, c) -> (x1, x2, x3, x4, b, d) # first :: (a -> b) -> (x1, x2, x3, x4, a, c) -> (x1, x2, x3, x4, b, c) # second :: (b -> c) -> (x1, x2, x3, x4, a, b) -> (x1, x2, x3, x4, a, c) #
Bifunctor ((,,,,,,) x1 x2 x3 x4 x5) | Since: base-4.8.0.0
Instance details Defined in Data.Bifunctor Methods bimap :: (a -> b) -> (c -> d) -> (x1, x2, x3, x4, x5, a, c) -> (x1, x2, x3, x4, x5, b, d) # first :: (a -> b) -> (x1, x2, x3, x4, x5, a, c) -> (x1, x2, x3, x4, x5, b, c) # second :: (b -> c) -> (x1, x2, x3, x4, x5, a, b) -> (x1, x2, x3, x4, x5, a, c) #

class Functor f => Applicative (f :: Type -> Type) where #

A functor with application, providing operations to

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

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

    (<*>) = liftA2 id

    liftA2 f x y = f <$> x <*> y

Further, any definition must satisfy the following:

Identity

      pure id <*> v = v

Composition

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

Homomorphism

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

Interchange

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

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

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

-     u <* v = liftA2 const u v

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

-     fmap f x = pure f <*> x

It may be useful to note that supposing

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

it follows from the above that

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

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

-     pure = return

-     m1 <*> m2 = m1 >>= (\x1 -> m2 >>= (\x2 -> return (x1 x2)))

-     (*>) = (>>)

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

Minimal complete definition

pure, ((<*>) | liftA2)

Methods

pure :: a -> f a #

Lift a value into the Structure.

#### Examples

Expand

    >>> pure 1 :: Maybe Int
    Just 1

    >>> pure 'z' :: [Char]
    "z"

    >>> pure (pure ":D") :: Maybe [String]
    Just [":D"]

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

Sequential application.

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

#### Example

Expand

Used in combination with ``(<$>)``, ``(<*>)`` can be used to build a record.

    >>> data MyState = MyState {arg1 :: Foo, arg2 :: Bar, arg3 :: Baz}

    >>> produceFoo :: Applicative f => f Foo
    >>> produceBar :: Applicative f => f Bar
    >>> produceBaz :: Applicative f => f Baz

    >>> mkState :: Applicative f => f MyState
    >>> mkState = MyState <$> produceFoo <*> produceBar <*> produceBaz

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

Lift a binary function to actions.

Some functors support an implementation of `liftA2` that is more efficient than the default one. In particular, if `fmap` is an expensive operation, it is likely better to use `liftA2` than to `fmap` over the structure and then use `<*>`.

This became a typeclass method in 4.10.0.0. Prior to that, it was a function defined in terms of `<*>` and `fmap`.

#### Example

Expand

    >>> liftA2 (,) (Just 3) (Just 5)
    Just (3,5)

    >>> liftA2 (+) [1, 2, 3] [4, 5, 6]
    [5,6,7,6,7,8,7,8,9]

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

Sequence actions, discarding the value of the first argument.

#### Examples

Expand

If used in conjunction with the Applicative instance for `Maybe`, you can chain Maybe computations, with a possible "early return" in case of `Nothing`.

    >>> Just 2 *> Just 3
    Just 3

    >>> Nothing *> Just 3
    Nothing

Of course a more interesting use case would be to have effectful computations instead of just returning pure values.

    >>> import Data.Char
    >>> import GHC.Internal.Text.ParserCombinators.ReadP
    >>> let p = string "my name is " *> munch1 isAlpha <* eof
    >>> readP_to_S p "my name is Simon"
    [("Simon","")]

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

Sequence actions, discarding the value of the second argument.

#### Instances

Instances details

Applicative Complex | Since: base-4.9.0.0
Instance details Defined in Data.Complex Methods pure :: a -> Complex a # (<*>) :: Complex (a -> b) -> Complex a -> Complex b # liftA2 :: (a -> b -> c) -> Complex a -> Complex b -> Complex c # (*>) :: Complex a -> Complex b -> Complex b # (<*) :: Complex a -> Complex b -> Complex a #
Applicative First | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods pure :: a -> First a # (<*>) :: First (a -> b) -> First a -> First b # liftA2 :: (a -> b -> c) -> First a -> First b -> First c # (*>) :: First a -> First b -> First b # (<*) :: First a -> First b -> First a #
Applicative Last | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods pure :: a -> Last a # (<*>) :: Last (a -> b) -> Last a -> Last b # liftA2 :: (a -> b -> c) -> Last a -> Last b -> Last c # (*>) :: Last a -> Last b -> Last b # (<*) :: Last a -> Last b -> Last a #
Applicative Max | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods pure :: a -> Max a # (<*>) :: Max (a -> b) -> Max a -> Max b # liftA2 :: (a -> b -> c) -> Max a -> Max b -> Max c # (*>) :: Max a -> Max b -> Max b # (<*) :: Max a -> Max b -> Max a #
Applicative Min | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods pure :: a -> Min a # (<*>) :: Min (a -> b) -> Min a -> Min b # liftA2 :: (a -> b -> c) -> Min a -> Min b -> Min c # (*>) :: Min a -> Min b -> Min b # (<*) :: Min a -> Min b -> Min a #
Applicative Gen # |
Instance details Defined in Foundation.Check.Gen Methods pure :: a -> Gen a # (<*>) :: Gen (a -> b) -> Gen a -> Gen b # liftA2 :: (a -> b -> c) -> Gen a -> Gen b -> Gen c # (*>) :: Gen a -> Gen b -> Gen b # (<*) :: Gen a -> Gen b -> Gen a #
Applicative Check # |
Instance details Defined in Foundation.Check.Types Methods pure :: a -> Check a # (<*>) :: Check (a -> b) -> Check a -> Check b # liftA2 :: (a -> b -> c) -> Check a -> Check b -> Check c # (*>) :: Check a -> Check b -> Check b # (<*) :: Check a -> Check b -> Check a #
Applicative DList # |
Instance details Defined in Foundation.List.DList Methods pure :: a -> DList a # (<*>) :: DList (a -> b) -> DList a -> DList b # liftA2 :: (a -> b -> c) -> DList a -> DList b -> DList c # (*>) :: DList a -> DList b -> DList b # (<*) :: DList a -> DList b -> DList a #
Applicative Partial # |
Instance details Defined in Foundation.Partial Methods pure :: a -> Partial a # (<*>) :: Partial (a -> b) -> Partial a -> Partial b # liftA2 :: (a -> b -> c) -> Partial a -> Partial b -> Partial c # (*>) :: Partial a -> Partial b -> Partial b # (<*) :: Partial a -> Partial b -> Partial a #
Applicative NonEmpty | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Base Methods pure :: a -> NonEmpty a # (<*>) :: NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b # liftA2 :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c # (*>) :: NonEmpty a -> NonEmpty b -> NonEmpty b # (<*) :: NonEmpty a -> NonEmpty b -> NonEmpty a #
Applicative STM | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Conc.Sync Methods pure :: a -> STM a # (<*>) :: STM (a -> b) -> STM a -> STM b # liftA2 :: (a -> b -> c) -> STM a -> STM b -> STM c # (*>) :: STM a -> STM b -> STM b # (<*) :: STM a -> STM b -> STM a #
Applicative Identity | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Functor.Identity Methods pure :: a -> Identity a # (<*>) :: Identity (a -> b) -> Identity a -> Identity b # liftA2 :: (a -> b -> c) -> Identity a -> Identity b -> Identity c # (*>) :: Identity a -> Identity b -> Identity b # (<*) :: Identity a -> Identity b -> Identity a #
Applicative First | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Monoid Methods pure :: a -> First a # (<*>) :: First (a -> b) -> First a -> First b # liftA2 :: (a -> b -> c) -> First a -> First b -> First c # (*>) :: First a -> First b -> First b # (<*) :: First a -> First b -> First a #
Applicative Last | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Monoid Methods pure :: a -> Last a # (<*>) :: Last (a -> b) -> Last a -> Last b # liftA2 :: (a -> b -> c) -> Last a -> Last b -> Last c # (*>) :: Last a -> Last b -> Last b # (<*) :: Last a -> Last b -> Last a #
Applicative Dual | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods pure :: a -> Dual a # (<*>) :: Dual (a -> b) -> Dual a -> Dual b # liftA2 :: (a -> b -> c) -> Dual a -> Dual b -> Dual c # (*>) :: Dual a -> Dual b -> Dual b # (<*) :: Dual a -> Dual b -> Dual a #
Applicative Product | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods pure :: a -> Product a # (<*>) :: Product (a -> b) -> Product a -> Product b # liftA2 :: (a -> b -> c) -> Product a -> Product b -> Product c # (*>) :: Product a -> Product b -> Product b # (<*) :: Product a -> Product b -> Product a #
Applicative Sum | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods pure :: a -> Sum a # (<*>) :: Sum (a -> b) -> Sum a -> Sum b # liftA2 :: (a -> b -> c) -> Sum a -> Sum b -> Sum c # (*>) :: Sum a -> Sum b -> Sum b # (<*) :: Sum a -> Sum b -> Sum a #
Applicative ZipList |
    f <$> ZipList xs1 <*> ... <*> ZipList xsN
        = ZipList (zipWithN f xs1 ... xsN)
where `zipWithN` refers to the `zipWith` function of the appropriate arity (`zipWith`, `zipWith3`, `zipWith4`, ...). For example:
    (\a b c -> stimes c [a, b]) <$> ZipList "abcd" <*> ZipList "567" <*> ZipList [1..]
        = ZipList (zipWith3 (\a b c -> stimes c [a, b]) "abcd" "567" [1..])
        = ZipList {getZipList = ["a5","b6b6","c7c7c7"]}
@since base-2.01
Instance details Defined in GHC.Internal.Functor.ZipList Methods pure :: a -> ZipList a # (<*>) :: ZipList (a -> b) -> ZipList a -> ZipList b # liftA2 :: (a -> b -> c) -> ZipList a -> ZipList b -> ZipList c # (*>) :: ZipList a -> ZipList b -> ZipList b # (<*) :: ZipList a -> ZipList b -> ZipList a #
Applicative Par1 | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods pure :: a -> Par1 a # (<*>) :: Par1 (a -> b) -> Par1 a -> Par1 b # liftA2 :: (a -> b -> c) -> Par1 a -> Par1 b -> Par1 c # (*>) :: Par1 a -> Par1 b -> Par1 b # (<*) :: Par1 a -> Par1 b -> Par1 a #
Applicative P | @since base-4.5.0.0
Instance details Defined in GHC.Internal.Text.ParserCombinators.ReadP Methods pure :: a -> P a # (<*>) :: P (a -> b) -> P a -> P b # liftA2 :: (a -> b -> c) -> P a -> P b -> P c # (*>) :: P a -> P b -> P b # (<*) :: P a -> P b -> P a #
Applicative ReadP | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Text.ParserCombinators.ReadP Methods pure :: a -> ReadP a # (<*>) :: ReadP (a -> b) -> ReadP a -> ReadP b # liftA2 :: (a -> b -> c) -> ReadP a -> ReadP b -> ReadP c # (*>) :: ReadP a -> ReadP b -> ReadP b # (<*) :: ReadP a -> ReadP b -> ReadP a #
Applicative IO | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods pure :: a -> IO a # (<*>) :: IO (a -> b) -> IO a -> IO b # liftA2 :: (a -> b -> c) -> IO a -> IO b -> IO c # (*>) :: IO a -> IO b -> IO b # (<*) :: IO a -> IO b -> IO a #
Applicative Maybe | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods pure :: a -> Maybe a # (<*>) :: Maybe (a -> b) -> Maybe a -> Maybe b # liftA2 :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c # (*>) :: Maybe a -> Maybe b -> Maybe b # (<*) :: Maybe a -> Maybe b -> Maybe a #
Applicative Solo | @since base-4.15
Instance details Defined in GHC.Internal.Base Methods pure :: a -> Solo a # (<*>) :: Solo (a -> b) -> Solo a -> Solo b # liftA2 :: (a -> b -> c) -> Solo a -> Solo b -> Solo c # (*>) :: Solo a -> Solo b -> Solo b # (<*) :: Solo a -> Solo b -> Solo a #
Applicative [] | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods pure :: a -> [a] # (<*>) :: [a -> b] -> [a] -> [b] # liftA2 :: (a -> b -> c) -> [a] -> [b] -> [c] # (*>) :: [a] -> [b] -> [b] # (<*) :: [a] -> [b] -> [a] #
Monad m => Applicative (WrappedMonad m) | Since: base-2.1
Instance details Defined in Control.Applicative Methods pure :: a -> WrappedMonad m a # (<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b # liftA2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c # (*>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b # (<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a #
Applicative m => Applicative (ResourceT m) # |
Instance details Defined in Foundation.Conduit.Internal Methods pure :: a -> ResourceT m a # (<*>) :: ResourceT m (a -> b) -> ResourceT m a -> ResourceT m b # liftA2 :: (a -> b -> c) -> ResourceT m a -> ResourceT m b -> ResourceT m c # (*>) :: ResourceT m a -> ResourceT m b -> ResourceT m b # (<*) :: ResourceT m a -> ResourceT m b -> ResourceT m a #
ParserSource input => Applicative (Parser input) # |
Instance details Defined in Foundation.Parser Methods pure :: a -> Parser input a # (<*>) :: Parser input (a -> b) -> Parser input a -> Parser input b # liftA2 :: (a -> b -> c) -> Parser input a -> Parser input b -> Parser input c # (*>) :: Parser input a -> Parser input b -> Parser input b # (<*) :: Parser input a -> Parser input b -> Parser input a #
Applicative (MonadRandomState gen) # |
Instance details Defined in Foundation.Random.DRG Methods pure :: a -> MonadRandomState gen a # (<*>) :: MonadRandomState gen (a -> b) -> MonadRandomState gen a -> MonadRandomState gen b # liftA2 :: (a -> b -> c) -> MonadRandomState gen a -> MonadRandomState gen b -> MonadRandomState gen c # (*>) :: MonadRandomState gen a -> MonadRandomState gen b -> MonadRandomState gen b # (<*) :: MonadRandomState gen a -> MonadRandomState gen b -> MonadRandomState gen a #
Arrow a => Applicative (ArrowMonad a) | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Control.Arrow Methods pure :: a0 -> ArrowMonad a a0 # (<*>) :: ArrowMonad a (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b # liftA2 :: (a0 -> b -> c) -> ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a c # (*>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b # (<*) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a a0 #
Applicative (Either e) | @since base-3.0
Instance details Defined in GHC.Internal.Data.Either Methods pure :: a -> Either e a # (<*>) :: Either e (a -> b) -> Either e a -> Either e b # liftA2 :: (a -> b -> c) -> Either e a -> Either e b -> Either e c # (*>) :: Either e a -> Either e b -> Either e b # (<*) :: Either e a -> Either e b -> Either e a #
Applicative (Proxy :: Type -> Type) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Proxy Methods pure :: a -> Proxy a # (<*>) :: Proxy (a -> b) -> Proxy a -> Proxy b # liftA2 :: (a -> b -> c) -> Proxy a -> Proxy b -> Proxy c # (*>) :: Proxy a -> Proxy b -> Proxy b # (<*) :: Proxy a -> Proxy b -> Proxy a #
Applicative (U1 :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods pure :: a -> U1 a # (<*>) :: U1 (a -> b) -> U1 a -> U1 b # liftA2 :: (a -> b -> c) -> U1 a -> U1 b -> U1 c # (*>) :: U1 a -> U1 b -> U1 b # (<*) :: U1 a -> U1 b -> U1 a #
Applicative (ST s) | @since base-4.4.0.0
Instance details Defined in GHC.Internal.ST Methods pure :: a -> ST s a # (<*>) :: ST s (a -> b) -> ST s a -> ST s b # liftA2 :: (a -> b -> c) -> ST s a -> ST s b -> ST s c # (*>) :: ST s a -> ST s b -> ST s b # (<*) :: ST s a -> ST s b -> ST s a #
Monoid a => Applicative ((,) a) | For tuples, the `Monoid` constraint on `a` determines how the first values merge. For example, `String`s concatenate:
    ("hello ", (+15)) <*> ("world!", 2002)
    ("hello world!",2017)
@since base-2.01
Instance details Defined in GHC.Internal.Base Methods pure :: a0 -> (a, a0) # (<*>) :: (a, a0 -> b) -> (a, a0) -> (a, b) # liftA2 :: (a0 -> b -> c) -> (a, a0) -> (a, b) -> (a, c) # (*>) :: (a, a0) -> (a, b) -> (a, b) # (<*) :: (a, a0) -> (a, b) -> (a, a0) #
Arrow a => Applicative (WrappedArrow a b) | Since: base-2.1
Instance details Defined in Control.Applicative Methods pure :: a0 -> WrappedArrow a b a0 # (<*>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 # liftA2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c # (*>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 # (<*) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 #
Monad m => Applicative (Reader r m) |
Instance details Defined in Basement.Compat.MonadTrans Methods pure :: a -> Reader r m a # (<*>) :: Reader r m (a -> b) -> Reader r m a -> Reader r m b # liftA2 :: (a -> b -> c) -> Reader r m a -> Reader r m b -> Reader r m c # (*>) :: Reader r m a -> Reader r m b -> Reader r m b # (<*) :: Reader r m a -> Reader r m b -> Reader r m a #
Monad m => Applicative (State s m) |
Instance details Defined in Basement.Compat.MonadTrans Methods pure :: a -> State s m a # (<*>) :: State s m (a -> b) -> State s m a -> State s m b # liftA2 :: (a -> b -> c) -> State s m a -> State s m b -> State s m c # (*>) :: State s m a -> State s m b -> State s m b # (<*) :: State s m a -> State s m b -> State s m a #
Monad m => Applicative (ZipSink i m) # |
Instance details Defined in Foundation.Conduit.Internal Methods pure :: a -> ZipSink i m a # (<*>) :: ZipSink i m (a -> b) -> ZipSink i m a -> ZipSink i m b # liftA2 :: (a -> b -> c) -> ZipSink i m a -> ZipSink i m b -> ZipSink i m c # (*>) :: ZipSink i m a -> ZipSink i m b -> ZipSink i m b # (<*) :: ZipSink i m a -> ZipSink i m b -> ZipSink i m a #
Monad m => Applicative (ExceptT e m) # |
Instance details Defined in Foundation.Monad.Except Methods pure :: a -> ExceptT e m a # (<*>) :: ExceptT e m (a -> b) -> ExceptT e m a -> ExceptT e m b # liftA2 :: (a -> b -> c) -> ExceptT e m a -> ExceptT e m b -> ExceptT e m c # (*>) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m b # (<*) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m a #
Applicative m => Applicative (ReaderT r m) # |
Instance details Defined in Foundation.Monad.Reader Methods pure :: a -> ReaderT r m a # (<*>) :: ReaderT r m (a -> b) -> ReaderT r m a -> ReaderT r m b # liftA2 :: (a -> b -> c) -> ReaderT r m a -> ReaderT r m b -> ReaderT r m c # (*>) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m b # (<*) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m a #
(Applicative m, Monad m) => Applicative (StateT s m) # |
Instance details Defined in Foundation.Monad.State Methods pure :: a -> StateT s m a # (<*>) :: StateT s m (a -> b) -> StateT s m a -> StateT s m b # liftA2 :: (a -> b -> c) -> StateT s m a -> StateT s m b -> StateT s m c # (*>) :: StateT s m a -> StateT s m b -> StateT s m b # (<*) :: StateT s m a -> StateT s m b -> StateT s m a #
Applicative m => Applicative (Kleisli m a) | @since base-4.14.0.0
Instance details Defined in GHC.Internal.Control.Arrow Methods pure :: a0 -> Kleisli m a a0 # (<*>) :: Kleisli m a (a0 -> b) -> Kleisli m a a0 -> Kleisli m a b # liftA2 :: (a0 -> b -> c) -> Kleisli m a a0 -> Kleisli m a b -> Kleisli m a c # (*>) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a b # (<*) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a a0 #
Monoid m => Applicative (Const m :: Type -> Type) | @since base-2.0.1
Instance details Defined in GHC.Internal.Data.Functor.Const Methods pure :: a -> Const m a # (<*>) :: Const m (a -> b) -> Const m a -> Const m b # liftA2 :: (a -> b -> c) -> Const m a -> Const m b -> Const m c # (*>) :: Const m a -> Const m b -> Const m b # (<*) :: Const m a -> Const m b -> Const m a #
Applicative f => Applicative (Ap f) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Data.Monoid Methods pure :: a -> Ap f a # (<*>) :: Ap f (a -> b) -> Ap f a -> Ap f b # liftA2 :: (a -> b -> c) -> Ap f a -> Ap f b -> Ap f c # (*>) :: Ap f a -> Ap f b -> Ap f b # (<*) :: Ap f a -> Ap f b -> Ap f a #
Applicative f => Applicative (Alt f) | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods pure :: a -> Alt f a # (<*>) :: Alt f (a -> b) -> Alt f a -> Alt f b # liftA2 :: (a -> b -> c) -> Alt f a -> Alt f b -> Alt f c # (*>) :: Alt f a -> Alt f b -> Alt f b # (<*) :: Alt f a -> Alt f b -> Alt f a #
(Generic1 f, Applicative (Rep1 f)) => Applicative (Generically1 f) | @since base-4.17.0.0
Instance details Defined in GHC.Internal.Generics Methods pure :: a -> Generically1 f a # (<*>) :: Generically1 f (a -> b) -> Generically1 f a -> Generically1 f b # liftA2 :: (a -> b -> c) -> Generically1 f a -> Generically1 f b -> Generically1 f c # (*>) :: Generically1 f a -> Generically1 f b -> Generically1 f b # (<*) :: Generically1 f a -> Generically1 f b -> Generically1 f a #
Applicative f => Applicative (Rec1 f) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods pure :: a -> Rec1 f a # (<*>) :: Rec1 f (a -> b) -> Rec1 f a -> Rec1 f b # liftA2 :: (a -> b -> c) -> Rec1 f a -> Rec1 f b -> Rec1 f c # (*>) :: Rec1 f a -> Rec1 f b -> Rec1 f b # (<*) :: Rec1 f a -> Rec1 f b -> Rec1 f a #
(Monoid a, Monoid b) => Applicative ((,,) a b) | @since base-4.14.0.0
Instance details Defined in GHC.Internal.Base Methods pure :: a0 -> (a, b, a0) # (<*>) :: (a, b, a0 -> b0) -> (a, b, a0) -> (a, b, b0) # liftA2 :: (a0 -> b0 -> c) -> (a, b, a0) -> (a, b, b0) -> (a, b, c) # (*>) :: (a, b, a0) -> (a, b, b0) -> (a, b, b0) # (<*) :: (a, b, a0) -> (a, b, b0) -> (a, b, a0) #
(Applicative f, Applicative g) => Applicative (Product f g) | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Product Methods pure :: a -> Product f g a # (<*>) :: Product f g (a -> b) -> Product f g a -> Product f g b # liftA2 :: (a -> b -> c) -> Product f g a -> Product f g b -> Product f g c # (*>) :: Product f g a -> Product f g b -> Product f g b # (<*) :: Product f g a -> Product f g b -> Product f g a #
Applicative (Conduit i o m) # |
Instance details Defined in Foundation.Conduit.Internal Methods pure :: a -> Conduit i o m a # (<*>) :: Conduit i o m (a -> b) -> Conduit i o m a -> Conduit i o m b # liftA2 :: (a -> b -> c) -> Conduit i o m a -> Conduit i o m b -> Conduit i o m c # (*>) :: Conduit i o m a -> Conduit i o m b -> Conduit i o m b # (<*) :: Conduit i o m a -> Conduit i o m b -> Conduit i o m a #
(Applicative f, Applicative g) => Applicative (f :*: g) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods pure :: a -> (f :*: g) a # (<*>) :: (f :*: g) (a -> b) -> (f :*: g) a -> (f :*: g) b # liftA2 :: (a -> b -> c) -> (f :*: g) a -> (f :*: g) b -> (f :*: g) c # (*>) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) b # (<*) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) a #
Monoid c => Applicative (K1 i c :: Type -> Type) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Generics Methods pure :: a -> K1 i c a # (<*>) :: K1 i c (a -> b) -> K1 i c a -> K1 i c b # liftA2 :: (a -> b -> c0) -> K1 i c a -> K1 i c b -> K1 i c c0 # (*>) :: K1 i c a -> K1 i c b -> K1 i c b # (<*) :: K1 i c a -> K1 i c b -> K1 i c a #
(Monoid a, Monoid b, Monoid c) => Applicative ((,,,) a b c) | @since base-4.14.0.0
Instance details Defined in GHC.Internal.Base Methods pure :: a0 -> (a, b, c, a0) # (<*>) :: (a, b, c, a0 -> b0) -> (a, b, c, a0) -> (a, b, c, b0) # liftA2 :: (a0 -> b0 -> c0) -> (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, c0) # (*>) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, b0) # (<*) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, a0) #
Applicative ((->) r) | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods pure :: a -> r -> a # (<*>) :: (r -> (a -> b)) -> (r -> a) -> r -> b # liftA2 :: (a -> b -> c) -> (r -> a) -> (r -> b) -> r -> c # (*>) :: (r -> a) -> (r -> b) -> r -> b # (<*) :: (r -> a) -> (r -> b) -> r -> a #
(Applicative f, Applicative g) => Applicative (Compose f g) | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Compose Methods pure :: a -> Compose f g a # (<*>) :: Compose f g (a -> b) -> Compose f g a -> Compose f g b # liftA2 :: (a -> b -> c) -> Compose f g a -> Compose f g b -> Compose f g c # (*>) :: Compose f g a -> Compose f g b -> Compose f g b # (<*) :: Compose f g a -> Compose f g b -> Compose f g a #
(Applicative f, Applicative g) => Applicative (f :.: g) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods pure :: a -> (f :.: g) a # (<*>) :: (f :.: g) (a -> b) -> (f :.: g) a -> (f :.: g) b # liftA2 :: (a -> b -> c) -> (f :.: g) a -> (f :.: g) b -> (f :.: g) c # (*>) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) b # (<*) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) a #
Applicative f => Applicative (M1 i c f) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods pure :: a -> M1 i c f a # (<*>) :: M1 i c f (a -> b) -> M1 i c f a -> M1 i c f b # liftA2 :: (a -> b -> c0) -> M1 i c f a -> M1 i c f b -> M1 i c f c0 # (*>) :: M1 i c f a -> M1 i c f b -> M1 i c f b # (<*) :: M1 i c f a -> M1 i c f b -> M1 i c f a #
Monad state => Applicative (Builder collection mutCollection step state err) |
Instance details Defined in Basement.MutableBuilder Methods pure :: a -> Builder collection mutCollection step state err a # (<*>) :: Builder collection mutCollection step state err (a -> b) -> Builder collection mutCollection step state err a -> Builder collection mutCollection step state err b # liftA2 :: (a -> b -> c) -> Builder collection mutCollection step state err a -> Builder collection mutCollection step state err b -> Builder collection mutCollection step state err c # (*>) :: Builder collection mutCollection step state err a -> Builder collection mutCollection step state err b -> Builder collection mutCollection step state err b # (<*) :: Builder collection mutCollection step state err a -> Builder collection mutCollection step state err b -> Builder collection mutCollection step state err a #

class Applicative m => Monad (m :: Type -> Type) where #

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

Instances of `Monad` should satisfy the following:

Left identity
  ``return` a `>>=` k = k a`
Right identity
  `m `>>=` `return` = m`
Associativity
  `m `>>=` (\x -> k x `>>=` h) = (m `>>=` k) `>>=` h`

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

-     pure = return

-     m1 <*> m2 = m1 >>= (\x1 -> m2 >>= (\x2 -> return (x1 x2)))

The above laws imply:

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

-     (>>) = (*>)

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

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

Minimal complete definition

(>>=)

Methods

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

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

'`as `>>=` bs`' can be understood as the `do` expression

    do a <- as
       bs a

An alternative name for this function is 'bind', but some people may refer to it as 'flatMap', which results from it being equivialent to

    \x f -> join (fmap f x) :: Monad m => m a -> (a -> m b) -> m b

which can be seen as mapping a value with `Monad m => m a -> m (m b)` and then 'flattening' `m (m b)` to `m b` using `join`.

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

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

'`as `>>` bs`' can be understood as the `do` expression

    do as
       bs

or in terms of ``(>>=)`` as

    as >>= const bs

return :: a -> m a #

Inject a value into the monadic type. This function should not be different from its default implementation as `pure`. The justification for the existence of this function is merely historic.

#### Instances

Instances details

Monad Complex | Since: base-4.9.0.0
Instance details Defined in Data.Complex Methods (>>=) :: Complex a -> (a -> Complex b) -> Complex b # (>>) :: Complex a -> Complex b -> Complex b # return :: a -> Complex a #
Monad First | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods (>>=) :: First a -> (a -> First b) -> First b # (>>) :: First a -> First b -> First b # return :: a -> First a #
Monad Last | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods (>>=) :: Last a -> (a -> Last b) -> Last b # (>>) :: Last a -> Last b -> Last b # return :: a -> Last a #
Monad Max | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods (>>=) :: Max a -> (a -> Max b) -> Max b # (>>) :: Max a -> Max b -> Max b # return :: a -> Max a #
Monad Min | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods (>>=) :: Min a -> (a -> Min b) -> Min b # (>>) :: Min a -> Min b -> Min b # return :: a -> Min a #
Monad Gen # |
Instance details Defined in Foundation.Check.Gen Methods (>>=) :: Gen a -> (a -> Gen b) -> Gen b # (>>) :: Gen a -> Gen b -> Gen b # return :: a -> Gen a #
Monad Check # |
Instance details Defined in Foundation.Check.Types Methods (>>=) :: Check a -> (a -> Check b) -> Check b # (>>) :: Check a -> Check b -> Check b # return :: a -> Check a #
Monad DList # |
Instance details Defined in Foundation.List.DList Methods (>>=) :: DList a -> (a -> DList b) -> DList b # (>>) :: DList a -> DList b -> DList b # return :: a -> DList a #
Monad Partial # |
Instance details Defined in Foundation.Partial Methods (>>=) :: Partial a -> (a -> Partial b) -> Partial b # (>>) :: Partial a -> Partial b -> Partial b # return :: a -> Partial a #
Monad NonEmpty | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Base Methods (>>=) :: NonEmpty a -> (a -> NonEmpty b) -> NonEmpty b # (>>) :: NonEmpty a -> NonEmpty b -> NonEmpty b # return :: a -> NonEmpty a #
Monad STM | @since base-4.3.0.0
Instance details Defined in GHC.Internal.Conc.Sync Methods (>>=) :: STM a -> (a -> STM b) -> STM b # (>>) :: STM a -> STM b -> STM b # return :: a -> STM a #
Monad Identity | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Functor.Identity Methods (>>=) :: Identity a -> (a -> Identity b) -> Identity b # (>>) :: Identity a -> Identity b -> Identity b # return :: a -> Identity a #
Monad First | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Monoid Methods (>>=) :: First a -> (a -> First b) -> First b # (>>) :: First a -> First b -> First b # return :: a -> First a #
Monad Last | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Monoid Methods (>>=) :: Last a -> (a -> Last b) -> Last b # (>>) :: Last a -> Last b -> Last b # return :: a -> Last a #
Monad Dual | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods (>>=) :: Dual a -> (a -> Dual b) -> Dual b # (>>) :: Dual a -> Dual b -> Dual b # return :: a -> Dual a #
Monad Product | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods (>>=) :: Product a -> (a -> Product b) -> Product b # (>>) :: Product a -> Product b -> Product b # return :: a -> Product a #
Monad Sum | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods (>>=) :: Sum a -> (a -> Sum b) -> Sum b # (>>) :: Sum a -> Sum b -> Sum b # return :: a -> Sum a #
Monad Par1 | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods (>>=) :: Par1 a -> (a -> Par1 b) -> Par1 b # (>>) :: Par1 a -> Par1 b -> Par1 b # return :: a -> Par1 a #
Monad P | @since base-2.01
Instance details Defined in GHC.Internal.Text.ParserCombinators.ReadP Methods (>>=) :: P a -> (a -> P b) -> P b # (>>) :: P a -> P b -> P b # return :: a -> P a #
Monad ReadP | @since base-2.01
Instance details Defined in GHC.Internal.Text.ParserCombinators.ReadP Methods (>>=) :: ReadP a -> (a -> ReadP b) -> ReadP b # (>>) :: ReadP a -> ReadP b -> ReadP b # return :: a -> ReadP a #
Monad IO | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods (>>=) :: IO a -> (a -> IO b) -> IO b # (>>) :: IO a -> IO b -> IO b # return :: a -> IO a #
Monad Maybe | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods (>>=) :: Maybe a -> (a -> Maybe b) -> Maybe b # (>>) :: Maybe a -> Maybe b -> Maybe b # return :: a -> Maybe a #
Monad Solo | @since base-4.15
Instance details Defined in GHC.Internal.Base Methods (>>=) :: Solo a -> (a -> Solo b) -> Solo b # (>>) :: Solo a -> Solo b -> Solo b # return :: a -> Solo a #
Monad [] | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods (>>=) :: [a] -> (a -> [b]) -> [b] # (>>) :: [a] -> [b] -> [b] # return :: a -> [a] #
Monad m => Monad (WrappedMonad m) | Since: base-4.7.0.0
Instance details Defined in Control.Applicative Methods (>>=) :: WrappedMonad m a -> (a -> WrappedMonad m b) -> WrappedMonad m b # (>>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b # return :: a -> WrappedMonad m a #
Monad m => Monad (ResourceT m) # |
Instance details Defined in Foundation.Conduit.Internal Methods (>>=) :: ResourceT m a -> (a -> ResourceT m b) -> ResourceT m b # (>>) :: ResourceT m a -> ResourceT m b -> ResourceT m b # return :: a -> ResourceT m a #
ParserSource input => Monad (Parser input) # |
Instance details Defined in Foundation.Parser Methods (>>=) :: Parser input a -> (a -> Parser input b) -> Parser input b # (>>) :: Parser input a -> Parser input b -> Parser input b # return :: a -> Parser input a #
Monad (MonadRandomState gen) # |
Instance details Defined in Foundation.Random.DRG Methods (>>=) :: MonadRandomState gen a -> (a -> MonadRandomState gen b) -> MonadRandomState gen b # (>>) :: MonadRandomState gen a -> MonadRandomState gen b -> MonadRandomState gen b # return :: a -> MonadRandomState gen a #
ArrowApply a => Monad (ArrowMonad a) | @since base-2.01
Instance details Defined in GHC.Internal.Control.Arrow Methods (>>=) :: ArrowMonad a a0 -> (a0 -> ArrowMonad a b) -> ArrowMonad a b # (>>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b # return :: a0 -> ArrowMonad a a0 #
Monad (Either e) | @since base-4.4.0.0
Instance details Defined in GHC.Internal.Data.Either Methods (>>=) :: Either e a -> (a -> Either e b) -> Either e b # (>>) :: Either e a -> Either e b -> Either e b # return :: a -> Either e a #
Monad (Proxy :: Type -> Type) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Proxy Methods (>>=) :: Proxy a -> (a -> Proxy b) -> Proxy b # (>>) :: Proxy a -> Proxy b -> Proxy b # return :: a -> Proxy a #
Monad (U1 :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods (>>=) :: U1 a -> (a -> U1 b) -> U1 b # (>>) :: U1 a -> U1 b -> U1 b # return :: a -> U1 a #
Monad (ST s) | @since base-2.01
Instance details Defined in GHC.Internal.ST Methods (>>=) :: ST s a -> (a -> ST s b) -> ST s b # (>>) :: ST s a -> ST s b -> ST s b # return :: a -> ST s a #
Monoid a => Monad ((,) a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Base Methods (>>=) :: (a, a0) -> (a0 -> (a, b)) -> (a, b) # (>>) :: (a, a0) -> (a, b) -> (a, b) # return :: a0 -> (a, a0) #
Monad m => Monad (Reader r m) |
Instance details Defined in Basement.Compat.MonadTrans Methods (>>=) :: Reader r m a -> (a -> Reader r m b) -> Reader r m b # (>>) :: Reader r m a -> Reader r m b -> Reader r m b # return :: a -> Reader r m a #
Monad m => Monad (State r m) |
Instance details Defined in Basement.Compat.MonadTrans Methods (>>=) :: State r m a -> (a -> State r m b) -> State r m b # (>>) :: State r m a -> State r m b -> State r m b # return :: a -> State r m a #
Monad m => Monad (ExceptT e m) # |
Instance details Defined in Foundation.Monad.Except Methods (>>=) :: ExceptT e m a -> (a -> ExceptT e m b) -> ExceptT e m b # (>>) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m b # return :: a -> ExceptT e m a #
Monad m => Monad (ReaderT r m) # |
Instance details Defined in Foundation.Monad.Reader Methods (>>=) :: ReaderT r m a -> (a -> ReaderT r m b) -> ReaderT r m b # (>>) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m b # return :: a -> ReaderT r m a #
(Functor m, Monad m) => Monad (StateT s m) # |
Instance details Defined in Foundation.Monad.State Methods (>>=) :: StateT s m a -> (a -> StateT s m b) -> StateT s m b # (>>) :: StateT s m a -> StateT s m b -> StateT s m b # return :: a -> StateT s m a #
Monad m => Monad (Kleisli m a) | @since base-4.14.0.0
Instance details Defined in GHC.Internal.Control.Arrow Methods (>>=) :: Kleisli m a a0 -> (a0 -> Kleisli m a b) -> Kleisli m a b # (>>) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a b # return :: a0 -> Kleisli m a a0 #
Monad f => Monad (Ap f) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Data.Monoid Methods (>>=) :: Ap f a -> (a -> Ap f b) -> Ap f b # (>>) :: Ap f a -> Ap f b -> Ap f b # return :: a -> Ap f a #
Monad f => Monad (Alt f) | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods (>>=) :: Alt f a -> (a -> Alt f b) -> Alt f b # (>>) :: Alt f a -> Alt f b -> Alt f b # return :: a -> Alt f a #
Monad f => Monad (Rec1 f) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods (>>=) :: Rec1 f a -> (a -> Rec1 f b) -> Rec1 f b # (>>) :: Rec1 f a -> Rec1 f b -> Rec1 f b # return :: a -> Rec1 f a #
(Monoid a, Monoid b) => Monad ((,,) a b) | @since base-4.14.0.0
Instance details Defined in GHC.Internal.Base Methods (>>=) :: (a, b, a0) -> (a0 -> (a, b, b0)) -> (a, b, b0) # (>>) :: (a, b, a0) -> (a, b, b0) -> (a, b, b0) # return :: a0 -> (a, b, a0) #
(Monad f, Monad g) => Monad (Product f g) | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Product Methods (>>=) :: Product f g a -> (a -> Product f g b) -> Product f g b # (>>) :: Product f g a -> Product f g b -> Product f g b # return :: a -> Product f g a #
Monad (Conduit i o m) # |
Instance details Defined in Foundation.Conduit.Internal Methods (>>=) :: Conduit i o m a -> (a -> Conduit i o m b) -> Conduit i o m b # (>>) :: Conduit i o m a -> Conduit i o m b -> Conduit i o m b # return :: a -> Conduit i o m a #
(Monad f, Monad g) => Monad (f :*: g) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods (>>=) :: (f :*: g) a -> (a -> (f :*: g) b) -> (f :*: g) b # (>>) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) b # return :: a -> (f :*: g) a #
(Monoid a, Monoid b, Monoid c) => Monad ((,,,) a b c) | @since base-4.14.0.0
Instance details Defined in GHC.Internal.Base Methods (>>=) :: (a, b, c, a0) -> (a0 -> (a, b, c, b0)) -> (a, b, c, b0) # (>>) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, b0) # return :: a0 -> (a, b, c, a0) #
Monad ((->) r) | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods (>>=) :: (r -> a) -> (a -> r -> b) -> r -> b # (>>) :: (r -> a) -> (r -> b) -> r -> b # return :: a -> r -> a #
Monad f => Monad (M1 i c f) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods (>>=) :: M1 i c f a -> (a -> M1 i c f b) -> M1 i c f b # (>>) :: M1 i c f a -> M1 i c f b -> M1 i c f b # return :: a -> M1 i c f a #
Monad state => Monad (Builder collection mutCollection step state err) |
Instance details Defined in Basement.MutableBuilder Methods (>>=) :: Builder collection mutCollection step state err a -> (a -> Builder collection mutCollection step state err b) -> Builder collection mutCollection step state err b # (>>) :: Builder collection mutCollection step state err a -> Builder collection mutCollection step state err b -> Builder collection mutCollection step state err b # return :: a -> Builder collection mutCollection step state err a #

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

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

    as >>= f == f =<< as

class IsString a where #

`IsString` is used in combination with the `-XOverloadedStrings` language extension to convert the literals to different string types.

For example, if you use the text package, you can say

    {-# LANGUAGE OverloadedStrings  #-}

    myText = "hello world" :: Text

Internally, the extension will convert this to the equivalent of

    myText = fromString @Text ("hello world" :: String)

Note: You can use `fromString` in normal code as well, but the usual performance/memory efficiency problems with `String` apply.

Methods

fromString :: String -> a #

#### Instances

Instances details

IsString AsciiString |
Instance details Defined in Basement.Types.AsciiString Methods fromString :: String -> AsciiString #
IsString String |
Instance details Defined in Basement.UTF8.Base Methods fromString :: String -> String #
IsString IPv4 # |
Instance details Defined in Foundation.Network.IPv4 Methods fromString :: String -> IPv4 #
IsString IPv6 # |
Instance details Defined in Foundation.Network.IPv6 Methods fromString :: String -> IPv6 #
IsString FileName # |
Instance details Defined in Foundation.VFS.FilePath Methods fromString :: String -> FileName #
IsString FilePath # |
Instance details Defined in Foundation.VFS.FilePath Methods fromString :: String -> FilePath #
IsString a => IsString (Identity a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.String Methods fromString :: String -> Identity a #
a ~ Char => IsString [a] | `(a ~ Char)` context was introduced in `4.9.0.0` @since base-2.01
Instance details Defined in GHC.Internal.Data.String Methods fromString :: String -> [a] #
IsString a => IsString (Const a b) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.String Methods fromString :: String -> Const a b #

class IsList l where #

The `IsList` class and its methods are intended to be used in conjunction with the OverloadedLists extension.

@since base-4.7.0.0

Minimal complete definition

fromList, toList

Associated Types

type Item l #

The `Item` type function returns the type of items of the structure `l`.

Methods

fromList :: [Item l] -> l #

The `fromList` function constructs the structure `l` from the given list of `Item l`

fromListN :: Int -> [Item l] -> l #

The `fromListN` function takes the input list's length and potentially uses it to construct the structure `l` more efficiently compared to `fromList`. If the given number does not equal to the input list's length the behaviour of `fromListN` is not specified.

    fromListN (length xs) xs == fromList xs

toList :: l -> [Item l] #

The `toList` function extracts a list of `Item l` from the structure `l`. It should satisfy fromList . toList = id.

#### Instances

Instances details

IsList ByteArray | Since: base-4.17.0.0
Instance details Defined in Data.Array.Byte Associated Types
type Item ByteArray |
Instance details Defined in Data.Array.Byte type Item ByteArray = Word8
Methods fromList :: [Item ByteArray] -> ByteArray # fromListN :: Int -> [Item ByteArray] -> ByteArray # toList :: ByteArray -> [Item ByteArray] #
IsList AsciiString |
Instance details Defined in Basement.Types.AsciiString Associated Types
type Item AsciiString |
Instance details Defined in Basement.Types.AsciiString type Item AsciiString = Char7
Methods fromList :: [Item AsciiString] -> AsciiString # fromListN :: Int -> [Item AsciiString] -> AsciiString # toList :: AsciiString -> [Item AsciiString] #
IsList String |
Instance details Defined in Basement.UTF8.Base Associated Types
type Item String |
Instance details Defined in Basement.UTF8.Base type Item String = Char
Methods fromList :: [Item String] -> String # fromListN :: Int -> [Item String] -> String # toList :: String -> [Item String] #
IsList Bitmap # |
Instance details Defined in Foundation.Array.Bitmap Associated Types
type Item Bitmap |
Instance details Defined in Foundation.Array.Bitmap type Item Bitmap = Bool
Methods fromList :: [Item Bitmap] -> Bitmap # fromListN :: Int -> [Item Bitmap] -> Bitmap # toList :: Bitmap -> [Item Bitmap] #
IsList CSV # |
Instance details Defined in Foundation.Format.CSV.Types Associated Types
type Item CSV |
Instance details Defined in Foundation.Format.CSV.Types type Item CSV = Row
Methods fromList :: [Item CSV] -> CSV # fromListN :: Int -> [Item CSV] -> CSV # toList :: CSV -> [Item CSV] #
IsList Row # |
Instance details Defined in Foundation.Format.CSV.Types Associated Types
type Item Row |
Instance details Defined in Foundation.Format.CSV.Types type Item Row = Field
Methods fromList :: [Item Row] -> Row # fromListN :: Int -> [Item Row] -> Row # toList :: Row -> [Item Row] #
IsList Version | @since base-4.8.0.0
Instance details Defined in GHC.Internal.IsList Associated Types
type Item Version |
Instance details Defined in GHC.Internal.IsList type Item Version = Int
Methods fromList :: [Item Version] -> Version # fromListN :: Int -> [Item Version] -> Version # toList :: Version -> [Item Version] #
IsList CallStack | Be aware that 'fromList . toList = id' only for unfrozen `CallStack`s, since `toList` removes frozenness information. @since base-4.9.0.0
Instance details Defined in GHC.Internal.IsList Associated Types
type Item CallStack |
Instance details Defined in GHC.Internal.IsList type Item CallStack = (String, SrcLoc)
Methods fromList :: [Item CallStack] -> CallStack # fromListN :: Int -> [Item CallStack] -> CallStack # toList :: CallStack -> [Item CallStack] #
PrimType ty => IsList (Block ty) |
Instance details Defined in Basement.Block.Base Associated Types
type Item (Block ty) |
Instance details Defined in Basement.Block.Base type Item (Block ty) = ty
Methods fromList :: [Item (Block ty)] -> Block ty # fromListN :: Int -> [Item (Block ty)] -> Block ty # toList :: Block ty -> [Item (Block ty)] #
IsList (Array ty) |
Instance details Defined in Basement.BoxedArray Associated Types
type Item (Array ty) |
Instance details Defined in Basement.BoxedArray type Item (Array ty) = ty
Methods fromList :: [Item (Array ty)] -> Array ty # fromListN :: Int -> [Item (Array ty)] -> Array ty # toList :: Array ty -> [Item (Array ty)] #
IsList c => IsList (NonEmpty c) |
Instance details Defined in Basement.NonEmpty Associated Types
type Item (NonEmpty c) |
Instance details Defined in Basement.NonEmpty type Item (NonEmpty c) = Item c
Methods fromList :: [Item (NonEmpty c)] -> NonEmpty c # fromListN :: Int -> [Item (NonEmpty c)] -> NonEmpty c # toList :: NonEmpty c -> [Item (NonEmpty c)] #
PrimType ty => IsList (UArray ty) |
Instance details Defined in Basement.UArray.Base Associated Types
type Item (UArray ty) |
Instance details Defined in Basement.UArray.Base type Item (UArray ty) = ty
Methods fromList :: [Item (UArray ty)] -> UArray ty # fromListN :: Int -> [Item (UArray ty)] -> UArray ty # toList :: UArray ty -> [Item (UArray ty)] #
PrimType ty => IsList (ChunkedUArray ty) # |
Instance details Defined in Foundation.Array.Chunked.Unboxed Associated Types
type Item (ChunkedUArray ty) |
Instance details Defined in Foundation.Array.Chunked.Unboxed type Item (ChunkedUArray ty) = ty
Methods fromList :: [Item (ChunkedUArray ty)] -> ChunkedUArray ty # fromListN :: Int -> [Item (ChunkedUArray ty)] -> ChunkedUArray ty # toList :: ChunkedUArray ty -> [Item (ChunkedUArray ty)] #
IsList (DList a) # |
Instance details Defined in Foundation.List.DList Associated Types
type Item (DList a) |
Instance details Defined in Foundation.List.DList type Item (DList a) = a
Methods fromList :: [Item (DList a)] -> DList a # fromListN :: Int -> [Item (DList a)] -> DList a # toList :: DList a -> [Item (DList a)] #
IsList (NonEmpty a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.IsList Associated Types
type Item (NonEmpty a) |
Instance details Defined in GHC.Internal.IsList type Item (NonEmpty a) = a
Methods fromList :: [Item (NonEmpty a)] -> NonEmpty a # fromListN :: Int -> [Item (NonEmpty a)] -> NonEmpty a # toList :: NonEmpty a -> [Item (NonEmpty a)] #
IsList (ZipList a) | @since base-4.15.0.0
Instance details Defined in GHC.Internal.IsList Associated Types
type Item (ZipList a) |
Instance details Defined in GHC.Internal.IsList type Item (ZipList a) = a
Methods fromList :: [Item (ZipList a)] -> ZipList a # fromListN :: Int -> [Item (ZipList a)] -> ZipList a # toList :: ZipList a -> [Item (ZipList a)] #
IsList [a] | @since base-4.7.0.0
Instance details Defined in GHC.Internal.IsList Associated Types
type Item [a] |
Instance details Defined in GHC.Internal.IsList type Item [a] = a
Methods fromList :: [Item [a]] -> [a] # fromListN :: Int -> [Item [a]] -> [a] # toList :: [a] -> [Item [a]] #

## Numeric type classes

class (Integral a, Eq a, Ord a) => IsIntegral a where #

Number literals, convertible through the generic Integer type.

all number are Enum'erable, meaning that you can move to next element

Methods

toInteger :: a -> Integer #

#### Instances

Instances details

IsIntegral Word128 |
Instance details Defined in Basement.Types.Word128 Methods toInteger :: Word128 -> Integer #
IsIntegral Word256 |
Instance details Defined in Basement.Types.Word256 Methods toInteger :: Word256 -> Integer #
IsIntegral CBool |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: CBool -> Integer #
IsIntegral CChar |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: CChar -> Integer #
IsIntegral CInt |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: CInt -> Integer #
IsIntegral CIntMax |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: CIntMax -> Integer #
IsIntegral CIntPtr |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: CIntPtr -> Integer #
IsIntegral CLLong |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: CLLong -> Integer #
IsIntegral CLong |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: CLong -> Integer #
IsIntegral CPtrdiff |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: CPtrdiff -> Integer #
IsIntegral CSChar |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: CSChar -> Integer #
IsIntegral CShort |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: CShort -> Integer #
IsIntegral CSigAtomic |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: CSigAtomic -> Integer #
IsIntegral CSize |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: CSize -> Integer #
IsIntegral CUChar |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: CUChar -> Integer #
IsIntegral CUInt |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: CUInt -> Integer #
IsIntegral CUIntMax |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: CUIntMax -> Integer #
IsIntegral CUIntPtr |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: CUIntPtr -> Integer #
IsIntegral CULLong |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: CULLong -> Integer #
IsIntegral CULong |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: CULong -> Integer #
IsIntegral CUShort |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: CUShort -> Integer #
IsIntegral CWchar |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: CWchar -> Integer #
IsIntegral Int16 |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Int16 -> Integer #
IsIntegral Int32 |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Int32 -> Integer #
IsIntegral Int64 |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Int64 -> Integer #
IsIntegral Int8 |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Int8 -> Integer #
IsIntegral Word16 |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Word16 -> Integer #
IsIntegral Word32 |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Word32 -> Integer #
IsIntegral Word64 |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Word64 -> Integer #
IsIntegral Word8 |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Word8 -> Integer #
IsIntegral Integer |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Integer -> Integer #
IsIntegral Natural |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Natural -> Integer #
IsIntegral Int |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Int -> Integer #
IsIntegral Word |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Word -> Integer #
KnownNat n => IsIntegral (Zn n) |
Instance details Defined in Basement.Bounded Methods toInteger :: Zn n -> Integer #
(KnownNat n, NatWithinBound Word64 n) => IsIntegral (Zn64 n) |
Instance details Defined in Basement.Bounded Methods toInteger :: Zn64 n -> Integer #
IsIntegral (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize Methods toInteger :: CountOf ty -> Integer #
IsIntegral (Offset ty) |
Instance details Defined in Basement.Types.OffsetSize Methods toInteger :: Offset ty -> Integer #

class IsIntegral a => IsNatural a where #

Non Negative Number literals, convertible through the generic Natural type

Methods

toNatural :: a -> Natural #

#### Instances

Instances details

IsNatural Word128 |
Instance details Defined in Basement.Types.Word128 Methods toNatural :: Word128 -> Natural #
IsNatural Word256 |
Instance details Defined in Basement.Types.Word256 Methods toNatural :: Word256 -> Natural #
IsNatural CSize |
Instance details Defined in Basement.Numerical.Number Methods toNatural :: CSize -> Natural #
IsNatural CUChar |
Instance details Defined in Basement.Numerical.Number Methods toNatural :: CUChar -> Natural #
IsNatural CUInt |
Instance details Defined in Basement.Numerical.Number Methods toNatural :: CUInt -> Natural #
IsNatural CUIntMax |
Instance details Defined in Basement.Numerical.Number Methods toNatural :: CUIntMax -> Natural #
IsNatural CUIntPtr |
Instance details Defined in Basement.Numerical.Number Methods toNatural :: CUIntPtr -> Natural #
IsNatural CULLong |
Instance details Defined in Basement.Numerical.Number Methods toNatural :: CULLong -> Natural #
IsNatural CULong |
Instance details Defined in Basement.Numerical.Number Methods toNatural :: CULong -> Natural #
IsNatural CUShort |
Instance details Defined in Basement.Numerical.Number Methods toNatural :: CUShort -> Natural #
IsNatural Word16 |
Instance details Defined in Basement.Numerical.Number Methods toNatural :: Word16 -> Natural #
IsNatural Word32 |
Instance details Defined in Basement.Numerical.Number Methods toNatural :: Word32 -> Natural #
IsNatural Word64 |
Instance details Defined in Basement.Numerical.Number Methods toNatural :: Word64 -> Natural #
IsNatural Word8 |
Instance details Defined in Basement.Numerical.Number Methods toNatural :: Word8 -> Natural #
IsNatural Natural |
Instance details Defined in Basement.Numerical.Number Methods toNatural :: Natural -> Natural #
IsNatural Word |
Instance details Defined in Basement.Numerical.Number Methods toNatural :: Word -> Natural #
KnownNat n => IsNatural (Zn n) |
Instance details Defined in Basement.Bounded Methods toNatural :: Zn n -> Natural #
(KnownNat n, NatWithinBound Word64 n) => IsNatural (Zn64 n) |
Instance details Defined in Basement.Bounded Methods toNatural :: Zn64 n -> Natural #
IsNatural (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize Methods toNatural :: CountOf ty -> Natural #
IsNatural (Offset ty) |
Instance details Defined in Basement.Types.OffsetSize Methods toNatural :: Offset ty -> Natural #

class Signed a where #

types that have sign and can be made absolute

Methods

abs :: a -> a #

signum :: a -> Sign #

#### Instances

Instances details

Signed Int16 # |
Instance details Defined in Foundation.Numerical Methods abs :: Int16 -> Int16 # signum :: Int16 -> Sign #
Signed Int32 # |
Instance details Defined in Foundation.Numerical Methods abs :: Int32 -> Int32 # signum :: Int32 -> Sign #
Signed Int64 # |
Instance details Defined in Foundation.Numerical Methods abs :: Int64 -> Int64 # signum :: Int64 -> Sign #
Signed Int8 # |
Instance details Defined in Foundation.Numerical Methods abs :: Int8 -> Int8 # signum :: Int8 -> Sign #
Signed Integer # |
Instance details Defined in Foundation.Numerical Methods abs :: Integer -> Integer # signum :: Integer -> Sign #
Signed Double # |
Instance details Defined in Foundation.Numerical Methods abs :: Double -> Double # signum :: Double -> Sign #
Signed Float # |
Instance details Defined in Foundation.Numerical Methods abs :: Float -> Float # signum :: Float -> Sign #
Signed Int # |
Instance details Defined in Foundation.Numerical Methods abs :: Int -> Int # signum :: Int -> Sign #

class Additive a where #

Represent class of things that can be added together, contains a neutral element and is commutative.

    x + azero = x
    azero + x = x
    x + y = y + x

Minimal complete definition

azero, (+)

Methods

azero :: a #

(+) :: a -> a -> a infixl 6 #

scale :: IsNatural n => n -> a -> a #

default scale :: (Enum n, IsNatural n) => n -> a -> a #

#### Instances

Instances details

Additive Word128 |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Word128 # (+) :: Word128 -> Word128 -> Word128 # scale :: IsNatural n => n -> Word128 -> Word128 #
Additive Word256 |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Word256 # (+) :: Word256 -> Word256 -> Word256 # scale :: IsNatural n => n -> Word256 -> Word256 #
Additive NanoSeconds # |
Instance details Defined in Foundation.Time.Types Methods azero :: NanoSeconds # (+) :: NanoSeconds -> NanoSeconds -> NanoSeconds # scale :: IsNatural n => n -> NanoSeconds -> NanoSeconds #
Additive Seconds # |
Instance details Defined in Foundation.Time.Types Methods azero :: Seconds # (+) :: Seconds -> Seconds -> Seconds # scale :: IsNatural n => n -> Seconds -> Seconds #
Additive CChar |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CChar # (+) :: CChar -> CChar -> CChar # scale :: IsNatural n => n -> CChar -> CChar #
Additive CClock |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CClock # (+) :: CClock -> CClock -> CClock # scale :: IsNatural n => n -> CClock -> CClock #
Additive CDouble |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CDouble # (+) :: CDouble -> CDouble -> CDouble # scale :: IsNatural n => n -> CDouble -> CDouble #
Additive CFloat |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CFloat # (+) :: CFloat -> CFloat -> CFloat # scale :: IsNatural n => n -> CFloat -> CFloat #
Additive CInt |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CInt # (+) :: CInt -> CInt -> CInt # scale :: IsNatural n => n -> CInt -> CInt #
Additive CIntMax |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CIntMax # (+) :: CIntMax -> CIntMax -> CIntMax # scale :: IsNatural n => n -> CIntMax -> CIntMax #
Additive CIntPtr |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CIntPtr # (+) :: CIntPtr -> CIntPtr -> CIntPtr # scale :: IsNatural n => n -> CIntPtr -> CIntPtr #
Additive CLLong |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CLLong # (+) :: CLLong -> CLLong -> CLLong # scale :: IsNatural n => n -> CLLong -> CLLong #
Additive CLong |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CLong # (+) :: CLong -> CLong -> CLong # scale :: IsNatural n => n -> CLong -> CLong #
Additive CPtrdiff |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CPtrdiff # (+) :: CPtrdiff -> CPtrdiff -> CPtrdiff # scale :: IsNatural n => n -> CPtrdiff -> CPtrdiff #
Additive CSChar |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CSChar # (+) :: CSChar -> CSChar -> CSChar # scale :: IsNatural n => n -> CSChar -> CSChar #
Additive CSUSeconds |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CSUSeconds # (+) :: CSUSeconds -> CSUSeconds -> CSUSeconds # scale :: IsNatural n => n -> CSUSeconds -> CSUSeconds #
Additive CShort |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CShort # (+) :: CShort -> CShort -> CShort # scale :: IsNatural n => n -> CShort -> CShort #
Additive CSigAtomic |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CSigAtomic # (+) :: CSigAtomic -> CSigAtomic -> CSigAtomic # scale :: IsNatural n => n -> CSigAtomic -> CSigAtomic #
Additive CSize |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CSize # (+) :: CSize -> CSize -> CSize # scale :: IsNatural n => n -> CSize -> CSize #
Additive CTime |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CTime # (+) :: CTime -> CTime -> CTime # scale :: IsNatural n => n -> CTime -> CTime #
Additive CUChar |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CUChar # (+) :: CUChar -> CUChar -> CUChar # scale :: IsNatural n => n -> CUChar -> CUChar #
Additive CUInt |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CUInt # (+) :: CUInt -> CUInt -> CUInt # scale :: IsNatural n => n -> CUInt -> CUInt #
Additive CUIntMax |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CUIntMax # (+) :: CUIntMax -> CUIntMax -> CUIntMax # scale :: IsNatural n => n -> CUIntMax -> CUIntMax #
Additive CUIntPtr |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CUIntPtr # (+) :: CUIntPtr -> CUIntPtr -> CUIntPtr # scale :: IsNatural n => n -> CUIntPtr -> CUIntPtr #
Additive CULLong |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CULLong # (+) :: CULLong -> CULLong -> CULLong # scale :: IsNatural n => n -> CULLong -> CULLong #
Additive CULong |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CULong # (+) :: CULong -> CULong -> CULong # scale :: IsNatural n => n -> CULong -> CULong #
Additive CUSeconds |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CUSeconds # (+) :: CUSeconds -> CUSeconds -> CUSeconds # scale :: IsNatural n => n -> CUSeconds -> CUSeconds #
Additive CUShort |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CUShort # (+) :: CUShort -> CUShort -> CUShort # scale :: IsNatural n => n -> CUShort -> CUShort #
Additive CWchar |
Instance details Defined in Basement.Numerical.Additive Methods azero :: CWchar # (+) :: CWchar -> CWchar -> CWchar # scale :: IsNatural n => n -> CWchar -> CWchar #
Additive Int16 |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Int16 # (+) :: Int16 -> Int16 -> Int16 # scale :: IsNatural n => n -> Int16 -> Int16 #
Additive Int32 |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Int32 # (+) :: Int32 -> Int32 -> Int32 # scale :: IsNatural n => n -> Int32 -> Int32 #
Additive Int64 |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Int64 # (+) :: Int64 -> Int64 -> Int64 # scale :: IsNatural n => n -> Int64 -> Int64 #
Additive Int8 |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Int8 # (+) :: Int8 -> Int8 -> Int8 # scale :: IsNatural n => n -> Int8 -> Int8 #
Additive Rational |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Rational # (+) :: Rational -> Rational -> Rational # scale :: IsNatural n => n -> Rational -> Rational #
Additive COff |
Instance details Defined in Basement.Numerical.Additive Methods azero :: COff # (+) :: COff -> COff -> COff # scale :: IsNatural n => n -> COff -> COff #
Additive Word16 |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Word16 # (+) :: Word16 -> Word16 -> Word16 # scale :: IsNatural n => n -> Word16 -> Word16 #
Additive Word32 |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Word32 # (+) :: Word32 -> Word32 -> Word32 # scale :: IsNatural n => n -> Word32 -> Word32 #
Additive Word64 |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Word64 # (+) :: Word64 -> Word64 -> Word64 # scale :: IsNatural n => n -> Word64 -> Word64 #
Additive Word8 |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Word8 # (+) :: Word8 -> Word8 -> Word8 # scale :: IsNatural n => n -> Word8 -> Word8 #
Additive Integer |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Integer # (+) :: Integer -> Integer -> Integer # scale :: IsNatural n => n -> Integer -> Integer #
Additive Natural |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Natural # (+) :: Natural -> Natural -> Natural # scale :: IsNatural n => n -> Natural -> Natural #
Additive Double |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Double # (+) :: Double -> Double -> Double # scale :: IsNatural n => n -> Double -> Double #
Additive Float |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Float # (+) :: Float -> Float -> Float # scale :: IsNatural n => n -> Float -> Float #
Additive Int |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Int # (+) :: Int -> Int -> Int # scale :: IsNatural n => n -> Int -> Int #
Additive Word |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Word # (+) :: Word -> Word -> Word # scale :: IsNatural n => n -> Word -> Word #
SizeValid n => Additive (Bits n) |
Instance details Defined in Basement.Bits Methods azero :: Bits n # (+) :: Bits n -> Bits n -> Bits n # scale :: IsNatural n0 => n0 -> Bits n -> Bits n #
KnownNat n => Additive (Zn n) |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Zn n # (+) :: Zn n -> Zn n -> Zn n # scale :: IsNatural n0 => n0 -> Zn n -> Zn n #
(KnownNat n, NatWithinBound Word64 n) => Additive (Zn64 n) |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Zn64 n # (+) :: Zn64 n -> Zn64 n -> Zn64 n # scale :: IsNatural n0 => n0 -> Zn64 n -> Zn64 n #
Additive (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize Methods azero :: CountOf ty # (+) :: CountOf ty -> CountOf ty -> CountOf ty # scale :: IsNatural n => n -> CountOf ty -> CountOf ty #
Additive (Offset ty) |
Instance details Defined in Basement.Types.OffsetSize Methods azero :: Offset ty # (+) :: Offset ty -> Offset ty -> Offset ty # scale :: IsNatural n => n -> Offset ty -> Offset ty #

class Subtractive a where #

Represent class of things that can be subtracted.

Note that the result is not necessary of the same type as the operand depending on the actual type.

For example:

    (-) :: Int -> Int -> Int
    (-) :: DateTime -> DateTime -> Seconds
    (-) :: Ptr a -> Ptr a -> PtrDiff
    (-) :: Natural -> Natural -> Maybe Natural

Associated Types

type Difference a #

Methods

(-) :: a -> a -> Difference a infixl 6 #

#### Instances

Instances details

Subtractive Word128 |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Word128 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word128 = Word128
Methods (-) :: Word128 -> Word128 -> Difference Word128 #
Subtractive Word256 |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Word256 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word256 = Word256
Methods (-) :: Word256 -> Word256 -> Difference Word256 #
Subtractive CBool |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CBool |
Instance details Defined in Basement.Numerical.Subtractive type Difference CBool = CBool
Methods (-) :: CBool -> CBool -> Difference CBool #
Subtractive CChar |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CChar |
Instance details Defined in Basement.Numerical.Subtractive type Difference CChar = CChar
Methods (-) :: CChar -> CChar -> Difference CChar #
Subtractive CClock |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CClock |
Instance details Defined in Basement.Numerical.Subtractive type Difference CClock = CClock
Methods (-) :: CClock -> CClock -> Difference CClock #
Subtractive CDouble |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CDouble |
Instance details Defined in Basement.Numerical.Subtractive type Difference CDouble = CDouble
Methods (-) :: CDouble -> CDouble -> Difference CDouble #
Subtractive CFloat |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CFloat |
Instance details Defined in Basement.Numerical.Subtractive type Difference CFloat = CFloat
Methods (-) :: CFloat -> CFloat -> Difference CFloat #
Subtractive CInt |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CInt |
Instance details Defined in Basement.Numerical.Subtractive type Difference CInt = CInt
Methods (-) :: CInt -> CInt -> Difference CInt #
Subtractive CIntMax |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CIntMax |
Instance details Defined in Basement.Numerical.Subtractive type Difference CIntMax = CIntMax
Methods (-) :: CIntMax -> CIntMax -> Difference CIntMax #
Subtractive CIntPtr |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CIntPtr |
Instance details Defined in Basement.Numerical.Subtractive type Difference CIntPtr = CIntPtr
Methods (-) :: CIntPtr -> CIntPtr -> Difference CIntPtr #
Subtractive CLLong |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CLLong |
Instance details Defined in Basement.Numerical.Subtractive type Difference CLLong = CLLong
Methods (-) :: CLLong -> CLLong -> Difference CLLong #
Subtractive CLong |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CLong |
Instance details Defined in Basement.Numerical.Subtractive type Difference CLong = CLong
Methods (-) :: CLong -> CLong -> Difference CLong #
Subtractive CPtrdiff |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CPtrdiff |
Instance details Defined in Basement.Numerical.Subtractive type Difference CPtrdiff = CPtrdiff
Methods (-) :: CPtrdiff -> CPtrdiff -> Difference CPtrdiff #
Subtractive CSChar |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CSChar |
Instance details Defined in Basement.Numerical.Subtractive type Difference CSChar = CSChar
Methods (-) :: CSChar -> CSChar -> Difference CSChar #
Subtractive CSUSeconds |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CSUSeconds |
Instance details Defined in Basement.Numerical.Subtractive type Difference CSUSeconds = CSUSeconds
Methods (-) :: CSUSeconds -> CSUSeconds -> Difference CSUSeconds #
Subtractive CShort |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CShort |
Instance details Defined in Basement.Numerical.Subtractive type Difference CShort = CShort
Methods (-) :: CShort -> CShort -> Difference CShort #
Subtractive CSigAtomic |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CSigAtomic |
Instance details Defined in Basement.Numerical.Subtractive type Difference CSigAtomic = CSigAtomic
Methods (-) :: CSigAtomic -> CSigAtomic -> Difference CSigAtomic #
Subtractive CSize |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CSize |
Instance details Defined in Basement.Numerical.Subtractive type Difference CSize = CSize
Methods (-) :: CSize -> CSize -> Difference CSize #
Subtractive CTime |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CTime |
Instance details Defined in Basement.Numerical.Subtractive type Difference CTime = CTime
Methods (-) :: CTime -> CTime -> Difference CTime #
Subtractive CUChar |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CUChar |
Instance details Defined in Basement.Numerical.Subtractive type Difference CUChar = CUChar
Methods (-) :: CUChar -> CUChar -> Difference CUChar #
Subtractive CUInt |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CUInt |
Instance details Defined in Basement.Numerical.Subtractive type Difference CUInt = CUInt
Methods (-) :: CUInt -> CUInt -> Difference CUInt #
Subtractive CUIntMax |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CUIntMax |
Instance details Defined in Basement.Numerical.Subtractive type Difference CUIntMax = CUIntMax
Methods (-) :: CUIntMax -> CUIntMax -> Difference CUIntMax #
Subtractive CUIntPtr |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CUIntPtr |
Instance details Defined in Basement.Numerical.Subtractive type Difference CUIntPtr = CUIntPtr
Methods (-) :: CUIntPtr -> CUIntPtr -> Difference CUIntPtr #
Subtractive CULLong |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CULLong |
Instance details Defined in Basement.Numerical.Subtractive type Difference CULLong = CULLong
Methods (-) :: CULLong -> CULLong -> Difference CULLong #
Subtractive CULong |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CULong |
Instance details Defined in Basement.Numerical.Subtractive type Difference CULong = CULong
Methods (-) :: CULong -> CULong -> Difference CULong #
Subtractive CUSeconds |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CUSeconds |
Instance details Defined in Basement.Numerical.Subtractive type Difference CUSeconds = CUSeconds
Methods (-) :: CUSeconds -> CUSeconds -> Difference CUSeconds #
Subtractive CUShort |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CUShort |
Instance details Defined in Basement.Numerical.Subtractive type Difference CUShort = CUShort
Methods (-) :: CUShort -> CUShort -> Difference CUShort #
Subtractive CWchar |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference CWchar |
Instance details Defined in Basement.Numerical.Subtractive type Difference CWchar = CWchar
Methods (-) :: CWchar -> CWchar -> Difference CWchar #
Subtractive Int16 |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Int16 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Int16 = Int16
Methods (-) :: Int16 -> Int16 -> Difference Int16 #
Subtractive Int32 |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Int32 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Int32 = Int32
Methods (-) :: Int32 -> Int32 -> Difference Int32 #
Subtractive Int64 |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Int64 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Int64 = Int64
Methods (-) :: Int64 -> Int64 -> Difference Int64 #
Subtractive Int8 |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Int8 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Int8 = Int8
Methods (-) :: Int8 -> Int8 -> Difference Int8 #
Subtractive COff |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference COff |
Instance details Defined in Basement.Numerical.Subtractive type Difference COff = COff
Methods (-) :: COff -> COff -> Difference COff #
Subtractive Word16 |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Word16 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word16 = Word16
Methods (-) :: Word16 -> Word16 -> Difference Word16 #
Subtractive Word32 |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Word32 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word32 = Word32
Methods (-) :: Word32 -> Word32 -> Difference Word32 #
Subtractive Word64 |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Word64 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word64 = Word64
Methods (-) :: Word64 -> Word64 -> Difference Word64 #
Subtractive Word8 |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Word8 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word8 = Word8
Methods (-) :: Word8 -> Word8 -> Difference Word8 #
Subtractive Integer |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Integer |
Instance details Defined in Basement.Numerical.Subtractive type Difference Integer = Integer
Methods (-) :: Integer -> Integer -> Difference Integer #
Subtractive Natural |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Natural |
Instance details Defined in Basement.Numerical.Subtractive type Difference Natural = Maybe Natural
Methods (-) :: Natural -> Natural -> Difference Natural #
Subtractive Char |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Char |
Instance details Defined in Basement.Numerical.Subtractive type Difference Char = Int
Methods (-) :: Char -> Char -> Difference Char #
Subtractive Double |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Double |
Instance details Defined in Basement.Numerical.Subtractive type Difference Double = Double
Methods (-) :: Double -> Double -> Difference Double #
Subtractive Float |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Float |
Instance details Defined in Basement.Numerical.Subtractive type Difference Float = Float
Methods (-) :: Float -> Float -> Difference Float #
Subtractive Int |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Int |
Instance details Defined in Basement.Numerical.Subtractive type Difference Int = Int
Methods (-) :: Int -> Int -> Difference Int #
Subtractive Word |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Word |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word = Word
Methods (-) :: Word -> Word -> Difference Word #
SizeValid n => Subtractive (Bits n) |
Instance details Defined in Basement.Bits Associated Types
type Difference (Bits n) |
Instance details Defined in Basement.Bits type Difference (Bits n) = Bits n
Methods (-) :: Bits n -> Bits n -> Difference (Bits n) #
KnownNat n => Subtractive (Zn n) |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference (Zn n) |
Instance details Defined in Basement.Numerical.Subtractive type Difference (Zn n) = Zn n
Methods (-) :: Zn n -> Zn n -> Difference (Zn n) #
(KnownNat n, NatWithinBound Word64 n) => Subtractive (Zn64 n) |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference (Zn64 n) |
Instance details Defined in Basement.Numerical.Subtractive type Difference (Zn64 n) = Zn64 n
Methods (-) :: Zn64 n -> Zn64 n -> Difference (Zn64 n) #
Subtractive (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize Associated Types
type Difference (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize type Difference (CountOf ty) = Maybe (CountOf ty)
Methods (-) :: CountOf ty -> CountOf ty -> Difference (CountOf ty) #
Subtractive (Offset ty) |
Instance details Defined in Basement.Types.OffsetSize Associated Types
type Difference (Offset ty) |
Instance details Defined in Basement.Types.OffsetSize type Difference (Offset ty) = CountOf ty
Methods (-) :: Offset ty -> Offset ty -> Difference (Offset ty) #

class Multiplicative a where #

Represent class of things that can be multiplied together

    x * midentity = x
    midentity * x = x

Minimal complete definition

midentity, (*)

Methods

midentity :: a #

Identity element over multiplication

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

Multiplication of 2 elements that result in another element

(^) :: (IsNatural n, Enum n, IDivisible n) => a -> n -> a infixr 8 #

Raise to power, repeated multiplication e.g. > a ^ 2 = a * a > a ^ 10 = (a ^ 5) * (a ^ 5) .. (^) :: (IsNatural n) => a -> n -> a

#### Instances

Instances details

Multiplicative Word128 |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Word128 # (*) :: Word128 -> Word128 -> Word128 # (^) :: (IsNatural n, Enum n, IDivisible n) => Word128 -> n -> Word128 #
Multiplicative Word256 |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Word256 # (*) :: Word256 -> Word256 -> Word256 # (^) :: (IsNatural n, Enum n, IDivisible n) => Word256 -> n -> Word256 #
Multiplicative CChar |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CChar # (*) :: CChar -> CChar -> CChar # (^) :: (IsNatural n, Enum n, IDivisible n) => CChar -> n -> CChar #
Multiplicative CClock |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CClock # (*) :: CClock -> CClock -> CClock # (^) :: (IsNatural n, Enum n, IDivisible n) => CClock -> n -> CClock #
Multiplicative CDouble |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CDouble # (*) :: CDouble -> CDouble -> CDouble # (^) :: (IsNatural n, Enum n, IDivisible n) => CDouble -> n -> CDouble #
Multiplicative CFloat |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CFloat # (*) :: CFloat -> CFloat -> CFloat # (^) :: (IsNatural n, Enum n, IDivisible n) => CFloat -> n -> CFloat #
Multiplicative CInt |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CInt # (*) :: CInt -> CInt -> CInt # (^) :: (IsNatural n, Enum n, IDivisible n) => CInt -> n -> CInt #
Multiplicative CIntMax |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CIntMax # (*) :: CIntMax -> CIntMax -> CIntMax # (^) :: (IsNatural n, Enum n, IDivisible n) => CIntMax -> n -> CIntMax #
Multiplicative CIntPtr |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CIntPtr # (*) :: CIntPtr -> CIntPtr -> CIntPtr # (^) :: (IsNatural n, Enum n, IDivisible n) => CIntPtr -> n -> CIntPtr #
Multiplicative CLLong |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CLLong # (*) :: CLLong -> CLLong -> CLLong # (^) :: (IsNatural n, Enum n, IDivisible n) => CLLong -> n -> CLLong #
Multiplicative CLong |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CLong # (*) :: CLong -> CLong -> CLong # (^) :: (IsNatural n, Enum n, IDivisible n) => CLong -> n -> CLong #
Multiplicative CPtrdiff |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CPtrdiff # (*) :: CPtrdiff -> CPtrdiff -> CPtrdiff # (^) :: (IsNatural n, Enum n, IDivisible n) => CPtrdiff -> n -> CPtrdiff #
Multiplicative CSChar |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CSChar # (*) :: CSChar -> CSChar -> CSChar # (^) :: (IsNatural n, Enum n, IDivisible n) => CSChar -> n -> CSChar #
Multiplicative CSUSeconds |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CSUSeconds # (*) :: CSUSeconds -> CSUSeconds -> CSUSeconds # (^) :: (IsNatural n, Enum n, IDivisible n) => CSUSeconds -> n -> CSUSeconds #
Multiplicative CShort |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CShort # (*) :: CShort -> CShort -> CShort # (^) :: (IsNatural n, Enum n, IDivisible n) => CShort -> n -> CShort #
Multiplicative CSigAtomic |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CSigAtomic # (*) :: CSigAtomic -> CSigAtomic -> CSigAtomic # (^) :: (IsNatural n, Enum n, IDivisible n) => CSigAtomic -> n -> CSigAtomic #
Multiplicative CSize |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CSize # (*) :: CSize -> CSize -> CSize # (^) :: (IsNatural n, Enum n, IDivisible n) => CSize -> n -> CSize #
Multiplicative CTime |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CTime # (*) :: CTime -> CTime -> CTime # (^) :: (IsNatural n, Enum n, IDivisible n) => CTime -> n -> CTime #
Multiplicative CUChar |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CUChar # (*) :: CUChar -> CUChar -> CUChar # (^) :: (IsNatural n, Enum n, IDivisible n) => CUChar -> n -> CUChar #
Multiplicative CUInt |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CUInt # (*) :: CUInt -> CUInt -> CUInt # (^) :: (IsNatural n, Enum n, IDivisible n) => CUInt -> n -> CUInt #
Multiplicative CUIntMax |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CUIntMax # (*) :: CUIntMax -> CUIntMax -> CUIntMax # (^) :: (IsNatural n, Enum n, IDivisible n) => CUIntMax -> n -> CUIntMax #
Multiplicative CUIntPtr |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CUIntPtr # (*) :: CUIntPtr -> CUIntPtr -> CUIntPtr # (^) :: (IsNatural n, Enum n, IDivisible n) => CUIntPtr -> n -> CUIntPtr #
Multiplicative CULLong |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CULLong # (*) :: CULLong -> CULLong -> CULLong # (^) :: (IsNatural n, Enum n, IDivisible n) => CULLong -> n -> CULLong #
Multiplicative CULong |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CULong # (*) :: CULong -> CULong -> CULong # (^) :: (IsNatural n, Enum n, IDivisible n) => CULong -> n -> CULong #
Multiplicative CUSeconds |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CUSeconds # (*) :: CUSeconds -> CUSeconds -> CUSeconds # (^) :: (IsNatural n, Enum n, IDivisible n) => CUSeconds -> n -> CUSeconds #
Multiplicative CUShort |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CUShort # (*) :: CUShort -> CUShort -> CUShort # (^) :: (IsNatural n, Enum n, IDivisible n) => CUShort -> n -> CUShort #
Multiplicative CWchar |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: CWchar # (*) :: CWchar -> CWchar -> CWchar # (^) :: (IsNatural n, Enum n, IDivisible n) => CWchar -> n -> CWchar #
Multiplicative Int16 |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Int16 # (*) :: Int16 -> Int16 -> Int16 # (^) :: (IsNatural n, Enum n, IDivisible n) => Int16 -> n -> Int16 #
Multiplicative Int32 |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Int32 # (*) :: Int32 -> Int32 -> Int32 # (^) :: (IsNatural n, Enum n, IDivisible n) => Int32 -> n -> Int32 #
Multiplicative Int64 |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Int64 # (*) :: Int64 -> Int64 -> Int64 # (^) :: (IsNatural n, Enum n, IDivisible n) => Int64 -> n -> Int64 #
Multiplicative Int8 |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Int8 # (*) :: Int8 -> Int8 -> Int8 # (^) :: (IsNatural n, Enum n, IDivisible n) => Int8 -> n -> Int8 #
Multiplicative Rational |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Rational # (*) :: Rational -> Rational -> Rational # (^) :: (IsNatural n, Enum n, IDivisible n) => Rational -> n -> Rational #
Multiplicative COff |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: COff # (*) :: COff -> COff -> COff # (^) :: (IsNatural n, Enum n, IDivisible n) => COff -> n -> COff #
Multiplicative Word16 |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Word16 # (*) :: Word16 -> Word16 -> Word16 # (^) :: (IsNatural n, Enum n, IDivisible n) => Word16 -> n -> Word16 #
Multiplicative Word32 |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Word32 # (*) :: Word32 -> Word32 -> Word32 # (^) :: (IsNatural n, Enum n, IDivisible n) => Word32 -> n -> Word32 #
Multiplicative Word64 |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Word64 # (*) :: Word64 -> Word64 -> Word64 # (^) :: (IsNatural n, Enum n, IDivisible n) => Word64 -> n -> Word64 #
Multiplicative Word8 |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Word8 # (*) :: Word8 -> Word8 -> Word8 # (^) :: (IsNatural n, Enum n, IDivisible n) => Word8 -> n -> Word8 #
Multiplicative Integer |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Integer # (*) :: Integer -> Integer -> Integer # (^) :: (IsNatural n, Enum n, IDivisible n) => Integer -> n -> Integer #
Multiplicative Natural |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Natural # (*) :: Natural -> Natural -> Natural # (^) :: (IsNatural n, Enum n, IDivisible n) => Natural -> n -> Natural #
Multiplicative Double |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Double # (*) :: Double -> Double -> Double # (^) :: (IsNatural n, Enum n, IDivisible n) => Double -> n -> Double #
Multiplicative Float |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Float # (*) :: Float -> Float -> Float # (^) :: (IsNatural n, Enum n, IDivisible n) => Float -> n -> Float #
Multiplicative Int |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Int # (*) :: Int -> Int -> Int # (^) :: (IsNatural n, Enum n, IDivisible n) => Int -> n -> Int #
Multiplicative Word |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Word # (*) :: Word -> Word -> Word # (^) :: (IsNatural n, Enum n, IDivisible n) => Word -> n -> Word #
SizeValid n => Multiplicative (Bits n) |
Instance details Defined in Basement.Bits Methods midentity :: Bits n # (*) :: Bits n -> Bits n -> Bits n # (^) :: (IsNatural n0, Enum n0, IDivisible n0) => Bits n -> n0 -> Bits n #

class (Additive a, Multiplicative a) => IDivisible a where #

Represent types that supports an euclidian division

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

Minimal complete definition

div, mod | divMod

Methods

div :: a -> a -> a #

mod :: a -> a -> a #

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

#### Instances

Instances details

IDivisible Word128 |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Word128 -> Word128 -> Word128 # mod :: Word128 -> Word128 -> Word128 # divMod :: Word128 -> Word128 -> (Word128, Word128) #
IDivisible Word256 |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Word256 -> Word256 -> Word256 # mod :: Word256 -> Word256 -> Word256 # divMod :: Word256 -> Word256 -> (Word256, Word256) #
IDivisible CChar |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: CChar -> CChar -> CChar # mod :: CChar -> CChar -> CChar # divMod :: CChar -> CChar -> (CChar, CChar) #
IDivisible CInt |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: CInt -> CInt -> CInt # mod :: CInt -> CInt -> CInt # divMod :: CInt -> CInt -> (CInt, CInt) #
IDivisible CIntMax |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: CIntMax -> CIntMax -> CIntMax # mod :: CIntMax -> CIntMax -> CIntMax # divMod :: CIntMax -> CIntMax -> (CIntMax, CIntMax) #
IDivisible CIntPtr |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: CIntPtr -> CIntPtr -> CIntPtr # mod :: CIntPtr -> CIntPtr -> CIntPtr # divMod :: CIntPtr -> CIntPtr -> (CIntPtr, CIntPtr) #
IDivisible CLLong |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: CLLong -> CLLong -> CLLong # mod :: CLLong -> CLLong -> CLLong # divMod :: CLLong -> CLLong -> (CLLong, CLLong) #
IDivisible CLong |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: CLong -> CLong -> CLong # mod :: CLong -> CLong -> CLong # divMod :: CLong -> CLong -> (CLong, CLong) #
IDivisible CPtrdiff |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: CPtrdiff -> CPtrdiff -> CPtrdiff # mod :: CPtrdiff -> CPtrdiff -> CPtrdiff # divMod :: CPtrdiff -> CPtrdiff -> (CPtrdiff, CPtrdiff) #
IDivisible CSChar |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: CSChar -> CSChar -> CSChar # mod :: CSChar -> CSChar -> CSChar # divMod :: CSChar -> CSChar -> (CSChar, CSChar) #
IDivisible CShort |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: CShort -> CShort -> CShort # mod :: CShort -> CShort -> CShort # divMod :: CShort -> CShort -> (CShort, CShort) #
IDivisible CSigAtomic |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: CSigAtomic -> CSigAtomic -> CSigAtomic # mod :: CSigAtomic -> CSigAtomic -> CSigAtomic # divMod :: CSigAtomic -> CSigAtomic -> (CSigAtomic, CSigAtomic) #
IDivisible CSize |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: CSize -> CSize -> CSize # mod :: CSize -> CSize -> CSize # divMod :: CSize -> CSize -> (CSize, CSize) #
IDivisible CUChar |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: CUChar -> CUChar -> CUChar # mod :: CUChar -> CUChar -> CUChar # divMod :: CUChar -> CUChar -> (CUChar, CUChar) #
IDivisible CUInt |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: CUInt -> CUInt -> CUInt # mod :: CUInt -> CUInt -> CUInt # divMod :: CUInt -> CUInt -> (CUInt, CUInt) #
IDivisible CUIntMax |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: CUIntMax -> CUIntMax -> CUIntMax # mod :: CUIntMax -> CUIntMax -> CUIntMax # divMod :: CUIntMax -> CUIntMax -> (CUIntMax, CUIntMax) #
IDivisible CUIntPtr |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: CUIntPtr -> CUIntPtr -> CUIntPtr # mod :: CUIntPtr -> CUIntPtr -> CUIntPtr # divMod :: CUIntPtr -> CUIntPtr -> (CUIntPtr, CUIntPtr) #
IDivisible CULLong |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: CULLong -> CULLong -> CULLong # mod :: CULLong -> CULLong -> CULLong # divMod :: CULLong -> CULLong -> (CULLong, CULLong) #
IDivisible CULong |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: CULong -> CULong -> CULong # mod :: CULong -> CULong -> CULong # divMod :: CULong -> CULong -> (CULong, CULong) #
IDivisible CUShort |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: CUShort -> CUShort -> CUShort # mod :: CUShort -> CUShort -> CUShort # divMod :: CUShort -> CUShort -> (CUShort, CUShort) #
IDivisible CWchar |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: CWchar -> CWchar -> CWchar # mod :: CWchar -> CWchar -> CWchar # divMod :: CWchar -> CWchar -> (CWchar, CWchar) #
IDivisible Int16 |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Int16 -> Int16 -> Int16 # mod :: Int16 -> Int16 -> Int16 # divMod :: Int16 -> Int16 -> (Int16, Int16) #
IDivisible Int32 |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Int32 -> Int32 -> Int32 # mod :: Int32 -> Int32 -> Int32 # divMod :: Int32 -> Int32 -> (Int32, Int32) #
IDivisible Int64 |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Int64 -> Int64 -> Int64 # mod :: Int64 -> Int64 -> Int64 # divMod :: Int64 -> Int64 -> (Int64, Int64) #
IDivisible Int8 |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Int8 -> Int8 -> Int8 # mod :: Int8 -> Int8 -> Int8 # divMod :: Int8 -> Int8 -> (Int8, Int8) #
IDivisible Word16 |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Word16 -> Word16 -> Word16 # mod :: Word16 -> Word16 -> Word16 # divMod :: Word16 -> Word16 -> (Word16, Word16) #
IDivisible Word32 |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Word32 -> Word32 -> Word32 # mod :: Word32 -> Word32 -> Word32 # divMod :: Word32 -> Word32 -> (Word32, Word32) #
IDivisible Word64 |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Word64 -> Word64 -> Word64 # mod :: Word64 -> Word64 -> Word64 # divMod :: Word64 -> Word64 -> (Word64, Word64) #
IDivisible Word8 |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Word8 -> Word8 -> Word8 # mod :: Word8 -> Word8 -> Word8 # divMod :: Word8 -> Word8 -> (Word8, Word8) #
IDivisible Integer |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Integer -> Integer -> Integer # mod :: Integer -> Integer -> Integer # divMod :: Integer -> Integer -> (Integer, Integer) #
IDivisible Natural |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Natural -> Natural -> Natural # mod :: Natural -> Natural -> Natural # divMod :: Natural -> Natural -> (Natural, Natural) #
IDivisible Int |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Int -> Int -> Int # mod :: Int -> Int -> Int # divMod :: Int -> Int -> (Int, Int) #
IDivisible Word |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Word -> Word -> Word # mod :: Word -> Word -> Word # divMod :: Word -> Word -> (Word, Word) #
SizeValid n => IDivisible (Bits n) |
Instance details Defined in Basement.Bits Methods div :: Bits n -> Bits n -> Bits n # mod :: Bits n -> Bits n -> Bits n # divMod :: Bits n -> Bits n -> (Bits n, Bits n) #

class Multiplicative a => Divisible a where #

Support for division between same types

This is likely to change to represent specific mathematic divisions

Methods

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

#### Instances

Instances details

Divisible CDouble |
Instance details Defined in Basement.Numerical.Multiplicative Methods (/) :: CDouble -> CDouble -> CDouble #
Divisible CFloat |
Instance details Defined in Basement.Numerical.Multiplicative Methods (/) :: CFloat -> CFloat -> CFloat #
Divisible Rational |
Instance details Defined in Basement.Numerical.Multiplicative Methods (/) :: Rational -> Rational -> Rational #
Divisible Double |
Instance details Defined in Basement.Numerical.Multiplicative Methods (/) :: Double -> Double -> Double #
Divisible Float |
Instance details Defined in Basement.Numerical.Multiplicative Methods (/) :: Float -> Float -> Float #

## Data types

data Maybe a #

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

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

Constructors

Nothing |
Just a |

#### Instances

Instances details

MonadZip Maybe | Since: base-4.8.0.0
Instance details Defined in Control.Monad.Zip Methods mzip :: Maybe a -> Maybe b -> Maybe (a, b) # mzipWith :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c # munzip :: Maybe (a, b) -> (Maybe a, Maybe b) #
Eq1 Maybe | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Classes Methods liftEq :: (a -> b -> Bool) -> Maybe a -> Maybe b -> Bool #
Ord1 Maybe | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Classes Methods liftCompare :: (a -> b -> Ordering) -> Maybe a -> Maybe b -> Ordering #
Read1 Maybe | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Classes Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Maybe a) # liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Maybe a] # liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Maybe a) # liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Maybe a] #
Show1 Maybe | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Classes Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Maybe a -> ShowS # liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Maybe a] -> ShowS #
MonadFailure Maybe |
Instance details Defined in Basement.Monad Associated Types
type Failure Maybe |
Instance details Defined in Basement.Monad type Failure Maybe = ()
Methods mFail :: Failure Maybe -> Maybe () #
Alternative Maybe | Picks the leftmost `Just` value, or, alternatively, `Nothing`. @since base-2.01
Instance details Defined in GHC.Internal.Base Methods empty :: Maybe a # (<|>) :: Maybe a -> Maybe a -> Maybe a # some :: Maybe a -> Maybe [a] # many :: Maybe a -> Maybe [a] #
Applicative Maybe | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods pure :: a -> Maybe a # (<*>) :: Maybe (a -> b) -> Maybe a -> Maybe b # liftA2 :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c # (*>) :: Maybe a -> Maybe b -> Maybe b # (<*) :: Maybe a -> Maybe b -> Maybe a #
Functor Maybe | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods fmap :: (a -> b) -> Maybe a -> Maybe b # (<$) :: a -> Maybe b -> Maybe a #
Monad Maybe | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods (>>=) :: Maybe a -> (a -> Maybe b) -> Maybe b # (>>) :: Maybe a -> Maybe b -> Maybe b # return :: a -> Maybe a #
MonadPlus Maybe | Picks the leftmost `Just` value, or, alternatively, `Nothing`. @since base-2.01
Instance details Defined in GHC.Internal.Base Methods mzero :: Maybe a # mplus :: Maybe a -> Maybe a -> Maybe a #
MonadFail Maybe | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Control.Monad.Fail Methods fail :: String -> Maybe a #
MonadFix Maybe | @since base-2.01
Instance details Defined in GHC.Internal.Control.Monad.Fix Methods mfix :: (a -> Maybe a) -> Maybe a #
Foldable Maybe | @since base-2.01
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Maybe m -> m # foldMap :: Monoid m => (a -> m) -> Maybe a -> m # foldMap' :: Monoid m => (a -> m) -> Maybe a -> m # foldr :: (a -> b -> b) -> b -> Maybe a -> b # foldr' :: (a -> b -> b) -> b -> Maybe a -> b # foldl :: (b -> a -> b) -> b -> Maybe a -> b # foldl' :: (b -> a -> b) -> b -> Maybe a -> b # foldr1 :: (a -> a -> a) -> Maybe a -> a # foldl1 :: (a -> a -> a) -> Maybe a -> a # toList :: Maybe a -> [a] # null :: Maybe a -> Bool # length :: Maybe a -> Int # elem :: Eq a => a -> Maybe a -> Bool # maximum :: Ord a => Maybe a -> a # minimum :: Ord a => Maybe a -> a # sum :: Num a => Maybe a -> a # product :: Num a => Maybe a -> a #
Traversable Maybe | @since base-2.01
Instance details Defined in GHC.Internal.Data.Traversable Methods traverse :: Applicative f => (a -> f b) -> Maybe a -> f (Maybe b) # sequenceA :: Applicative f => Maybe (f a) -> f (Maybe a) # mapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b) # sequence :: Monad m => Maybe (m a) -> m (Maybe a) #
Generic1 Maybe |
Instance details Defined in GHC.Internal.Generics Associated Types
type Rep1 Maybe | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Generics type Rep1 Maybe = D1 ('MetaData "Maybe" "GHC.Internal.Maybe" "ghc-internal" 'False) (C1 ('MetaCons "Nothing" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Just" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
Methods from1 :: Maybe a -> Rep1 Maybe a # to1 :: Rep1 Maybe a -> Maybe a #
NormalForm a => NormalForm (Maybe a) |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Maybe a -> () #
Arbitrary a => Arbitrary (Maybe a) # |
Instance details Defined in Foundation.Check.Arbitrary Methods arbitrary :: Gen (Maybe a) #
IsField a => IsField (Maybe a) # |
Instance details Defined in Foundation.Format.CSV.Types Methods toField :: Maybe a -> Field # fromField :: Field -> Either String (Maybe a) #
Semigroup 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 4.11.0: constraint on inner `a` value generalised from `Monoid` to `Semigroup`. @since base-2.01
Instance details Defined in GHC.Internal.Base Methods mempty :: Maybe a # mappend :: Maybe a -> Maybe a -> Maybe a # mconcat :: [Maybe a] -> Maybe a #
Semigroup a => Semigroup (Maybe a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Base Methods (<>) :: Maybe a -> Maybe a -> Maybe a # sconcat :: NonEmpty (Maybe a) -> Maybe a # stimes :: Integral b => b -> Maybe a -> Maybe a #
Data a => Data (Maybe a) | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Maybe a -> c (Maybe a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Maybe a) # toConstr :: Maybe a -> Constr # dataTypeOf :: Maybe a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Maybe a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Maybe a)) # gmapT :: (forall b. Data b => b -> b) -> Maybe a -> Maybe a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Maybe a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Maybe a -> r # gmapQ :: (forall d. Data d => d -> u) -> Maybe a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Maybe a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) #
Generic (Maybe a) |
Instance details Defined in GHC.Internal.Generics Associated Types
type Rep (Maybe a) | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Generics type Rep (Maybe a) = D1 ('MetaData "Maybe" "GHC.Internal.Maybe" "ghc-internal" 'False) (C1 ('MetaCons "Nothing" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Just" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
Methods from :: Maybe a -> Rep (Maybe a) x # to :: Rep (Maybe a) x -> Maybe a #
SingKind a => SingKind (Maybe a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Associated Types
type DemoteRep (Maybe a) |
Instance details Defined in GHC.Internal.Generics type DemoteRep (Maybe a) = Maybe (DemoteRep a)
Methods fromSing :: forall (a0 :: Maybe a). Sing a0 -> DemoteRep (Maybe a)
Read a => Read (Maybe a) | @since base-2.01
Instance details Defined in GHC.Internal.Read Methods readsPrec :: Int -> ReadS (Maybe a) # readList :: ReadS [Maybe a] # readPrec :: ReadPrec (Maybe a) # readListPrec :: ReadPrec [Maybe a] #
Show a => Show (Maybe a) | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> Maybe a -> ShowS # show :: Maybe a -> String # showList :: [Maybe a] -> ShowS #
Eq a => Eq (Maybe a) | @since base-2.01
Instance details Defined in GHC.Internal.Maybe Methods (==) :: Maybe a -> Maybe a -> Bool # (/=) :: Maybe a -> Maybe a -> Bool #
Ord a => Ord (Maybe a) | @since base-2.01
Instance details Defined in GHC.Internal.Maybe Methods compare :: Maybe a -> Maybe a -> Ordering # (<) :: Maybe a -> Maybe a -> Bool # (<=) :: Maybe a -> Maybe a -> Bool # (>) :: Maybe a -> Maybe a -> Bool # (>=) :: Maybe a -> Maybe a -> Bool # max :: Maybe a -> Maybe a -> Maybe a # min :: Maybe a -> Maybe a -> Maybe a #
SingI ('Nothing :: Maybe a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods sing :: Sing ('Nothing :: Maybe a)
From (Maybe a) (Either () a) |
Instance details Defined in Basement.From Methods from :: Maybe a -> Either () a #
SingI a2 => SingI ('Just a2 :: Maybe a1) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods sing :: Sing ('Just a2)
type Failure Maybe |
Instance details Defined in Basement.Monad type Failure Maybe = ()
type Rep1 Maybe | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Generics type Rep1 Maybe = D1 ('MetaData "Maybe" "GHC.Internal.Maybe" "ghc-internal" 'False) (C1 ('MetaCons "Nothing" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Just" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
type DemoteRep (Maybe a) |
Instance details Defined in GHC.Internal.Generics type DemoteRep (Maybe a) = Maybe (DemoteRep a)
type Rep (Maybe a) | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Generics type Rep (Maybe a) = D1 ('MetaData "Maybe" "GHC.Internal.Maybe" "ghc-internal" 'False) (C1 ('MetaCons "Nothing" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Just" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
data Sing (b :: Maybe a) |
Instance details Defined in GHC.Internal.Generics data Sing (b :: Maybe a) where SNothing :: forall {a}. Sing ('Nothing :: Maybe a) SJust :: forall {a} (a1 :: a). Sing a1 -> Sing ('Just a1)

data Ordering #

Constructors

LT |
EQ |
GT |

#### Instances

Instances details

Monoid Ordering | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods mempty :: Ordering # mappend :: Ordering -> Ordering -> Ordering # mconcat :: [Ordering] -> Ordering #
Semigroup Ordering | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Base Methods (<>) :: Ordering -> Ordering -> Ordering # sconcat :: NonEmpty Ordering -> Ordering # stimes :: Integral b => b -> Ordering -> Ordering #
Data Ordering | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ordering -> c Ordering # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Ordering # toConstr :: Ordering -> Constr # dataTypeOf :: Ordering -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Ordering) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Ordering) # gmapT :: (forall b. Data b => b -> b) -> Ordering -> Ordering # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ordering -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ordering -> r # gmapQ :: (forall d. Data d => d -> u) -> Ordering -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Ordering -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering #
Bounded Ordering | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: Ordering # maxBound :: Ordering #
Enum Ordering | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods succ :: Ordering -> Ordering # pred :: Ordering -> Ordering # toEnum :: Int -> Ordering # fromEnum :: Ordering -> Int # enumFrom :: Ordering -> [Ordering] # enumFromThen :: Ordering -> Ordering -> [Ordering] # enumFromTo :: Ordering -> Ordering -> [Ordering] # enumFromThenTo :: Ordering -> Ordering -> Ordering -> [Ordering] #
Generic Ordering |
Instance details Defined in GHC.Internal.Generics Associated Types
type Rep Ordering | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Generics type Rep Ordering = D1 ('MetaData "Ordering" "GHC.Types" "ghc-prim" 'False) (C1 ('MetaCons "LT" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "EQ" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GT" 'PrefixI 'False) (U1 :: Type -> Type)))
Methods from :: Ordering -> Rep Ordering x # to :: Rep Ordering x -> Ordering #
Read Ordering | @since base-2.01
Instance details Defined in GHC.Internal.Read Methods readsPrec :: Int -> ReadS Ordering # readList :: ReadS [Ordering] # readPrec :: ReadPrec Ordering # readListPrec :: ReadPrec [Ordering] #
Show Ordering | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> Ordering -> ShowS # show :: Ordering -> String # showList :: [Ordering] -> ShowS #
Eq Ordering |
Instance details Defined in GHC.Classes Methods (==) :: Ordering -> Ordering -> Bool # (/=) :: Ordering -> Ordering -> Bool #
Ord Ordering |
Instance details Defined in GHC.Classes Methods compare :: Ordering -> Ordering -> Ordering # (<) :: Ordering -> Ordering -> Bool # (<=) :: Ordering -> Ordering -> Bool # (>) :: Ordering -> Ordering -> Bool # (>=) :: Ordering -> Ordering -> Bool # max :: Ordering -> Ordering -> Ordering # min :: Ordering -> Ordering -> Ordering #
type Rep Ordering | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Generics type Rep Ordering = D1 ('MetaData "Ordering" "GHC.Types" "ghc-prim" 'False) (C1 ('MetaCons "LT" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "EQ" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GT" 'PrefixI 'False) (U1 :: Type -> Type)))

data Bool #

Constructors

False |
True |

#### Instances

Instances details

BitOps Bool |
Instance details Defined in Basement.Bits Methods (.&.) :: Bool -> Bool -> Bool # (.|.) :: Bool -> Bool -> Bool # (.^.) :: Bool -> Bool -> Bool # (.<<.) :: Bool -> CountOf Bool -> Bool # (.>>.) :: Bool -> CountOf Bool -> Bool # bit :: Offset Bool -> Bool # isBitSet :: Bool -> Offset Bool -> Bool # setBit :: Bool -> Offset Bool -> Bool # clearBit :: Bool -> Offset Bool -> Bool #
FiniteBitsOps Bool |
Instance details Defined in Basement.Bits Methods numberOfBits :: Bool -> CountOf Bool # rotateL :: Bool -> CountOf Bool -> Bool # rotateR :: Bool -> CountOf Bool -> Bool # popCount :: Bool -> CountOf Bool # bitFlip :: Bool -> Bool # countLeadingZeros :: Bool -> CountOf Bool # countTrailingZeros :: Bool -> CountOf Bool #
NormalForm Bool |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Bool -> () #
Arbitrary Bool # |
Instance details Defined in Foundation.Check.Arbitrary Methods arbitrary :: Gen Bool #
IsProperty Bool # |
Instance details Defined in Foundation.Check.Property Methods property :: Bool -> Property #
IsField Bool # |
Instance details Defined in Foundation.Format.CSV.Types Methods toField :: Bool -> Field # fromField :: Field -> Either String Bool #
Bits Bool | Interpret `Bool` as 1-bit bit-field @since base-4.7.0.0
Instance details Defined in GHC.Internal.Bits Methods (.&.) :: Bool -> Bool -> Bool # (.|.) :: Bool -> Bool -> Bool # xor :: Bool -> Bool -> Bool # complement :: Bool -> Bool # shift :: Bool -> Int -> Bool # rotate :: Bool -> Int -> Bool # zeroBits :: Bool # bit :: Int -> Bool # setBit :: Bool -> Int -> Bool # clearBit :: Bool -> Int -> Bool # complementBit :: Bool -> Int -> Bool # testBit :: Bool -> Int -> Bool # bitSizeMaybe :: Bool -> Maybe Int # bitSize :: Bool -> Int # isSigned :: Bool -> Bool # shiftL :: Bool -> Int -> Bool # unsafeShiftL :: Bool -> Int -> Bool # shiftR :: Bool -> Int -> Bool # unsafeShiftR :: Bool -> Int -> Bool # rotateL :: Bool -> Int -> Bool # rotateR :: Bool -> Int -> Bool # popCount :: Bool -> Int #
FiniteBits Bool | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Bits Methods finiteBitSize :: Bool -> Int # countLeadingZeros :: Bool -> Int # countTrailingZeros :: Bool -> Int #
Data Bool | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Bool -> c Bool # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Bool # toConstr :: Bool -> Constr # dataTypeOf :: Bool -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Bool) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Bool) # gmapT :: (forall b. Data b => b -> b) -> Bool -> Bool # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bool -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bool -> r # gmapQ :: (forall d. Data d => d -> u) -> Bool -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Bool -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Bool -> m Bool # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Bool -> m Bool # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Bool -> m Bool #
Bounded Bool | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: Bool # maxBound :: Bool #
Enum Bool | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods succ :: Bool -> Bool # pred :: Bool -> Bool # toEnum :: Int -> Bool # fromEnum :: Bool -> Int # enumFrom :: Bool -> [Bool] # enumFromThen :: Bool -> Bool -> [Bool] # enumFromTo :: Bool -> Bool -> [Bool] # enumFromThenTo :: Bool -> Bool -> Bool -> [Bool] #
Storable Bool | @since base-2.01
Instance details Defined in GHC.Internal.Foreign.Storable Methods sizeOf :: Bool -> Int # alignment :: Bool -> Int # peekElemOff :: Ptr Bool -> Int -> IO Bool # pokeElemOff :: Ptr Bool -> Int -> Bool -> IO () # peekByteOff :: Ptr b -> Int -> IO Bool # pokeByteOff :: Ptr b -> Int -> Bool -> IO () # peek :: Ptr Bool -> IO Bool # poke :: Ptr Bool -> Bool -> IO () #
Generic Bool |
Instance details Defined in GHC.Internal.Generics Associated Types
type Rep Bool | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Generics type Rep Bool = D1 ('MetaData "Bool" "GHC.Types" "ghc-prim" 'False) (C1 ('MetaCons "False" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "True" 'PrefixI 'False) (U1 :: Type -> Type))
Methods from :: Bool -> Rep Bool x # to :: Rep Bool x -> Bool #
SingKind Bool | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Associated Types
type DemoteRep Bool |
Instance details Defined in GHC.Internal.Generics type DemoteRep Bool = Bool
Methods fromSing :: forall (a :: Bool). Sing a -> DemoteRep Bool
Read Bool | @since base-2.01
Instance details Defined in GHC.Internal.Read Methods readsPrec :: Int -> ReadS Bool # readList :: ReadS [Bool] # readPrec :: ReadPrec Bool # readListPrec :: ReadPrec [Bool] #
Show Bool | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> Bool -> ShowS # show :: Bool -> String # showList :: [Bool] -> ShowS #
Eq Bool |
Instance details Defined in GHC.Classes Methods (==) :: Bool -> Bool -> Bool # (/=) :: Bool -> Bool -> Bool #
Ord Bool |
Instance details Defined in GHC.Classes Methods compare :: Bool -> Bool -> Ordering # (<) :: Bool -> Bool -> Bool # (<=) :: Bool -> Bool -> Bool # (>) :: Bool -> Bool -> Bool # (>=) :: Bool -> Bool -> Bool # max :: Bool -> Bool -> Bool # min :: Bool -> Bool -> Bool #
SingI 'False | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods sing :: Sing 'False
SingI 'True | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods sing :: Sing 'True
IsProperty (String, Bool) # |
Instance details Defined in Foundation.Check.Property Methods property :: (String, Bool) -> Property #
type DemoteRep Bool |
Instance details Defined in GHC.Internal.Generics type DemoteRep Bool = Bool
type Rep Bool | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Generics type Rep Bool = D1 ('MetaData "Bool" "GHC.Types" "ghc-prim" 'False) (C1 ('MetaCons "False" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "True" 'PrefixI 'False) (U1 :: Type -> Type))
data Sing (a :: Bool) |
Instance details Defined in GHC.Internal.Generics data Sing (a :: Bool) where STrue :: Sing 'True SFalse :: Sing 'False

data Char #

The character type `Char` represents Unicode codespace and its elements are code points as in definitions D9 and D10 of the Unicode Standard.

Character literals in Haskell are single-quoted: `'Q'`, `'Я'` or `'Ω'`. To represent a single quote itself use `'\''`, and to represent a backslash use `'\\'`. The full grammar can be found in the section 2.6 of the Haskell 2010 Language Report.

To specify a character by its code point one can use decimal, hexadecimal or octal notation: `'\65'`, `'\x41'` and `'\o101'` are all alternative forms of `'A'`. The largest code point is `'\x10ffff'`.

There is a special escape syntax for ASCII control characters:

Escape | Alternatives | Meaning
--- | --- | ---
`'\NUL'` | `'\0'` | null character
`'\SOH'` | `'\1'` | start of heading
`'\STX'` | `'\2'` | start of text
`'\ETX'` | `'\3'` | end of text
`'\EOT'` | `'\4'` | end of transmission
`'\ENQ'` | `'\5'` | enquiry
`'\ACK'` | `'\6'` | acknowledge
`'\BEL'` | `'\7'`, `'\a'` | bell (alert)
`'\BS'` | `'\8'`, `'\b'` | backspace
`'\HT'` | `'\9'`, `'\t'` | horizontal tab
`'\LF'` | `'\10'`, `'\n'` | line feed (new line)
`'\VT'` | `'\11'`, `'\v'` | vertical tab
`'\FF'` | `'\12'`, `'\f'` | form feed
`'\CR'` | `'\13'`, `'\r'` | carriage return
`'\SO'` | `'\14'` | shift out
`'\SI'` | `'\15'` | shift in
`'\DLE'` | `'\16'` | data link escape
`'\DC1'` | `'\17'` | device control 1
`'\DC2'` | `'\18'` | device control 2
`'\DC3'` | `'\19'` | device control 3
`'\DC4'` | `'\20'` | device control 4
`'\NAK'` | `'\21'` | negative acknowledge
`'\SYN'` | `'\22'` | synchronous idle
`'\ETB'` | `'\23'` | end of transmission block
`'\CAN'` | `'\24'` | cancel
`'\EM'` | `'\25'` | end of medium
`'\SUB'` | `'\26'` | substitute
`'\ESC'` | `'\27'` | escape
`'\FS'` | `'\28'` | file separator
`'\GS'` | `'\29'` | group separator
`'\RS'` | `'\30'` | record separator
`'\US'` | `'\31'` | unit separator
`'\SP'` | `'\32'`, `' '` | space
`'\DEL'` | `'\127'` | delete

Data.Char provides utilities to work with `Char`.

#### Instances

Instances details

IsChar Char | Since: base-2.1
Instance details Defined in Text.Printf Methods toChar :: Char -> Char # fromChar :: Char -> Char #
PrintfArg Char | Since: base-2.1
Instance details Defined in Text.Printf Methods formatArg :: Char -> FieldFormatter # parseFormat :: Char -> ModifierParser #
NormalForm Char |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Char -> () #
Subtractive Char |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Char |
Instance details Defined in Basement.Numerical.Subtractive type Difference Char = Int
Methods (-) :: Char -> Char -> Difference Char #
PrimMemoryComparable Char |
Instance details Defined in Basement.PrimType
PrimType Char |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Char |
Instance details Defined in Basement.PrimType type PrimSize Char = 4
Methods primSizeInBytes :: Proxy Char -> CountOf Word8 # primShiftToBytes :: Proxy Char -> Int # primBaUIndex :: ByteArray# -> Offset Char -> Char # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Char -> prim Char # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Char -> Char -> prim () # primAddrIndex :: Addr# -> Offset Char -> Char # primAddrRead :: PrimMonad prim => Addr# -> Offset Char -> prim Char # primAddrWrite :: PrimMonad prim => Addr# -> Offset Char -> Char -> prim () #
Arbitrary Char # |
Instance details Defined in Foundation.Check.Arbitrary Methods arbitrary :: Gen Char #
Storable Char # |
Instance details Defined in Foundation.Class.Storable Methods peek :: Ptr Char -> IO Char # poke :: Ptr Char -> Char -> IO () #
StorableFixed Char # |
Instance details Defined in Foundation.Class.Storable Methods size :: proxy Char -> CountOf Word8 # alignment :: proxy Char -> CountOf Word8 #
IsField Char # |
Instance details Defined in Foundation.Format.CSV.Types Methods toField :: Char -> Field # fromField :: Field -> Either String Char #
Data Char | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Char -> c Char # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Char # toConstr :: Char -> Constr # dataTypeOf :: Char -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Char) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Char) # gmapT :: (forall b. Data b => b -> b) -> Char -> Char # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Char -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Char -> r # gmapQ :: (forall d. Data d => d -> u) -> Char -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Char -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Char -> m Char # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Char -> m Char # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Char -> m Char #
Bounded Char | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: Char # maxBound :: Char #
Enum Char | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods succ :: Char -> Char # pred :: Char -> Char # toEnum :: Int -> Char # fromEnum :: Char -> Int # enumFrom :: Char -> [Char] # enumFromThen :: Char -> Char -> [Char] # enumFromTo :: Char -> Char -> [Char] # enumFromThenTo :: Char -> Char -> Char -> [Char] #
Storable Char | @since base-2.01
Instance details Defined in GHC.Internal.Foreign.Storable Methods sizeOf :: Char -> Int # alignment :: Char -> Int # peekElemOff :: Ptr Char -> Int -> IO Char # pokeElemOff :: Ptr Char -> Int -> Char -> IO () # peekByteOff :: Ptr b -> Int -> IO Char # pokeByteOff :: Ptr b -> Int -> Char -> IO () # peek :: Ptr Char -> IO Char # poke :: Ptr Char -> Char -> IO () #
Read Char | @since base-2.01
Instance details Defined in GHC.Internal.Read Methods readsPrec :: Int -> ReadS Char # readList :: ReadS [Char] # readPrec :: ReadPrec Char # readListPrec :: ReadPrec [Char] #
Show Char | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> Char -> ShowS # show :: Char -> String # showList :: [Char] -> ShowS #
Eq Char |
Instance details Defined in GHC.Classes Methods (==) :: Char -> Char -> Bool # (/=) :: Char -> Char -> Bool #
Ord Char |
Instance details Defined in GHC.Classes Methods compare :: Char -> Char -> Ordering # (<) :: Char -> Char -> Bool # (<=) :: Char -> Char -> Bool # (>) :: Char -> Char -> Bool # (>=) :: Char -> Char -> Bool # max :: Char -> Char -> Char # min :: Char -> Char -> Char #
Generic1 (URec Char :: k -> Type) |
Instance details Defined in GHC.Internal.Generics Associated Types
type Rep1 (URec Char :: k -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics type Rep1 (URec Char :: k -> Type) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UChar" 'PrefixI 'True) (S1 ('MetaSel ('Just "uChar#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UChar :: k -> Type)))
Methods from1 :: forall (a :: k). URec Char a -> Rep1 (URec Char :: k -> Type) a # to1 :: forall (a :: k). Rep1 (URec Char :: k -> Type) a -> URec Char a #
IsField [Char] # |
Instance details Defined in Foundation.Format.CSV.Types Methods toField :: [Char] -> Field # fromField :: Field -> Either String [Char] #
Foldable (UChar :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => UChar m -> m # foldMap :: Monoid m => (a -> m) -> UChar a -> m # foldMap' :: Monoid m => (a -> m) -> UChar a -> m # foldr :: (a -> b -> b) -> b -> UChar a -> b # foldr' :: (a -> b -> b) -> b -> UChar a -> b # foldl :: (b -> a -> b) -> b -> UChar a -> b # foldl' :: (b -> a -> b) -> b -> UChar a -> b # foldr1 :: (a -> a -> a) -> UChar a -> a # foldl1 :: (a -> a -> a) -> UChar a -> a # toList :: UChar a -> [a] # null :: UChar a -> Bool # length :: UChar a -> Int # elem :: Eq a => a -> UChar a -> Bool # maximum :: Ord a => UChar a -> a # minimum :: Ord a => UChar a -> a # sum :: Num a => UChar a -> a # product :: Num a => UChar a -> a #
Traversable (UChar :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Traversable Methods traverse :: Applicative f => (a -> f b) -> UChar a -> f (UChar b) # sequenceA :: Applicative f => UChar (f a) -> f (UChar a) # mapM :: Monad m => (a -> m b) -> UChar a -> m (UChar b) # sequence :: Monad m => UChar (m a) -> m (UChar a) #
Functor (URec Char :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods fmap :: (a -> b) -> URec Char a -> URec Char b # (<$) :: a -> URec Char b -> URec Char a #
Generic (URec Char p) |
Instance details Defined in GHC.Internal.Generics Associated Types
type Rep (URec Char p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics type Rep (URec Char p) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UChar" 'PrefixI 'True) (S1 ('MetaSel ('Just "uChar#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UChar :: Type -> Type)))
Methods from :: URec Char p -> Rep (URec Char p) x # to :: Rep (URec Char p) x -> URec Char p #
Show (URec Char p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> URec Char p -> ShowS # show :: URec Char p -> String # showList :: [URec Char p] -> ShowS #
Eq (URec Char p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: URec Char p -> URec Char p -> Bool # (/=) :: URec Char p -> URec Char p -> Bool #
Ord (URec Char p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods compare :: URec Char p -> URec Char p -> Ordering # (<) :: URec Char p -> URec Char p -> Bool # (<=) :: URec Char p -> URec Char p -> Bool # (>) :: URec Char p -> URec Char p -> Bool # (>=) :: URec Char p -> URec Char p -> Bool # max :: URec Char p -> URec Char p -> URec Char p # min :: URec Char p -> URec Char p -> URec Char p #
type NatNumMaxBound Char |
Instance details Defined in Basement.Nat type NatNumMaxBound Char = 1114111
type Difference Char |
Instance details Defined in Basement.Numerical.Subtractive type Difference Char = Int
type PrimSize Char |
Instance details Defined in Basement.PrimType type PrimSize Char = 4
data URec Char (p :: k) | Used for marking occurrences of `Char#` @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics data URec Char (p :: k) = UChar { uChar# :: Char# }
type Compare (a :: Char) (b :: Char) |
Instance details Defined in GHC.Internal.Data.Type.Ord type Compare (a :: Char) (b :: Char) = CmpChar a b
type Rep1 (URec Char :: k -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics type Rep1 (URec Char :: k -> Type) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UChar" 'PrefixI 'True) (S1 ('MetaSel ('Just "uChar#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UChar :: k -> Type)))
type Rep (URec Char p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics type Rep (URec Char p) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UChar" 'PrefixI 'True) (S1 ('MetaSel ('Just "uChar#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UChar :: Type -> Type)))

data Char7 #

ASCII value between 0x0 and 0x7f

#### Instances

Instances details

NormalForm Char7 |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Char7 -> () #
PrimType Char7 |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Char7 |
Instance details Defined in Basement.PrimType type PrimSize Char7 = 1
Methods primSizeInBytes :: Proxy Char7 -> CountOf Word8 # primShiftToBytes :: Proxy Char7 -> Int # primBaUIndex :: ByteArray# -> Offset Char7 -> Char7 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Char7 -> prim Char7 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Char7 -> Char7 -> prim () # primAddrIndex :: Addr# -> Offset Char7 -> Char7 # primAddrRead :: PrimMonad prim => Addr# -> Offset Char7 -> prim Char7 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Char7 -> Char7 -> prim () #
Arbitrary Char7 # |
Instance details Defined in Foundation.Check.Arbitrary Methods arbitrary :: Gen Char7 #
Show Char7 |
Instance details Defined in Basement.Types.Char7 Methods showsPrec :: Int -> Char7 -> ShowS # show :: Char7 -> String # showList :: [Char7] -> ShowS #
Eq Char7 |
Instance details Defined in Basement.Types.Char7 Methods (==) :: Char7 -> Char7 -> Bool # (/=) :: Char7 -> Char7 -> Bool #
Ord Char7 |
Instance details Defined in Basement.Types.Char7 Methods compare :: Char7 -> Char7 -> Ordering # (<) :: Char7 -> Char7 -> Bool # (<=) :: Char7 -> Char7 -> Bool # (>) :: Char7 -> Char7 -> Bool # (>=) :: Char7 -> Char7 -> Bool # max :: Char7 -> Char7 -> Char7 # min :: Char7 -> Char7 -> Char7 #
type NatNumMaxBound Char7 |
Instance details Defined in Basement.Nat type NatNumMaxBound Char7 = 127
type PrimSize Char7 |
Instance details Defined in Basement.PrimType type PrimSize Char7 = 1

data IO a #

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

Instances details

MonadIO IO | Since: base-4.9.0.0
Instance details Defined in Control.Monad.IO.Class Methods liftIO :: IO a -> IO a #
PrimMonad IO |
Instance details Defined in Basement.Monad Associated Types
type PrimState IO |
Instance details Defined in Basement.Monad type PrimState IO = RealWorld
type PrimVar IO |
Instance details Defined in Basement.Monad type PrimVar IO = IORef
Methods primitive :: (State# (PrimState IO) -> (# State# (PrimState IO), a #)) -> IO a # primThrow :: Exception e => e -> IO a # unPrimMonad :: IO a -> State# (PrimState IO) -> (# State# (PrimState IO), a #) # primVarNew :: a -> IO (PrimVar IO a) # primVarRead :: PrimVar IO a -> IO a # primVarWrite :: PrimVar IO a -> a -> IO () #
MonadBracket IO # |
Instance details Defined in Foundation.Monad.Exception Methods generalBracket :: IO a -> (a -> b -> IO ignored1) -> (a -> SomeException -> IO ignored2) -> (a -> IO b) -> IO b #
MonadCatch IO # |
Instance details Defined in Foundation.Monad.Exception Methods catch :: Exception e => IO a -> (e -> IO a) -> IO a #
MonadThrow IO # |
Instance details Defined in Foundation.Monad.Exception Methods throw :: Exception e => e -> IO a #
MonadRandom IO # |
Instance details Defined in Foundation.Random.Class Methods getRandomBytes :: CountOf Word8 -> IO (UArray Word8) # getRandomWord64 :: IO Word64 # getRandomF32 :: IO Float # getRandomF64 :: IO Double #
Alternative IO | Takes the first non-throwing `IO` action's result. `empty` throws an exception. @since base-4.9.0.0
Instance details Defined in GHC.Internal.Base Methods empty :: IO a # (<|>) :: IO a -> IO a -> IO a # some :: IO a -> IO [a] # many :: IO a -> IO [a] #
Applicative IO | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods pure :: a -> IO a # (<*>) :: IO (a -> b) -> IO a -> IO b # liftA2 :: (a -> b -> c) -> IO a -> IO b -> IO c # (*>) :: IO a -> IO b -> IO b # (<*) :: IO a -> IO b -> IO a #
Functor IO | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods fmap :: (a -> b) -> IO a -> IO b # (<$) :: a -> IO b -> IO a #
Monad IO | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods (>>=) :: IO a -> (a -> IO b) -> IO b # (>>) :: IO a -> IO b -> IO b # return :: a -> IO a #
MonadPlus IO | Takes the first non-throwing `IO` action's result. `mzero` throws an exception. @since base-4.9.0.0
Instance details Defined in GHC.Internal.Base Methods mzero :: IO a # mplus :: IO a -> IO a -> IO a #
MonadFail IO | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Control.Monad.Fail Methods fail :: String -> IO a #
MonadFix IO | @since base-2.01
Instance details Defined in GHC.Internal.Control.Monad.Fix Methods mfix :: (a -> IO a) -> IO a #
a ~ () => HPrintfType (IO a) | Since: base-4.7.0.0
Instance details Defined in Text.Printf Methods hspr :: Handle -> String -> [UPrintf] -> IO a
a ~ () => PrintfType (IO a) | Since: base-4.7.0.0
Instance details Defined in Text.Printf Methods spr :: String -> [UPrintf] -> IO a
Monoid a => Monoid (IO a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Base Methods mempty :: IO a # mappend :: IO a -> IO a -> IO a # mconcat :: [IO a] -> IO a #
Semigroup a => Semigroup (IO a) | @since base-4.10.0.0
Instance details Defined in GHC.Internal.Base Methods (<>) :: IO a -> IO a -> IO a # sconcat :: NonEmpty (IO a) -> IO a # stimes :: Integral b => b -> IO a -> IO a #
type PrimState IO |
Instance details Defined in Basement.Monad type PrimState IO = RealWorld
type PrimVar IO |
Instance details Defined in Basement.Monad type PrimVar IO = IORef

data Either a b #

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

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

#### Examples

Expand

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

Instances details

Bifoldable Either | Since: base-4.10.0.0
Instance details Defined in Data.Bifoldable Methods bifold :: Monoid m => Either m m -> m # bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Either a b -> m # bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Either a b -> c # bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Either a b -> c #
Bifoldable1 Either |
Instance details Defined in Data.Bifoldable1 Methods bifold1 :: Semigroup m => Either m m -> m # bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> Either a b -> m #
Bifunctor Either | Since: base-4.8.0.0
Instance details Defined in Data.Bifunctor Methods bimap :: (a -> b) -> (c -> d) -> Either a c -> Either b d # first :: (a -> b) -> Either a c -> Either b c # second :: (b -> c) -> Either a b -> Either a c #
Bitraversable Either | Since: base-4.10.0.0
Instance details Defined in Data.Bitraversable Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Either a b -> f (Either c d) #
Eq2 Either | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Classes Methods liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Either a c -> Either b d -> Bool #
Ord2 Either | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Classes Methods liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Either a c -> Either b d -> Ordering #
Read2 Either | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Classes Methods liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Either a b) # liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Either a b] # liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Either a b) # liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Either a b] #
Show2 Either | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Classes Methods liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Either a b -> ShowS # liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Either a b] -> ShowS #
Generic1 (Either a :: Type -> Type) |
Instance details Defined in GHC.Internal.Generics Associated Types
type Rep1 (Either a :: Type -> Type) | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Generics type Rep1 (Either a :: Type -> Type) = D1 ('MetaData "Either" "GHC.Internal.Data.Either" "ghc-internal" 'False) (C1 ('MetaCons "Left" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "Right" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
Methods from1 :: Either a a0 -> Rep1 (Either a) a0 # to1 :: Rep1 (Either a) a0 -> Either a a0 #
Eq a => Eq1 (Either a) | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Classes Methods liftEq :: (a0 -> b -> Bool) -> Either a a0 -> Either a b -> Bool #
Ord a => Ord1 (Either a) | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Classes Methods liftCompare :: (a0 -> b -> Ordering) -> Either a a0 -> Either a b -> Ordering #
Read a => Read1 (Either a) | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Classes Methods liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Either a a0) # liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Either a a0] # liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Either a a0) # liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Either a a0] #
Show a => Show1 (Either a) | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Classes Methods liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Either a a0 -> ShowS # liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Either a a0] -> ShowS #
MonadFailure (Either a) |
Instance details Defined in Basement.Monad Associated Types
type Failure (Either a) |
Instance details Defined in Basement.Monad type Failure (Either a) = a
Methods mFail :: Failure (Either a) -> Either a () #
Applicative (Either e) | @since base-3.0
Instance details Defined in GHC.Internal.Data.Either Methods pure :: a -> Either e a # (<*>) :: Either e (a -> b) -> Either e a -> Either e b # liftA2 :: (a -> b -> c) -> Either e a -> Either e b -> Either e c # (*>) :: Either e a -> Either e b -> Either e b # (<*) :: Either e a -> Either e b -> Either e a #
Functor (Either a) | @since base-3.0
Instance details Defined in GHC.Internal.Data.Either Methods fmap :: (a0 -> b) -> Either a a0 -> Either a b # (<$) :: a0 -> Either a b -> Either a a0 #
Monad (Either e) | @since base-4.4.0.0
Instance details Defined in GHC.Internal.Data.Either Methods (>>=) :: Either e a -> (a -> Either e b) -> Either e b # (>>) :: Either e a -> Either e b -> Either e b # return :: a -> Either e a #
MonadFix (Either e) | @since base-4.3.0.0
Instance details Defined in GHC.Internal.Control.Monad.Fix Methods mfix :: (a -> Either e a) -> Either e a #
Foldable (Either a) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Either a m -> m # foldMap :: Monoid m => (a0 -> m) -> Either a a0 -> m # foldMap' :: Monoid m => (a0 -> m) -> Either a a0 -> m # foldr :: (a0 -> b -> b) -> b -> Either a a0 -> b # foldr' :: (a0 -> b -> b) -> b -> Either a a0 -> b # foldl :: (b -> a0 -> b) -> b -> Either a a0 -> b # foldl' :: (b -> a0 -> b) -> b -> Either a a0 -> b # foldr1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 # foldl1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 # toList :: Either a a0 -> [a0] # null :: Either a a0 -> Bool # length :: Either a a0 -> Int # elem :: Eq a0 => a0 -> Either a a0 -> Bool # maximum :: Ord a0 => Either a a0 -> a0 # minimum :: Ord a0 => Either a a0 -> a0 # sum :: Num a0 => Either a a0 -> a0 # product :: Num a0 => Either a a0 -> a0 #
Traversable (Either a) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Traversable Methods traverse :: Applicative f => (a0 -> f b) -> Either a a0 -> f (Either a b) # sequenceA :: Applicative f => Either a (f a0) -> f (Either a a0) # mapM :: Monad m => (a0 -> m b) -> Either a a0 -> m (Either a b) # sequence :: Monad m => Either a (m a0) -> m (Either a a0) #
From (Maybe a) (Either () a) |
Instance details Defined in Basement.From Methods from :: Maybe a -> Either () a #
(NormalForm l, NormalForm r) => NormalForm (Either l r) |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Either l r -> () #
(Arbitrary l, Arbitrary r) => Arbitrary (Either l r) # |
Instance details Defined in Foundation.Check.Arbitrary Methods arbitrary :: Gen (Either l r) #
Semigroup (Either a b) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Either Methods (<>) :: Either a b -> Either a b -> Either a b # sconcat :: NonEmpty (Either a b) -> Either a b # stimes :: Integral b0 => b0 -> Either a b -> Either a b #
(Data a, Data b) => Data (Either a b) | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Either a b -> c (Either a b) # gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Either a b) # toConstr :: Either a b -> Constr # dataTypeOf :: Either a b -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Either a b)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Either a b)) # gmapT :: (forall b0. Data b0 => b0 -> b0) -> Either a b -> Either a b # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Either a b -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Either a b -> r # gmapQ :: (forall d. Data d => d -> u) -> Either a b -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Either a b -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Either a b -> m (Either a b) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Either a b -> m (Either a b) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Either a b -> m (Either a b) #
Generic (Either a b) |
Instance details Defined in GHC.Internal.Generics Associated Types
type Rep (Either a b) | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Generics type Rep (Either a b) = D1 ('MetaData "Either" "GHC.Internal.Data.Either" "ghc-internal" 'False) (C1 ('MetaCons "Left" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "Right" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b)))
Methods from :: Either a b -> Rep (Either a b) x # to :: Rep (Either a b) x -> Either a b #
(Read a, Read b) => Read (Either a b) | @since base-3.0
Instance details Defined in GHC.Internal.Data.Either Methods readsPrec :: Int -> ReadS (Either a b) # readList :: ReadS [Either a b] # readPrec :: ReadPrec (Either a b) # readListPrec :: ReadPrec [Either a b] #
(Show a, Show b) => Show (Either a b) | @since base-3.0
Instance details Defined in GHC.Internal.Data.Either Methods showsPrec :: Int -> Either a b -> ShowS # show :: Either a b -> String # showList :: [Either a b] -> ShowS #
(Eq a, Eq b) => Eq (Either a b) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Either Methods (==) :: Either a b -> Either a b -> Bool # (/=) :: Either a b -> Either a b -> Bool #
(Ord a, Ord b) => Ord (Either a b) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Either Methods compare :: Either a b -> Either a b -> Ordering # (<) :: Either a b -> Either a b -> Bool # (<=) :: Either a b -> Either a b -> Bool # (>) :: Either a b -> Either a b -> Bool # (>=) :: Either a b -> Either a b -> Bool # max :: Either a b -> Either a b -> Either a b # min :: Either a b -> Either a b -> Either a b #
From (Either a b) (These a b) |
Instance details Defined in Basement.From Methods from :: Either a b -> These a b #
type Rep1 (Either a :: Type -> Type) | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Generics type Rep1 (Either a :: Type -> Type) = D1 ('MetaData "Either" "GHC.Internal.Data.Either" "ghc-internal" 'False) (C1 ('MetaCons "Left" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "Right" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
type Failure (Either a) |
Instance details Defined in Basement.Monad type Failure (Either a) = a
type Rep (Either a b) | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Generics type Rep (Either a b) = D1 ('MetaData "Either" "GHC.Internal.Data.Either" "ghc-internal" 'False) (C1 ('MetaCons "Left" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "Right" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b)))

## Numbers

data Int8 #

8-bit signed integer type

#### Instances

Instances details

PrintfArg Int8 | Since: base-2.1
Instance details Defined in Text.Printf Methods formatArg :: Int8 -> FieldFormatter # parseFormat :: Int8 -> ModifierParser #
BitOps Int8 |
Instance details Defined in Basement.Bits Methods (.&.) :: Int8 -> Int8 -> Int8 # (.|.) :: Int8 -> Int8 -> Int8 # (.^.) :: Int8 -> Int8 -> Int8 # (.<<.) :: Int8 -> CountOf Bool -> Int8 # (.>>.) :: Int8 -> CountOf Bool -> Int8 # bit :: Offset Bool -> Int8 # isBitSet :: Int8 -> Offset Bool -> Bool # setBit :: Int8 -> Offset Bool -> Int8 # clearBit :: Int8 -> Offset Bool -> Int8 #
FiniteBitsOps Int8 |
Instance details Defined in Basement.Bits Methods numberOfBits :: Int8 -> CountOf Bool # rotateL :: Int8 -> CountOf Bool -> Int8 # rotateR :: Int8 -> CountOf Bool -> Int8 # popCount :: Int8 -> CountOf Bool # bitFlip :: Int8 -> Int8 # countLeadingZeros :: Int8 -> CountOf Bool # countTrailingZeros :: Int8 -> CountOf Bool #
HasNegation Int8 |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Int8 -> Int8 #
Integral Int8 |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Int8 #
NormalForm Int8 |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Int8 -> () #
Additive Int8 |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Int8 # (+) :: Int8 -> Int8 -> Int8 # scale :: IsNatural n => n -> Int8 -> Int8 #
IDivisible Int8 |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Int8 -> Int8 -> Int8 # mod :: Int8 -> Int8 -> Int8 # divMod :: Int8 -> Int8 -> (Int8, Int8) #
Multiplicative Int8 |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Int8 # (*) :: Int8 -> Int8 -> Int8 # (^) :: (IsNatural n, Enum n, IDivisible n) => Int8 -> n -> Int8 #
IsIntegral Int8 |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Int8 -> Integer #
Subtractive Int8 |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Int8 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Int8 = Int8
Methods (-) :: Int8 -> Int8 -> Difference Int8 #
PrimMemoryComparable Int8 |
Instance details Defined in Basement.PrimType
PrimType Int8 |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Int8 |
Instance details Defined in Basement.PrimType type PrimSize Int8 = 1
Methods primSizeInBytes :: Proxy Int8 -> CountOf Word8 # primShiftToBytes :: Proxy Int8 -> Int # primBaUIndex :: ByteArray# -> Offset Int8 -> Int8 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int8 -> prim Int8 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int8 -> Int8 -> prim () # primAddrIndex :: Addr# -> Offset Int8 -> Int8 # primAddrRead :: PrimMonad prim => Addr# -> Offset Int8 -> prim Int8 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Int8 -> Int8 -> prim () #
Arbitrary Int8 # |
Instance details Defined in Foundation.Check.Arbitrary Methods arbitrary :: Gen Int8 #
Storable Int8 # |
Instance details Defined in Foundation.Class.Storable Methods peek :: Ptr Int8 -> IO Int8 # poke :: Ptr Int8 -> Int8 -> IO () #
StorableFixed Int8 # |
Instance details Defined in Foundation.Class.Storable Methods size :: proxy Int8 -> CountOf Word8 # alignment :: proxy Int8 -> CountOf Word8 #
IsField Int8 # |
Instance details Defined in Foundation.Format.CSV.Types Methods toField :: Int8 -> Field # fromField :: Field -> Either String Int8 #
Hashable Int8 # |
Instance details Defined in Foundation.Hashing.Hashable Methods hashMix :: Hasher st => Int8 -> st -> st #
Signed Int8 # |
Instance details Defined in Foundation.Numerical Methods abs :: Int8 -> Int8 # signum :: Int8 -> Sign #
Bits Int8 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods (.&.) :: Int8 -> Int8 -> Int8 # (.|.) :: Int8 -> Int8 -> Int8 # xor :: Int8 -> Int8 -> Int8 # complement :: Int8 -> Int8 # shift :: Int8 -> Int -> Int8 # rotate :: Int8 -> Int -> Int8 # zeroBits :: Int8 # bit :: Int -> Int8 # setBit :: Int8 -> Int -> Int8 # clearBit :: Int8 -> Int -> Int8 # complementBit :: Int8 -> Int -> Int8 # testBit :: Int8 -> Int -> Bool # bitSizeMaybe :: Int8 -> Maybe Int # bitSize :: Int8 -> Int # isSigned :: Int8 -> Bool # shiftL :: Int8 -> Int -> Int8 # unsafeShiftL :: Int8 -> Int -> Int8 # shiftR :: Int8 -> Int -> Int8 # unsafeShiftR :: Int8 -> Int -> Int8 # rotateL :: Int8 -> Int -> Int8 # rotateR :: Int8 -> Int -> Int8 # popCount :: Int8 -> Int #
FiniteBits Int8 | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Int Methods finiteBitSize :: Int8 -> Int # countLeadingZeros :: Int8 -> Int # countTrailingZeros :: Int8 -> Int #
Data Int8 | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int8 -> c Int8 # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int8 # toConstr :: Int8 -> Constr # dataTypeOf :: Int8 -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Int8) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int8) # gmapT :: (forall b. Data b => b -> b) -> Int8 -> Int8 # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int8 -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int8 -> r # gmapQ :: (forall d. Data d => d -> u) -> Int8 -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Int8 -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int8 -> m Int8 # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int8 -> m Int8 # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int8 -> m Int8 #
Bounded Int8 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods minBound :: Int8 # maxBound :: Int8 #
Enum Int8 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods succ :: Int8 -> Int8 # pred :: Int8 -> Int8 # toEnum :: Int -> Int8 # fromEnum :: Int8 -> Int # enumFrom :: Int8 -> [Int8] # enumFromThen :: Int8 -> Int8 -> [Int8] # enumFromTo :: Int8 -> Int8 -> [Int8] # enumFromThenTo :: Int8 -> Int8 -> Int8 -> [Int8] #
Storable Int8 | @since base-2.01
Instance details Defined in GHC.Internal.Foreign.Storable Methods sizeOf :: Int8 -> Int # alignment :: Int8 -> Int # peekElemOff :: Ptr Int8 -> Int -> IO Int8 # pokeElemOff :: Ptr Int8 -> Int -> Int8 -> IO () # peekByteOff :: Ptr b -> Int -> IO Int8 # pokeByteOff :: Ptr b -> Int -> Int8 -> IO () # peek :: Ptr Int8 -> IO Int8 # poke :: Ptr Int8 -> Int8 -> IO () #
Ix Int8 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods range :: (Int8, Int8) -> [Int8] # index :: (Int8, Int8) -> Int8 -> Int # unsafeIndex :: (Int8, Int8) -> Int8 -> Int # inRange :: (Int8, Int8) -> Int8 -> Bool # rangeSize :: (Int8, Int8) -> Int # unsafeRangeSize :: (Int8, Int8) -> Int #
Num Int8 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods (+) :: Int8 -> Int8 -> Int8 # (-) :: Int8 -> Int8 -> Int8 # (*) :: Int8 -> Int8 -> Int8 # negate :: Int8 -> Int8 # abs :: Int8 -> Int8 # signum :: Int8 -> Int8 # fromInteger :: Integer -> Int8 #
Read Int8 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods readsPrec :: Int -> ReadS Int8 # readList :: ReadS [Int8] # readPrec :: ReadPrec Int8 # readListPrec :: ReadPrec [Int8] #
Integral Int8 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods quot :: Int8 -> Int8 -> Int8 # rem :: Int8 -> Int8 -> Int8 # div :: Int8 -> Int8 -> Int8 # mod :: Int8 -> Int8 -> Int8 # quotRem :: Int8 -> Int8 -> (Int8, Int8) # divMod :: Int8 -> Int8 -> (Int8, Int8) # toInteger :: Int8 -> Integer #
Real Int8 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods toRational :: Int8 -> Rational #
Show Int8 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods showsPrec :: Int -> Int8 -> ShowS # show :: Int8 -> String # showList :: [Int8] -> ShowS #
Eq Int8 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods (==) :: Int8 -> Int8 -> Bool # (/=) :: Int8 -> Int8 -> Bool #
Ord Int8 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods compare :: Int8 -> Int8 -> Ordering # (<) :: Int8 -> Int8 -> Bool # (<=) :: Int8 -> Int8 -> Bool # (>) :: Int8 -> Int8 -> Bool # (>=) :: Int8 -> Int8 -> Bool # max :: Int8 -> Int8 -> Int8 # min :: Int8 -> Int8 -> Int8 #
Cast Int8 Word8 |
Instance details Defined in Basement.Cast Methods cast :: Int8 -> Word8 #
Cast Word8 Int8 |
Instance details Defined in Basement.Cast Methods cast :: Word8 -> Int8 #
From Int8 Int16 |
Instance details Defined in Basement.From Methods from :: Int8 -> Int16 #
From Int8 Int32 |
Instance details Defined in Basement.From Methods from :: Int8 -> Int32 #
From Int8 Int64 |
Instance details Defined in Basement.From Methods from :: Int8 -> Int64 #
From Int8 Int |
Instance details Defined in Basement.From Methods from :: Int8 -> Int #
IntegralDownsize Int64 Int8 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Int64 -> Int8 # integralDownsizeCheck :: Int64 -> Maybe Int8 #
IntegralDownsize Integer Int8 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Integer -> Int8 # integralDownsizeCheck :: Integer -> Maybe Int8 #
IntegralDownsize Int Int8 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Int -> Int8 # integralDownsizeCheck :: Int -> Maybe Int8 #
IntegralUpsize Int8 Int16 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Int8 -> Int16 #
IntegralUpsize Int8 Int32 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Int8 -> Int32 #
IntegralUpsize Int8 Int64 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Int8 -> Int64 #
IntegralUpsize Int8 Int |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Int8 -> Int #
type NatNumMaxBound Int8 |
Instance details Defined in Basement.Nat type NatNumMaxBound Int8 = 127
type Difference Int8 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Int8 = Int8
type PrimSize Int8 |
Instance details Defined in Basement.PrimType type PrimSize Int8 = 1

data Int16 #

16-bit signed integer type

#### Instances

Instances details

PrintfArg Int16 | Since: base-2.1
Instance details Defined in Text.Printf Methods formatArg :: Int16 -> FieldFormatter # parseFormat :: Int16 -> ModifierParser #
BitOps Int16 |
Instance details Defined in Basement.Bits Methods (.&.) :: Int16 -> Int16 -> Int16 # (.|.) :: Int16 -> Int16 -> Int16 # (.^.) :: Int16 -> Int16 -> Int16 # (.<<.) :: Int16 -> CountOf Bool -> Int16 # (.>>.) :: Int16 -> CountOf Bool -> Int16 # bit :: Offset Bool -> Int16 # isBitSet :: Int16 -> Offset Bool -> Bool # setBit :: Int16 -> Offset Bool -> Int16 # clearBit :: Int16 -> Offset Bool -> Int16 #
FiniteBitsOps Int16 |
Instance details Defined in Basement.Bits Methods numberOfBits :: Int16 -> CountOf Bool # rotateL :: Int16 -> CountOf Bool -> Int16 # rotateR :: Int16 -> CountOf Bool -> Int16 # popCount :: Int16 -> CountOf Bool # bitFlip :: Int16 -> Int16 # countLeadingZeros :: Int16 -> CountOf Bool # countTrailingZeros :: Int16 -> CountOf Bool #
HasNegation Int16 |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Int16 -> Int16 #
Integral Int16 |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Int16 #
NormalForm Int16 |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Int16 -> () #
Additive Int16 |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Int16 # (+) :: Int16 -> Int16 -> Int16 # scale :: IsNatural n => n -> Int16 -> Int16 #
IDivisible Int16 |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Int16 -> Int16 -> Int16 # mod :: Int16 -> Int16 -> Int16 # divMod :: Int16 -> Int16 -> (Int16, Int16) #
Multiplicative Int16 |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Int16 # (*) :: Int16 -> Int16 -> Int16 # (^) :: (IsNatural n, Enum n, IDivisible n) => Int16 -> n -> Int16 #
IsIntegral Int16 |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Int16 -> Integer #
Subtractive Int16 |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Int16 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Int16 = Int16
Methods (-) :: Int16 -> Int16 -> Difference Int16 #
PrimMemoryComparable Int16 |
Instance details Defined in Basement.PrimType
PrimType Int16 |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Int16 |
Instance details Defined in Basement.PrimType type PrimSize Int16 = 2
Methods primSizeInBytes :: Proxy Int16 -> CountOf Word8 # primShiftToBytes :: Proxy Int16 -> Int # primBaUIndex :: ByteArray# -> Offset Int16 -> Int16 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int16 -> prim Int16 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int16 -> Int16 -> prim () # primAddrIndex :: Addr# -> Offset Int16 -> Int16 # primAddrRead :: PrimMonad prim => Addr# -> Offset Int16 -> prim Int16 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Int16 -> Int16 -> prim () #
Arbitrary Int16 # |
Instance details Defined in Foundation.Check.Arbitrary Methods arbitrary :: Gen Int16 #
Storable Int16 # |
Instance details Defined in Foundation.Class.Storable Methods peek :: Ptr Int16 -> IO Int16 # poke :: Ptr Int16 -> Int16 -> IO () #
StorableFixed Int16 # |
Instance details Defined in Foundation.Class.Storable Methods size :: proxy Int16 -> CountOf Word8 # alignment :: proxy Int16 -> CountOf Word8 #
IsField Int16 # |
Instance details Defined in Foundation.Format.CSV.Types Methods toField :: Int16 -> Field # fromField :: Field -> Either String Int16 #
Hashable Int16 # |
Instance details Defined in Foundation.Hashing.Hashable Methods hashMix :: Hasher st => Int16 -> st -> st #
Signed Int16 # |
Instance details Defined in Foundation.Numerical Methods abs :: Int16 -> Int16 # signum :: Int16 -> Sign #
Bits Int16 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods (.&.) :: Int16 -> Int16 -> Int16 # (.|.) :: Int16 -> Int16 -> Int16 # xor :: Int16 -> Int16 -> Int16 # complement :: Int16 -> Int16 # shift :: Int16 -> Int -> Int16 # rotate :: Int16 -> Int -> Int16 # zeroBits :: Int16 # bit :: Int -> Int16 # setBit :: Int16 -> Int -> Int16 # clearBit :: Int16 -> Int -> Int16 # complementBit :: Int16 -> Int -> Int16 # testBit :: Int16 -> Int -> Bool # bitSizeMaybe :: Int16 -> Maybe Int # bitSize :: Int16 -> Int # isSigned :: Int16 -> Bool # shiftL :: Int16 -> Int -> Int16 # unsafeShiftL :: Int16 -> Int -> Int16 # shiftR :: Int16 -> Int -> Int16 # unsafeShiftR :: Int16 -> Int -> Int16 # rotateL :: Int16 -> Int -> Int16 # rotateR :: Int16 -> Int -> Int16 # popCount :: Int16 -> Int #
FiniteBits Int16 | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Int Methods finiteBitSize :: Int16 -> Int # countLeadingZeros :: Int16 -> Int # countTrailingZeros :: Int16 -> Int #
Data Int16 | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int16 -> c Int16 # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int16 # toConstr :: Int16 -> Constr # dataTypeOf :: Int16 -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Int16) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int16) # gmapT :: (forall b. Data b => b -> b) -> Int16 -> Int16 # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int16 -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int16 -> r # gmapQ :: (forall d. Data d => d -> u) -> Int16 -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Int16 -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int16 -> m Int16 # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int16 -> m Int16 # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int16 -> m Int16 #
Bounded Int16 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods minBound :: Int16 # maxBound :: Int16 #
Enum Int16 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods succ :: Int16 -> Int16 # pred :: Int16 -> Int16 # toEnum :: Int -> Int16 # fromEnum :: Int16 -> Int # enumFrom :: Int16 -> [Int16] # enumFromThen :: Int16 -> Int16 -> [Int16] # enumFromTo :: Int16 -> Int16 -> [Int16] # enumFromThenTo :: Int16 -> Int16 -> Int16 -> [Int16] #
Storable Int16 | @since base-2.01
Instance details Defined in GHC.Internal.Foreign.Storable Methods sizeOf :: Int16 -> Int # alignment :: Int16 -> Int # peekElemOff :: Ptr Int16 -> Int -> IO Int16 # pokeElemOff :: Ptr Int16 -> Int -> Int16 -> IO () # peekByteOff :: Ptr b -> Int -> IO Int16 # pokeByteOff :: Ptr b -> Int -> Int16 -> IO () # peek :: Ptr Int16 -> IO Int16 # poke :: Ptr Int16 -> Int16 -> IO () #
Ix Int16 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods range :: (Int16, Int16) -> [Int16] # index :: (Int16, Int16) -> Int16 -> Int # unsafeIndex :: (Int16, Int16) -> Int16 -> Int # inRange :: (Int16, Int16) -> Int16 -> Bool # rangeSize :: (Int16, Int16) -> Int # unsafeRangeSize :: (Int16, Int16) -> Int #
Num Int16 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods (+) :: Int16 -> Int16 -> Int16 # (-) :: Int16 -> Int16 -> Int16 # (*) :: Int16 -> Int16 -> Int16 # negate :: Int16 -> Int16 # abs :: Int16 -> Int16 # signum :: Int16 -> Int16 # fromInteger :: Integer -> Int16 #
Read Int16 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods readsPrec :: Int -> ReadS Int16 # readList :: ReadS [Int16] # readPrec :: ReadPrec Int16 # readListPrec :: ReadPrec [Int16] #
Integral Int16 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods quot :: Int16 -> Int16 -> Int16 # rem :: Int16 -> Int16 -> Int16 # div :: Int16 -> Int16 -> Int16 # mod :: Int16 -> Int16 -> Int16 # quotRem :: Int16 -> Int16 -> (Int16, Int16) # divMod :: Int16 -> Int16 -> (Int16, Int16) # toInteger :: Int16 -> Integer #
Real Int16 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods toRational :: Int16 -> Rational #
Show Int16 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods showsPrec :: Int -> Int16 -> ShowS # show :: Int16 -> String # showList :: [Int16] -> ShowS #
Eq Int16 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods (==) :: Int16 -> Int16 -> Bool # (/=) :: Int16 -> Int16 -> Bool #
Ord Int16 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods compare :: Int16 -> Int16 -> Ordering # (<) :: Int16 -> Int16 -> Bool # (<=) :: Int16 -> Int16 -> Bool # (>) :: Int16 -> Int16 -> Bool # (>=) :: Int16 -> Int16 -> Bool # max :: Int16 -> Int16 -> Int16 # min :: Int16 -> Int16 -> Int16 #
Cast Int16 Word16 |
Instance details Defined in Basement.Cast Methods cast :: Int16 -> Word16 #
Cast Word16 Int16 |
Instance details Defined in Basement.Cast Methods cast :: Word16 -> Int16 #
From Int16 Int32 |
Instance details Defined in Basement.From Methods from :: Int16 -> Int32 #
From Int16 Int64 |
Instance details Defined in Basement.From Methods from :: Int16 -> Int64 #
From Int16 Int |
Instance details Defined in Basement.From Methods from :: Int16 -> Int #
From Int8 Int16 |
Instance details Defined in Basement.From Methods from :: Int8 -> Int16 #
From Word8 Int16 |
Instance details Defined in Basement.From Methods from :: Word8 -> Int16 #
IntegralDownsize Int64 Int16 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Int64 -> Int16 # integralDownsizeCheck :: Int64 -> Maybe Int16 #
IntegralDownsize Integer Int16 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Integer -> Int16 # integralDownsizeCheck :: Integer -> Maybe Int16 #
IntegralDownsize Int Int16 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Int -> Int16 # integralDownsizeCheck :: Int -> Maybe Int16 #
IntegralUpsize Int16 Int32 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Int16 -> Int32 #
IntegralUpsize Int16 Int64 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Int16 -> Int64 #
IntegralUpsize Int16 Int |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Int16 -> Int #
IntegralUpsize Int8 Int16 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Int8 -> Int16 #
IntegralUpsize Word8 Int16 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word8 -> Int16 #
type NatNumMaxBound Int16 |
Instance details Defined in Basement.Nat type NatNumMaxBound Int16 = 32767
type Difference Int16 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Int16 = Int16
type PrimSize Int16 |
Instance details Defined in Basement.PrimType type PrimSize Int16 = 2

data Int32 #

32-bit signed integer type

#### Instances

Instances details

PrintfArg Int32 | Since: base-2.1
Instance details Defined in Text.Printf Methods formatArg :: Int32 -> FieldFormatter # parseFormat :: Int32 -> ModifierParser #
BitOps Int32 |
Instance details Defined in Basement.Bits Methods (.&.) :: Int32 -> Int32 -> Int32 # (.|.) :: Int32 -> Int32 -> Int32 # (.^.) :: Int32 -> Int32 -> Int32 # (.<<.) :: Int32 -> CountOf Bool -> Int32 # (.>>.) :: Int32 -> CountOf Bool -> Int32 # bit :: Offset Bool -> Int32 # isBitSet :: Int32 -> Offset Bool -> Bool # setBit :: Int32 -> Offset Bool -> Int32 # clearBit :: Int32 -> Offset Bool -> Int32 #
FiniteBitsOps Int32 |
Instance details Defined in Basement.Bits Methods numberOfBits :: Int32 -> CountOf Bool # rotateL :: Int32 -> CountOf Bool -> Int32 # rotateR :: Int32 -> CountOf Bool -> Int32 # popCount :: Int32 -> CountOf Bool # bitFlip :: Int32 -> Int32 # countLeadingZeros :: Int32 -> CountOf Bool # countTrailingZeros :: Int32 -> CountOf Bool #
HasNegation Int32 |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Int32 -> Int32 #
Integral Int32 |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Int32 #
NormalForm Int32 |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Int32 -> () #
Additive Int32 |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Int32 # (+) :: Int32 -> Int32 -> Int32 # scale :: IsNatural n => n -> Int32 -> Int32 #
IDivisible Int32 |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Int32 -> Int32 -> Int32 # mod :: Int32 -> Int32 -> Int32 # divMod :: Int32 -> Int32 -> (Int32, Int32) #
Multiplicative Int32 |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Int32 # (*) :: Int32 -> Int32 -> Int32 # (^) :: (IsNatural n, Enum n, IDivisible n) => Int32 -> n -> Int32 #
IsIntegral Int32 |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Int32 -> Integer #
Subtractive Int32 |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Int32 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Int32 = Int32
Methods (-) :: Int32 -> Int32 -> Difference Int32 #
PrimMemoryComparable Int32 |
Instance details Defined in Basement.PrimType
PrimType Int32 |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Int32 |
Instance details Defined in Basement.PrimType type PrimSize Int32 = 4
Methods primSizeInBytes :: Proxy Int32 -> CountOf Word8 # primShiftToBytes :: Proxy Int32 -> Int # primBaUIndex :: ByteArray# -> Offset Int32 -> Int32 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int32 -> prim Int32 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int32 -> Int32 -> prim () # primAddrIndex :: Addr# -> Offset Int32 -> Int32 # primAddrRead :: PrimMonad prim => Addr# -> Offset Int32 -> prim Int32 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Int32 -> Int32 -> prim () #
Arbitrary Int32 # |
Instance details Defined in Foundation.Check.Arbitrary Methods arbitrary :: Gen Int32 #
Storable Int32 # |
Instance details Defined in Foundation.Class.Storable Methods peek :: Ptr Int32 -> IO Int32 # poke :: Ptr Int32 -> Int32 -> IO () #
StorableFixed Int32 # |
Instance details Defined in Foundation.Class.Storable Methods size :: proxy Int32 -> CountOf Word8 # alignment :: proxy Int32 -> CountOf Word8 #
IsField Int32 # |
Instance details Defined in Foundation.Format.CSV.Types Methods toField :: Int32 -> Field # fromField :: Field -> Either String Int32 #
Hashable Int32 # |
Instance details Defined in Foundation.Hashing.Hashable Methods hashMix :: Hasher st => Int32 -> st -> st #
Signed Int32 # |
Instance details Defined in Foundation.Numerical Methods abs :: Int32 -> Int32 # signum :: Int32 -> Sign #
Bits Int32 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods (.&.) :: Int32 -> Int32 -> Int32 # (.|.) :: Int32 -> Int32 -> Int32 # xor :: Int32 -> Int32 -> Int32 # complement :: Int32 -> Int32 # shift :: Int32 -> Int -> Int32 # rotate :: Int32 -> Int -> Int32 # zeroBits :: Int32 # bit :: Int -> Int32 # setBit :: Int32 -> Int -> Int32 # clearBit :: Int32 -> Int -> Int32 # complementBit :: Int32 -> Int -> Int32 # testBit :: Int32 -> Int -> Bool # bitSizeMaybe :: Int32 -> Maybe Int # bitSize :: Int32 -> Int # isSigned :: Int32 -> Bool # shiftL :: Int32 -> Int -> Int32 # unsafeShiftL :: Int32 -> Int -> Int32 # shiftR :: Int32 -> Int -> Int32 # unsafeShiftR :: Int32 -> Int -> Int32 # rotateL :: Int32 -> Int -> Int32 # rotateR :: Int32 -> Int -> Int32 # popCount :: Int32 -> Int #
FiniteBits Int32 | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Int Methods finiteBitSize :: Int32 -> Int # countLeadingZeros :: Int32 -> Int # countTrailingZeros :: Int32 -> Int #
Data Int32 | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int32 -> c Int32 # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int32 # toConstr :: Int32 -> Constr # dataTypeOf :: Int32 -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Int32) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int32) # gmapT :: (forall b. Data b => b -> b) -> Int32 -> Int32 # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int32 -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int32 -> r # gmapQ :: (forall d. Data d => d -> u) -> Int32 -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Int32 -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int32 -> m Int32 # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int32 -> m Int32 # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int32 -> m Int32 #
Bounded Int32 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods minBound :: Int32 # maxBound :: Int32 #
Enum Int32 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods succ :: Int32 -> Int32 # pred :: Int32 -> Int32 # toEnum :: Int -> Int32 # fromEnum :: Int32 -> Int # enumFrom :: Int32 -> [Int32] # enumFromThen :: Int32 -> Int32 -> [Int32] # enumFromTo :: Int32 -> Int32 -> [Int32] # enumFromThenTo :: Int32 -> Int32 -> Int32 -> [Int32] #
Storable Int32 | @since base-2.01
Instance details Defined in GHC.Internal.Foreign.Storable Methods sizeOf :: Int32 -> Int # alignment :: Int32 -> Int # peekElemOff :: Ptr Int32 -> Int -> IO Int32 # pokeElemOff :: Ptr Int32 -> Int -> Int32 -> IO () # peekByteOff :: Ptr b -> Int -> IO Int32 # pokeByteOff :: Ptr b -> Int -> Int32 -> IO () # peek :: Ptr Int32 -> IO Int32 # poke :: Ptr Int32 -> Int32 -> IO () #
Ix Int32 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods range :: (Int32, Int32) -> [Int32] # index :: (Int32, Int32) -> Int32 -> Int # unsafeIndex :: (Int32, Int32) -> Int32 -> Int # inRange :: (Int32, Int32) -> Int32 -> Bool # rangeSize :: (Int32, Int32) -> Int # unsafeRangeSize :: (Int32, Int32) -> Int #
Num Int32 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods (+) :: Int32 -> Int32 -> Int32 # (-) :: Int32 -> Int32 -> Int32 # (*) :: Int32 -> Int32 -> Int32 # negate :: Int32 -> Int32 # abs :: Int32 -> Int32 # signum :: Int32 -> Int32 # fromInteger :: Integer -> Int32 #
Read Int32 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods readsPrec :: Int -> ReadS Int32 # readList :: ReadS [Int32] # readPrec :: ReadPrec Int32 # readListPrec :: ReadPrec [Int32] #
Integral Int32 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods quot :: Int32 -> Int32 -> Int32 # rem :: Int32 -> Int32 -> Int32 # div :: Int32 -> Int32 -> Int32 # mod :: Int32 -> Int32 -> Int32 # quotRem :: Int32 -> Int32 -> (Int32, Int32) # divMod :: Int32 -> Int32 -> (Int32, Int32) # toInteger :: Int32 -> Integer #
Real Int32 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods toRational :: Int32 -> Rational #
Show Int32 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods showsPrec :: Int -> Int32 -> ShowS # show :: Int32 -> String # showList :: [Int32] -> ShowS #
Eq Int32 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods (==) :: Int32 -> Int32 -> Bool # (/=) :: Int32 -> Int32 -> Bool #
Ord Int32 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods compare :: Int32 -> Int32 -> Ordering # (<) :: Int32 -> Int32 -> Bool # (<=) :: Int32 -> Int32 -> Bool # (>) :: Int32 -> Int32 -> Bool # (>=) :: Int32 -> Int32 -> Bool # max :: Int32 -> Int32 -> Int32 # min :: Int32 -> Int32 -> Int32 #
Cast Int32 Word32 |
Instance details Defined in Basement.Cast Methods cast :: Int32 -> Word32 #
Cast Word32 Int32 |
Instance details Defined in Basement.Cast Methods cast :: Word32 -> Int32 #
From Int16 Int32 |
Instance details Defined in Basement.From Methods from :: Int16 -> Int32 #
From Int32 Int64 |
Instance details Defined in Basement.From Methods from :: Int32 -> Int64 #
From Int32 Int |
Instance details Defined in Basement.From Methods from :: Int32 -> Int #
From Int8 Int32 |
Instance details Defined in Basement.From Methods from :: Int8 -> Int32 #
From Word16 Int32 |
Instance details Defined in Basement.From Methods from :: Word16 -> Int32 #
From Word8 Int32 |
Instance details Defined in Basement.From Methods from :: Word8 -> Int32 #
IntegralDownsize Int64 Int32 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Int64 -> Int32 # integralDownsizeCheck :: Int64 -> Maybe Int32 #
IntegralDownsize Integer Int32 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Integer -> Int32 # integralDownsizeCheck :: Integer -> Maybe Int32 #
IntegralDownsize Int Int32 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Int -> Int32 # integralDownsizeCheck :: Int -> Maybe Int32 #
IntegralUpsize Int16 Int32 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Int16 -> Int32 #
IntegralUpsize Int32 Int64 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Int32 -> Int64 #
IntegralUpsize Int32 Int |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Int32 -> Int #
IntegralUpsize Int8 Int32 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Int8 -> Int32 #
IntegralUpsize Word8 Int32 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word8 -> Int32 #
type NatNumMaxBound Int32 |
Instance details Defined in Basement.Nat type NatNumMaxBound Int32 = 2147483647
type Difference Int32 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Int32 = Int32
type PrimSize Int32 |
Instance details Defined in Basement.PrimType type PrimSize Int32 = 4

data Int64 #

64-bit signed integer type

#### Instances

Instances details

PrintfArg Int64 | Since: base-2.1
Instance details Defined in Text.Printf Methods formatArg :: Int64 -> FieldFormatter # parseFormat :: Int64 -> ModifierParser #
BitOps Int64 |
Instance details Defined in Basement.Bits Methods (.&.) :: Int64 -> Int64 -> Int64 # (.|.) :: Int64 -> Int64 -> Int64 # (.^.) :: Int64 -> Int64 -> Int64 # (.<<.) :: Int64 -> CountOf Bool -> Int64 # (.>>.) :: Int64 -> CountOf Bool -> Int64 # bit :: Offset Bool -> Int64 # isBitSet :: Int64 -> Offset Bool -> Bool # setBit :: Int64 -> Offset Bool -> Int64 # clearBit :: Int64 -> Offset Bool -> Int64 #
FiniteBitsOps Int64 |
Instance details Defined in Basement.Bits Methods numberOfBits :: Int64 -> CountOf Bool # rotateL :: Int64 -> CountOf Bool -> Int64 # rotateR :: Int64 -> CountOf Bool -> Int64 # popCount :: Int64 -> CountOf Bool # bitFlip :: Int64 -> Int64 # countLeadingZeros :: Int64 -> CountOf Bool # countTrailingZeros :: Int64 -> CountOf Bool #
HasNegation Int64 |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Int64 -> Int64 #
Integral Int64 |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Int64 #
NormalForm Int64 |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Int64 -> () #
Additive Int64 |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Int64 # (+) :: Int64 -> Int64 -> Int64 # scale :: IsNatural n => n -> Int64 -> Int64 #
IDivisible Int64 |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Int64 -> Int64 -> Int64 # mod :: Int64 -> Int64 -> Int64 # divMod :: Int64 -> Int64 -> (Int64, Int64) #
Multiplicative Int64 |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Int64 # (*) :: Int64 -> Int64 -> Int64 # (^) :: (IsNatural n, Enum n, IDivisible n) => Int64 -> n -> Int64 #
IsIntegral Int64 |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Int64 -> Integer #
Subtractive Int64 |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Int64 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Int64 = Int64
Methods (-) :: Int64 -> Int64 -> Difference Int64 #
PrimMemoryComparable Int64 |
Instance details Defined in Basement.PrimType
PrimType Int64 |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Int64 |
Instance details Defined in Basement.PrimType type PrimSize Int64 = 8
Methods primSizeInBytes :: Proxy Int64 -> CountOf Word8 # primShiftToBytes :: Proxy Int64 -> Int # primBaUIndex :: ByteArray# -> Offset Int64 -> Int64 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int64 -> prim Int64 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int64 -> Int64 -> prim () # primAddrIndex :: Addr# -> Offset Int64 -> Int64 # primAddrRead :: PrimMonad prim => Addr# -> Offset Int64 -> prim Int64 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Int64 -> Int64 -> prim () #
Arbitrary Int64 # |
Instance details Defined in Foundation.Check.Arbitrary Methods arbitrary :: Gen Int64 #
Storable Int64 # |
Instance details Defined in Foundation.Class.Storable Methods peek :: Ptr Int64 -> IO Int64 # poke :: Ptr Int64 -> Int64 -> IO () #
StorableFixed Int64 # |
Instance details Defined in Foundation.Class.Storable Methods size :: proxy Int64 -> CountOf Word8 # alignment :: proxy Int64 -> CountOf Word8 #
IsField Int64 # |
Instance details Defined in Foundation.Format.CSV.Types Methods toField :: Int64 -> Field # fromField :: Field -> Either String Int64 #
Hashable Int64 # |
Instance details Defined in Foundation.Hashing.Hashable Methods hashMix :: Hasher st => Int64 -> st -> st #
Signed Int64 # |
Instance details Defined in Foundation.Numerical Methods abs :: Int64 -> Int64 # signum :: Int64 -> Sign #
Bits Int64 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods (.&.) :: Int64 -> Int64 -> Int64 # (.|.) :: Int64 -> Int64 -> Int64 # xor :: Int64 -> Int64 -> Int64 # complement :: Int64 -> Int64 # shift :: Int64 -> Int -> Int64 # rotate :: Int64 -> Int -> Int64 # zeroBits :: Int64 # bit :: Int -> Int64 # setBit :: Int64 -> Int -> Int64 # clearBit :: Int64 -> Int -> Int64 # complementBit :: Int64 -> Int -> Int64 # testBit :: Int64 -> Int -> Bool # bitSizeMaybe :: Int64 -> Maybe Int # bitSize :: Int64 -> Int # isSigned :: Int64 -> Bool # shiftL :: Int64 -> Int -> Int64 # unsafeShiftL :: Int64 -> Int -> Int64 # shiftR :: Int64 -> Int -> Int64 # unsafeShiftR :: Int64 -> Int -> Int64 # rotateL :: Int64 -> Int -> Int64 # rotateR :: Int64 -> Int -> Int64 # popCount :: Int64 -> Int #
FiniteBits Int64 | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Int Methods finiteBitSize :: Int64 -> Int # countLeadingZeros :: Int64 -> Int # countTrailingZeros :: Int64 -> Int #
Data Int64 | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int64 -> c Int64 # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int64 # toConstr :: Int64 -> Constr # dataTypeOf :: Int64 -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Int64) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int64) # gmapT :: (forall b. Data b => b -> b) -> Int64 -> Int64 # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int64 -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int64 -> r # gmapQ :: (forall d. Data d => d -> u) -> Int64 -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Int64 -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int64 -> m Int64 # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int64 -> m Int64 # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int64 -> m Int64 #
Bounded Int64 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods minBound :: Int64 # maxBound :: Int64 #
Enum Int64 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods succ :: Int64 -> Int64 # pred :: Int64 -> Int64 # toEnum :: Int -> Int64 # fromEnum :: Int64 -> Int # enumFrom :: Int64 -> [Int64] # enumFromThen :: Int64 -> Int64 -> [Int64] # enumFromTo :: Int64 -> Int64 -> [Int64] # enumFromThenTo :: Int64 -> Int64 -> Int64 -> [Int64] #
Storable Int64 | @since base-2.01
Instance details Defined in GHC.Internal.Foreign.Storable Methods sizeOf :: Int64 -> Int # alignment :: Int64 -> Int # peekElemOff :: Ptr Int64 -> Int -> IO Int64 # pokeElemOff :: Ptr Int64 -> Int -> Int64 -> IO () # peekByteOff :: Ptr b -> Int -> IO Int64 # pokeByteOff :: Ptr b -> Int -> Int64 -> IO () # peek :: Ptr Int64 -> IO Int64 # poke :: Ptr Int64 -> Int64 -> IO () #
Ix Int64 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods range :: (Int64, Int64) -> [Int64] # index :: (Int64, Int64) -> Int64 -> Int # unsafeIndex :: (Int64, Int64) -> Int64 -> Int # inRange :: (Int64, Int64) -> Int64 -> Bool # rangeSize :: (Int64, Int64) -> Int # unsafeRangeSize :: (Int64, Int64) -> Int #
Num Int64 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods (+) :: Int64 -> Int64 -> Int64 # (-) :: Int64 -> Int64 -> Int64 # (*) :: Int64 -> Int64 -> Int64 # negate :: Int64 -> Int64 # abs :: Int64 -> Int64 # signum :: Int64 -> Int64 # fromInteger :: Integer -> Int64 #
Read Int64 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods readsPrec :: Int -> ReadS Int64 # readList :: ReadS [Int64] # readPrec :: ReadPrec Int64 # readListPrec :: ReadPrec [Int64] #
Integral Int64 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods quot :: Int64 -> Int64 -> Int64 # rem :: Int64 -> Int64 -> Int64 # div :: Int64 -> Int64 -> Int64 # mod :: Int64 -> Int64 -> Int64 # quotRem :: Int64 -> Int64 -> (Int64, Int64) # divMod :: Int64 -> Int64 -> (Int64, Int64) # toInteger :: Int64 -> Integer #
Real Int64 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods toRational :: Int64 -> Rational #
Show Int64 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods showsPrec :: Int -> Int64 -> ShowS # show :: Int64 -> String # showList :: [Int64] -> ShowS #
Eq Int64 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods (==) :: Int64 -> Int64 -> Bool # (/=) :: Int64 -> Int64 -> Bool #
Ord Int64 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods compare :: Int64 -> Int64 -> Ordering # (<) :: Int64 -> Int64 -> Bool # (<=) :: Int64 -> Int64 -> Bool # (>) :: Int64 -> Int64 -> Bool # (>=) :: Int64 -> Int64 -> Bool # max :: Int64 -> Int64 -> Int64 # min :: Int64 -> Int64 -> Int64 #
Cast Int64 Word64 |
Instance details Defined in Basement.Cast Methods cast :: Int64 -> Word64 #
Cast Int64 Int |
Instance details Defined in Basement.Cast Methods cast :: Int64 -> Int #
Cast Int64 Word |
Instance details Defined in Basement.Cast Methods cast :: Int64 -> Word #
Cast Word64 Int64 |
Instance details Defined in Basement.Cast Methods cast :: Word64 -> Int64 #
Cast Int Int64 |
Instance details Defined in Basement.Cast Methods cast :: Int -> Int64 #
Cast Word Int64 |
Instance details Defined in Basement.Cast Methods cast :: Word -> Int64 #
From Int16 Int64 |
Instance details Defined in Basement.From Methods from :: Int16 -> Int64 #
From Int32 Int64 |
Instance details Defined in Basement.From Methods from :: Int32 -> Int64 #
From Int8 Int64 |
Instance details Defined in Basement.From Methods from :: Int8 -> Int64 #
From Word16 Int64 |
Instance details Defined in Basement.From Methods from :: Word16 -> Int64 #
From Word32 Int64 |
Instance details Defined in Basement.From Methods from :: Word32 -> Int64 #
From Word8 Int64 |
Instance details Defined in Basement.From Methods from :: Word8 -> Int64 #
From Int Int64 |
Instance details Defined in Basement.From Methods from :: Int -> Int64 #
IntegralDownsize Int64 Int16 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Int64 -> Int16 # integralDownsizeCheck :: Int64 -> Maybe Int16 #
IntegralDownsize Int64 Int32 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Int64 -> Int32 # integralDownsizeCheck :: Int64 -> Maybe Int32 #
IntegralDownsize Int64 Int8 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Int64 -> Int8 # integralDownsizeCheck :: Int64 -> Maybe Int8 #
IntegralDownsize Int64 Int |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Int64 -> Int # integralDownsizeCheck :: Int64 -> Maybe Int #
IntegralDownsize Integer Int64 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Integer -> Int64 # integralDownsizeCheck :: Integer -> Maybe Int64 #
IntegralUpsize Int16 Int64 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Int16 -> Int64 #
IntegralUpsize Int32 Int64 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Int32 -> Int64 #
IntegralUpsize Int8 Int64 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Int8 -> Int64 #
IntegralUpsize Word8 Int64 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word8 -> Int64 #
IntegralUpsize Int Int64 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Int -> Int64 #
type NatNumMaxBound Int64 |
Instance details Defined in Basement.Nat type NatNumMaxBound Int64 = 9223372036854775807
type Difference Int64 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Int64 = Int64
type PrimSize Int64 |
Instance details Defined in Basement.PrimType type PrimSize Int64 = 8

data Word8 #

8-bit unsigned integer type

#### Instances

Instances details

PrintfArg Word8 | Since: base-2.1
Instance details Defined in Text.Printf Methods formatArg :: Word8 -> FieldFormatter # parseFormat :: Word8 -> ModifierParser #
BitOps Word8 |
Instance details Defined in Basement.Bits Methods (.&.) :: Word8 -> Word8 -> Word8 # (.|.) :: Word8 -> Word8 -> Word8 # (.^.) :: Word8 -> Word8 -> Word8 # (.<<.) :: Word8 -> CountOf Bool -> Word8 # (.>>.) :: Word8 -> CountOf Bool -> Word8 # bit :: Offset Bool -> Word8 # isBitSet :: Word8 -> Offset Bool -> Bool # setBit :: Word8 -> Offset Bool -> Word8 # clearBit :: Word8 -> Offset Bool -> Word8 #
FiniteBitsOps Word8 |
Instance details Defined in Basement.Bits Methods numberOfBits :: Word8 -> CountOf Bool # rotateL :: Word8 -> CountOf Bool -> Word8 # rotateR :: Word8 -> CountOf Bool -> Word8 # popCount :: Word8 -> CountOf Bool # bitFlip :: Word8 -> Word8 # countLeadingZeros :: Word8 -> CountOf Bool # countTrailingZeros :: Word8 -> CountOf Bool #
HasNegation Word8 |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Word8 -> Word8 #
Integral Word8 |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Word8 #
NormalForm Word8 |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Word8 -> () #
Additive Word8 |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Word8 # (+) :: Word8 -> Word8 -> Word8 # scale :: IsNatural n => n -> Word8 -> Word8 #
IDivisible Word8 |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Word8 -> Word8 -> Word8 # mod :: Word8 -> Word8 -> Word8 # divMod :: Word8 -> Word8 -> (Word8, Word8) #
Multiplicative Word8 |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Word8 # (*) :: Word8 -> Word8 -> Word8 # (^) :: (IsNatural n, Enum n, IDivisible n) => Word8 -> n -> Word8 #
IsIntegral Word8 |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Word8 -> Integer #
IsNatural Word8 |
Instance details Defined in Basement.Numerical.Number Methods toNatural :: Word8 -> Natural #
Subtractive Word8 |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Word8 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word8 = Word8
Methods (-) :: Word8 -> Word8 -> Difference Word8 #
PrimMemoryComparable Word8 |
Instance details Defined in Basement.PrimType
PrimType Word8 |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Word8 |
Instance details Defined in Basement.PrimType type PrimSize Word8 = 1
Methods primSizeInBytes :: Proxy Word8 -> CountOf Word8 # primShiftToBytes :: Proxy Word8 -> Int # primBaUIndex :: ByteArray# -> Offset Word8 -> Word8 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word8 -> prim Word8 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word8 -> Word8 -> prim () # primAddrIndex :: Addr# -> Offset Word8 -> Word8 # primAddrRead :: PrimMonad prim => Addr# -> Offset Word8 -> prim Word8 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Word8 -> Word8 -> prim () #
Arbitrary Word8 # |
Instance details Defined in Foundation.Check.Arbitrary Methods arbitrary :: Gen Word8 #
Storable Word8 # |
Instance details Defined in Foundation.Class.Storable Methods peek :: Ptr Word8 -> IO Word8 # poke :: Ptr Word8 -> Word8 -> IO () #
StorableFixed Word8 # |
Instance details Defined in Foundation.Class.Storable Methods size :: proxy Word8 -> CountOf Word8 # alignment :: proxy Word8 -> CountOf Word8 #
IsField Word8 # |
Instance details Defined in Foundation.Format.CSV.Types Methods toField :: Word8 -> Field # fromField :: Field -> Either String Word8 #
Hashable Word8 # |
Instance details Defined in Foundation.Hashing.Hashable Methods hashMix :: Hasher st => Word8 -> st -> st #
Bits Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods (.&.) :: Word8 -> Word8 -> Word8 # (.|.) :: Word8 -> Word8 -> Word8 # xor :: Word8 -> Word8 -> Word8 # complement :: Word8 -> Word8 # shift :: Word8 -> Int -> Word8 # rotate :: Word8 -> Int -> Word8 # zeroBits :: Word8 # bit :: Int -> Word8 # setBit :: Word8 -> Int -> Word8 # clearBit :: Word8 -> Int -> Word8 # complementBit :: Word8 -> Int -> Word8 # testBit :: Word8 -> Int -> Bool # bitSizeMaybe :: Word8 -> Maybe Int # bitSize :: Word8 -> Int # isSigned :: Word8 -> Bool # shiftL :: Word8 -> Int -> Word8 # unsafeShiftL :: Word8 -> Int -> Word8 # shiftR :: Word8 -> Int -> Word8 # unsafeShiftR :: Word8 -> Int -> Word8 # rotateL :: Word8 -> Int -> Word8 # rotateR :: Word8 -> Int -> Word8 # popCount :: Word8 -> Int #
FiniteBits Word8 | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Word Methods finiteBitSize :: Word8 -> Int # countLeadingZeros :: Word8 -> Int # countTrailingZeros :: Word8 -> Int #
Data Word8 | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word8 -> c Word8 # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word8 # toConstr :: Word8 -> Constr # dataTypeOf :: Word8 -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word8) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word8) # gmapT :: (forall b. Data b => b -> b) -> Word8 -> Word8 # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word8 -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word8 -> r # gmapQ :: (forall d. Data d => d -> u) -> Word8 -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Word8 -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word8 -> m Word8 # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word8 -> m Word8 # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word8 -> m Word8 #
Bounded Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods minBound :: Word8 # maxBound :: Word8 #
Enum Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods succ :: Word8 -> Word8 # pred :: Word8 -> Word8 # toEnum :: Int -> Word8 # fromEnum :: Word8 -> Int # enumFrom :: Word8 -> [Word8] # enumFromThen :: Word8 -> Word8 -> [Word8] # enumFromTo :: Word8 -> Word8 -> [Word8] # enumFromThenTo :: Word8 -> Word8 -> Word8 -> [Word8] #
Storable Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Foreign.Storable Methods sizeOf :: Word8 -> Int # alignment :: Word8 -> Int # peekElemOff :: Ptr Word8 -> Int -> IO Word8 # pokeElemOff :: Ptr Word8 -> Int -> Word8 -> IO () # peekByteOff :: Ptr b -> Int -> IO Word8 # pokeByteOff :: Ptr b -> Int -> Word8 -> IO () # peek :: Ptr Word8 -> IO Word8 # poke :: Ptr Word8 -> Word8 -> IO () #
Ix Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods range :: (Word8, Word8) -> [Word8] # index :: (Word8, Word8) -> Word8 -> Int # unsafeIndex :: (Word8, Word8) -> Word8 -> Int # inRange :: (Word8, Word8) -> Word8 -> Bool # rangeSize :: (Word8, Word8) -> Int # unsafeRangeSize :: (Word8, Word8) -> Int #
Num Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods (+) :: Word8 -> Word8 -> Word8 # (-) :: Word8 -> Word8 -> Word8 # (*) :: Word8 -> Word8 -> Word8 # negate :: Word8 -> Word8 # abs :: Word8 -> Word8 # signum :: Word8 -> Word8 # fromInteger :: Integer -> Word8 #
Read Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Read Methods readsPrec :: Int -> ReadS Word8 # readList :: ReadS [Word8] # readPrec :: ReadPrec Word8 # readListPrec :: ReadPrec [Word8] #
Integral Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods quot :: Word8 -> Word8 -> Word8 # rem :: Word8 -> Word8 -> Word8 # div :: Word8 -> Word8 -> Word8 # mod :: Word8 -> Word8 -> Word8 # quotRem :: Word8 -> Word8 -> (Word8, Word8) # divMod :: Word8 -> Word8 -> (Word8, Word8) # toInteger :: Word8 -> Integer #
Real Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods toRational :: Word8 -> Rational #
Show Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods showsPrec :: Int -> Word8 -> ShowS # show :: Word8 -> String # showList :: [Word8] -> ShowS #
Eq Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods (==) :: Word8 -> Word8 -> Bool # (/=) :: Word8 -> Word8 -> Bool #
Ord Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods compare :: Word8 -> Word8 -> Ordering # (<) :: Word8 -> Word8 -> Bool # (<=) :: Word8 -> Word8 -> Bool # (>) :: Word8 -> Word8 -> Bool # (>=) :: Word8 -> Word8 -> Bool # max :: Word8 -> Word8 -> Word8 # min :: Word8 -> Word8 -> Word8 #
Cast Int8 Word8 |
Instance details Defined in Basement.Cast Methods cast :: Int8 -> Word8 #
Cast Word8 Int8 |
Instance details Defined in Basement.Cast Methods cast :: Word8 -> Int8 #
From Word8 Word128 |
Instance details Defined in Basement.From Methods from :: Word8 -> Word128 #
From Word8 Word256 |
Instance details Defined in Basement.From Methods from :: Word8 -> Word256 #
From Word8 Int16 |
Instance details Defined in Basement.From Methods from :: Word8 -> Int16 #
From Word8 Int32 |
Instance details Defined in Basement.From Methods from :: Word8 -> Int32 #
From Word8 Int64 |
Instance details Defined in Basement.From Methods from :: Word8 -> Int64 #
From Word8 Word16 |
Instance details Defined in Basement.From Methods from :: Word8 -> Word16 #
From Word8 Word32 |
Instance details Defined in Basement.From Methods from :: Word8 -> Word32 #
From Word8 Word64 |
Instance details Defined in Basement.From Methods from :: Word8 -> Word64 #
From Word8 Int |
Instance details Defined in Basement.From Methods from :: Word8 -> Int #
From Word8 Word |
Instance details Defined in Basement.From Methods from :: Word8 -> Word #
IntegralDownsize Word16 Word8 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Word16 -> Word8 # integralDownsizeCheck :: Word16 -> Maybe Word8 #
IntegralDownsize Word32 Word8 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Word32 -> Word8 # integralDownsizeCheck :: Word32 -> Maybe Word8 #
IntegralDownsize Word64 Word8 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Word64 -> Word8 # integralDownsizeCheck :: Word64 -> Maybe Word8 #
IntegralDownsize Integer Word8 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Integer -> Word8 # integralDownsizeCheck :: Integer -> Maybe Word8 #
IntegralDownsize Natural Word8 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Natural -> Word8 # integralDownsizeCheck :: Natural -> Maybe Word8 #
IntegralDownsize Word Word8 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Word -> Word8 # integralDownsizeCheck :: Word -> Maybe Word8 #
IntegralUpsize Word8 Int16 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word8 -> Int16 #
IntegralUpsize Word8 Int32 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word8 -> Int32 #
IntegralUpsize Word8 Int64 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word8 -> Int64 #
IntegralUpsize Word8 Word16 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word8 -> Word16 #
IntegralUpsize Word8 Word32 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word8 -> Word32 #
IntegralUpsize Word8 Word64 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word8 -> Word64 #
IntegralUpsize Word8 Int |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word8 -> Int #
IntegralUpsize Word8 Word |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word8 -> Word #
From AsciiString (UArray Word8) |
Instance details Defined in Basement.From Methods from :: AsciiString -> UArray Word8 #
From String (UArray Word8) |
Instance details Defined in Basement.From Methods from :: String -> UArray Word8 #
(KnownNat n, NatWithinBound Word8 n) => From (Zn n) Word8 |
Instance details Defined in Basement.From Methods from :: Zn n -> Word8 #
(KnownNat n, NatWithinBound Word8 n) => From (Zn64 n) Word8 |
Instance details Defined in Basement.From Methods from :: Zn64 n -> Word8 #
TryFrom (UArray Word8) String |
Instance details Defined in Basement.From Methods tryFrom :: UArray Word8 -> Maybe String #
Cast (Block a) (Block Word8) |
Instance details Defined in Basement.Cast Methods cast :: Block a -> Block Word8 #
type NatNumMaxBound Word8 |
Instance details Defined in Basement.Nat type NatNumMaxBound Word8 = 255
type Difference Word8 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word8 = Word8
type PrimSize Word8 |
Instance details Defined in Basement.PrimType type PrimSize Word8 = 1

data Word16 #

16-bit unsigned integer type

#### Instances

Instances details

PrintfArg Word16 | Since: base-2.1
Instance details Defined in Text.Printf Methods formatArg :: Word16 -> FieldFormatter # parseFormat :: Word16 -> ModifierParser #
BitOps Word16 |
Instance details Defined in Basement.Bits Methods (.&.) :: Word16 -> Word16 -> Word16 # (.|.) :: Word16 -> Word16 -> Word16 # (.^.) :: Word16 -> Word16 -> Word16 # (.<<.) :: Word16 -> CountOf Bool -> Word16 # (.>>.) :: Word16 -> CountOf Bool -> Word16 # bit :: Offset Bool -> Word16 # isBitSet :: Word16 -> Offset Bool -> Bool # setBit :: Word16 -> Offset Bool -> Word16 # clearBit :: Word16 -> Offset Bool -> Word16 #
FiniteBitsOps Word16 |
Instance details Defined in Basement.Bits Methods numberOfBits :: Word16 -> CountOf Bool # rotateL :: Word16 -> CountOf Bool -> Word16 # rotateR :: Word16 -> CountOf Bool -> Word16 # popCount :: Word16 -> CountOf Bool # bitFlip :: Word16 -> Word16 # countLeadingZeros :: Word16 -> CountOf Bool # countTrailingZeros :: Word16 -> CountOf Bool #
HasNegation Word16 |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Word16 -> Word16 #
Integral Word16 |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Word16 #
ByteSwap Word16 |
Instance details Defined in Basement.Endianness Methods byteSwap :: Word16 -> Word16
NormalForm Word16 |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Word16 -> () #
Additive Word16 |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Word16 # (+) :: Word16 -> Word16 -> Word16 # scale :: IsNatural n => n -> Word16 -> Word16 #
IDivisible Word16 |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Word16 -> Word16 -> Word16 # mod :: Word16 -> Word16 -> Word16 # divMod :: Word16 -> Word16 -> (Word16, Word16) #
Multiplicative Word16 |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Word16 # (*) :: Word16 -> Word16 -> Word16 # (^) :: (IsNatural n, Enum n, IDivisible n) => Word16 -> n -> Word16 #
IsIntegral Word16 |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Word16 -> Integer #
IsNatural Word16 |
Instance details Defined in Basement.Numerical.Number Methods toNatural :: Word16 -> Natural #
Subtractive Word16 |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Word16 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word16 = Word16
Methods (-) :: Word16 -> Word16 -> Difference Word16 #
PrimMemoryComparable Word16 |
Instance details Defined in Basement.PrimType
PrimType Word16 |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Word16 |
Instance details Defined in Basement.PrimType type PrimSize Word16 = 2
Methods primSizeInBytes :: Proxy Word16 -> CountOf Word8 # primShiftToBytes :: Proxy Word16 -> Int # primBaUIndex :: ByteArray# -> Offset Word16 -> Word16 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word16 -> prim Word16 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word16 -> Word16 -> prim () # primAddrIndex :: Addr# -> Offset Word16 -> Word16 # primAddrRead :: PrimMonad prim => Addr# -> Offset Word16 -> prim Word16 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Word16 -> Word16 -> prim () #
Arbitrary Word16 # |
Instance details Defined in Foundation.Check.Arbitrary Methods arbitrary :: Gen Word16 #
Storable Word16 # |
Instance details Defined in Foundation.Class.Storable Methods peek :: Ptr Word16 -> IO Word16 # poke :: Ptr Word16 -> Word16 -> IO () #
StorableFixed Word16 # |
Instance details Defined in Foundation.Class.Storable Methods size :: proxy Word16 -> CountOf Word8 # alignment :: proxy Word16 -> CountOf Word8 #
IsField Word16 # |
Instance details Defined in Foundation.Format.CSV.Types Methods toField :: Word16 -> Field # fromField :: Field -> Either String Word16 #
Hashable Word16 # |
Instance details Defined in Foundation.Hashing.Hashable Methods hashMix :: Hasher st => Word16 -> st -> st #
Bits Word16 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods (.&.) :: Word16 -> Word16 -> Word16 # (.|.) :: Word16 -> Word16 -> Word16 # xor :: Word16 -> Word16 -> Word16 # complement :: Word16 -> Word16 # shift :: Word16 -> Int -> Word16 # rotate :: Word16 -> Int -> Word16 # zeroBits :: Word16 # bit :: Int -> Word16 # setBit :: Word16 -> Int -> Word16 # clearBit :: Word16 -> Int -> Word16 # complementBit :: Word16 -> Int -> Word16 # testBit :: Word16 -> Int -> Bool # bitSizeMaybe :: Word16 -> Maybe Int # bitSize :: Word16 -> Int # isSigned :: Word16 -> Bool # shiftL :: Word16 -> Int -> Word16 # unsafeShiftL :: Word16 -> Int -> Word16 # shiftR :: Word16 -> Int -> Word16 # unsafeShiftR :: Word16 -> Int -> Word16 # rotateL :: Word16 -> Int -> Word16 # rotateR :: Word16 -> Int -> Word16 # popCount :: Word16 -> Int #
FiniteBits Word16 | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Word Methods finiteBitSize :: Word16 -> Int # countLeadingZeros :: Word16 -> Int # countTrailingZeros :: Word16 -> Int #
Data Word16 | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word16 -> c Word16 # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word16 # toConstr :: Word16 -> Constr # dataTypeOf :: Word16 -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word16) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word16) # gmapT :: (forall b. Data b => b -> b) -> Word16 -> Word16 # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word16 -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word16 -> r # gmapQ :: (forall d. Data d => d -> u) -> Word16 -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Word16 -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word16 -> m Word16 # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word16 -> m Word16 # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word16 -> m Word16 #
Bounded Word16 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods minBound :: Word16 # maxBound :: Word16 #
Enum Word16 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods succ :: Word16 -> Word16 # pred :: Word16 -> Word16 # toEnum :: Int -> Word16 # fromEnum :: Word16 -> Int # enumFrom :: Word16 -> [Word16] # enumFromThen :: Word16 -> Word16 -> [Word16] # enumFromTo :: Word16 -> Word16 -> [Word16] # enumFromThenTo :: Word16 -> Word16 -> Word16 -> [Word16] #
Storable Word16 | @since base-2.01
Instance details Defined in GHC.Internal.Foreign.Storable Methods sizeOf :: Word16 -> Int # alignment :: Word16 -> Int # peekElemOff :: Ptr Word16 -> Int -> IO Word16 # pokeElemOff :: Ptr Word16 -> Int -> Word16 -> IO () # peekByteOff :: Ptr b -> Int -> IO Word16 # pokeByteOff :: Ptr b -> Int -> Word16 -> IO () # peek :: Ptr Word16 -> IO Word16 # poke :: Ptr Word16 -> Word16 -> IO () #
Ix Word16 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods range :: (Word16, Word16) -> [Word16] # index :: (Word16, Word16) -> Word16 -> Int # unsafeIndex :: (Word16, Word16) -> Word16 -> Int # inRange :: (Word16, Word16) -> Word16 -> Bool # rangeSize :: (Word16, Word16) -> Int # unsafeRangeSize :: (Word16, Word16) -> Int #
Num Word16 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods (+) :: Word16 -> Word16 -> Word16 # (-) :: Word16 -> Word16 -> Word16 # (*) :: Word16 -> Word16 -> Word16 # negate :: Word16 -> Word16 # abs :: Word16 -> Word16 # signum :: Word16 -> Word16 # fromInteger :: Integer -> Word16 #
Read Word16 | @since base-2.01
Instance details Defined in GHC.Internal.Read Methods readsPrec :: Int -> ReadS Word16 # readList :: ReadS [Word16] # readPrec :: ReadPrec Word16 # readListPrec :: ReadPrec [Word16] #
Integral Word16 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods quot :: Word16 -> Word16 -> Word16 # rem :: Word16 -> Word16 -> Word16 # div :: Word16 -> Word16 -> Word16 # mod :: Word16 -> Word16 -> Word16 # quotRem :: Word16 -> Word16 -> (Word16, Word16) # divMod :: Word16 -> Word16 -> (Word16, Word16) # toInteger :: Word16 -> Integer #
Real Word16 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods toRational :: Word16 -> Rational #
Show Word16 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods showsPrec :: Int -> Word16 -> ShowS # show :: Word16 -> String # showList :: [Word16] -> ShowS #
Eq Word16 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods (==) :: Word16 -> Word16 -> Bool # (/=) :: Word16 -> Word16 -> Bool #
Ord Word16 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods compare :: Word16 -> Word16 -> Ordering # (<) :: Word16 -> Word16 -> Bool # (<=) :: Word16 -> Word16 -> Bool # (>) :: Word16 -> Word16 -> Bool # (>=) :: Word16 -> Word16 -> Bool # max :: Word16 -> Word16 -> Word16 # min :: Word16 -> Word16 -> Word16 #
Cast Int16 Word16 |
Instance details Defined in Basement.Cast Methods cast :: Int16 -> Word16 #
Cast Word16 Int16 |
Instance details Defined in Basement.Cast Methods cast :: Word16 -> Int16 #
From Word16 Word128 |
Instance details Defined in Basement.From Methods from :: Word16 -> Word128 #
From Word16 Word256 |
Instance details Defined in Basement.From Methods from :: Word16 -> Word256 #
From Word16 Int32 |
Instance details Defined in Basement.From Methods from :: Word16 -> Int32 #
From Word16 Int64 |
Instance details Defined in Basement.From Methods from :: Word16 -> Int64 #
From Word16 Word32 |
Instance details Defined in Basement.From Methods from :: Word16 -> Word32 #
From Word16 Word64 |
Instance details Defined in Basement.From Methods from :: Word16 -> Word64 #
From Word16 Int |
Instance details Defined in Basement.From Methods from :: Word16 -> Int #
From Word16 Word |
Instance details Defined in Basement.From Methods from :: Word16 -> Word #
From Word8 Word16 |
Instance details Defined in Basement.From Methods from :: Word8 -> Word16 #
IntegralDownsize Word16 Word8 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Word16 -> Word8 # integralDownsizeCheck :: Word16 -> Maybe Word8 #
IntegralDownsize Word32 Word16 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Word32 -> Word16 # integralDownsizeCheck :: Word32 -> Maybe Word16 #
IntegralDownsize Word64 Word16 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Word64 -> Word16 # integralDownsizeCheck :: Word64 -> Maybe Word16 #
IntegralDownsize Integer Word16 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Integer -> Word16 # integralDownsizeCheck :: Integer -> Maybe Word16 #
IntegralDownsize Natural Word16 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Natural -> Word16 # integralDownsizeCheck :: Natural -> Maybe Word16 #
IntegralDownsize Word Word16 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Word -> Word16 # integralDownsizeCheck :: Word -> Maybe Word16 #
IntegralUpsize Word16 Word32 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word16 -> Word32 #
IntegralUpsize Word16 Word64 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word16 -> Word64 #
IntegralUpsize Word16 Word |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word16 -> Word #
IntegralUpsize Word8 Word16 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word8 -> Word16 #
Storable (BE Word16) # |
Instance details Defined in Foundation.Class.Storable Methods peek :: Ptr (BE Word16) -> IO (BE Word16) # poke :: Ptr (BE Word16) -> BE Word16 -> IO () #
Storable (LE Word16) # |
Instance details Defined in Foundation.Class.Storable Methods peek :: Ptr (LE Word16) -> IO (LE Word16) # poke :: Ptr (LE Word16) -> LE Word16 -> IO () #
StorableFixed (BE Word16) # |
Instance details Defined in Foundation.Class.Storable Methods size :: proxy (BE Word16) -> CountOf Word8 # alignment :: proxy (BE Word16) -> CountOf Word8 #
StorableFixed (LE Word16) # |
Instance details Defined in Foundation.Class.Storable Methods size :: proxy (LE Word16) -> CountOf Word8 # alignment :: proxy (LE Word16) -> CountOf Word8 #
(KnownNat n, NatWithinBound Word16 n) => From (Zn n) Word16 |
Instance details Defined in Basement.From Methods from :: Zn n -> Word16 #
(KnownNat n, NatWithinBound Word16 n) => From (Zn64 n) Word16 |
Instance details Defined in Basement.From Methods from :: Zn64 n -> Word16 #
type NatNumMaxBound Word16 |
Instance details Defined in Basement.Nat type NatNumMaxBound Word16 = 65535
type Difference Word16 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word16 = Word16
type PrimSize Word16 |
Instance details Defined in Basement.PrimType type PrimSize Word16 = 2

data Word32 #

32-bit unsigned integer type

#### Instances

Instances details

PrintfArg Word32 | Since: base-2.1
Instance details Defined in Text.Printf Methods formatArg :: Word32 -> FieldFormatter # parseFormat :: Word32 -> ModifierParser #
BitOps Word32 |
Instance details Defined in Basement.Bits Methods (.&.) :: Word32 -> Word32 -> Word32 # (.|.) :: Word32 -> Word32 -> Word32 # (.^.) :: Word32 -> Word32 -> Word32 # (.<<.) :: Word32 -> CountOf Bool -> Word32 # (.>>.) :: Word32 -> CountOf Bool -> Word32 # bit :: Offset Bool -> Word32 # isBitSet :: Word32 -> Offset Bool -> Bool # setBit :: Word32 -> Offset Bool -> Word32 # clearBit :: Word32 -> Offset Bool -> Word32 #
FiniteBitsOps Word32 |
Instance details Defined in Basement.Bits Methods numberOfBits :: Word32 -> CountOf Bool # rotateL :: Word32 -> CountOf Bool -> Word32 # rotateR :: Word32 -> CountOf Bool -> Word32 # popCount :: Word32 -> CountOf Bool # bitFlip :: Word32 -> Word32 # countLeadingZeros :: Word32 -> CountOf Bool # countTrailingZeros :: Word32 -> CountOf Bool #
HasNegation Word32 |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Word32 -> Word32 #
Integral Word32 |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Word32 #
ByteSwap Word32 |
Instance details Defined in Basement.Endianness Methods byteSwap :: Word32 -> Word32
NormalForm Word32 |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Word32 -> () #
Additive Word32 |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Word32 # (+) :: Word32 -> Word32 -> Word32 # scale :: IsNatural n => n -> Word32 -> Word32 #
IDivisible Word32 |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Word32 -> Word32 -> Word32 # mod :: Word32 -> Word32 -> Word32 # divMod :: Word32 -> Word32 -> (Word32, Word32) #
Multiplicative Word32 |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Word32 # (*) :: Word32 -> Word32 -> Word32 # (^) :: (IsNatural n, Enum n, IDivisible n) => Word32 -> n -> Word32 #
IsIntegral Word32 |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Word32 -> Integer #
IsNatural Word32 |
Instance details Defined in Basement.Numerical.Number Methods toNatural :: Word32 -> Natural #
Subtractive Word32 |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Word32 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word32 = Word32
Methods (-) :: Word32 -> Word32 -> Difference Word32 #
PrimMemoryComparable Word32 |
Instance details Defined in Basement.PrimType
PrimType Word32 |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Word32 |
Instance details Defined in Basement.PrimType type PrimSize Word32 = 4
Methods primSizeInBytes :: Proxy Word32 -> CountOf Word8 # primShiftToBytes :: Proxy Word32 -> Int # primBaUIndex :: ByteArray# -> Offset Word32 -> Word32 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word32 -> prim Word32 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word32 -> Word32 -> prim () # primAddrIndex :: Addr# -> Offset Word32 -> Word32 # primAddrRead :: PrimMonad prim => Addr# -> Offset Word32 -> prim Word32 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Word32 -> Word32 -> prim () #
Arbitrary Word32 # |
Instance details Defined in Foundation.Check.Arbitrary Methods arbitrary :: Gen Word32 #
Storable Word32 # |
Instance details Defined in Foundation.Class.Storable Methods peek :: Ptr Word32 -> IO Word32 # poke :: Ptr Word32 -> Word32 -> IO () #
StorableFixed Word32 # |
Instance details Defined in Foundation.Class.Storable Methods size :: proxy Word32 -> CountOf Word8 # alignment :: proxy Word32 -> CountOf Word8 #
IsField Word32 # |
Instance details Defined in Foundation.Format.CSV.Types Methods toField :: Word32 -> Field # fromField :: Field -> Either String Word32 #
Hashable Word32 # |
Instance details Defined in Foundation.Hashing.Hashable Methods hashMix :: Hasher st => Word32 -> st -> st #
Bits Word32 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods (.&.) :: Word32 -> Word32 -> Word32 # (.|.) :: Word32 -> Word32 -> Word32 # xor :: Word32 -> Word32 -> Word32 # complement :: Word32 -> Word32 # shift :: Word32 -> Int -> Word32 # rotate :: Word32 -> Int -> Word32 # zeroBits :: Word32 # bit :: Int -> Word32 # setBit :: Word32 -> Int -> Word32 # clearBit :: Word32 -> Int -> Word32 # complementBit :: Word32 -> Int -> Word32 # testBit :: Word32 -> Int -> Bool # bitSizeMaybe :: Word32 -> Maybe Int # bitSize :: Word32 -> Int # isSigned :: Word32 -> Bool # shiftL :: Word32 -> Int -> Word32 # unsafeShiftL :: Word32 -> Int -> Word32 # shiftR :: Word32 -> Int -> Word32 # unsafeShiftR :: Word32 -> Int -> Word32 # rotateL :: Word32 -> Int -> Word32 # rotateR :: Word32 -> Int -> Word32 # popCount :: Word32 -> Int #
FiniteBits Word32 | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Word Methods finiteBitSize :: Word32 -> Int # countLeadingZeros :: Word32 -> Int # countTrailingZeros :: Word32 -> Int #
Data Word32 | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word32 -> c Word32 # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word32 # toConstr :: Word32 -> Constr # dataTypeOf :: Word32 -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word32) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word32) # gmapT :: (forall b. Data b => b -> b) -> Word32 -> Word32 # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word32 -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word32 -> r # gmapQ :: (forall d. Data d => d -> u) -> Word32 -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Word32 -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word32 -> m Word32 # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word32 -> m Word32 # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word32 -> m Word32 #
Bounded Word32 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods minBound :: Word32 # maxBound :: Word32 #
Enum Word32 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods succ :: Word32 -> Word32 # pred :: Word32 -> Word32 # toEnum :: Int -> Word32 # fromEnum :: Word32 -> Int # enumFrom :: Word32 -> [Word32] # enumFromThen :: Word32 -> Word32 -> [Word32] # enumFromTo :: Word32 -> Word32 -> [Word32] # enumFromThenTo :: Word32 -> Word32 -> Word32 -> [Word32] #
Storable Word32 | @since base-2.01
Instance details Defined in GHC.Internal.Foreign.Storable Methods sizeOf :: Word32 -> Int # alignment :: Word32 -> Int # peekElemOff :: Ptr Word32 -> Int -> IO Word32 # pokeElemOff :: Ptr Word32 -> Int -> Word32 -> IO () # peekByteOff :: Ptr b -> Int -> IO Word32 # pokeByteOff :: Ptr b -> Int -> Word32 -> IO () # peek :: Ptr Word32 -> IO Word32 # poke :: Ptr Word32 -> Word32 -> IO () #
Ix Word32 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods range :: (Word32, Word32) -> [Word32] # index :: (Word32, Word32) -> Word32 -> Int # unsafeIndex :: (Word32, Word32) -> Word32 -> Int # inRange :: (Word32, Word32) -> Word32 -> Bool # rangeSize :: (Word32, Word32) -> Int # unsafeRangeSize :: (Word32, Word32) -> Int #
Num Word32 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods (+) :: Word32 -> Word32 -> Word32 # (-) :: Word32 -> Word32 -> Word32 # (*) :: Word32 -> Word32 -> Word32 # negate :: Word32 -> Word32 # abs :: Word32 -> Word32 # signum :: Word32 -> Word32 # fromInteger :: Integer -> Word32 #
Read Word32 | @since base-2.01
Instance details Defined in GHC.Internal.Read Methods readsPrec :: Int -> ReadS Word32 # readList :: ReadS [Word32] # readPrec :: ReadPrec Word32 # readListPrec :: ReadPrec [Word32] #
Integral Word32 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods quot :: Word32 -> Word32 -> Word32 # rem :: Word32 -> Word32 -> Word32 # div :: Word32 -> Word32 -> Word32 # mod :: Word32 -> Word32 -> Word32 # quotRem :: Word32 -> Word32 -> (Word32, Word32) # divMod :: Word32 -> Word32 -> (Word32, Word32) # toInteger :: Word32 -> Integer #
Real Word32 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods toRational :: Word32 -> Rational #
Show Word32 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods showsPrec :: Int -> Word32 -> ShowS # show :: Word32 -> String # showList :: [Word32] -> ShowS #
Eq Word32 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods (==) :: Word32 -> Word32 -> Bool # (/=) :: Word32 -> Word32 -> Bool #
Ord Word32 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods compare :: Word32 -> Word32 -> Ordering # (<) :: Word32 -> Word32 -> Bool # (<=) :: Word32 -> Word32 -> Bool # (>) :: Word32 -> Word32 -> Bool # (>=) :: Word32 -> Word32 -> Bool # max :: Word32 -> Word32 -> Word32 # min :: Word32 -> Word32 -> Word32 #
Cast Int32 Word32 |
Instance details Defined in Basement.Cast Methods cast :: Int32 -> Word32 #
Cast Word32 Int32 |
Instance details Defined in Basement.Cast Methods cast :: Word32 -> Int32 #
From Word16 Word32 |
Instance details Defined in Basement.From Methods from :: Word16 -> Word32 #
From Word32 Word128 |
Instance details Defined in Basement.From Methods from :: Word32 -> Word128 #
From Word32 Word256 |
Instance details Defined in Basement.From Methods from :: Word32 -> Word256 #
From Word32 Int64 |
Instance details Defined in Basement.From Methods from :: Word32 -> Int64 #
From Word32 Word64 |
Instance details Defined in Basement.From Methods from :: Word32 -> Word64 #
From Word32 Int |
Instance details Defined in Basement.From Methods from :: Word32 -> Int #
From Word32 Word |
Instance details Defined in Basement.From Methods from :: Word32 -> Word #
From Word8 Word32 |
Instance details Defined in Basement.From Methods from :: Word8 -> Word32 #
IntegralDownsize Word32 Word16 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Word32 -> Word16 # integralDownsizeCheck :: Word32 -> Maybe Word16 #
IntegralDownsize Word32 Word8 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Word32 -> Word8 # integralDownsizeCheck :: Word32 -> Maybe Word8 #
IntegralDownsize Word64 Word32 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Word64 -> Word32 # integralDownsizeCheck :: Word64 -> Maybe Word32 #
IntegralDownsize Integer Word32 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Integer -> Word32 # integralDownsizeCheck :: Integer -> Maybe Word32 #
IntegralDownsize Natural Word32 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Natural -> Word32 # integralDownsizeCheck :: Natural -> Maybe Word32 #
IntegralDownsize Word Word32 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Word -> Word32 # integralDownsizeCheck :: Word -> Maybe Word32 #
IntegralUpsize Word16 Word32 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word16 -> Word32 #
IntegralUpsize Word32 Word64 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word32 -> Word64 #
IntegralUpsize Word32 Word |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word32 -> Word #
IntegralUpsize Word8 Word32 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word8 -> Word32 #
Storable (BE Word32) # |
Instance details Defined in Foundation.Class.Storable Methods peek :: Ptr (BE Word32) -> IO (BE Word32) # poke :: Ptr (BE Word32) -> BE Word32 -> IO () #
Storable (LE Word32) # |
Instance details Defined in Foundation.Class.Storable Methods peek :: Ptr (LE Word32) -> IO (LE Word32) # poke :: Ptr (LE Word32) -> LE Word32 -> IO () #
StorableFixed (BE Word32) # |
Instance details Defined in Foundation.Class.Storable Methods size :: proxy (BE Word32) -> CountOf Word8 # alignment :: proxy (BE Word32) -> CountOf Word8 #
StorableFixed (LE Word32) # |
Instance details Defined in Foundation.Class.Storable Methods size :: proxy (LE Word32) -> CountOf Word8 # alignment :: proxy (LE Word32) -> CountOf Word8 #
(KnownNat n, NatWithinBound Word32 n) => From (Zn n) Word32 |
Instance details Defined in Basement.From Methods from :: Zn n -> Word32 #
(KnownNat n, NatWithinBound Word32 n) => From (Zn64 n) Word32 |
Instance details Defined in Basement.From Methods from :: Zn64 n -> Word32 #
type NatNumMaxBound Word32 |
Instance details Defined in Basement.Nat type NatNumMaxBound Word32 = 4294967295
type Difference Word32 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word32 = Word32
type PrimSize Word32 |
Instance details Defined in Basement.PrimType type PrimSize Word32 = 4

data Word64 #

64-bit unsigned integer type

#### Instances

Instances details

PrintfArg Word64 | Since: base-2.1
Instance details Defined in Text.Printf Methods formatArg :: Word64 -> FieldFormatter # parseFormat :: Word64 -> ModifierParser #
BitOps Word64 |
Instance details Defined in Basement.Bits Methods (.&.) :: Word64 -> Word64 -> Word64 # (.|.) :: Word64 -> Word64 -> Word64 # (.^.) :: Word64 -> Word64 -> Word64 # (.<<.) :: Word64 -> CountOf Bool -> Word64 # (.>>.) :: Word64 -> CountOf Bool -> Word64 # bit :: Offset Bool -> Word64 # isBitSet :: Word64 -> Offset Bool -> Bool # setBit :: Word64 -> Offset Bool -> Word64 # clearBit :: Word64 -> Offset Bool -> Word64 #
FiniteBitsOps Word64 |
Instance details Defined in Basement.Bits Methods numberOfBits :: Word64 -> CountOf Bool # rotateL :: Word64 -> CountOf Bool -> Word64 # rotateR :: Word64 -> CountOf Bool -> Word64 # popCount :: Word64 -> CountOf Bool # bitFlip :: Word64 -> Word64 # countLeadingZeros :: Word64 -> CountOf Bool # countTrailingZeros :: Word64 -> CountOf Bool #
HasNegation Word64 |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Word64 -> Word64 #
Integral Word64 |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Word64 #
ByteSwap Word64 |
Instance details Defined in Basement.Endianness Methods byteSwap :: Word64 -> Word64
NormalForm Word64 |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Word64 -> () #
Additive Word64 |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Word64 # (+) :: Word64 -> Word64 -> Word64 # scale :: IsNatural n => n -> Word64 -> Word64 #
IDivisible Word64 |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Word64 -> Word64 -> Word64 # mod :: Word64 -> Word64 -> Word64 # divMod :: Word64 -> Word64 -> (Word64, Word64) #
Multiplicative Word64 |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Word64 # (*) :: Word64 -> Word64 -> Word64 # (^) :: (IsNatural n, Enum n, IDivisible n) => Word64 -> n -> Word64 #
IsIntegral Word64 |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Word64 -> Integer #
IsNatural Word64 |
Instance details Defined in Basement.Numerical.Number Methods toNatural :: Word64 -> Natural #
Subtractive Word64 |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Word64 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word64 = Word64
Methods (-) :: Word64 -> Word64 -> Difference Word64 #
PrimMemoryComparable Word64 |
Instance details Defined in Basement.PrimType
PrimType Word64 |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Word64 |
Instance details Defined in Basement.PrimType type PrimSize Word64 = 8
Methods primSizeInBytes :: Proxy Word64 -> CountOf Word8 # primShiftToBytes :: Proxy Word64 -> Int # primBaUIndex :: ByteArray# -> Offset Word64 -> Word64 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word64 -> prim Word64 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word64 -> Word64 -> prim () # primAddrIndex :: Addr# -> Offset Word64 -> Word64 # primAddrRead :: PrimMonad prim => Addr# -> Offset Word64 -> prim Word64 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Word64 -> Word64 -> prim () #
Arbitrary Word64 # |
Instance details Defined in Foundation.Check.Arbitrary Methods arbitrary :: Gen Word64 #
Storable Word64 # |
Instance details Defined in Foundation.Class.Storable Methods peek :: Ptr Word64 -> IO Word64 # poke :: Ptr Word64 -> Word64 -> IO () #
StorableFixed Word64 # |
Instance details Defined in Foundation.Class.Storable Methods size :: proxy Word64 -> CountOf Word8 # alignment :: proxy Word64 -> CountOf Word8 #
IsField Word64 # |
Instance details Defined in Foundation.Format.CSV.Types Methods toField :: Word64 -> Field # fromField :: Field -> Either String Word64 #
Hashable Word64 # |
Instance details Defined in Foundation.Hashing.Hashable Methods hashMix :: Hasher st => Word64 -> st -> st #
Bits Word64 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods (.&.) :: Word64 -> Word64 -> Word64 # (.|.) :: Word64 -> Word64 -> Word64 # xor :: Word64 -> Word64 -> Word64 # complement :: Word64 -> Word64 # shift :: Word64 -> Int -> Word64 # rotate :: Word64 -> Int -> Word64 # zeroBits :: Word64 # bit :: Int -> Word64 # setBit :: Word64 -> Int -> Word64 # clearBit :: Word64 -> Int -> Word64 # complementBit :: Word64 -> Int -> Word64 # testBit :: Word64 -> Int -> Bool # bitSizeMaybe :: Word64 -> Maybe Int # bitSize :: Word64 -> Int # isSigned :: Word64 -> Bool # shiftL :: Word64 -> Int -> Word64 # unsafeShiftL :: Word64 -> Int -> Word64 # shiftR :: Word64 -> Int -> Word64 # unsafeShiftR :: Word64 -> Int -> Word64 # rotateL :: Word64 -> Int -> Word64 # rotateR :: Word64 -> Int -> Word64 # popCount :: Word64 -> Int #
FiniteBits Word64 | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Word Methods finiteBitSize :: Word64 -> Int # countLeadingZeros :: Word64 -> Int # countTrailingZeros :: Word64 -> Int #
Data Word64 | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word64 -> c Word64 # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word64 # toConstr :: Word64 -> Constr # dataTypeOf :: Word64 -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word64) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word64) # gmapT :: (forall b. Data b => b -> b) -> Word64 -> Word64 # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word64 -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word64 -> r # gmapQ :: (forall d. Data d => d -> u) -> Word64 -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Word64 -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word64 -> m Word64 # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word64 -> m Word64 # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word64 -> m Word64 #
Bounded Word64 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods minBound :: Word64 # maxBound :: Word64 #
Enum Word64 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods succ :: Word64 -> Word64 # pred :: Word64 -> Word64 # toEnum :: Int -> Word64 # fromEnum :: Word64 -> Int # enumFrom :: Word64 -> [Word64] # enumFromThen :: Word64 -> Word64 -> [Word64] # enumFromTo :: Word64 -> Word64 -> [Word64] # enumFromThenTo :: Word64 -> Word64 -> Word64 -> [Word64] #
Storable Word64 | @since base-2.01
Instance details Defined in GHC.Internal.Foreign.Storable Methods sizeOf :: Word64 -> Int # alignment :: Word64 -> Int # peekElemOff :: Ptr Word64 -> Int -> IO Word64 # pokeElemOff :: Ptr Word64 -> Int -> Word64 -> IO () # peekByteOff :: Ptr b -> Int -> IO Word64 # pokeByteOff :: Ptr b -> Int -> Word64 -> IO () # peek :: Ptr Word64 -> IO Word64 # poke :: Ptr Word64 -> Word64 -> IO () #
Ix Word64 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods range :: (Word64, Word64) -> [Word64] # index :: (Word64, Word64) -> Word64 -> Int # unsafeIndex :: (Word64, Word64) -> Word64 -> Int # inRange :: (Word64, Word64) -> Word64 -> Bool # rangeSize :: (Word64, Word64) -> Int # unsafeRangeSize :: (Word64, Word64) -> Int #
Num Word64 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods (+) :: Word64 -> Word64 -> Word64 # (-) :: Word64 -> Word64 -> Word64 # (*) :: Word64 -> Word64 -> Word64 # negate :: Word64 -> Word64 # abs :: Word64 -> Word64 # signum :: Word64 -> Word64 # fromInteger :: Integer -> Word64 #
Read Word64 | @since base-2.01
Instance details Defined in GHC.Internal.Read Methods readsPrec :: Int -> ReadS Word64 # readList :: ReadS [Word64] # readPrec :: ReadPrec Word64 # readListPrec :: ReadPrec [Word64] #
Integral Word64 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods quot :: Word64 -> Word64 -> Word64 # rem :: Word64 -> Word64 -> Word64 # div :: Word64 -> Word64 -> Word64 # mod :: Word64 -> Word64 -> Word64 # quotRem :: Word64 -> Word64 -> (Word64, Word64) # divMod :: Word64 -> Word64 -> (Word64, Word64) # toInteger :: Word64 -> Integer #
Real Word64 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods toRational :: Word64 -> Rational #
Show Word64 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods showsPrec :: Int -> Word64 -> ShowS # show :: Word64 -> String # showList :: [Word64] -> ShowS #
Eq Word64 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods (==) :: Word64 -> Word64 -> Bool # (/=) :: Word64 -> Word64 -> Bool #
Ord Word64 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods compare :: Word64 -> Word64 -> Ordering # (<) :: Word64 -> Word64 -> Bool # (<=) :: Word64 -> Word64 -> Bool # (>) :: Word64 -> Word64 -> Bool # (>=) :: Word64 -> Word64 -> Bool # max :: Word64 -> Word64 -> Word64 # min :: Word64 -> Word64 -> Word64 #
Cast Int64 Word64 |
Instance details Defined in Basement.Cast Methods cast :: Int64 -> Word64 #
Cast Word64 Int64 |
Instance details Defined in Basement.Cast Methods cast :: Word64 -> Int64 #
Cast Word64 Int |
Instance details Defined in Basement.Cast Methods cast :: Word64 -> Int #
Cast Word64 Word |
Instance details Defined in Basement.Cast Methods cast :: Word64 -> Word #
Cast Int Word64 |
Instance details Defined in Basement.Cast Methods cast :: Int -> Word64 #
Cast Word Word64 |
Instance details Defined in Basement.Cast Methods cast :: Word -> Word64 #
From Word16 Word64 |
Instance details Defined in Basement.From Methods from :: Word16 -> Word64 #
From Word32 Word64 |
Instance details Defined in Basement.From Methods from :: Word32 -> Word64 #
From Word64 Word128 |
Instance details Defined in Basement.From Methods from :: Word64 -> Word128 #
From Word64 Word256 |
Instance details Defined in Basement.From Methods from :: Word64 -> Word256 #
From Word8 Word64 |
Instance details Defined in Basement.From Methods from :: Word8 -> Word64 #
From Word Word64 |
Instance details Defined in Basement.From Methods from :: Word -> Word64 #
IntegralDownsize Word64 Word16 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Word64 -> Word16 # integralDownsizeCheck :: Word64 -> Maybe Word16 #
IntegralDownsize Word64 Word32 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Word64 -> Word32 # integralDownsizeCheck :: Word64 -> Maybe Word32 #
IntegralDownsize Word64 Word8 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Word64 -> Word8 # integralDownsizeCheck :: Word64 -> Maybe Word8 #
IntegralDownsize Integer Word64 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Integer -> Word64 # integralDownsizeCheck :: Integer -> Maybe Word64 #
IntegralDownsize Natural Word64 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Natural -> Word64 # integralDownsizeCheck :: Natural -> Maybe Word64 #
IntegralUpsize Word16 Word64 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word16 -> Word64 #
IntegralUpsize Word32 Word64 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word32 -> Word64 #
IntegralUpsize Word8 Word64 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word8 -> Word64 #
IntegralUpsize Word Word64 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word -> Word64 #
Storable (BE Word64) # |
Instance details Defined in Foundation.Class.Storable Methods peek :: Ptr (BE Word64) -> IO (BE Word64) # poke :: Ptr (BE Word64) -> BE Word64 -> IO () #
Storable (LE Word64) # |
Instance details Defined in Foundation.Class.Storable Methods peek :: Ptr (LE Word64) -> IO (LE Word64) # poke :: Ptr (LE Word64) -> LE Word64 -> IO () #
StorableFixed (BE Word64) # |
Instance details Defined in Foundation.Class.Storable Methods size :: proxy (BE Word64) -> CountOf Word8 # alignment :: proxy (BE Word64) -> CountOf Word8 #
StorableFixed (LE Word64) # |
Instance details Defined in Foundation.Class.Storable Methods size :: proxy (LE Word64) -> CountOf Word8 # alignment :: proxy (LE Word64) -> CountOf Word8 #
(KnownNat n, NatWithinBound Word64 n) => From (Zn n) Word64 |
Instance details Defined in Basement.From Methods from :: Zn n -> Word64 #
From (Zn64 n) Word64 |
Instance details Defined in Basement.From Methods from :: Zn64 n -> Word64 #
type NatNumMaxBound Word64 |
Instance details Defined in Basement.Nat type NatNumMaxBound Word64 = 18446744073709551615
type Difference Word64 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word64 = Word64
type PrimSize Word64 |
Instance details Defined in Basement.PrimType type PrimSize Word64 = 8

data Word #

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

#### Instances

Instances details

PrintfArg Word | Since: base-2.1
Instance details Defined in Text.Printf Methods formatArg :: Word -> FieldFormatter # parseFormat :: Word -> ModifierParser #
BitOps Word |
Instance details Defined in Basement.Bits Methods (.&.) :: Word -> Word -> Word # (.|.) :: Word -> Word -> Word # (.^.) :: Word -> Word -> Word # (.<<.) :: Word -> CountOf Bool -> Word # (.>>.) :: Word -> CountOf Bool -> Word # bit :: Offset Bool -> Word # isBitSet :: Word -> Offset Bool -> Bool # setBit :: Word -> Offset Bool -> Word # clearBit :: Word -> Offset Bool -> Word #
FiniteBitsOps Word |
Instance details Defined in Basement.Bits Methods numberOfBits :: Word -> CountOf Bool # rotateL :: Word -> CountOf Bool -> Word # rotateR :: Word -> CountOf Bool -> Word # popCount :: Word -> CountOf Bool # bitFlip :: Word -> Word # countLeadingZeros :: Word -> CountOf Bool # countTrailingZeros :: Word -> CountOf Bool #
HasNegation Word |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Word -> Word #
Integral Word |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Word #
NormalForm Word |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Word -> () #
Additive Word |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Word # (+) :: Word -> Word -> Word # scale :: IsNatural n => n -> Word -> Word #
IDivisible Word |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Word -> Word -> Word # mod :: Word -> Word -> Word # divMod :: Word -> Word -> (Word, Word) #
Multiplicative Word |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Word # (*) :: Word -> Word -> Word # (^) :: (IsNatural n, Enum n, IDivisible n) => Word -> n -> Word #
IsIntegral Word |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Word -> Integer #
IsNatural Word |
Instance details Defined in Basement.Numerical.Number Methods toNatural :: Word -> Natural #
Subtractive Word |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Word |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word = Word
Methods (-) :: Word -> Word -> Difference Word #
PrimMemoryComparable Word |
Instance details Defined in Basement.PrimType
PrimType Word |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Word |
Instance details Defined in Basement.PrimType type PrimSize Word = 8
Methods primSizeInBytes :: Proxy Word -> CountOf Word8 # primShiftToBytes :: Proxy Word -> Int # primBaUIndex :: ByteArray# -> Offset Word -> Word # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word -> prim Word # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word -> Word -> prim () # primAddrIndex :: Addr# -> Offset Word -> Word # primAddrRead :: PrimMonad prim => Addr# -> Offset Word -> prim Word # primAddrWrite :: PrimMonad prim => Addr# -> Offset Word -> Word -> prim () #
Arbitrary Word # |
Instance details Defined in Foundation.Check.Arbitrary Methods arbitrary :: Gen Word #
IsField Word # |
Instance details Defined in Foundation.Format.CSV.Types Methods toField :: Word -> Field # fromField :: Field -> Either String Word #
Bits Word | @since base-2.01
Instance details Defined in GHC.Internal.Bits Methods (.&.) :: Word -> Word -> Word # (.|.) :: Word -> Word -> Word # xor :: Word -> Word -> Word # complement :: Word -> Word # shift :: Word -> Int -> Word # rotate :: Word -> Int -> Word # zeroBits :: Word # bit :: Int -> Word # setBit :: Word -> Int -> Word # clearBit :: Word -> Int -> Word # complementBit :: Word -> Int -> Word # testBit :: Word -> Int -> Bool # bitSizeMaybe :: Word -> Maybe Int # bitSize :: Word -> Int # isSigned :: Word -> Bool # shiftL :: Word -> Int -> Word # unsafeShiftL :: Word -> Int -> Word # shiftR :: Word -> Int -> Word # unsafeShiftR :: Word -> Int -> Word # rotateL :: Word -> Int -> Word # rotateR :: Word -> Int -> Word # popCount :: Word -> Int #
FiniteBits Word | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Bits Methods finiteBitSize :: Word -> Int # countLeadingZeros :: Word -> Int # countTrailingZeros :: Word -> Int #
Data Word | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word -> c Word # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word # toConstr :: Word -> Constr # dataTypeOf :: Word -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word) # gmapT :: (forall b. Data b => b -> b) -> Word -> Word # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word -> r # gmapQ :: (forall d. Data d => d -> u) -> Word -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Word -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word -> m Word # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word -> m Word # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word -> m Word #
Bounded Word | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: Word # maxBound :: Word #
Enum Word | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods succ :: Word -> Word # pred :: Word -> Word # toEnum :: Int -> Word # fromEnum :: Word -> Int # enumFrom :: Word -> [Word] # enumFromThen :: Word -> Word -> [Word] # enumFromTo :: Word -> Word -> [Word] # enumFromThenTo :: Word -> Word -> Word -> [Word] #
Storable Word | @since base-2.01
Instance details Defined in GHC.Internal.Foreign.Storable Methods sizeOf :: Word -> Int # alignment :: Word -> Int # peekElemOff :: Ptr Word -> Int -> IO Word # pokeElemOff :: Ptr Word -> Int -> Word -> IO () # peekByteOff :: Ptr b -> Int -> IO Word # pokeByteOff :: Ptr b -> Int -> Word -> IO () # peek :: Ptr Word -> IO Word # poke :: Ptr Word -> Word -> IO () #
Num Word | @since base-2.01
Instance details Defined in GHC.Internal.Num Methods (+) :: Word -> Word -> Word # (-) :: Word -> Word -> Word # (*) :: Word -> Word -> Word # negate :: Word -> Word # abs :: Word -> Word # signum :: Word -> Word # fromInteger :: Integer -> Word #
Read Word | @since base-4.5.0.0
Instance details Defined in GHC.Internal.Read Methods readsPrec :: Int -> ReadS Word # readList :: ReadS [Word] # readPrec :: ReadPrec Word # readListPrec :: ReadPrec [Word] #
Integral Word | @since base-2.01
Instance details Defined in GHC.Internal.Real Methods quot :: Word -> Word -> Word # rem :: Word -> Word -> Word # div :: Word -> Word -> Word # mod :: Word -> Word -> Word # quotRem :: Word -> Word -> (Word, Word) # divMod :: Word -> Word -> (Word, Word) # toInteger :: Word -> Integer #
Real Word | @since base-2.01
Instance details Defined in GHC.Internal.Real Methods toRational :: Word -> Rational #
Show Word | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> Word -> ShowS # show :: Word -> String # showList :: [Word] -> ShowS #
Eq Word |
Instance details Defined in GHC.Classes Methods (==) :: Word -> Word -> Bool # (/=) :: Word -> Word -> Bool #
Ord Word |
Instance details Defined in GHC.Classes Methods compare :: Word -> Word -> Ordering # (<) :: Word -> Word -> Bool # (<=) :: Word -> Word -> Bool # (>) :: Word -> Word -> Bool # (>=) :: Word -> Word -> Bool # max :: Word -> Word -> Word # min :: Word -> Word -> Word #
Cast Int64 Word |
Instance details Defined in Basement.Cast Methods cast :: Int64 -> Word #
Cast Word64 Word |
Instance details Defined in Basement.Cast Methods cast :: Word64 -> Word #
Cast Int Word |
Instance details Defined in Basement.Cast Methods cast :: Int -> Word #
Cast Word Int64 |
Instance details Defined in Basement.Cast Methods cast :: Word -> Int64 #
Cast Word Word64 |
Instance details Defined in Basement.Cast Methods cast :: Word -> Word64 #
Cast Word Int |
Instance details Defined in Basement.Cast Methods cast :: Word -> Int #
From Word16 Word |
Instance details Defined in Basement.From Methods from :: Word16 -> Word #
From Word32 Word |
Instance details Defined in Basement.From Methods from :: Word32 -> Word #
From Word8 Word |
Instance details Defined in Basement.From Methods from :: Word8 -> Word #
From Word Word64 |
Instance details Defined in Basement.From Methods from :: Word -> Word64 #
IntegralDownsize Word Word16 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Word -> Word16 # integralDownsizeCheck :: Word -> Maybe Word16 #
IntegralDownsize Word Word32 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Word -> Word32 # integralDownsizeCheck :: Word -> Maybe Word32 #
IntegralDownsize Word Word8 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Word -> Word8 # integralDownsizeCheck :: Word -> Maybe Word8 #
IntegralUpsize Word16 Word |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word16 -> Word #
IntegralUpsize Word32 Word |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word32 -> Word #
IntegralUpsize Word8 Word |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word8 -> Word #
IntegralUpsize Word Word64 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word -> Word64 #
From Word (CountOf ty) |
Instance details Defined in Basement.From Methods from :: Word -> CountOf ty #
From Word (Offset ty) |
Instance details Defined in Basement.From Methods from :: Word -> Offset ty #
Generic1 (URec Word :: k -> Type) |
Instance details Defined in GHC.Internal.Generics Associated Types
type Rep1 (URec Word :: k -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics type Rep1 (URec Word :: k -> Type) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UWord" 'PrefixI 'True) (S1 ('MetaSel ('Just "uWord#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UWord :: k -> Type)))
Methods from1 :: forall (a :: k). URec Word a -> Rep1 (URec Word :: k -> Type) a # to1 :: forall (a :: k). Rep1 (URec Word :: k -> Type) a -> URec Word a #
Foldable (UWord :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => UWord m -> m # foldMap :: Monoid m => (a -> m) -> UWord a -> m # foldMap' :: Monoid m => (a -> m) -> UWord a -> m # foldr :: (a -> b -> b) -> b -> UWord a -> b # foldr' :: (a -> b -> b) -> b -> UWord a -> b # foldl :: (b -> a -> b) -> b -> UWord a -> b # foldl' :: (b -> a -> b) -> b -> UWord a -> b # foldr1 :: (a -> a -> a) -> UWord a -> a # foldl1 :: (a -> a -> a) -> UWord a -> a # toList :: UWord a -> [a] # null :: UWord a -> Bool # length :: UWord a -> Int # elem :: Eq a => a -> UWord a -> Bool # maximum :: Ord a => UWord a -> a # minimum :: Ord a => UWord a -> a # sum :: Num a => UWord a -> a # product :: Num a => UWord a -> a #
Traversable (UWord :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Traversable Methods traverse :: Applicative f => (a -> f b) -> UWord a -> f (UWord b) # sequenceA :: Applicative f => UWord (f a) -> f (UWord a) # mapM :: Monad m => (a -> m b) -> UWord a -> m (UWord b) # sequence :: Monad m => UWord (m a) -> m (UWord a) #
From (CountOf ty) Word |
Instance details Defined in Basement.From Methods from :: CountOf ty -> Word #
Functor (URec Word :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods fmap :: (a -> b) -> URec Word a -> URec Word b # (<$) :: a -> URec Word b -> URec Word a #
Generic (URec Word p) |
Instance details Defined in GHC.Internal.Generics Associated Types
type Rep (URec Word p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics type Rep (URec Word p) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UWord" 'PrefixI 'True) (S1 ('MetaSel ('Just "uWord#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UWord :: Type -> Type)))
Methods from :: URec Word p -> Rep (URec Word p) x # to :: Rep (URec Word p) x -> URec Word p #
Show (URec Word p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> URec Word p -> ShowS # show :: URec Word p -> String # showList :: [URec Word p] -> ShowS #
Eq (URec Word p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: URec Word p -> URec Word p -> Bool # (/=) :: URec Word p -> URec Word p -> Bool #
Ord (URec Word p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods compare :: URec Word p -> URec Word p -> Ordering # (<) :: URec Word p -> URec Word p -> Bool # (<=) :: URec Word p -> URec Word p -> Bool # (>) :: URec Word p -> URec Word p -> Bool # (>=) :: URec Word p -> URec Word p -> Bool # max :: URec Word p -> URec Word p -> URec Word p # min :: URec Word p -> URec Word p -> URec Word p #
type NatNumMaxBound Word |
Instance details Defined in Basement.Nat type NatNumMaxBound Word = NatNumMaxBound Word64
type Difference Word |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word = Word
type PrimSize Word |
Instance details Defined in Basement.PrimType type PrimSize Word = 8
data URec Word (p :: k) | Used for marking occurrences of `Word#` @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics data URec Word (p :: k) = UWord { uWord# :: Word# }
type Rep1 (URec Word :: k -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics type Rep1 (URec Word :: k -> Type) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UWord" 'PrefixI 'True) (S1 ('MetaSel ('Just "uWord#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UWord :: k -> Type)))
type Rep (URec Word p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics type Rep (URec Word p) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UWord" 'PrefixI 'True) (S1 ('MetaSel ('Just "uWord#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UWord :: Type -> Type)))

data Word128 #

128 bits Word

#### Instances

Instances details

BitOps Word128 |
Instance details Defined in Basement.Bits Methods (.&.) :: Word128 -> Word128 -> Word128 # (.|.) :: Word128 -> Word128 -> Word128 # (.^.) :: Word128 -> Word128 -> Word128 # (.<<.) :: Word128 -> CountOf Bool -> Word128 # (.>>.) :: Word128 -> CountOf Bool -> Word128 # bit :: Offset Bool -> Word128 # isBitSet :: Word128 -> Offset Bool -> Bool # setBit :: Word128 -> Offset Bool -> Word128 # clearBit :: Word128 -> Offset Bool -> Word128 #
FiniteBitsOps Word128 |
Instance details Defined in Basement.Bits Methods numberOfBits :: Word128 -> CountOf Bool # rotateL :: Word128 -> CountOf Bool -> Word128 # rotateR :: Word128 -> CountOf Bool -> Word128 # popCount :: Word128 -> CountOf Bool # bitFlip :: Word128 -> Word128 # countLeadingZeros :: Word128 -> CountOf Bool # countTrailingZeros :: Word128 -> CountOf Bool #
HasNegation Word128 |
Instance details Defined in Basement.Types.Word128 Methods negate :: Word128 -> Word128 #
Integral Word128 |
Instance details Defined in Basement.Types.Word128 Methods fromInteger :: Integer -> Word128 #
NormalForm Word128 |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Word128 -> () #
Additive Word128 |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Word128 # (+) :: Word128 -> Word128 -> Word128 # scale :: IsNatural n => n -> Word128 -> Word128 #
IDivisible Word128 |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Word128 -> Word128 -> Word128 # mod :: Word128 -> Word128 -> Word128 # divMod :: Word128 -> Word128 -> (Word128, Word128) #
Multiplicative Word128 |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Word128 # (*) :: Word128 -> Word128 -> Word128 # (^) :: (IsNatural n, Enum n, IDivisible n) => Word128 -> n -> Word128 #
IsIntegral Word128 |
Instance details Defined in Basement.Types.Word128 Methods toInteger :: Word128 -> Integer #
IsNatural Word128 |
Instance details Defined in Basement.Types.Word128 Methods toNatural :: Word128 -> Natural #
Subtractive Word128 |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Word128 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word128 = Word128
Methods (-) :: Word128 -> Word128 -> Difference Word128 #
PrimMemoryComparable Word128 |
Instance details Defined in Basement.PrimType
PrimType Word128 |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Word128 |
Instance details Defined in Basement.PrimType type PrimSize Word128 = 16
Methods primSizeInBytes :: Proxy Word128 -> CountOf Word8 # primShiftToBytes :: Proxy Word128 -> Int # primBaUIndex :: ByteArray# -> Offset Word128 -> Word128 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word128 -> prim Word128 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word128 -> Word128 -> prim () # primAddrIndex :: Addr# -> Offset Word128 -> Word128 # primAddrRead :: PrimMonad prim => Addr# -> Offset Word128 -> prim Word128 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Word128 -> Word128 -> prim () #
Arbitrary Word128 # |
Instance details Defined in Foundation.Check.Arbitrary Methods arbitrary :: Gen Word128 #
Storable Word128 # |
Instance details Defined in Foundation.Class.Storable Methods peek :: Ptr Word128 -> IO Word128 # poke :: Ptr Word128 -> Word128 -> IO () #
StorableFixed Word128 # |
Instance details Defined in Foundation.Class.Storable Methods size :: proxy Word128 -> CountOf Word8 # alignment :: proxy Word128 -> CountOf Word8 #
IsField Word128 # |
Instance details Defined in Foundation.Format.CSV.Types Methods toField :: Word128 -> Field # fromField :: Field -> Either String Word128 #
Hashable Word128 # |
Instance details Defined in Foundation.Hashing.Hashable Methods hashMix :: Hasher st => Word128 -> st -> st #
Bits Word128 |
Instance details Defined in Basement.Types.Word128 Methods (.&.) :: Word128 -> Word128 -> Word128 # (.|.) :: Word128 -> Word128 -> Word128 # xor :: Word128 -> Word128 -> Word128 # complement :: Word128 -> Word128 # shift :: Word128 -> Int -> Word128 # rotate :: Word128 -> Int -> Word128 # zeroBits :: Word128 # bit :: Int -> Word128 # setBit :: Word128 -> Int -> Word128 # clearBit :: Word128 -> Int -> Word128 # complementBit :: Word128 -> Int -> Word128 # testBit :: Word128 -> Int -> Bool # bitSizeMaybe :: Word128 -> Maybe Int # bitSize :: Word128 -> Int # isSigned :: Word128 -> Bool # shiftL :: Word128 -> Int -> Word128 # unsafeShiftL :: Word128 -> Int -> Word128 # shiftR :: Word128 -> Int -> Word128 # unsafeShiftR :: Word128 -> Int -> Word128 # rotateL :: Word128 -> Int -> Word128 # rotateR :: Word128 -> Int -> Word128 # popCount :: Word128 -> Int #
Bounded Word128 |
Instance details Defined in Basement.Types.Word128 Methods minBound :: Word128 # maxBound :: Word128 #
Enum Word128 |
Instance details Defined in Basement.Types.Word128 Methods succ :: Word128 -> Word128 # pred :: Word128 -> Word128 # toEnum :: Int -> Word128 # fromEnum :: Word128 -> Int # enumFrom :: Word128 -> [Word128] # enumFromThen :: Word128 -> Word128 -> [Word128] # enumFromTo :: Word128 -> Word128 -> [Word128] # enumFromThenTo :: Word128 -> Word128 -> Word128 -> [Word128] #
Storable Word128 |
Instance details Defined in Basement.Types.Word128 Methods sizeOf :: Word128 -> Int # alignment :: Word128 -> Int # peekElemOff :: Ptr Word128 -> Int -> IO Word128 # pokeElemOff :: Ptr Word128 -> Int -> Word128 -> IO () # peekByteOff :: Ptr b -> Int -> IO Word128 # pokeByteOff :: Ptr b -> Int -> Word128 -> IO () # peek :: Ptr Word128 -> IO Word128 # poke :: Ptr Word128 -> Word128 -> IO () #
Num Word128 |
Instance details Defined in Basement.Types.Word128 Methods (+) :: Word128 -> Word128 -> Word128 # (-) :: Word128 -> Word128 -> Word128 # (*) :: Word128 -> Word128 -> Word128 # negate :: Word128 -> Word128 # abs :: Word128 -> Word128 # signum :: Word128 -> Word128 # fromInteger :: Integer -> Word128 #
Show Word128 |
Instance details Defined in Basement.Types.Word128 Methods showsPrec :: Int -> Word128 -> ShowS # show :: Word128 -> String # showList :: [Word128] -> ShowS #
Eq Word128 |
Instance details Defined in Basement.Types.Word128 Methods (==) :: Word128 -> Word128 -> Bool # (/=) :: Word128 -> Word128 -> Bool #
Ord Word128 |
Instance details Defined in Basement.Types.Word128 Methods compare :: Word128 -> Word128 -> Ordering # (<) :: Word128 -> Word128 -> Bool # (<=) :: Word128 -> Word128 -> Bool # (>) :: Word128 -> Word128 -> Bool # (>=) :: Word128 -> Word128 -> Bool # max :: Word128 -> Word128 -> Word128 # min :: Word128 -> Word128 -> Word128 #
From Word128 Word256 |
Instance details Defined in Basement.From Methods from :: Word128 -> Word256 #
From Word16 Word128 |
Instance details Defined in Basement.From Methods from :: Word16 -> Word128 #
From Word32 Word128 |
Instance details Defined in Basement.From Methods from :: Word32 -> Word128 #
From Word64 Word128 |
Instance details Defined in Basement.From Methods from :: Word64 -> Word128 #
From Word8 Word128 |
Instance details Defined in Basement.From Methods from :: Word8 -> Word128 #
Storable (BE Word128) # |
Instance details Defined in Foundation.Class.Storable Methods peek :: Ptr (BE Word128) -> IO (BE Word128) # poke :: Ptr (BE Word128) -> BE Word128 -> IO () #
Storable (LE Word128) # |
Instance details Defined in Foundation.Class.Storable Methods peek :: Ptr (LE Word128) -> IO (LE Word128) # poke :: Ptr (LE Word128) -> LE Word128 -> IO () #
StorableFixed (BE Word128) # |
Instance details Defined in Foundation.Class.Storable Methods size :: proxy (BE Word128) -> CountOf Word8 # alignment :: proxy (BE Word128) -> CountOf Word8 #
StorableFixed (LE Word128) # |
Instance details Defined in Foundation.Class.Storable Methods size :: proxy (LE Word128) -> CountOf Word8 # alignment :: proxy (LE Word128) -> CountOf Word8 #
(KnownNat n, NatWithinBound Word128 n) => From (Zn n) Word128 |
Instance details Defined in Basement.From Methods from :: Zn n -> Word128 #
From (Zn64 n) Word128 |
Instance details Defined in Basement.From Methods from :: Zn64 n -> Word128 #
type NatNumMaxBound Word128 |
Instance details Defined in Basement.Nat type NatNumMaxBound Word128 = 340282366920938463463374607431768211455
type Difference Word128 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word128 = Word128
type PrimSize Word128 |
Instance details Defined in Basement.PrimType type PrimSize Word128 = 16

data Word256 #

256 bits Word

#### Instances

Instances details

BitOps Word256 |
Instance details Defined in Basement.Bits Methods (.&.) :: Word256 -> Word256 -> Word256 # (.|.) :: Word256 -> Word256 -> Word256 # (.^.) :: Word256 -> Word256 -> Word256 # (.<<.) :: Word256 -> CountOf Bool -> Word256 # (.>>.) :: Word256 -> CountOf Bool -> Word256 # bit :: Offset Bool -> Word256 # isBitSet :: Word256 -> Offset Bool -> Bool # setBit :: Word256 -> Offset Bool -> Word256 # clearBit :: Word256 -> Offset Bool -> Word256 #
FiniteBitsOps Word256 |
Instance details Defined in Basement.Bits Methods numberOfBits :: Word256 -> CountOf Bool # rotateL :: Word256 -> CountOf Bool -> Word256 # rotateR :: Word256 -> CountOf Bool -> Word256 # popCount :: Word256 -> CountOf Bool # bitFlip :: Word256 -> Word256 # countLeadingZeros :: Word256 -> CountOf Bool # countTrailingZeros :: Word256 -> CountOf Bool #
HasNegation Word256 |
Instance details Defined in Basement.Types.Word256 Methods negate :: Word256 -> Word256 #
Integral Word256 |
Instance details Defined in Basement.Types.Word256 Methods fromInteger :: Integer -> Word256 #
NormalForm Word256 |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Word256 -> () #
Additive Word256 |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Word256 # (+) :: Word256 -> Word256 -> Word256 # scale :: IsNatural n => n -> Word256 -> Word256 #
IDivisible Word256 |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Word256 -> Word256 -> Word256 # mod :: Word256 -> Word256 -> Word256 # divMod :: Word256 -> Word256 -> (Word256, Word256) #
Multiplicative Word256 |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Word256 # (*) :: Word256 -> Word256 -> Word256 # (^) :: (IsNatural n, Enum n, IDivisible n) => Word256 -> n -> Word256 #
IsIntegral Word256 |
Instance details Defined in Basement.Types.Word256 Methods toInteger :: Word256 -> Integer #
IsNatural Word256 |
Instance details Defined in Basement.Types.Word256 Methods toNatural :: Word256 -> Natural #
Subtractive Word256 |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Word256 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word256 = Word256
Methods (-) :: Word256 -> Word256 -> Difference Word256 #
PrimMemoryComparable Word256 |
Instance details Defined in Basement.PrimType
PrimType Word256 |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Word256 |
Instance details Defined in Basement.PrimType type PrimSize Word256 = 32
Methods primSizeInBytes :: Proxy Word256 -> CountOf Word8 # primShiftToBytes :: Proxy Word256 -> Int # primBaUIndex :: ByteArray# -> Offset Word256 -> Word256 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word256 -> prim Word256 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word256 -> Word256 -> prim () # primAddrIndex :: Addr# -> Offset Word256 -> Word256 # primAddrRead :: PrimMonad prim => Addr# -> Offset Word256 -> prim Word256 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Word256 -> Word256 -> prim () #
Arbitrary Word256 # |
Instance details Defined in Foundation.Check.Arbitrary Methods arbitrary :: Gen Word256 #
Storable Word256 # |
Instance details Defined in Foundation.Class.Storable Methods peek :: Ptr Word256 -> IO Word256 # poke :: Ptr Word256 -> Word256 -> IO () #
StorableFixed Word256 # |
Instance details Defined in Foundation.Class.Storable Methods size :: proxy Word256 -> CountOf Word8 # alignment :: proxy Word256 -> CountOf Word8 #
IsField Word256 # |
Instance details Defined in Foundation.Format.CSV.Types Methods toField :: Word256 -> Field # fromField :: Field -> Either String Word256 #
Hashable Word256 # |
Instance details Defined in Foundation.Hashing.Hashable Methods hashMix :: Hasher st => Word256 -> st -> st #
Bits Word256 |
Instance details Defined in Basement.Types.Word256 Methods (.&.) :: Word256 -> Word256 -> Word256 # (.|.) :: Word256 -> Word256 -> Word256 # xor :: Word256 -> Word256 -> Word256 # complement :: Word256 -> Word256 # shift :: Word256 -> Int -> Word256 # rotate :: Word256 -> Int -> Word256 # zeroBits :: Word256 # bit :: Int -> Word256 # setBit :: Word256 -> Int -> Word256 # clearBit :: Word256 -> Int -> Word256 # complementBit :: Word256 -> Int -> Word256 # testBit :: Word256 -> Int -> Bool # bitSizeMaybe :: Word256 -> Maybe Int # bitSize :: Word256 -> Int # isSigned :: Word256 -> Bool # shiftL :: Word256 -> Int -> Word256 # unsafeShiftL :: Word256 -> Int -> Word256 # shiftR :: Word256 -> Int -> Word256 # unsafeShiftR :: Word256 -> Int -> Word256 # rotateL :: Word256 -> Int -> Word256 # rotateR :: Word256 -> Int -> Word256 # popCount :: Word256 -> Int #
Bounded Word256 |
Instance details Defined in Basement.Types.Word256 Methods minBound :: Word256 # maxBound :: Word256 #
Enum Word256 |
Instance details Defined in Basement.Types.Word256 Methods succ :: Word256 -> Word256 # pred :: Word256 -> Word256 # toEnum :: Int -> Word256 # fromEnum :: Word256 -> Int # enumFrom :: Word256 -> [Word256] # enumFromThen :: Word256 -> Word256 -> [Word256] # enumFromTo :: Word256 -> Word256 -> [Word256] # enumFromThenTo :: Word256 -> Word256 -> Word256 -> [Word256] #
Storable Word256 |
Instance details Defined in Basement.Types.Word256 Methods sizeOf :: Word256 -> Int # alignment :: Word256 -> Int # peekElemOff :: Ptr Word256 -> Int -> IO Word256 # pokeElemOff :: Ptr Word256 -> Int -> Word256 -> IO () # peekByteOff :: Ptr b -> Int -> IO Word256 # pokeByteOff :: Ptr b -> Int -> Word256 -> IO () # peek :: Ptr Word256 -> IO Word256 # poke :: Ptr Word256 -> Word256 -> IO () #
Num Word256 |
Instance details Defined in Basement.Types.Word256 Methods (+) :: Word256 -> Word256 -> Word256 # (-) :: Word256 -> Word256 -> Word256 # (*) :: Word256 -> Word256 -> Word256 # negate :: Word256 -> Word256 # abs :: Word256 -> Word256 # signum :: Word256 -> Word256 # fromInteger :: Integer -> Word256 #
Show Word256 |
Instance details Defined in Basement.Types.Word256 Methods showsPrec :: Int -> Word256 -> ShowS # show :: Word256 -> String # showList :: [Word256] -> ShowS #
Eq Word256 |
Instance details Defined in Basement.Types.Word256 Methods (==) :: Word256 -> Word256 -> Bool # (/=) :: Word256 -> Word256 -> Bool #
Ord Word256 |
Instance details Defined in Basement.Types.Word256 Methods compare :: Word256 -> Word256 -> Ordering # (<) :: Word256 -> Word256 -> Bool # (<=) :: Word256 -> Word256 -> Bool # (>) :: Word256 -> Word256 -> Bool # (>=) :: Word256 -> Word256 -> Bool # max :: Word256 -> Word256 -> Word256 # min :: Word256 -> Word256 -> Word256 #
From Word128 Word256 |
Instance details Defined in Basement.From Methods from :: Word128 -> Word256 #
From Word16 Word256 |
Instance details Defined in Basement.From Methods from :: Word16 -> Word256 #
From Word32 Word256 |
Instance details Defined in Basement.From Methods from :: Word32 -> Word256 #
From Word64 Word256 |
Instance details Defined in Basement.From Methods from :: Word64 -> Word256 #
From Word8 Word256 |
Instance details Defined in Basement.From Methods from :: Word8 -> Word256 #
Storable (BE Word256) # |
Instance details Defined in Foundation.Class.Storable Methods peek :: Ptr (BE Word256) -> IO (BE Word256) # poke :: Ptr (BE Word256) -> BE Word256 -> IO () #
Storable (LE Word256) # |
Instance details Defined in Foundation.Class.Storable Methods peek :: Ptr (LE Word256) -> IO (LE Word256) # poke :: Ptr (LE Word256) -> LE Word256 -> IO () #
StorableFixed (BE Word256) # |
Instance details Defined in Foundation.Class.Storable Methods size :: proxy (BE Word256) -> CountOf Word8 # alignment :: proxy (BE Word256) -> CountOf Word8 #
StorableFixed (LE Word256) # |
Instance details Defined in Foundation.Class.Storable Methods size :: proxy (LE Word256) -> CountOf Word8 # alignment :: proxy (LE Word256) -> CountOf Word8 #
(KnownNat n, NatWithinBound Word256 n) => From (Zn n) Word256 |
Instance details Defined in Basement.From Methods from :: Zn n -> Word256 #
From (Zn64 n) Word256 |
Instance details Defined in Basement.From Methods from :: Zn64 n -> Word256 #
type NatNumMaxBound Word256 |
Instance details Defined in Basement.Nat type NatNumMaxBound Word256 = 115792089237316195423570985008687907853269984665640564039457584007913129639935
type Difference Word256 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word256 = Word256
type PrimSize Word256 |
Instance details Defined in Basement.PrimType type PrimSize Word256 = 32

data Int #

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

Instances details

PrintfArg Int | Since: base-2.1
Instance details Defined in Text.Printf Methods formatArg :: Int -> FieldFormatter # parseFormat :: Int -> ModifierParser #
HasNegation Int |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Int -> Int #
Integral Int |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Int #
NormalForm Int |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Int -> () #
Additive Int |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Int # (+) :: Int -> Int -> Int # scale :: IsNatural n => n -> Int -> Int #
IDivisible Int |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Int -> Int -> Int # mod :: Int -> Int -> Int # divMod :: Int -> Int -> (Int, Int) #
Multiplicative Int |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Int # (*) :: Int -> Int -> Int # (^) :: (IsNatural n, Enum n, IDivisible n) => Int -> n -> Int #
IsIntegral Int |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Int -> Integer #
Subtractive Int |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Int |
Instance details Defined in Basement.Numerical.Subtractive type Difference Int = Int
Methods (-) :: Int -> Int -> Difference Int #
PrimMemoryComparable Int |
Instance details Defined in Basement.PrimType
PrimType Int |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Int |
Instance details Defined in Basement.PrimType type PrimSize Int = 8
Methods primSizeInBytes :: Proxy Int -> CountOf Word8 # primShiftToBytes :: Proxy Int -> Int # primBaUIndex :: ByteArray# -> Offset Int -> Int # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int -> prim Int # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int -> Int -> prim () # primAddrIndex :: Addr# -> Offset Int -> Int # primAddrRead :: PrimMonad prim => Addr# -> Offset Int -> prim Int # primAddrWrite :: PrimMonad prim => Addr# -> Offset Int -> Int -> prim () #
Arbitrary Int # |
Instance details Defined in Foundation.Check.Arbitrary Methods arbitrary :: Gen Int #
IsField Int # |
Instance details Defined in Foundation.Format.CSV.Types Methods toField :: Int -> Field # fromField :: Field -> Either String Int #
Signed Int # |
Instance details Defined in Foundation.Numerical Methods abs :: Int -> Int # signum :: Int -> Sign #
Bits Int | @since base-2.01
Instance details Defined in GHC.Internal.Bits Methods (.&.) :: Int -> Int -> Int # (.|.) :: Int -> Int -> Int # xor :: Int -> Int -> Int # complement :: Int -> Int # shift :: Int -> Int -> Int # rotate :: Int -> Int -> Int # zeroBits :: Int # bit :: Int -> Int # setBit :: Int -> Int -> Int # clearBit :: Int -> Int -> Int # complementBit :: Int -> Int -> Int # testBit :: Int -> Int -> Bool # bitSizeMaybe :: Int -> Maybe Int # bitSize :: Int -> Int # isSigned :: Int -> Bool # shiftL :: Int -> Int -> Int # unsafeShiftL :: Int -> Int -> Int # shiftR :: Int -> Int -> Int # unsafeShiftR :: Int -> Int -> Int # rotateL :: Int -> Int -> Int # rotateR :: Int -> Int -> Int # popCount :: Int -> Int #
FiniteBits Int | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Bits Methods finiteBitSize :: Int -> Int # countLeadingZeros :: Int -> Int # countTrailingZeros :: Int -> Int #
Data Int | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int -> c Int # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int # toConstr :: Int -> Constr # dataTypeOf :: Int -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Int) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int) # gmapT :: (forall b. Data b => b -> b) -> Int -> Int # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int -> r # gmapQ :: (forall d. Data d => d -> u) -> Int -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Int -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int -> m Int # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int -> m Int # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int -> m Int #
Bounded Int | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods minBound :: Int # maxBound :: Int #
Enum Int | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods succ :: Int -> Int # pred :: Int -> Int # toEnum :: Int -> Int # fromEnum :: Int -> Int # enumFrom :: Int -> [Int] # enumFromThen :: Int -> Int -> [Int] # enumFromTo :: Int -> Int -> [Int] # enumFromThenTo :: Int -> Int -> Int -> [Int] #
Storable Int | @since base-2.01
Instance details Defined in GHC.Internal.Foreign.Storable Methods sizeOf :: Int -> Int # alignment :: Int -> Int # peekElemOff :: Ptr Int -> Int -> IO Int # pokeElemOff :: Ptr Int -> Int -> Int -> IO () # peekByteOff :: Ptr b -> Int -> IO Int # pokeByteOff :: Ptr b -> Int -> Int -> IO () # peek :: Ptr Int -> IO Int # poke :: Ptr Int -> Int -> IO () #
Num Int | @since base-2.01
Instance details Defined in GHC.Internal.Num Methods (+) :: Int -> Int -> Int # (-) :: Int -> Int -> Int # (*) :: Int -> Int -> Int # negate :: Int -> Int # abs :: Int -> Int # signum :: Int -> Int # fromInteger :: Integer -> Int #
Read Int | @since base-2.01
Instance details Defined in GHC.Internal.Read Methods readsPrec :: Int -> ReadS Int # readList :: ReadS [Int] # readPrec :: ReadPrec Int # readListPrec :: ReadPrec [Int] #
Integral Int | @since base-2.0.1
Instance details Defined in GHC.Internal.Real Methods quot :: Int -> Int -> Int # rem :: Int -> Int -> Int # div :: Int -> Int -> Int # mod :: Int -> Int -> Int # quotRem :: Int -> Int -> (Int, Int) # divMod :: Int -> Int -> (Int, Int) # toInteger :: Int -> Integer #
Real Int | @since base-2.0.1
Instance details Defined in GHC.Internal.Real Methods toRational :: Int -> Rational #
Show Int | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> Int -> ShowS # show :: Int -> String # showList :: [Int] -> ShowS #
Eq Int |
Instance details Defined in GHC.Classes Methods (==) :: Int -> Int -> Bool # (/=) :: Int -> Int -> Bool #
Ord Int |
Instance details Defined in GHC.Classes Methods compare :: Int -> Int -> Ordering # (<) :: Int -> Int -> Bool # (<=) :: Int -> Int -> Bool # (>) :: Int -> Int -> Bool # (>=) :: Int -> Int -> Bool # max :: Int -> Int -> Int # min :: Int -> Int -> Int #
Cast Int64 Int |
Instance details Defined in Basement.Cast Methods cast :: Int64 -> Int #
Cast Word64 Int |
Instance details Defined in Basement.Cast Methods cast :: Word64 -> Int #
Cast Int Int64 |
Instance details Defined in Basement.Cast Methods cast :: Int -> Int64 #
Cast Int Word64 |
Instance details Defined in Basement.Cast Methods cast :: Int -> Word64 #
Cast Int Word |
Instance details Defined in Basement.Cast Methods cast :: Int -> Word #
Cast Word Int |
Instance details Defined in Basement.Cast Methods cast :: Word -> Int #
From Int16 Int |
Instance details Defined in Basement.From Methods from :: Int16 -> Int #
From Int32 Int |
Instance details Defined in Basement.From Methods from :: Int32 -> Int #
From Int8 Int |
Instance details Defined in Basement.From Methods from :: Int8 -> Int #
From Word16 Int |
Instance details Defined in Basement.From Methods from :: Word16 -> Int #
From Word32 Int |
Instance details Defined in Basement.From Methods from :: Word32 -> Int #
From Word8 Int |
Instance details Defined in Basement.From Methods from :: Word8 -> Int #
From Int Int64 |
Instance details Defined in Basement.From Methods from :: Int -> Int64 #
IntegralDownsize Int64 Int |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Int64 -> Int # integralDownsizeCheck :: Int64 -> Maybe Int #
IntegralDownsize Int Int16 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Int -> Int16 # integralDownsizeCheck :: Int -> Maybe Int16 #
IntegralDownsize Int Int32 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Int -> Int32 # integralDownsizeCheck :: Int -> Maybe Int32 #
IntegralDownsize Int Int8 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Int -> Int8 # integralDownsizeCheck :: Int -> Maybe Int8 #
IntegralUpsize Int16 Int |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Int16 -> Int #
IntegralUpsize Int32 Int |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Int32 -> Int #
IntegralUpsize Int8 Int |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Int8 -> Int #
IntegralUpsize Word8 Int |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Word8 -> Int #
IntegralUpsize Int Int64 |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: Int -> Int64 #
TryFrom Int (CountOf ty) |
Instance details Defined in Basement.From Methods tryFrom :: Int -> Maybe (CountOf ty) #
TryFrom Int (Offset ty) |
Instance details Defined in Basement.From Methods tryFrom :: Int -> Maybe (Offset ty) #
Generic1 (URec Int :: k -> Type) |
Instance details Defined in GHC.Internal.Generics Associated Types
type Rep1 (URec Int :: k -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics type Rep1 (URec Int :: k -> Type) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UInt" 'PrefixI 'True) (S1 ('MetaSel ('Just "uInt#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UInt :: k -> Type)))
Methods from1 :: forall (a :: k). URec Int a -> Rep1 (URec Int :: k -> Type) a # to1 :: forall (a :: k). Rep1 (URec Int :: k -> Type) a -> URec Int a #
Foldable (UInt :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => UInt m -> m # foldMap :: Monoid m => (a -> m) -> UInt a -> m # foldMap' :: Monoid m => (a -> m) -> UInt a -> m # foldr :: (a -> b -> b) -> b -> UInt a -> b # foldr' :: (a -> b -> b) -> b -> UInt a -> b # foldl :: (b -> a -> b) -> b -> UInt a -> b # foldl' :: (b -> a -> b) -> b -> UInt a -> b # foldr1 :: (a -> a -> a) -> UInt a -> a # foldl1 :: (a -> a -> a) -> UInt a -> a # toList :: UInt a -> [a] # null :: UInt a -> Bool # length :: UInt a -> Int # elem :: Eq a => a -> UInt a -> Bool # maximum :: Ord a => UInt a -> a # minimum :: Ord a => UInt a -> a # sum :: Num a => UInt a -> a # product :: Num a => UInt a -> a #
Traversable (UInt :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Traversable Methods traverse :: Applicative f => (a -> f b) -> UInt a -> f (UInt b) # sequenceA :: Applicative f => UInt (f a) -> f (UInt a) # mapM :: Monad m => (a -> m b) -> UInt a -> m (UInt b) # sequence :: Monad m => UInt (m a) -> m (UInt a) #
From (CountOf ty) Int |
Instance details Defined in Basement.From Methods from :: CountOf ty -> Int #
Functor (URec Int :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods fmap :: (a -> b) -> URec Int a -> URec Int b # (<$) :: a -> URec Int b -> URec Int a #
Generic (URec Int p) |
Instance details Defined in GHC.Internal.Generics Associated Types
type Rep (URec Int p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics type Rep (URec Int p) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UInt" 'PrefixI 'True) (S1 ('MetaSel ('Just "uInt#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UInt :: Type -> Type)))
Methods from :: URec Int p -> Rep (URec Int p) x # to :: Rep (URec Int p) x -> URec Int p #
Show (URec Int p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> URec Int p -> ShowS # show :: URec Int p -> String # showList :: [URec Int p] -> ShowS #
Eq (URec Int p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: URec Int p -> URec Int p -> Bool # (/=) :: URec Int p -> URec Int p -> Bool #
Ord (URec Int p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods compare :: URec Int p -> URec Int p -> Ordering # (<) :: URec Int p -> URec Int p -> Bool # (<=) :: URec Int p -> URec Int p -> Bool # (>) :: URec Int p -> URec Int p -> Bool # (>=) :: URec Int p -> URec Int p -> Bool # max :: URec Int p -> URec Int p -> URec Int p # min :: URec Int p -> URec Int p -> URec Int p #
type NatNumMaxBound Int |
Instance details Defined in Basement.Nat type NatNumMaxBound Int = NatNumMaxBound Int64
type Difference Int |
Instance details Defined in Basement.Numerical.Subtractive type Difference Int = Int
type PrimSize Int |
Instance details Defined in Basement.PrimType type PrimSize Int = 8
data URec Int (p :: k) | Used for marking occurrences of `Int#` @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics data URec Int (p :: k) = UInt { uInt# :: Int# }
type Rep1 (URec Int :: k -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics type Rep1 (URec Int :: k -> Type) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UInt" 'PrefixI 'True) (S1 ('MetaSel ('Just "uInt#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UInt :: k -> Type)))
type Rep (URec Int p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics type Rep (URec Int p) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UInt" 'PrefixI 'True) (S1 ('MetaSel ('Just "uInt#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UInt :: Type -> Type)))

data Integer #

Arbitrary precision integers. In contrast with fixed-size integral types such as `Int`, the `Integer` type represents the entire infinite range of integers.

Integers are stored in a kind of sign-magnitude form, hence do not expect two's complement form when using bit operations.

If the value is small (i.e., fits into an `Int`), the `IS` constructor is used. Otherwise `IP` and `IN` constructors are used to store a `BigNat` representing the positive or the negative value magnitude, respectively.

Invariant: `IP` and `IN` are used iff the value does not fit in `IS`.

#### Instances

Instances details

PrintfArg Integer | Since: base-2.1
Instance details Defined in Text.Printf Methods formatArg :: Integer -> FieldFormatter # parseFormat :: Integer -> ModifierParser #
Fractional Rational |
Instance details Defined in Basement.Compat.NumLiteral Methods fromRational :: Rational -> Rational #
HasNegation Integer |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Integer -> Integer #
Integral Integer |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Integer #
NormalForm Integer |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Integer -> () #
Additive Rational |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Rational # (+) :: Rational -> Rational -> Rational # scale :: IsNatural n => n -> Rational -> Rational #
Additive Integer |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Integer # (+) :: Integer -> Integer -> Integer # scale :: IsNatural n => n -> Integer -> Integer #
Divisible Rational |
Instance details Defined in Basement.Numerical.Multiplicative Methods (/) :: Rational -> Rational -> Rational #
IDivisible Integer |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Integer -> Integer -> Integer # mod :: Integer -> Integer -> Integer # divMod :: Integer -> Integer -> (Integer, Integer) #
Multiplicative Rational |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Rational # (*) :: Rational -> Rational -> Rational # (^) :: (IsNatural n, Enum n, IDivisible n) => Rational -> n -> Rational #
Multiplicative Integer |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Integer # (*) :: Integer -> Integer -> Integer # (^) :: (IsNatural n, Enum n, IDivisible n) => Integer -> n -> Integer #
IsIntegral Integer |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Integer -> Integer #
Subtractive Integer |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Integer |
Instance details Defined in Basement.Numerical.Subtractive type Difference Integer = Integer
Methods (-) :: Integer -> Integer -> Difference Integer #
Arbitrary Integer # |
Instance details Defined in Foundation.Check.Arbitrary Methods arbitrary :: Gen Integer #
IsField Integer # |
Instance details Defined in Foundation.Format.CSV.Types Methods toField :: Integer -> Field # fromField :: Field -> Either String Integer #
Hashable Integer # |
Instance details Defined in Foundation.Hashing.Hashable Methods hashMix :: Hasher st => Integer -> st -> st #
IntegralRounding Rational # |
Instance details Defined in Foundation.Numerical Methods roundUp :: Integral n => Rational -> n # roundDown :: Integral n => Rational -> n # roundTruncate :: Integral n => Rational -> n # roundNearest :: Integral n => Rational -> n #
Signed Integer # |
Instance details Defined in Foundation.Numerical Methods abs :: Integer -> Integer # signum :: Integer -> Sign #
Bits Integer | @since base-2.01
Instance details Defined in GHC.Internal.Bits Methods (.&.) :: Integer -> Integer -> Integer # (.|.) :: Integer -> Integer -> Integer # xor :: Integer -> Integer -> Integer # complement :: Integer -> Integer # shift :: Integer -> Int -> Integer # rotate :: Integer -> Int -> Integer # zeroBits :: Integer # bit :: Int -> Integer # setBit :: Integer -> Int -> Integer # clearBit :: Integer -> Int -> Integer # complementBit :: Integer -> Int -> Integer # testBit :: Integer -> Int -> Bool # bitSizeMaybe :: Integer -> Maybe Int # bitSize :: Integer -> Int # isSigned :: Integer -> Bool # shiftL :: Integer -> Int -> Integer # unsafeShiftL :: Integer -> Int -> Integer # shiftR :: Integer -> Int -> Integer # unsafeShiftR :: Integer -> Int -> Integer # rotateL :: Integer -> Int -> Integer # rotateR :: Integer -> Int -> Integer # popCount :: Integer -> Int #
Data Integer | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Integer -> c Integer # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Integer # toConstr :: Integer -> Constr # dataTypeOf :: Integer -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Integer) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Integer) # gmapT :: (forall b. Data b => b -> b) -> Integer -> Integer # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Integer -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Integer -> r # gmapQ :: (forall d. Data d => d -> u) -> Integer -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Integer -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Integer -> m Integer # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Integer -> m Integer # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Integer -> m Integer #
Enum Integer | @since base-2.01
Instance details Defined in GHC.Internal.Enum Methods succ :: Integer -> Integer # pred :: Integer -> Integer # toEnum :: Int -> Integer # fromEnum :: Integer -> Int # enumFrom :: Integer -> [Integer] # enumFromThen :: Integer -> Integer -> [Integer] # enumFromTo :: Integer -> Integer -> [Integer] # enumFromThenTo :: Integer -> Integer -> Integer -> [Integer] #
Num Integer | @since base-2.01
Instance details Defined in GHC.Internal.Num Methods (+) :: Integer -> Integer -> Integer # (-) :: Integer -> Integer -> Integer # (*) :: Integer -> Integer -> Integer # negate :: Integer -> Integer # abs :: Integer -> Integer # signum :: Integer -> Integer # fromInteger :: Integer -> Integer #
Read Integer | @since base-2.01
Instance details Defined in GHC.Internal.Read Methods readsPrec :: Int -> ReadS Integer # readList :: ReadS [Integer] # readPrec :: ReadPrec Integer # readListPrec :: ReadPrec [Integer] #
Integral Integer | @since base-2.0.1
Instance details Defined in GHC.Internal.Real Methods quot :: Integer -> Integer -> Integer # rem :: Integer -> Integer -> Integer # div :: Integer -> Integer -> Integer # mod :: Integer -> Integer -> Integer # quotRem :: Integer -> Integer -> (Integer, Integer) # divMod :: Integer -> Integer -> (Integer, Integer) # toInteger :: Integer -> Integer #
Real Integer | @since base-2.0.1
Instance details Defined in GHC.Internal.Real Methods toRational :: Integer -> Rational #
Show Integer | @since base-2.01
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> Integer -> ShowS # show :: Integer -> String # showList :: [Integer] -> ShowS #
Eq Integer |
Instance details Defined in GHC.Num.Integer Methods (==) :: Integer -> Integer -> Bool # (/=) :: Integer -> Integer -> Bool #
Ord Integer |
Instance details Defined in GHC.Num.Integer Methods compare :: Integer -> Integer -> Ordering # (<) :: Integer -> Integer -> Bool # (<=) :: Integer -> Integer -> Bool # (>) :: Integer -> Integer -> Bool # (>=) :: Integer -> Integer -> Bool # max :: Integer -> Integer -> Integer # min :: Integer -> Integer -> Integer #
IsIntegral n => From n Integer |
Instance details Defined in Basement.From Methods from :: n -> Integer #
IntegralDownsize Integer Int16 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Integer -> Int16 # integralDownsizeCheck :: Integer -> Maybe Int16 #
IntegralDownsize Integer Int32 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Integer -> Int32 # integralDownsizeCheck :: Integer -> Maybe Int32 #
IntegralDownsize Integer Int64 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Integer -> Int64 # integralDownsizeCheck :: Integer -> Maybe Int64 #
IntegralDownsize Integer Int8 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Integer -> Int8 # integralDownsizeCheck :: Integer -> Maybe Int8 #
IntegralDownsize Integer Word16 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Integer -> Word16 # integralDownsizeCheck :: Integer -> Maybe Word16 #
IntegralDownsize Integer Word32 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Integer -> Word32 # integralDownsizeCheck :: Integer -> Maybe Word32 #
IntegralDownsize Integer Word64 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Integer -> Word64 # integralDownsizeCheck :: Integer -> Maybe Word64 #
IntegralDownsize Integer Word8 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Integer -> Word8 # integralDownsizeCheck :: Integer -> Maybe Word8 #
IntegralDownsize Integer Natural |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Integer -> Natural # integralDownsizeCheck :: Integer -> Maybe Natural #
IsIntegral a => IntegralUpsize a Integer |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: a -> Integer #
type Difference Integer |
Instance details Defined in Basement.Numerical.Subtractive type Difference Integer = Integer

data Natural #

Natural number

Invariant: numbers <= 0xffffffffffffffff use the `NS` constructor

#### Instances

Instances details

PrintfArg Natural | Since: base-4.8.0.0
Instance details Defined in Text.Printf Methods formatArg :: Natural -> FieldFormatter # parseFormat :: Natural -> ModifierParser #
Integral Natural |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Natural #
NormalForm Natural |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Natural -> () #
Additive Natural |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Natural # (+) :: Natural -> Natural -> Natural # scale :: IsNatural n => n -> Natural -> Natural #
IDivisible Natural |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Natural -> Natural -> Natural # mod :: Natural -> Natural -> Natural # divMod :: Natural -> Natural -> (Natural, Natural) #
Multiplicative Natural |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Natural # (*) :: Natural -> Natural -> Natural # (^) :: (IsNatural n, Enum n, IDivisible n) => Natural -> n -> Natural #
IsIntegral Natural |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Natural -> Integer #
IsNatural Natural |
Instance details Defined in Basement.Numerical.Number Methods toNatural :: Natural -> Natural #
Subtractive Natural |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Natural |
Instance details Defined in Basement.Numerical.Subtractive type Difference Natural = Maybe Natural
Methods (-) :: Natural -> Natural -> Difference Natural #
Arbitrary Natural # |
Instance details Defined in Foundation.Check.Arbitrary Methods arbitrary :: Gen Natural #
IsField Natural # |
Instance details Defined in Foundation.Format.CSV.Types Methods toField :: Natural -> Field # fromField :: Field -> Either String Natural #
Hashable Natural # |
Instance details Defined in Foundation.Hashing.Hashable Methods hashMix :: Hasher st => Natural -> st -> st #
Bits Natural | @since base-4.8.0
Instance details Defined in GHC.Internal.Bits Methods (.&.) :: Natural -> Natural -> Natural # (.|.) :: Natural -> Natural -> Natural # xor :: Natural -> Natural -> Natural # complement :: Natural -> Natural # shift :: Natural -> Int -> Natural # rotate :: Natural -> Int -> Natural # zeroBits :: Natural # bit :: Int -> Natural # setBit :: Natural -> Int -> Natural # clearBit :: Natural -> Int -> Natural # complementBit :: Natural -> Int -> Natural # testBit :: Natural -> Int -> Bool # bitSizeMaybe :: Natural -> Maybe Int # bitSize :: Natural -> Int # isSigned :: Natural -> Bool # shiftL :: Natural -> Int -> Natural # unsafeShiftL :: Natural -> Int -> Natural # shiftR :: Natural -> Int -> Natural # unsafeShiftR :: Natural -> Int -> Natural # rotateL :: Natural -> Int -> Natural # rotateR :: Natural -> Int -> Natural # popCount :: Natural -> Int #
Data Natural | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Natural -> c Natural # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Natural # toConstr :: Natural -> Constr # dataTypeOf :: Natural -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Natural) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Natural) # gmapT :: (forall b. Data b => b -> b) -> Natural -> Natural # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Natural -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Natural -> r # gmapQ :: (forall d. Data d => d -> u) -> Natural -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Natural -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Natural -> m Natural # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Natural -> m Natural # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Natural -> m Natural #
Enum Natural | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Enum Methods succ :: Natural -> Natural # pred :: Natural -> Natural # toEnum :: Int -> Natural # fromEnum :: Natural -> Int # enumFrom :: Natural -> [Natural] # enumFromThen :: Natural -> Natural -> [Natural] # enumFromTo :: Natural -> Natural -> [Natural] # enumFromThenTo :: Natural -> Natural -> Natural -> [Natural] #
Num Natural | Note that `Natural`'s `Num` instance isn't a ring: no element but 0 has an additive inverse. It is a semiring though. @since base-4.8.0.0
Instance details Defined in GHC.Internal.Num Methods (+) :: Natural -> Natural -> Natural # (-) :: Natural -> Natural -> Natural # (*) :: Natural -> Natural -> Natural # negate :: Natural -> Natural # abs :: Natural -> Natural # signum :: Natural -> Natural # fromInteger :: Integer -> Natural #
Read Natural | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Read Methods readsPrec :: Int -> ReadS Natural # readList :: ReadS [Natural] # readPrec :: ReadPrec Natural # readListPrec :: ReadPrec [Natural] #
Integral Natural | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Real Methods quot :: Natural -> Natural -> Natural # rem :: Natural -> Natural -> Natural # div :: Natural -> Natural -> Natural # mod :: Natural -> Natural -> Natural # quotRem :: Natural -> Natural -> (Natural, Natural) # divMod :: Natural -> Natural -> (Natural, Natural) # toInteger :: Natural -> Integer #
Real Natural | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Real Methods toRational :: Natural -> Rational #
Show Natural | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Show Methods showsPrec :: Int -> Natural -> ShowS # show :: Natural -> String # showList :: [Natural] -> ShowS #
Eq Natural |
Instance details Defined in GHC.Num.Natural Methods (==) :: Natural -> Natural -> Bool # (/=) :: Natural -> Natural -> Bool #
Ord Natural |
Instance details Defined in GHC.Num.Natural Methods compare :: Natural -> Natural -> Ordering # (<) :: Natural -> Natural -> Bool # (<=) :: Natural -> Natural -> Bool # (>) :: Natural -> Natural -> Bool # (>=) :: Natural -> Natural -> Bool # max :: Natural -> Natural -> Natural # min :: Natural -> Natural -> Natural #
KnownNat n => HasResolution (n :: Nat) | For example, `Fixed 1000` will give you a `Fixed` with a resolution of 1000.
Instance details Defined in Data.Fixed Methods resolution :: p n -> Integer #
IsNatural n => From n Natural |
Instance details Defined in Basement.From Methods from :: n -> Natural #
IntegralDownsize Integer Natural |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Integer -> Natural # integralDownsizeCheck :: Integer -> Maybe Natural #
IntegralDownsize Natural Word16 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Natural -> Word16 # integralDownsizeCheck :: Natural -> Maybe Word16 #
IntegralDownsize Natural Word32 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Natural -> Word32 # integralDownsizeCheck :: Natural -> Maybe Word32 #
IntegralDownsize Natural Word64 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Natural -> Word64 # integralDownsizeCheck :: Natural -> Maybe Word64 #
IntegralDownsize Natural Word8 |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Natural -> Word8 # integralDownsizeCheck :: Natural -> Maybe Word8 #
IsNatural a => IntegralUpsize a Natural |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: a -> Natural #
TestCoercion SNat | @since base-4.18.0.0
Instance details Defined in GHC.Internal.TypeNats Methods testCoercion :: forall (a :: Nat) (b :: Nat). SNat a -> SNat b -> Maybe (Coercion a b) #
TestEquality SNat | @since base-4.18.0.0
Instance details Defined in GHC.Internal.TypeNats Methods testEquality :: forall (a :: Nat) (b :: Nat). SNat a -> SNat b -> Maybe (a :~: b) #
type Difference Natural |
Instance details Defined in Basement.Numerical.Subtractive type Difference Natural = Maybe Natural
type Compare (a :: Natural) (b :: Natural) |
Instance details Defined in GHC.Internal.Data.Type.Ord type Compare (a :: Natural) (b :: Natural) = CmpNat a b

type Rational = Ratio Integer #

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

data Float #

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

Instances details

PrintfArg Float | Since: base-2.1
Instance details Defined in Text.Printf Methods formatArg :: Float -> FieldFormatter # parseFormat :: Float -> ModifierParser #
Fractional Float |
Instance details Defined in Basement.Compat.NumLiteral Methods fromRational :: Rational -> Float #
HasNegation Float |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Float -> Float #
Integral Float |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Float #
NormalForm Float |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Float -> () #
Additive Float |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Float # (+) :: Float -> Float -> Float # scale :: IsNatural n => n -> Float -> Float #
Divisible Float |
Instance details Defined in Basement.Numerical.Multiplicative Methods (/) :: Float -> Float -> Float #
Multiplicative Float |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Float # (*) :: Float -> Float -> Float # (^) :: (IsNatural n, Enum n, IDivisible n) => Float -> n -> Float #
Subtractive Float |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Float |
Instance details Defined in Basement.Numerical.Subtractive type Difference Float = Float
Methods (-) :: Float -> Float -> Difference Float #
PrimType Float |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Float |
Instance details Defined in Basement.PrimType type PrimSize Float = 4
Methods primSizeInBytes :: Proxy Float -> CountOf Word8 # primShiftToBytes :: Proxy Float -> Int # primBaUIndex :: ByteArray# -> Offset Float -> Float # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Float -> prim Float # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Float -> Float -> prim () # primAddrIndex :: Addr# -> Offset Float -> Float # primAddrRead :: PrimMonad prim => Addr# -> Offset Float -> prim Float # primAddrWrite :: PrimMonad prim => Addr# -> Offset Float -> Float -> prim () #
Arbitrary Float # |
Instance details Defined in Foundation.Check.Arbitrary Methods arbitrary :: Gen Float #
Storable Float # |
Instance details Defined in Foundation.Class.Storable Methods peek :: Ptr Float -> IO Float # poke :: Ptr Float -> Float -> IO () #
StorableFixed Float # |
Instance details Defined in Foundation.Class.Storable Methods size :: proxy Float -> CountOf Word8 # alignment :: proxy Float -> CountOf Word8 #
Trigonometry Float # |
Instance details Defined in Foundation.Math.Trigonometry Methods pi :: Float # sin :: Float -> Float # cos :: Float -> Float # tan :: Float -> Float # asin :: Float -> Float # acos :: Float -> Float # atan :: Float -> Float # sinh :: Float -> Float # cosh :: Float -> Float # tanh :: Float -> Float # asinh :: Float -> Float # acosh :: Float -> Float # atanh :: Float -> Float #
IntegralRounding Float # |
Instance details Defined in Foundation.Numerical Methods roundUp :: Integral n => Float -> n # roundDown :: Integral n => Float -> n # roundTruncate :: Integral n => Float -> n # roundNearest :: Integral n => Float -> n #
Signed Float # |
Instance details Defined in Foundation.Numerical Methods abs :: Float -> Float # signum :: Float -> Sign #
FloatingPoint Float # |
Instance details Defined in Foundation.Numerical.Floating Methods floatRadix :: Proxy Float -> Integer # floatDigits :: Proxy Float -> Int # floatRange :: Proxy Float -> (Int, Int) # floatDecode :: Float -> (Integer, Int) # floatEncode :: Integer -> Int -> Float #
Data Float | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Float -> c Float # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Float # toConstr :: Float -> Constr # dataTypeOf :: Float -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Float) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Float) # gmapT :: (forall b. Data b => b -> b) -> Float -> Float # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Float -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Float -> r # gmapQ :: (forall d. Data d => d -> u) -> Float -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Float -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Float -> m Float # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Float -> m Float # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Float -> m Float #
Floating Float | @since base-2.01
Instance details Defined in GHC.Internal.Float Methods pi :: Float # exp :: Float -> Float # log :: Float -> Float # sqrt :: Float -> Float # (**) :: Float -> Float -> Float # logBase :: Float -> Float -> Float # sin :: Float -> Float # cos :: Float -> Float # tan :: Float -> Float # asin :: Float -> Float # acos :: Float -> Float # atan :: Float -> Float # sinh :: Float -> Float # cosh :: Float -> Float # tanh :: Float -> Float # asinh :: Float -> Float # acosh :: Float -> Float # atanh :: Float -> Float # log1p :: Float -> Float # expm1 :: Float -> Float # log1pexp :: Float -> Float # log1mexp :: Float -> Float #
RealFloat Float | @since base-2.01
Instance details Defined in GHC.Internal.Float Methods floatRadix :: Float -> Integer # floatDigits :: Float -> Int # floatRange :: Float -> (Int, Int) # decodeFloat :: Float -> (Integer, Int) # encodeFloat :: Integer -> Int -> Float # exponent :: Float -> Int # significand :: Float -> Float # scaleFloat :: Int -> Float -> Float # isNaN :: Float -> Bool # isInfinite :: Float -> Bool # isDenormalized :: Float -> Bool # isNegativeZero :: Float -> Bool # isIEEE :: Float -> Bool # atan2 :: Float -> Float -> Float #
Storable Float | @since base-2.01
Instance details Defined in GHC.Internal.Foreign.Storable Methods sizeOf :: Float -> Int # alignment :: Float -> Int # peekElemOff :: Ptr Float -> Int -> IO Float # pokeElemOff :: Ptr Float -> Int -> Float -> IO () # peekByteOff :: Ptr b -> Int -> IO Float # pokeByteOff :: Ptr b -> Int -> Float -> IO () # peek :: Ptr Float -> IO Float # poke :: Ptr Float -> Float -> IO () #
Read Float | @since base-2.01
Instance details Defined in GHC.Internal.Read Methods readsPrec :: Int -> ReadS Float # readList :: ReadS [Float] # readPrec :: ReadPrec Float # readListPrec :: ReadPrec [Float] #
Eq Float | Note that due to the presence of `NaN`, `Float`'s `Eq` instance does not satisfy reflexivity.
    >>> 0/0 == (0/0 :: Float)
    False
Also note that `Float`'s `Eq` instance does not satisfy extensionality:
    >>> 0 == (-0 :: Float)
    True
    >>> recip 0 == recip (-0 :: Float)
    False
Instance details Defined in GHC.Classes Methods (==) :: Float -> Float -> Bool # (/=) :: Float -> Float -> Bool #
Ord Float | See `instance` `Ord` `Double` for discussion of deviations from IEEE 754 standard.
Instance details Defined in GHC.Classes Methods compare :: Float -> Float -> Ordering # (<) :: Float -> Float -> Bool # (<=) :: Float -> Float -> Bool # (>) :: Float -> Float -> Bool # (>=) :: Float -> Float -> Bool # max :: Float -> Float -> Float # min :: Float -> Float -> Float #
Generic1 (URec Float :: k -> Type) |
Instance details Defined in GHC.Internal.Generics Associated Types
type Rep1 (URec Float :: k -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics type Rep1 (URec Float :: k -> Type) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UFloat" 'PrefixI 'True) (S1 ('MetaSel ('Just "uFloat#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UFloat :: k -> Type)))
Methods from1 :: forall (a :: k). URec Float a -> Rep1 (URec Float :: k -> Type) a # to1 :: forall (a :: k). Rep1 (URec Float :: k -> Type) a -> URec Float a #
Foldable (UFloat :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => UFloat m -> m # foldMap :: Monoid m => (a -> m) -> UFloat a -> m # foldMap' :: Monoid m => (a -> m) -> UFloat a -> m # foldr :: (a -> b -> b) -> b -> UFloat a -> b # foldr' :: (a -> b -> b) -> b -> UFloat a -> b # foldl :: (b -> a -> b) -> b -> UFloat a -> b # foldl' :: (b -> a -> b) -> b -> UFloat a -> b # foldr1 :: (a -> a -> a) -> UFloat a -> a # foldl1 :: (a -> a -> a) -> UFloat a -> a # toList :: UFloat a -> [a] # null :: UFloat a -> Bool # length :: UFloat a -> Int # elem :: Eq a => a -> UFloat a -> Bool # maximum :: Ord a => UFloat a -> a # minimum :: Ord a => UFloat a -> a # sum :: Num a => UFloat a -> a # product :: Num a => UFloat a -> a #
Traversable (UFloat :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Traversable Methods traverse :: Applicative f => (a -> f b) -> UFloat a -> f (UFloat b) # sequenceA :: Applicative f => UFloat (f a) -> f (UFloat a) # mapM :: Monad m => (a -> m b) -> UFloat a -> m (UFloat b) # sequence :: Monad m => UFloat (m a) -> m (UFloat a) #
Functor (URec Float :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods fmap :: (a -> b) -> URec Float a -> URec Float b # (<$) :: a -> URec Float b -> URec Float a #
Generic (URec Float p) |
Instance details Defined in GHC.Internal.Generics Associated Types
type Rep (URec Float p) |
Instance details Defined in GHC.Internal.Generics type Rep (URec Float p) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UFloat" 'PrefixI 'True) (S1 ('MetaSel ('Just "uFloat#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UFloat :: Type -> Type)))
Methods from :: URec Float p -> Rep (URec Float p) x # to :: Rep (URec Float p) x -> URec Float p #
Show (URec Float p) |
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> URec Float p -> ShowS # show :: URec Float p -> String # showList :: [URec Float p] -> ShowS #
Eq (URec Float p) |
Instance details Defined in GHC.Internal.Generics Methods (==) :: URec Float p -> URec Float p -> Bool # (/=) :: URec Float p -> URec Float p -> Bool #
Ord (URec Float p) |
Instance details Defined in GHC.Internal.Generics Methods compare :: URec Float p -> URec Float p -> Ordering # (<) :: URec Float p -> URec Float p -> Bool # (<=) :: URec Float p -> URec Float p -> Bool # (>) :: URec Float p -> URec Float p -> Bool # (>=) :: URec Float p -> URec Float p -> Bool # max :: URec Float p -> URec Float p -> URec Float p # min :: URec Float p -> URec Float p -> URec Float p #
type Difference Float |
Instance details Defined in Basement.Numerical.Subtractive type Difference Float = Float
type PrimSize Float |
Instance details Defined in Basement.PrimType type PrimSize Float = 4
data URec Float (p :: k) | Used for marking occurrences of `Float#` @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics data URec Float (p :: k) = UFloat { uFloat# :: Float# }
type Rep1 (URec Float :: k -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics type Rep1 (URec Float :: k -> Type) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UFloat" 'PrefixI 'True) (S1 ('MetaSel ('Just "uFloat#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UFloat :: k -> Type)))
type Rep (URec Float p) |
Instance details Defined in GHC.Internal.Generics type Rep (URec Float p) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UFloat" 'PrefixI 'True) (S1 ('MetaSel ('Just "uFloat#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UFloat :: Type -> Type)))

data Double #

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

Instances details

PrintfArg Double | Since: base-2.1
Instance details Defined in Text.Printf Methods formatArg :: Double -> FieldFormatter # parseFormat :: Double -> ModifierParser #
Fractional Double |
Instance details Defined in Basement.Compat.NumLiteral Methods fromRational :: Rational -> Double #
HasNegation Double |
Instance details Defined in Basement.Compat.NumLiteral Methods negate :: Double -> Double #
Integral Double |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Double #
NormalForm Double |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Double -> () #
Additive Double |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Double # (+) :: Double -> Double -> Double # scale :: IsNatural n => n -> Double -> Double #
Divisible Double |
Instance details Defined in Basement.Numerical.Multiplicative Methods (/) :: Double -> Double -> Double #
Multiplicative Double |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Double # (*) :: Double -> Double -> Double # (^) :: (IsNatural n, Enum n, IDivisible n) => Double -> n -> Double #
Subtractive Double |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Double |
Instance details Defined in Basement.Numerical.Subtractive type Difference Double = Double
Methods (-) :: Double -> Double -> Difference Double #
PrimType Double |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Double |
Instance details Defined in Basement.PrimType type PrimSize Double = 8
Methods primSizeInBytes :: Proxy Double -> CountOf Word8 # primShiftToBytes :: Proxy Double -> Int # primBaUIndex :: ByteArray# -> Offset Double -> Double # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Double -> prim Double # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Double -> Double -> prim () # primAddrIndex :: Addr# -> Offset Double -> Double # primAddrRead :: PrimMonad prim => Addr# -> Offset Double -> prim Double # primAddrWrite :: PrimMonad prim => Addr# -> Offset Double -> Double -> prim () #
Arbitrary Double # |
Instance details Defined in Foundation.Check.Arbitrary Methods arbitrary :: Gen Double #
Storable Double # |
Instance details Defined in Foundation.Class.Storable Methods peek :: Ptr Double -> IO Double # poke :: Ptr Double -> Double -> IO () #
StorableFixed Double # |
Instance details Defined in Foundation.Class.Storable Methods size :: proxy Double -> CountOf Word8 # alignment :: proxy Double -> CountOf Word8 #
IsField Double # |
Instance details Defined in Foundation.Format.CSV.Types Methods toField :: Double -> Field # fromField :: Field -> Either String Double #
Trigonometry Double # |
Instance details Defined in Foundation.Math.Trigonometry Methods pi :: Double # sin :: Double -> Double # cos :: Double -> Double # tan :: Double -> Double # asin :: Double -> Double # acos :: Double -> Double # atan :: Double -> Double # sinh :: Double -> Double # cosh :: Double -> Double # tanh :: Double -> Double # asinh :: Double -> Double # acosh :: Double -> Double # atanh :: Double -> Double #
IntegralRounding Double # |
Instance details Defined in Foundation.Numerical Methods roundUp :: Integral n => Double -> n # roundDown :: Integral n => Double -> n # roundTruncate :: Integral n => Double -> n # roundNearest :: Integral n => Double -> n #
Signed Double # |
Instance details Defined in Foundation.Numerical Methods abs :: Double -> Double # signum :: Double -> Sign #
FloatingPoint Double # |
Instance details Defined in Foundation.Numerical.Floating Methods floatRadix :: Proxy Double -> Integer # floatDigits :: Proxy Double -> Int # floatRange :: Proxy Double -> (Int, Int) # floatDecode :: Double -> (Integer, Int) # floatEncode :: Integer -> Int -> Double #
Data Double | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Double -> c Double # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Double # toConstr :: Double -> Constr # dataTypeOf :: Double -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Double) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Double) # gmapT :: (forall b. Data b => b -> b) -> Double -> Double # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Double -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Double -> r # gmapQ :: (forall d. Data d => d -> u) -> Double -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Double -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Double -> m Double # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Double -> m Double # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Double -> m Double #
Floating Double | @since base-2.01
Instance details Defined in GHC.Internal.Float Methods pi :: Double # exp :: Double -> Double # log :: Double -> Double # sqrt :: Double -> Double # (**) :: Double -> Double -> Double # logBase :: Double -> Double -> Double # sin :: Double -> Double # cos :: Double -> Double # tan :: Double -> Double # asin :: Double -> Double # acos :: Double -> Double # atan :: Double -> Double # sinh :: Double -> Double # cosh :: Double -> Double # tanh :: Double -> Double # asinh :: Double -> Double # acosh :: Double -> Double # atanh :: Double -> Double # log1p :: Double -> Double # expm1 :: Double -> Double # log1pexp :: Double -> Double # log1mexp :: Double -> Double #
RealFloat Double | @since base-2.01
Instance details Defined in GHC.Internal.Float Methods floatRadix :: Double -> Integer # floatDigits :: Double -> Int # floatRange :: Double -> (Int, Int) # decodeFloat :: Double -> (Integer, Int) # encodeFloat :: Integer -> Int -> Double # exponent :: Double -> Int # significand :: Double -> Double # scaleFloat :: Int -> Double -> Double # isNaN :: Double -> Bool # isInfinite :: Double -> Bool # isDenormalized :: Double -> Bool # isNegativeZero :: Double -> Bool # isIEEE :: Double -> Bool # atan2 :: Double -> Double -> Double #
Storable Double | @since base-2.01
Instance details Defined in GHC.Internal.Foreign.Storable Methods sizeOf :: Double -> Int # alignment :: Double -> Int # peekElemOff :: Ptr Double -> Int -> IO Double # pokeElemOff :: Ptr Double -> Int -> Double -> IO () # peekByteOff :: Ptr b -> Int -> IO Double # pokeByteOff :: Ptr b -> Int -> Double -> IO () # peek :: Ptr Double -> IO Double # poke :: Ptr Double -> Double -> IO () #
Read Double | @since base-2.01
Instance details Defined in GHC.Internal.Read Methods readsPrec :: Int -> ReadS Double # readList :: ReadS [Double] # readPrec :: ReadPrec Double # readListPrec :: ReadPrec [Double] #
Eq Double | Note that due to the presence of `NaN`, `Double`'s `Eq` instance does not satisfy reflexivity.
    >>> 0/0 == (0/0 :: Double)
    False
Also note that `Double`'s `Eq` instance does not satisfy substitutivity:
    >>> 0 == (-0 :: Double)
    True
    >>> recip 0 == recip (-0 :: Double)
    False
Instance details Defined in GHC.Classes Methods (==) :: Double -> Double -> Bool # (/=) :: Double -> Double -> Bool #
Ord Double | IEEE 754 `Double`-precision type includes not only numbers, but also positive and negative infinities and a special element called `NaN` (which can be quiet or signal). IEEE 754-2008, section 5.11 requires that if at least one of arguments of `<=`, `<`, `>`, `>=` is `NaN` then the result of the comparison is `False`, and `instance` `Ord` `Double` complies with this requirement. This violates the reflexivity: both `NaN` `<=` `NaN` and `NaN` `>=` `NaN` are `False`. IEEE 754-2008, section 5.10 defines `totalOrder` predicate. Unfortunately, `compare` on `Double`s violates the IEEE standard and does not define a total order. More specifically, both `compare` `NaN` `x` and `compare` `x` `NaN` always return `GT`. Thus, users must be extremely cautious when using `instance` `Ord` `Double`. For instance, one should avoid ordered containers with keys represented by `Double`, because data loss and corruption may happen. An IEEE-compliant `compare` is available in `fp-ieee` package as `TotallyOrdered` newtype. Moving further, the behaviour of `min` and `max` with regards to `NaN` is also non-compliant. IEEE 754-2008, section 5.3.1 defines that quiet `NaN` should be treated as a missing data by `minNum` and `maxNum` functions, for example, `minNum(NaN, 1) = minNum(1, NaN) = 1`. Some languages such as Java deviate from the standard implementing `minNum(NaN, 1) = minNum(1, NaN) = NaN`. However, `min` / `max` in `base` are even worse: `min` `NaN` 1 is 1, but `min` 1 `NaN` is `NaN`. IEEE 754-2008 compliant `min` / `max` can be found in `ieee754` package under `minNum` / `maxNum` names. Implementations compliant with `minimumNumber` / `maximumNumber` from a newer IEEE 754-2019, section 9.6 are available from `fp-ieee` package.
Instance details Defined in GHC.Classes Methods compare :: Double -> Double -> Ordering # (<) :: Double -> Double -> Bool # (<=) :: Double -> Double -> Bool # (>) :: Double -> Double -> Bool # (>=) :: Double -> Double -> Bool # max :: Double -> Double -> Double # min :: Double -> Double -> Double #
Generic1 (URec Double :: k -> Type) |
Instance details Defined in GHC.Internal.Generics Associated Types
type Rep1 (URec Double :: k -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics type Rep1 (URec Double :: k -> Type) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UDouble" 'PrefixI 'True) (S1 ('MetaSel ('Just "uDouble#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UDouble :: k -> Type)))
Methods from1 :: forall (a :: k). URec Double a -> Rep1 (URec Double :: k -> Type) a # to1 :: forall (a :: k). Rep1 (URec Double :: k -> Type) a -> URec Double a #
Foldable (UDouble :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => UDouble m -> m # foldMap :: Monoid m => (a -> m) -> UDouble a -> m # foldMap' :: Monoid m => (a -> m) -> UDouble a -> m # foldr :: (a -> b -> b) -> b -> UDouble a -> b # foldr' :: (a -> b -> b) -> b -> UDouble a -> b # foldl :: (b -> a -> b) -> b -> UDouble a -> b # foldl' :: (b -> a -> b) -> b -> UDouble a -> b # foldr1 :: (a -> a -> a) -> UDouble a -> a # foldl1 :: (a -> a -> a) -> UDouble a -> a # toList :: UDouble a -> [a] # null :: UDouble a -> Bool # length :: UDouble a -> Int # elem :: Eq a => a -> UDouble a -> Bool # maximum :: Ord a => UDouble a -> a # minimum :: Ord a => UDouble a -> a # sum :: Num a => UDouble a -> a # product :: Num a => UDouble a -> a #
Traversable (UDouble :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Traversable Methods traverse :: Applicative f => (a -> f b) -> UDouble a -> f (UDouble b) # sequenceA :: Applicative f => UDouble (f a) -> f (UDouble a) # mapM :: Monad m => (a -> m b) -> UDouble a -> m (UDouble b) # sequence :: Monad m => UDouble (m a) -> m (UDouble a) #
Functor (URec Double :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods fmap :: (a -> b) -> URec Double a -> URec Double b # (<$) :: a -> URec Double b -> URec Double a #
Generic (URec Double p) |
Instance details Defined in GHC.Internal.Generics Associated Types
type Rep (URec Double p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics type Rep (URec Double p) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UDouble" 'PrefixI 'True) (S1 ('MetaSel ('Just "uDouble#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UDouble :: Type -> Type)))
Methods from :: URec Double p -> Rep (URec Double p) x # to :: Rep (URec Double p) x -> URec Double p #
Show (URec Double p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> URec Double p -> ShowS # show :: URec Double p -> String # showList :: [URec Double p] -> ShowS #
Eq (URec Double p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: URec Double p -> URec Double p -> Bool # (/=) :: URec Double p -> URec Double p -> Bool #
Ord (URec Double p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods compare :: URec Double p -> URec Double p -> Ordering # (<) :: URec Double p -> URec Double p -> Bool # (<=) :: URec Double p -> URec Double p -> Bool # (>) :: URec Double p -> URec Double p -> Bool # (>=) :: URec Double p -> URec Double p -> Bool # max :: URec Double p -> URec Double p -> URec Double p # min :: URec Double p -> URec Double p -> URec Double p #
type Difference Double |
Instance details Defined in Basement.Numerical.Subtractive type Difference Double = Double
type PrimSize Double |
Instance details Defined in Basement.PrimType type PrimSize Double = 8
data URec Double (p :: k) | Used for marking occurrences of `Double#` @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics data URec Double (p :: k) = UDouble { uDouble# :: Double# }
type Rep1 (URec Double :: k -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics type Rep1 (URec Double :: k -> Type) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UDouble" 'PrefixI 'True) (S1 ('MetaSel ('Just "uDouble#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UDouble :: k -> Type)))
type Rep (URec Double p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics type Rep (URec Double p) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UDouble" 'PrefixI 'True) (S1 ('MetaSel ('Just "uDouble#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UDouble :: Type -> Type)))

newtype CountOf ty #

CountOf of a data structure.

More specifically, it represents the number of elements of type `ty` that fit into the data structure.

    >>> length (fromList ['a', 'b', 'c', '🌟']) :: CountOf Char
    CountOf 4

Same caveats as `Offset` apply here.

Constructors

CountOf Int |

#### Instances

Instances details

From Word (CountOf ty) |
Instance details Defined in Basement.From Methods from :: Word -> CountOf ty #
TryFrom Int (CountOf ty) |
Instance details Defined in Basement.From Methods tryFrom :: Int -> Maybe (CountOf ty) #
Integral (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize Methods fromInteger :: Integer -> CountOf ty #
NormalForm (CountOf a) |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: CountOf a -> () #
Additive (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize Methods azero :: CountOf ty # (+) :: CountOf ty -> CountOf ty -> CountOf ty # scale :: IsNatural n => n -> CountOf ty -> CountOf ty #
IsIntegral (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize Methods toInteger :: CountOf ty -> Integer #
IsNatural (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize Methods toNatural :: CountOf ty -> Natural #
Subtractive (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize Associated Types
type Difference (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize type Difference (CountOf ty) = Maybe (CountOf ty)
Methods (-) :: CountOf ty -> CountOf ty -> Difference (CountOf ty) #
Arbitrary (CountOf ty) # |
Instance details Defined in Foundation.Check.Arbitrary Methods arbitrary :: Gen (CountOf ty) #
IsField (CountOf a) # |
Instance details Defined in Foundation.Format.CSV.Types Methods toField :: CountOf a -> Field # fromField :: Field -> Either String (CountOf a) #
Monoid (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize Methods mempty :: CountOf ty # mappend :: CountOf ty -> CountOf ty -> CountOf ty # mconcat :: [CountOf ty] -> CountOf ty #
Semigroup (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize Methods (<>) :: CountOf ty -> CountOf ty -> CountOf ty # sconcat :: NonEmpty (CountOf ty) -> CountOf ty # stimes :: Integral b => b -> CountOf ty -> CountOf ty #
Enum (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize Methods succ :: CountOf ty -> CountOf ty # pred :: CountOf ty -> CountOf ty # toEnum :: Int -> CountOf ty # fromEnum :: CountOf ty -> Int # enumFrom :: CountOf ty -> [CountOf ty] # enumFromThen :: CountOf ty -> CountOf ty -> [CountOf ty] # enumFromTo :: CountOf ty -> CountOf ty -> [CountOf ty] # enumFromThenTo :: CountOf ty -> CountOf ty -> CountOf ty -> [CountOf ty] #
Num (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize Methods (+) :: CountOf ty -> CountOf ty -> CountOf ty # (-) :: CountOf ty -> CountOf ty -> CountOf ty # (*) :: CountOf ty -> CountOf ty -> CountOf ty # negate :: CountOf ty -> CountOf ty # abs :: CountOf ty -> CountOf ty # signum :: CountOf ty -> CountOf ty # fromInteger :: Integer -> CountOf ty #
Show (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize Methods showsPrec :: Int -> CountOf ty -> ShowS # show :: CountOf ty -> String # showList :: [CountOf ty] -> ShowS #
Eq (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize Methods (==) :: CountOf ty -> CountOf ty -> Bool # (/=) :: CountOf ty -> CountOf ty -> Bool #
Ord (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize Methods compare :: CountOf ty -> CountOf ty -> Ordering # (<) :: CountOf ty -> CountOf ty -> Bool # (<=) :: CountOf ty -> CountOf ty -> Bool # (>) :: CountOf ty -> CountOf ty -> Bool # (>=) :: CountOf ty -> CountOf ty -> Bool # max :: CountOf ty -> CountOf ty -> CountOf ty # min :: CountOf ty -> CountOf ty -> CountOf ty #
From (CountOf ty) Int |
Instance details Defined in Basement.From Methods from :: CountOf ty -> Int #
From (CountOf ty) Word |
Instance details Defined in Basement.From Methods from :: CountOf ty -> Word #
type NatNumMaxBound (CountOf x) |
Instance details Defined in Basement.Types.OffsetSize type NatNumMaxBound (CountOf x) = NatNumMaxBound Int
type Difference (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize type Difference (CountOf ty) = Maybe (CountOf ty)

newtype Offset ty #

Offset in a data structure consisting of elements of type `ty`.

Int is a terrible backing type which is hard to get away from, considering that GHC/Haskell are mostly using this for offset. Trying to bring some sanity by a lightweight wrapping.

Constructors

Offset Int |

#### Instances

Instances details

From Word (Offset ty) |
Instance details Defined in Basement.From Methods from :: Word -> Offset ty #
TryFrom Int (Offset ty) |
Instance details Defined in Basement.From Methods tryFrom :: Int -> Maybe (Offset ty) #
Integral (Offset ty) |
Instance details Defined in Basement.Types.OffsetSize Methods fromInteger :: Integer -> Offset ty #
NormalForm (Offset a) |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Offset a -> () #
Additive (Offset ty) |
Instance details Defined in Basement.Types.OffsetSize Methods azero :: Offset ty # (+) :: Offset ty -> Offset ty -> Offset ty # scale :: IsNatural n => n -> Offset ty -> Offset ty #
IsIntegral (Offset ty) |
Instance details Defined in Basement.Types.OffsetSize Methods toInteger :: Offset ty -> Integer #
IsNatural (Offset ty) |
Instance details Defined in Basement.Types.OffsetSize Methods toNatural :: Offset ty -> Natural #
Subtractive (Offset ty) |
Instance details Defined in Basement.Types.OffsetSize Associated Types
type Difference (Offset ty) |
Instance details Defined in Basement.Types.OffsetSize type Difference (Offset ty) = CountOf ty
Methods (-) :: Offset ty -> Offset ty -> Difference (Offset ty) #
IsField (Offset a) # |
Instance details Defined in Foundation.Format.CSV.Types Methods toField :: Offset a -> Field # fromField :: Field -> Either String (Offset a) #
Enum (Offset ty) |
Instance details Defined in Basement.Types.OffsetSize Methods succ :: Offset ty -> Offset ty # pred :: Offset ty -> Offset ty # toEnum :: Int -> Offset ty # fromEnum :: Offset ty -> Int # enumFrom :: Offset ty -> [Offset ty] # enumFromThen :: Offset ty -> Offset ty -> [Offset ty] # enumFromTo :: Offset ty -> Offset ty -> [Offset ty] # enumFromThenTo :: Offset ty -> Offset ty -> Offset ty -> [Offset ty] #
Num (Offset ty) |
Instance details Defined in Basement.Types.OffsetSize Methods (+) :: Offset ty -> Offset ty -> Offset ty # (-) :: Offset ty -> Offset ty -> Offset ty # (*) :: Offset ty -> Offset ty -> Offset ty # negate :: Offset ty -> Offset ty # abs :: Offset ty -> Offset ty # signum :: Offset ty -> Offset ty # fromInteger :: Integer -> Offset ty #
Show (Offset ty) |
Instance details Defined in Basement.Types.OffsetSize Methods showsPrec :: Int -> Offset ty -> ShowS # show :: Offset ty -> String # showList :: [Offset ty] -> ShowS #
Eq (Offset ty) |
Instance details Defined in Basement.Types.OffsetSize Methods (==) :: Offset ty -> Offset ty -> Bool # (/=) :: Offset ty -> Offset ty -> Bool #
Ord (Offset ty) |
Instance details Defined in Basement.Types.OffsetSize Methods compare :: Offset ty -> Offset ty -> Ordering # (<) :: Offset ty -> Offset ty -> Bool # (<=) :: Offset ty -> Offset ty -> Bool # (>) :: Offset ty -> Offset ty -> Bool # (>=) :: Offset ty -> Offset ty -> Bool # max :: Offset ty -> Offset ty -> Offset ty # min :: Offset ty -> Offset ty -> Offset ty #
type NatNumMaxBound (Offset x) |
Instance details Defined in Basement.Types.OffsetSize type NatNumMaxBound (Offset x) = NatNumMaxBound Int
type Difference (Offset ty) |
Instance details Defined in Basement.Types.OffsetSize type Difference (Offset ty) = CountOf ty

toCount :: Int -> CountOf ty #

fromCount :: CountOf ty -> Int #

## Collection types

data UArray ty #

An array of type built on top of GHC primitive.

The elements need to have fixed sized and the representation is a packed contiguous array in memory that can easily be passed to foreign interface

#### Instances

Instances details

From AsciiString (UArray Word8) |
Instance details Defined in Basement.From Methods from :: AsciiString -> UArray Word8 #
From String (UArray Word8) |
Instance details Defined in Basement.From Methods from :: String -> UArray Word8 #
NormalForm (UArray ty) |
Instance details Defined in Basement.UArray.Base Methods toNormalForm :: UArray ty -> () #
PrimType ty => Buildable (UArray ty) # |
Instance details Defined in Foundation.Collection.Buildable Associated Types
type Mutable (UArray ty) |
Instance details Defined in Foundation.Collection.Buildable type Mutable (UArray ty) = MUArray ty
type Step (UArray ty) |
Instance details Defined in Foundation.Collection.Buildable type Step (UArray ty) = ty
Methods append :: forall (prim :: Type -> Type) err. PrimMonad prim => Element (UArray ty) -> Builder (UArray ty) (Mutable (UArray ty)) (Step (UArray ty)) prim err () # build :: PrimMonad prim => Int -> Builder (UArray ty) (Mutable (UArray ty)) (Step (UArray ty)) prim err () -> prim (Either err (UArray ty)) #
PrimType ty => Collection (UArray ty) # |
Instance details Defined in Foundation.Collection.Collection Methods null :: UArray ty -> Bool # length :: UArray ty -> CountOf (Element (UArray ty)) # elem :: (Eq a, a ~ Element (UArray ty)) => Element (UArray ty) -> UArray ty -> Bool # notElem :: (Eq a, a ~ Element (UArray ty)) => Element (UArray ty) -> UArray ty -> Bool # maximum :: (Ord a, a ~ Element (UArray ty)) => NonEmpty (UArray ty) -> Element (UArray ty) # minimum :: (Ord a, a ~ Element (UArray ty)) => NonEmpty (UArray ty) -> Element (UArray ty) # any :: (Element (UArray ty) -> Bool) -> UArray ty -> Bool # all :: (Element (UArray ty) -> Bool) -> UArray ty -> Bool #
PrimType ty => Copy (UArray ty) # |
Instance details Defined in Foundation.Collection.Copy Methods copy :: UArray ty -> UArray ty #
PrimType ty => Fold1able (UArray ty) # |
Instance details Defined in Foundation.Collection.Foldable Methods foldl1' :: (Element (UArray ty) -> Element (UArray ty) -> Element (UArray ty)) -> NonEmpty (UArray ty) -> Element (UArray ty) # foldr1 :: (Element (UArray ty) -> Element (UArray ty) -> Element (UArray ty)) -> NonEmpty (UArray ty) -> Element (UArray ty) #
PrimType ty => Foldable (UArray ty) # |
Instance details Defined in Foundation.Collection.Foldable Methods foldl' :: (a -> Element (UArray ty) -> a) -> a -> UArray ty -> a # foldr :: (Element (UArray ty) -> a -> a) -> a -> UArray ty -> a # foldr' :: (Element (UArray ty) -> a -> a) -> a -> UArray ty -> a #
PrimType ty => IndexedCollection (UArray ty) # |
Instance details Defined in Foundation.Collection.Indexed Methods (!) :: UArray ty -> Offset (Element (UArray ty)) -> Maybe (Element (UArray ty)) # findIndex :: (Element (UArray ty) -> Bool) -> UArray ty -> Maybe (Offset (Element (UArray ty))) #
PrimType ty => InnerFunctor (UArray ty) # |
Instance details Defined in Foundation.Collection.InnerFunctor Methods imap :: (Element (UArray ty) -> Element (UArray ty)) -> UArray ty -> UArray ty #
PrimType ty => Sequential (UArray ty) # |
Instance details Defined in Foundation.Collection.Sequential Methods take :: CountOf (Element (UArray ty)) -> UArray ty -> UArray ty # revTake :: CountOf (Element (UArray ty)) -> UArray ty -> UArray ty # drop :: CountOf (Element (UArray ty)) -> UArray ty -> UArray ty # revDrop :: CountOf (Element (UArray ty)) -> UArray ty -> UArray ty # splitAt :: CountOf (Element (UArray ty)) -> UArray ty -> (UArray ty, UArray ty) # revSplitAt :: CountOf (Element (UArray ty)) -> UArray ty -> (UArray ty, UArray ty) # splitOn :: (Element (UArray ty) -> Bool) -> UArray ty -> [UArray ty] # break :: (Element (UArray ty) -> Bool) -> UArray ty -> (UArray ty, UArray ty) # breakEnd :: (Element (UArray ty) -> Bool) -> UArray ty -> (UArray ty, UArray ty) # breakElem :: Element (UArray ty) -> UArray ty -> (UArray ty, UArray ty) # takeWhile :: (Element (UArray ty) -> Bool) -> UArray ty -> UArray ty # dropWhile :: (Element (UArray ty) -> Bool) -> UArray ty -> UArray ty # intersperse :: Element (UArray ty) -> UArray ty -> UArray ty # intercalate :: Element (UArray ty) -> UArray ty -> Element (UArray ty) # span :: (Element (UArray ty) -> Bool) -> UArray ty -> (UArray ty, UArray ty) # spanEnd :: (Element (UArray ty) -> Bool) -> UArray ty -> (UArray ty, UArray ty) # filter :: (Element (UArray ty) -> Bool) -> UArray ty -> UArray ty # partition :: (Element (UArray ty) -> Bool) -> UArray ty -> (UArray ty, UArray ty) # reverse :: UArray ty -> UArray ty # uncons :: UArray ty -> Maybe (Element (UArray ty), UArray ty) # unsnoc :: UArray ty -> Maybe (UArray ty, Element (UArray ty)) # snoc :: UArray ty -> Element (UArray ty) -> UArray ty # cons :: Element (UArray ty) -> UArray ty -> UArray ty # find :: (Element (UArray ty) -> Bool) -> UArray ty -> Maybe (Element (UArray ty)) # sortBy :: (Element (UArray ty) -> Element (UArray ty) -> Ordering) -> UArray ty -> UArray ty # singleton :: Element (UArray ty) -> UArray ty # head :: NonEmpty (UArray ty) -> Element (UArray ty) # last :: NonEmpty (UArray ty) -> Element (UArray ty) # tail :: NonEmpty (UArray ty) -> UArray ty # init :: NonEmpty (UArray ty) -> UArray ty # replicate :: CountOf (Element (UArray ty)) -> Element (UArray ty) -> UArray ty # isPrefixOf :: UArray ty -> UArray ty -> Bool # isSuffixOf :: UArray ty -> UArray ty -> Bool # isInfixOf :: UArray ty -> UArray ty -> Bool # stripPrefix :: UArray ty -> UArray ty -> Maybe (UArray ty) # stripSuffix :: UArray ty -> UArray ty -> Maybe (UArray ty) #
PrimType ty => Zippable (UArray ty) # |
Instance details Defined in Foundation.Collection.Zippable Methods zipWith :: (Sequential a, Sequential b) => (Element a -> Element b -> Element (UArray ty)) -> a -> b -> UArray ty # zipWith3 :: (Sequential a, Sequential b, Sequential c) => (Element a -> Element b -> Element c -> Element (UArray ty)) -> a -> b -> c -> UArray ty # zipWith4 :: (Sequential a, Sequential b, Sequential c, Sequential d) => (Element a -> Element b -> Element c -> Element d -> Element (UArray ty)) -> a -> b -> c -> d -> UArray ty # zipWith5 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element (UArray ty)) -> a -> b -> c -> d -> e -> UArray ty # zipWith6 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element f -> Element (UArray ty)) -> a -> b -> c -> d -> e -> f -> UArray ty # zipWith7 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Sequential g) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element f -> Element g -> Element (UArray ty)) -> a -> b -> c -> d -> e -> f -> g -> UArray ty #
PrimType a => Hashable (UArray a) # |
Instance details Defined in Foundation.Hashing.Hashable Methods hashMix :: Hasher st => UArray a -> st -> st #
PrimType ty => Monoid (UArray ty) |
Instance details Defined in Basement.UArray.Base Methods mempty :: UArray ty # mappend :: UArray ty -> UArray ty -> UArray ty # mconcat :: [UArray ty] -> UArray ty #
PrimType ty => Semigroup (UArray ty) |
Instance details Defined in Basement.UArray.Base Methods (<>) :: UArray ty -> UArray ty -> UArray ty # sconcat :: NonEmpty (UArray ty) -> UArray ty # stimes :: Integral b => b -> UArray ty -> UArray ty #
Data ty => Data (UArray ty) |
Instance details Defined in Basement.UArray.Base Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UArray ty -> c (UArray ty) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (UArray ty) # toConstr :: UArray ty -> Constr # dataTypeOf :: UArray ty -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (UArray ty)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (UArray ty)) # gmapT :: (forall b. Data b => b -> b) -> UArray ty -> UArray ty # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UArray ty -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UArray ty -> r # gmapQ :: (forall d. Data d => d -> u) -> UArray ty -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> UArray ty -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> UArray ty -> m (UArray ty) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UArray ty -> m (UArray ty) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UArray ty -> m (UArray ty) #
PrimType ty => IsList (UArray ty) |
Instance details Defined in Basement.UArray.Base Associated Types
type Item (UArray ty) |
Instance details Defined in Basement.UArray.Base type Item (UArray ty) = ty
Methods fromList :: [Item (UArray ty)] -> UArray ty # fromListN :: Int -> [Item (UArray ty)] -> UArray ty # toList :: UArray ty -> [Item (UArray ty)] #
(PrimType ty, Show ty) => Show (UArray ty) |
Instance details Defined in Basement.UArray.Base Methods showsPrec :: Int -> UArray ty -> ShowS # show :: UArray ty -> String # showList :: [UArray ty] -> ShowS #
(PrimType ty, Eq ty) => Eq (UArray ty) |
Instance details Defined in Basement.UArray.Base Methods (==) :: UArray ty -> UArray ty -> Bool # (/=) :: UArray ty -> UArray ty -> Bool #
(PrimType ty, Ord ty) => Ord (UArray ty) |
Instance details Defined in Basement.UArray.Base Methods compare :: UArray ty -> UArray ty -> Ordering # (<) :: UArray ty -> UArray ty -> Bool # (<=) :: UArray ty -> UArray ty -> Bool # (>) :: UArray ty -> UArray ty -> Bool # (>=) :: UArray ty -> UArray ty -> Bool # max :: UArray ty -> UArray ty -> UArray ty # min :: UArray ty -> UArray ty -> UArray ty #
TryFrom (UArray Word8) String |
Instance details Defined in Basement.From Methods tryFrom :: UArray Word8 -> Maybe String #
PrimType ty => From (Block ty) (UArray ty) |
Instance details Defined in Basement.From Methods from :: Block ty -> UArray ty #
PrimType ty => From (Array ty) (UArray ty) |
Instance details Defined in Basement.From Methods from :: Array ty -> UArray ty #
PrimType ty => From (UArray ty) (Block ty) |
Instance details Defined in Basement.From Methods from :: UArray ty -> Block ty #
PrimType ty => From (UArray ty) (Array ty) |
Instance details Defined in Basement.From Methods from :: UArray ty -> Array ty #
(NatWithinBound (CountOf ty) n, KnownNat n, PrimType ty) => TryFrom (UArray ty) (BlockN n ty) |
Instance details Defined in Basement.From Methods tryFrom :: UArray ty -> Maybe (BlockN n ty) #
(NatWithinBound Int n, PrimType ty) => From (BlockN n ty) (UArray ty) |
Instance details Defined in Basement.From Methods from :: BlockN n ty -> UArray ty #
type Mutable (UArray ty) # |
Instance details Defined in Foundation.Collection.Buildable type Mutable (UArray ty) = MUArray ty
type Step (UArray ty) # |
Instance details Defined in Foundation.Collection.Buildable type Step (UArray ty) = ty
type Element (UArray ty) # |
Instance details Defined in Foundation.Collection.Element type Element (UArray ty) = ty
type Item (UArray ty) |
Instance details Defined in Basement.UArray.Base type Item (UArray ty) = ty

class Eq ty => PrimType ty #

Represent the accessor for types that can be stored in the UArray and MUArray.

Types need to be a instance of storable and have fixed sized.

Minimal complete definition

primSizeInBytes, primShiftToBytes, primBaUIndex, primMbaURead, primMbaUWrite, primAddrIndex, primAddrRead, primAddrWrite

#### Instances

Instances details

PrimType Char7 |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Char7 |
Instance details Defined in Basement.PrimType type PrimSize Char7 = 1
Methods primSizeInBytes :: Proxy Char7 -> CountOf Word8 # primShiftToBytes :: Proxy Char7 -> Int # primBaUIndex :: ByteArray# -> Offset Char7 -> Char7 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Char7 -> prim Char7 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Char7 -> Char7 -> prim () # primAddrIndex :: Addr# -> Offset Char7 -> Char7 # primAddrRead :: PrimMonad prim => Addr# -> Offset Char7 -> prim Char7 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Char7 -> Char7 -> prim () #
PrimType Word128 |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Word128 |
Instance details Defined in Basement.PrimType type PrimSize Word128 = 16
Methods primSizeInBytes :: Proxy Word128 -> CountOf Word8 # primShiftToBytes :: Proxy Word128 -> Int # primBaUIndex :: ByteArray# -> Offset Word128 -> Word128 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word128 -> prim Word128 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word128 -> Word128 -> prim () # primAddrIndex :: Addr# -> Offset Word128 -> Word128 # primAddrRead :: PrimMonad prim => Addr# -> Offset Word128 -> prim Word128 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Word128 -> Word128 -> prim () #
PrimType Word256 |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Word256 |
Instance details Defined in Basement.PrimType type PrimSize Word256 = 32
Methods primSizeInBytes :: Proxy Word256 -> CountOf Word8 # primShiftToBytes :: Proxy Word256 -> Int # primBaUIndex :: ByteArray# -> Offset Word256 -> Word256 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word256 -> prim Word256 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word256 -> Word256 -> prim () # primAddrIndex :: Addr# -> Offset Word256 -> Word256 # primAddrRead :: PrimMonad prim => Addr# -> Offset Word256 -> prim Word256 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Word256 -> Word256 -> prim () #
PrimType NanoSeconds # |
Instance details Defined in Foundation.Time.Types Associated Types
type PrimSize NanoSeconds |
Instance details Defined in Foundation.Time.Types type PrimSize NanoSeconds = 8
Methods primSizeInBytes :: Proxy NanoSeconds -> CountOf Word8 # primShiftToBytes :: Proxy NanoSeconds -> Int # primBaUIndex :: ByteArray# -> Offset NanoSeconds -> NanoSeconds # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset NanoSeconds -> prim NanoSeconds # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset NanoSeconds -> NanoSeconds -> prim () # primAddrIndex :: Addr# -> Offset NanoSeconds -> NanoSeconds # primAddrRead :: PrimMonad prim => Addr# -> Offset NanoSeconds -> prim NanoSeconds # primAddrWrite :: PrimMonad prim => Addr# -> Offset NanoSeconds -> NanoSeconds -> prim () #
PrimType Seconds # |
Instance details Defined in Foundation.Time.Types Associated Types
type PrimSize Seconds |
Instance details Defined in Foundation.Time.Types type PrimSize Seconds = 8
Methods primSizeInBytes :: Proxy Seconds -> CountOf Word8 # primShiftToBytes :: Proxy Seconds -> Int # primBaUIndex :: ByteArray# -> Offset Seconds -> Seconds # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Seconds -> prim Seconds # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Seconds -> Seconds -> prim () # primAddrIndex :: Addr# -> Offset Seconds -> Seconds # primAddrRead :: PrimMonad prim => Addr# -> Offset Seconds -> prim Seconds # primAddrWrite :: PrimMonad prim => Addr# -> Offset Seconds -> Seconds -> prim () #
PrimType CChar |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize CChar |
Instance details Defined in Basement.PrimType type PrimSize CChar = 1
Methods primSizeInBytes :: Proxy CChar -> CountOf Word8 # primShiftToBytes :: Proxy CChar -> Int # primBaUIndex :: ByteArray# -> Offset CChar -> CChar # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset CChar -> prim CChar # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset CChar -> CChar -> prim () # primAddrIndex :: Addr# -> Offset CChar -> CChar # primAddrRead :: PrimMonad prim => Addr# -> Offset CChar -> prim CChar # primAddrWrite :: PrimMonad prim => Addr# -> Offset CChar -> CChar -> prim () #
PrimType CUChar |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize CUChar |
Instance details Defined in Basement.PrimType type PrimSize CUChar = 1
Methods primSizeInBytes :: Proxy CUChar -> CountOf Word8 # primShiftToBytes :: Proxy CUChar -> Int # primBaUIndex :: ByteArray# -> Offset CUChar -> CUChar # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset CUChar -> prim CUChar # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset CUChar -> CUChar -> prim () # primAddrIndex :: Addr# -> Offset CUChar -> CUChar # primAddrRead :: PrimMonad prim => Addr# -> Offset CUChar -> prim CUChar # primAddrWrite :: PrimMonad prim => Addr# -> Offset CUChar -> CUChar -> prim () #
PrimType Int16 |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Int16 |
Instance details Defined in Basement.PrimType type PrimSize Int16 = 2
Methods primSizeInBytes :: Proxy Int16 -> CountOf Word8 # primShiftToBytes :: Proxy Int16 -> Int # primBaUIndex :: ByteArray# -> Offset Int16 -> Int16 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int16 -> prim Int16 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int16 -> Int16 -> prim () # primAddrIndex :: Addr# -> Offset Int16 -> Int16 # primAddrRead :: PrimMonad prim => Addr# -> Offset Int16 -> prim Int16 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Int16 -> Int16 -> prim () #
PrimType Int32 |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Int32 |
Instance details Defined in Basement.PrimType type PrimSize Int32 = 4
Methods primSizeInBytes :: Proxy Int32 -> CountOf Word8 # primShiftToBytes :: Proxy Int32 -> Int # primBaUIndex :: ByteArray# -> Offset Int32 -> Int32 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int32 -> prim Int32 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int32 -> Int32 -> prim () # primAddrIndex :: Addr# -> Offset Int32 -> Int32 # primAddrRead :: PrimMonad prim => Addr# -> Offset Int32 -> prim Int32 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Int32 -> Int32 -> prim () #
PrimType Int64 |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Int64 |
Instance details Defined in Basement.PrimType type PrimSize Int64 = 8
Methods primSizeInBytes :: Proxy Int64 -> CountOf Word8 # primShiftToBytes :: Proxy Int64 -> Int # primBaUIndex :: ByteArray# -> Offset Int64 -> Int64 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int64 -> prim Int64 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int64 -> Int64 -> prim () # primAddrIndex :: Addr# -> Offset Int64 -> Int64 # primAddrRead :: PrimMonad prim => Addr# -> Offset Int64 -> prim Int64 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Int64 -> Int64 -> prim () #
PrimType Int8 |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Int8 |
Instance details Defined in Basement.PrimType type PrimSize Int8 = 1
Methods primSizeInBytes :: Proxy Int8 -> CountOf Word8 # primShiftToBytes :: Proxy Int8 -> Int # primBaUIndex :: ByteArray# -> Offset Int8 -> Int8 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int8 -> prim Int8 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int8 -> Int8 -> prim () # primAddrIndex :: Addr# -> Offset Int8 -> Int8 # primAddrRead :: PrimMonad prim => Addr# -> Offset Int8 -> prim Int8 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Int8 -> Int8 -> prim () #
PrimType Word16 |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Word16 |
Instance details Defined in Basement.PrimType type PrimSize Word16 = 2
Methods primSizeInBytes :: Proxy Word16 -> CountOf Word8 # primShiftToBytes :: Proxy Word16 -> Int # primBaUIndex :: ByteArray# -> Offset Word16 -> Word16 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word16 -> prim Word16 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word16 -> Word16 -> prim () # primAddrIndex :: Addr# -> Offset Word16 -> Word16 # primAddrRead :: PrimMonad prim => Addr# -> Offset Word16 -> prim Word16 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Word16 -> Word16 -> prim () #
PrimType Word32 |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Word32 |
Instance details Defined in Basement.PrimType type PrimSize Word32 = 4
Methods primSizeInBytes :: Proxy Word32 -> CountOf Word8 # primShiftToBytes :: Proxy Word32 -> Int # primBaUIndex :: ByteArray# -> Offset Word32 -> Word32 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word32 -> prim Word32 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word32 -> Word32 -> prim () # primAddrIndex :: Addr# -> Offset Word32 -> Word32 # primAddrRead :: PrimMonad prim => Addr# -> Offset Word32 -> prim Word32 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Word32 -> Word32 -> prim () #
PrimType Word64 |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Word64 |
Instance details Defined in Basement.PrimType type PrimSize Word64 = 8
Methods primSizeInBytes :: Proxy Word64 -> CountOf Word8 # primShiftToBytes :: Proxy Word64 -> Int # primBaUIndex :: ByteArray# -> Offset Word64 -> Word64 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word64 -> prim Word64 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word64 -> Word64 -> prim () # primAddrIndex :: Addr# -> Offset Word64 -> Word64 # primAddrRead :: PrimMonad prim => Addr# -> Offset Word64 -> prim Word64 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Word64 -> Word64 -> prim () #
PrimType Word8 |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Word8 |
Instance details Defined in Basement.PrimType type PrimSize Word8 = 1
Methods primSizeInBytes :: Proxy Word8 -> CountOf Word8 # primShiftToBytes :: Proxy Word8 -> Int # primBaUIndex :: ByteArray# -> Offset Word8 -> Word8 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word8 -> prim Word8 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word8 -> Word8 -> prim () # primAddrIndex :: Addr# -> Offset Word8 -> Word8 # primAddrRead :: PrimMonad prim => Addr# -> Offset Word8 -> prim Word8 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Word8 -> Word8 -> prim () #
PrimType Char |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Char |
Instance details Defined in Basement.PrimType type PrimSize Char = 4
Methods primSizeInBytes :: Proxy Char -> CountOf Word8 # primShiftToBytes :: Proxy Char -> Int # primBaUIndex :: ByteArray# -> Offset Char -> Char # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Char -> prim Char # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Char -> Char -> prim () # primAddrIndex :: Addr# -> Offset Char -> Char # primAddrRead :: PrimMonad prim => Addr# -> Offset Char -> prim Char # primAddrWrite :: PrimMonad prim => Addr# -> Offset Char -> Char -> prim () #
PrimType Double |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Double |
Instance details Defined in Basement.PrimType type PrimSize Double = 8
Methods primSizeInBytes :: Proxy Double -> CountOf Word8 # primShiftToBytes :: Proxy Double -> Int # primBaUIndex :: ByteArray# -> Offset Double -> Double # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Double -> prim Double # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Double -> Double -> prim () # primAddrIndex :: Addr# -> Offset Double -> Double # primAddrRead :: PrimMonad prim => Addr# -> Offset Double -> prim Double # primAddrWrite :: PrimMonad prim => Addr# -> Offset Double -> Double -> prim () #
PrimType Float |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Float |
Instance details Defined in Basement.PrimType type PrimSize Float = 4
Methods primSizeInBytes :: Proxy Float -> CountOf Word8 # primShiftToBytes :: Proxy Float -> Int # primBaUIndex :: ByteArray# -> Offset Float -> Float # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Float -> prim Float # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Float -> Float -> prim () # primAddrIndex :: Addr# -> Offset Float -> Float # primAddrRead :: PrimMonad prim => Addr# -> Offset Float -> prim Float # primAddrWrite :: PrimMonad prim => Addr# -> Offset Float -> Float -> prim () #
PrimType Int |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Int |
Instance details Defined in Basement.PrimType type PrimSize Int = 8
Methods primSizeInBytes :: Proxy Int -> CountOf Word8 # primShiftToBytes :: Proxy Int -> Int # primBaUIndex :: ByteArray# -> Offset Int -> Int # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int -> prim Int # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int -> Int -> prim () # primAddrIndex :: Addr# -> Offset Int -> Int # primAddrRead :: PrimMonad prim => Addr# -> Offset Int -> prim Int # primAddrWrite :: PrimMonad prim => Addr# -> Offset Int -> Int -> prim () #
PrimType Word |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Word |
Instance details Defined in Basement.PrimType type PrimSize Word = 8
Methods primSizeInBytes :: Proxy Word -> CountOf Word8 # primShiftToBytes :: Proxy Word -> Int # primBaUIndex :: ByteArray# -> Offset Word -> Word # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word -> prim Word # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word -> Word -> prim () # primAddrIndex :: Addr# -> Offset Word -> Word # primAddrRead :: PrimMonad prim => Addr# -> Offset Word -> prim Word # primAddrWrite :: PrimMonad prim => Addr# -> Offset Word -> Word -> prim () #
PrimType a => PrimType (BE a) |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize (BE a) |
Instance details Defined in Basement.PrimType type PrimSize (BE a) = PrimSize a
Methods primSizeInBytes :: Proxy (BE a) -> CountOf Word8 # primShiftToBytes :: Proxy (BE a) -> Int # primBaUIndex :: ByteArray# -> Offset (BE a) -> BE a # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset (BE a) -> prim (BE a) # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset (BE a) -> BE a -> prim () # primAddrIndex :: Addr# -> Offset (BE a) -> BE a # primAddrRead :: PrimMonad prim => Addr# -> Offset (BE a) -> prim (BE a) # primAddrWrite :: PrimMonad prim => Addr# -> Offset (BE a) -> BE a -> prim () #
PrimType a => PrimType (LE a) |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize (LE a) |
Instance details Defined in Basement.PrimType type PrimSize (LE a) = PrimSize a
Methods primSizeInBytes :: Proxy (LE a) -> CountOf Word8 # primShiftToBytes :: Proxy (LE a) -> Int # primBaUIndex :: ByteArray# -> Offset (LE a) -> LE a # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset (LE a) -> prim (LE a) # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset (LE a) -> LE a -> prim () # primAddrIndex :: Addr# -> Offset (LE a) -> LE a # primAddrRead :: PrimMonad prim => Addr# -> Offset (LE a) -> prim (LE a) # primAddrWrite :: PrimMonad prim => Addr# -> Offset (LE a) -> LE a -> prim () #

data Array a #

Array of a

#### Instances

Instances details

Mappable Array # |
Instance details Defined in Foundation.Collection.Mappable Methods traverse :: Applicative f => (a -> f b) -> Array a -> f (Array b) # sequenceA :: Applicative f => Array (f a) -> f (Array a) # mapM :: (Applicative m, Monad m) => (a -> m b) -> Array a -> m (Array b) # sequence :: (Applicative m, Monad m) => Array (m a) -> m (Array a) #
Functor Array |
Instance details Defined in Basement.BoxedArray Methods fmap :: (a -> b) -> Array a -> Array b # (<$) :: a -> Array b -> Array a #
NormalForm a => NormalForm (Array a) |
Instance details Defined in Basement.BoxedArray Methods toNormalForm :: Array a -> () #
Buildable (Array ty) # |
Instance details Defined in Foundation.Collection.Buildable Associated Types
type Mutable (Array ty) |
Instance details Defined in Foundation.Collection.Buildable type Mutable (Array ty) = MArray ty
type Step (Array ty) |
Instance details Defined in Foundation.Collection.Buildable type Step (Array ty) = ty
Methods append :: forall (prim :: Type -> Type) err. PrimMonad prim => Element (Array ty) -> Builder (Array ty) (Mutable (Array ty)) (Step (Array ty)) prim err () # build :: PrimMonad prim => Int -> Builder (Array ty) (Mutable (Array ty)) (Step (Array ty)) prim err () -> prim (Either err (Array ty)) #
Collection (Array ty) # |
Instance details Defined in Foundation.Collection.Collection Methods null :: Array ty -> Bool # length :: Array ty -> CountOf (Element (Array ty)) # elem :: (Eq a, a ~ Element (Array ty)) => Element (Array ty) -> Array ty -> Bool # notElem :: (Eq a, a ~ Element (Array ty)) => Element (Array ty) -> Array ty -> Bool # maximum :: (Ord a, a ~ Element (Array ty)) => NonEmpty (Array ty) -> Element (Array ty) # minimum :: (Ord a, a ~ Element (Array ty)) => NonEmpty (Array ty) -> Element (Array ty) # any :: (Element (Array ty) -> Bool) -> Array ty -> Bool # all :: (Element (Array ty) -> Bool) -> Array ty -> Bool #
Copy (Array ty) # |
Instance details Defined in Foundation.Collection.Copy Methods copy :: Array ty -> Array ty #
Fold1able (Array ty) # |
Instance details Defined in Foundation.Collection.Foldable Methods foldl1' :: (Element (Array ty) -> Element (Array ty) -> Element (Array ty)) -> NonEmpty (Array ty) -> Element (Array ty) # foldr1 :: (Element (Array ty) -> Element (Array ty) -> Element (Array ty)) -> NonEmpty (Array ty) -> Element (Array ty) #
Foldable (Array ty) # |
Instance details Defined in Foundation.Collection.Foldable Methods foldl' :: (a -> Element (Array ty) -> a) -> a -> Array ty -> a # foldr :: (Element (Array ty) -> a -> a) -> a -> Array ty -> a # foldr' :: (Element (Array ty) -> a -> a) -> a -> Array ty -> a #
IndexedCollection (Array ty) # |
Instance details Defined in Foundation.Collection.Indexed Methods (!) :: Array ty -> Offset (Element (Array ty)) -> Maybe (Element (Array ty)) # findIndex :: (Element (Array ty) -> Bool) -> Array ty -> Maybe (Offset (Element (Array ty))) #
InnerFunctor (Array ty) # |
Instance details Defined in Foundation.Collection.InnerFunctor Methods imap :: (Element (Array ty) -> Element (Array ty)) -> Array ty -> Array ty #
Sequential (Array ty) # |
Instance details Defined in Foundation.Collection.Sequential Methods take :: CountOf (Element (Array ty)) -> Array ty -> Array ty # revTake :: CountOf (Element (Array ty)) -> Array ty -> Array ty # drop :: CountOf (Element (Array ty)) -> Array ty -> Array ty # revDrop :: CountOf (Element (Array ty)) -> Array ty -> Array ty # splitAt :: CountOf (Element (Array ty)) -> Array ty -> (Array ty, Array ty) # revSplitAt :: CountOf (Element (Array ty)) -> Array ty -> (Array ty, Array ty) # splitOn :: (Element (Array ty) -> Bool) -> Array ty -> [Array ty] # break :: (Element (Array ty) -> Bool) -> Array ty -> (Array ty, Array ty) # breakEnd :: (Element (Array ty) -> Bool) -> Array ty -> (Array ty, Array ty) # breakElem :: Element (Array ty) -> Array ty -> (Array ty, Array ty) # takeWhile :: (Element (Array ty) -> Bool) -> Array ty -> Array ty # dropWhile :: (Element (Array ty) -> Bool) -> Array ty -> Array ty # intersperse :: Element (Array ty) -> Array ty -> Array ty # intercalate :: Element (Array ty) -> Array ty -> Element (Array ty) # span :: (Element (Array ty) -> Bool) -> Array ty -> (Array ty, Array ty) # spanEnd :: (Element (Array ty) -> Bool) -> Array ty -> (Array ty, Array ty) # filter :: (Element (Array ty) -> Bool) -> Array ty -> Array ty # partition :: (Element (Array ty) -> Bool) -> Array ty -> (Array ty, Array ty) # reverse :: Array ty -> Array ty # uncons :: Array ty -> Maybe (Element (Array ty), Array ty) # unsnoc :: Array ty -> Maybe (Array ty, Element (Array ty)) # snoc :: Array ty -> Element (Array ty) -> Array ty # cons :: Element (Array ty) -> Array ty -> Array ty # find :: (Element (Array ty) -> Bool) -> Array ty -> Maybe (Element (Array ty)) # sortBy :: (Element (Array ty) -> Element (Array ty) -> Ordering) -> Array ty -> Array ty # singleton :: Element (Array ty) -> Array ty # head :: NonEmpty (Array ty) -> Element (Array ty) # last :: NonEmpty (Array ty) -> Element (Array ty) # tail :: NonEmpty (Array ty) -> Array ty # init :: NonEmpty (Array ty) -> Array ty # replicate :: CountOf (Element (Array ty)) -> Element (Array ty) -> Array ty # isPrefixOf :: Array ty -> Array ty -> Bool # isSuffixOf :: Array ty -> Array ty -> Bool # isInfixOf :: Array ty -> Array ty -> Bool # stripPrefix :: Array ty -> Array ty -> Maybe (Array ty) # stripSuffix :: Array ty -> Array ty -> Maybe (Array ty) #
BoxedZippable (Array ty) # |
Instance details Defined in Foundation.Collection.Zippable Methods zip :: (Sequential a, Sequential b, Element (Array ty) ~ (Element a, Element b)) => a -> b -> Array ty # zip3 :: (Sequential a, Sequential b, Sequential c, Element (Array ty) ~ (Element a, Element b, Element c)) => a -> b -> c -> Array ty # zip4 :: (Sequential a, Sequential b, Sequential c, Sequential d, Element (Array ty) ~ (Element a, Element b, Element c, Element d)) => a -> b -> c -> d -> Array ty # zip5 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Element (Array ty) ~ (Element a, Element b, Element c, Element d, Element e)) => a -> b -> c -> d -> e -> Array ty # zip6 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Element (Array ty) ~ (Element a, Element b, Element c, Element d, Element e, Element f)) => a -> b -> c -> d -> e -> f -> Array ty # zip7 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Sequential g, Element (Array ty) ~ (Element a, Element b, Element c, Element d, Element e, Element f, Element g)) => a -> b -> c -> d -> e -> f -> g -> Array ty # unzip :: (Sequential a, Sequential b, Element (Array ty) ~ (Element a, Element b)) => Array ty -> (a, b) # unzip3 :: (Sequential a, Sequential b, Sequential c, Element (Array ty) ~ (Element a, Element b, Element c)) => Array ty -> (a, b, c) # unzip4 :: (Sequential a, Sequential b, Sequential c, Sequential d, Element (Array ty) ~ (Element a, Element b, Element c, Element d)) => Array ty -> (a, b, c, d) # unzip5 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Element (Array ty) ~ (Element a, Element b, Element c, Element d, Element e)) => Array ty -> (a, b, c, d, e) # unzip6 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Element (Array ty) ~ (Element a, Element b, Element c, Element d, Element e, Element f)) => Array ty -> (a, b, c, d, e, f) # unzip7 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Sequential g, Element (Array ty) ~ (Element a, Element b, Element c, Element d, Element e, Element f, Element g)) => Array ty -> (a, b, c, d, e, f, g) #
Zippable (Array ty) # |
Instance details Defined in Foundation.Collection.Zippable Methods zipWith :: (Sequential a, Sequential b) => (Element a -> Element b -> Element (Array ty)) -> a -> b -> Array ty # zipWith3 :: (Sequential a, Sequential b, Sequential c) => (Element a -> Element b -> Element c -> Element (Array ty)) -> a -> b -> c -> Array ty # zipWith4 :: (Sequential a, Sequential b, Sequential c, Sequential d) => (Element a -> Element b -> Element c -> Element d -> Element (Array ty)) -> a -> b -> c -> d -> Array ty # zipWith5 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element (Array ty)) -> a -> b -> c -> d -> e -> Array ty # zipWith6 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element f -> Element (Array ty)) -> a -> b -> c -> d -> e -> f -> Array ty # zipWith7 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Sequential g) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element f -> Element g -> Element (Array ty)) -> a -> b -> c -> d -> e -> f -> g -> Array ty #
Hashable a => Hashable (Array a) # |
Instance details Defined in Foundation.Hashing.Hashable Methods hashMix :: Hasher st => Array a -> st -> st #
Monoid (Array a) |
Instance details Defined in Basement.BoxedArray Methods mempty :: Array a # mappend :: Array a -> Array a -> Array a # mconcat :: [Array a] -> Array a #
Semigroup (Array a) |
Instance details Defined in Basement.BoxedArray Methods (<>) :: Array a -> Array a -> Array a # sconcat :: NonEmpty (Array a) -> Array a # stimes :: Integral b => b -> Array a -> Array a #
Data ty => Data (Array ty) |
Instance details Defined in Basement.BoxedArray Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Array ty -> c (Array ty) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Array ty) # toConstr :: Array ty -> Constr # dataTypeOf :: Array ty -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Array ty)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Array ty)) # gmapT :: (forall b. Data b => b -> b) -> Array ty -> Array ty # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Array ty -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Array ty -> r # gmapQ :: (forall d. Data d => d -> u) -> Array ty -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Array ty -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Array ty -> m (Array ty) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Array ty -> m (Array ty) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Array ty -> m (Array ty) #
IsList (Array ty) |
Instance details Defined in Basement.BoxedArray Associated Types
type Item (Array ty) |
Instance details Defined in Basement.BoxedArray type Item (Array ty) = ty
Methods fromList :: [Item (Array ty)] -> Array ty # fromListN :: Int -> [Item (Array ty)] -> Array ty # toList :: Array ty -> [Item (Array ty)] #
Show a => Show (Array a) |
Instance details Defined in Basement.BoxedArray Methods showsPrec :: Int -> Array a -> ShowS # show :: Array a -> String # showList :: [Array a] -> ShowS #
Eq a => Eq (Array a) |
Instance details Defined in Basement.BoxedArray Methods (==) :: Array a -> Array a -> Bool # (/=) :: Array a -> Array a -> Bool #
Ord a => Ord (Array a) |
Instance details Defined in Basement.BoxedArray Methods compare :: Array a -> Array a -> Ordering # (<) :: Array a -> Array a -> Bool # (<=) :: Array a -> Array a -> Bool # (>) :: Array a -> Array a -> Bool # (>=) :: Array a -> Array a -> Bool # max :: Array a -> Array a -> Array a # min :: Array a -> Array a -> Array a #
PrimType ty => From (Array ty) (Block ty) |
Instance details Defined in Basement.From Methods from :: Array ty -> Block ty #
PrimType ty => From (Array ty) (UArray ty) |
Instance details Defined in Basement.From Methods from :: Array ty -> UArray ty #
PrimType ty => From (UArray ty) (Array ty) |
Instance details Defined in Basement.From Methods from :: UArray ty -> Array ty #
(NatWithinBound (CountOf ty) n, KnownNat n, PrimType ty) => TryFrom (Array ty) (BlockN n ty) |
Instance details Defined in Basement.From Methods tryFrom :: Array ty -> Maybe (BlockN n ty) #
(NatWithinBound Int n, PrimType ty) => From (BlockN n ty) (Array ty) |
Instance details Defined in Basement.From Methods from :: BlockN n ty -> Array ty #
type Mutable (Array ty) # |
Instance details Defined in Foundation.Collection.Buildable type Mutable (Array ty) = MArray ty
type Step (Array ty) # |
Instance details Defined in Foundation.Collection.Buildable type Step (Array ty) = ty
type Element (Array ty) # |
Instance details Defined in Foundation.Collection.Element type Element (Array ty) = ty
type Item (Array ty) |
Instance details Defined in Basement.BoxedArray type Item (Array ty) = ty

data String #

Opaque packed array of characters in the UTF8 encoding

#### Instances

Instances details

NormalForm String |
Instance details Defined in Basement.UTF8.Base Methods toNormalForm :: String -> () #
Arbitrary String # |
Instance details Defined in Foundation.Check.Arbitrary Methods arbitrary :: Gen String #
Buildable String # |
Instance details Defined in Foundation.Collection.Buildable Associated Types
type Mutable String |
Instance details Defined in Foundation.Collection.Buildable type Mutable String = MutableString
type Step String |
Instance details Defined in Foundation.Collection.Buildable type Step String = Word8
Methods append :: forall (prim :: Type -> Type) err. PrimMonad prim => Element String -> Builder String (Mutable String) (Step String) prim err () # build :: PrimMonad prim => Int -> Builder String (Mutable String) (Step String) prim err () -> prim (Either err String) #
Collection String # |
Instance details Defined in Foundation.Collection.Collection Methods null :: String -> Bool # length :: String -> CountOf (Element String) # elem :: (Eq a, a ~ Element String) => Element String -> String -> Bool # notElem :: (Eq a, a ~ Element String) => Element String -> String -> Bool # maximum :: (Ord a, a ~ Element String) => NonEmpty String -> Element String # minimum :: (Ord a, a ~ Element String) => NonEmpty String -> Element String # any :: (Element String -> Bool) -> String -> Bool # all :: (Element String -> Bool) -> String -> Bool #
Copy String # |
Instance details Defined in Foundation.Collection.Copy Methods copy :: String -> String #
IndexedCollection String # |
Instance details Defined in Foundation.Collection.Indexed Methods (!) :: String -> Offset (Element String) -> Maybe (Element String) # findIndex :: (Element String -> Bool) -> String -> Maybe (Offset (Element String)) #
InnerFunctor String # |
Instance details Defined in Foundation.Collection.InnerFunctor Methods imap :: (Element String -> Element String) -> String -> String #
Sequential String # |
Instance details Defined in Foundation.Collection.Sequential Methods take :: CountOf (Element String) -> String -> String # revTake :: CountOf (Element String) -> String -> String # drop :: CountOf (Element String) -> String -> String # revDrop :: CountOf (Element String) -> String -> String # splitAt :: CountOf (Element String) -> String -> (String, String) # revSplitAt :: CountOf (Element String) -> String -> (String, String) # splitOn :: (Element String -> Bool) -> String -> [String] # break :: (Element String -> Bool) -> String -> (String, String) # breakEnd :: (Element String -> Bool) -> String -> (String, String) # breakElem :: Element String -> String -> (String, String) # takeWhile :: (Element String -> Bool) -> String -> String # dropWhile :: (Element String -> Bool) -> String -> String # intersperse :: Element String -> String -> String # intercalate :: Element String -> String -> Element String # span :: (Element String -> Bool) -> String -> (String, String) # spanEnd :: (Element String -> Bool) -> String -> (String, String) # filter :: (Element String -> Bool) -> String -> String # partition :: (Element String -> Bool) -> String -> (String, String) # reverse :: String -> String # uncons :: String -> Maybe (Element String, String) # unsnoc :: String -> Maybe (String, Element String) # snoc :: String -> Element String -> String # cons :: Element String -> String -> String # find :: (Element String -> Bool) -> String -> Maybe (Element String) # sortBy :: (Element String -> Element String -> Ordering) -> String -> String # singleton :: Element String -> String # head :: NonEmpty String -> Element String # last :: NonEmpty String -> Element String # tail :: NonEmpty String -> String # init :: NonEmpty String -> String # replicate :: CountOf (Element String) -> Element String -> String # isPrefixOf :: String -> String -> Bool # isSuffixOf :: String -> String -> Bool # isInfixOf :: String -> String -> Bool # stripPrefix :: String -> String -> Maybe String # stripSuffix :: String -> String -> Maybe String #
Zippable String # |
Instance details Defined in Foundation.Collection.Zippable Methods zipWith :: (Sequential a, Sequential b) => (Element a -> Element b -> Element String) -> a -> b -> String # zipWith3 :: (Sequential a, Sequential b, Sequential c) => (Element a -> Element b -> Element c -> Element String) -> a -> b -> c -> String # zipWith4 :: (Sequential a, Sequential b, Sequential c, Sequential d) => (Element a -> Element b -> Element c -> Element d -> Element String) -> a -> b -> c -> d -> String # zipWith5 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element String) -> a -> b -> c -> d -> e -> String # zipWith6 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element f -> Element String) -> a -> b -> c -> d -> e -> f -> String # zipWith7 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Sequential g) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element f -> Element g -> Element String) -> a -> b -> c -> d -> e -> f -> g -> String #
IsField String # |
Instance details Defined in Foundation.Format.CSV.Types Methods toField :: String -> Field # fromField :: Field -> Either String String #
Hashable String # |
Instance details Defined in Foundation.Hashing.Hashable Methods hashMix :: Hasher st => String -> st -> st #
ParserSource String # |
Instance details Defined in Foundation.Parser Associated Types
type Chunk String |
Instance details Defined in Foundation.Parser type Chunk String = String
Methods nullChunk :: String -> Chunk String -> Bool # appendChunk :: String -> Chunk String -> String # subChunk :: String -> Offset (Element String) -> CountOf (Element String) -> Chunk String # spanChunk :: String -> Offset (Element String) -> (Element String -> Bool) -> (Chunk String, Offset (Element String)) #
Monoid String |
Instance details Defined in Basement.UTF8.Base Methods mempty :: String # mappend :: String -> String -> String # mconcat :: [String] -> String #
Semigroup String |
Instance details Defined in Basement.UTF8.Base Methods (<>) :: String -> String -> String # sconcat :: NonEmpty String -> String # stimes :: Integral b => b -> String -> String #
Data String |
Instance details Defined in Basement.UTF8.Base Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> String -> c String # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c String # toConstr :: String -> Constr # dataTypeOf :: String -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c String) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c String) # gmapT :: (forall b. Data b => b -> b) -> String -> String # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> String -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> String -> r # gmapQ :: (forall d. Data d => d -> u) -> String -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> String -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> String -> m String # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> String -> m String # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> String -> m String #
IsString String |
Instance details Defined in Basement.UTF8.Base Methods fromString :: String -> String #
IsList String |
Instance details Defined in Basement.UTF8.Base Associated Types
type Item String |
Instance details Defined in Basement.UTF8.Base type Item String = Char
Methods fromList :: [Item String] -> String # fromListN :: Int -> [Item String] -> String # toList :: String -> [Item String] #
Show String |
Instance details Defined in Basement.UTF8.Base Methods showsPrec :: Int -> String -> ShowS # show :: String -> String # showList :: [String] -> ShowS #
Eq String |
Instance details Defined in Basement.UTF8.Base Methods (==) :: String -> String -> Bool # (/=) :: String -> String -> Bool #
Ord String |
Instance details Defined in Basement.UTF8.Base Methods compare :: String -> String -> Ordering # (<) :: String -> String -> Bool # (<=) :: String -> String -> Bool # (>) :: String -> String -> Bool # (>=) :: String -> String -> Bool # max :: String -> String -> String # min :: String -> String -> String #
From AsciiString String |
Instance details Defined in Basement.From Methods from :: AsciiString -> String #
From String (UArray Word8) |
Instance details Defined in Basement.From Methods from :: String -> UArray Word8 #
Show (ParseError String) # |
Instance details Defined in Foundation.Parser Methods showsPrec :: Int -> ParseError String -> ShowS # show :: ParseError String -> String # showList :: [ParseError String] -> ShowS #
TryFrom (UArray Word8) String |
Instance details Defined in Basement.From Methods tryFrom :: UArray Word8 -> Maybe String #
IsProperty (String, Bool) # |
Instance details Defined in Foundation.Check.Property Methods property :: (String, Bool) -> Property #
type Mutable String # |
Instance details Defined in Foundation.Collection.Buildable type Mutable String = MutableString
type Step String # |
Instance details Defined in Foundation.Collection.Buildable type Step String = Word8
type Element String # |
Instance details Defined in Foundation.Collection.Element type Element String = Char
type Chunk String # |
Instance details Defined in Foundation.Parser type Chunk String = String
type Item String |
Instance details Defined in Basement.UTF8.Base type Item String = Char

## Numeric functions

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

raise a number to an integral power

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

General coercion from `Integral` types.

WARNING: This function performs silent truncation if the result type is not at least as big as the argument's type.

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

General coercion to `Fractional` types.

WARNING: This function goes through the `Rational` type, which does not have values for `NaN` for example. This means it does not round-trip.

For `Double` it also behaves differently with or without -O0:

    Prelude> realToFrac nan -- With -O0
    -Infinity
    Prelude> realToFrac nan
    NaN

## Monoids

class Semigroup a #

The class of semigroups (types with an associative binary operation).

Instances should satisfy the following:

Associativity
  `x `<>` (y `<>` z) = (x `<>` y) `<>` z`

You can alternatively define `sconcat` instead of (`<>`), in which case the laws are:

Unit
  ``sconcat` (`pure` x) = x`
Multiplication
  ``sconcat` (`join` xss) = `sconcat` (`fmap` `sconcat` xss)`

@since base-4.9.0.0

Minimal complete definition

(<>) | sconcat

#### Instances

Instances details

Semigroup ByteArray | Since: base-4.17.0.0
Instance details Defined in Data.Array.Byte Methods (<>) :: ByteArray -> ByteArray -> ByteArray # sconcat :: NonEmpty ByteArray -> ByteArray # stimes :: Integral b => b -> ByteArray -> ByteArray #
Semigroup Builder |
Instance details Defined in Basement.Block.Builder Methods (<>) :: Builder -> Builder -> Builder # sconcat :: NonEmpty Builder -> Builder # stimes :: Integral b => b -> Builder -> Builder #
Semigroup Builder |
Instance details Defined in Basement.String.Builder Methods (<>) :: Builder -> Builder -> Builder # sconcat :: NonEmpty Builder -> Builder # stimes :: Integral b => b -> Builder -> Builder #
Semigroup AsciiString |
Instance details Defined in Basement.Types.AsciiString Methods (<>) :: AsciiString -> AsciiString -> AsciiString # sconcat :: NonEmpty AsciiString -> AsciiString # stimes :: Integral b => b -> AsciiString -> AsciiString #
Semigroup String |
Instance details Defined in Basement.UTF8.Base Methods (<>) :: String -> String -> String # sconcat :: NonEmpty String -> String # stimes :: Integral b => b -> String -> String #
Semigroup Bitmap # |
Instance details Defined in Foundation.Array.Bitmap Methods (<>) :: Bitmap -> Bitmap -> Bitmap # sconcat :: NonEmpty Bitmap -> Bitmap # stimes :: Integral b => b -> Bitmap -> Bitmap #
Semigroup CSV # |
Instance details Defined in Foundation.Format.CSV.Types Methods (<>) :: CSV -> CSV -> CSV # sconcat :: NonEmpty CSV -> CSV # stimes :: Integral b => b -> CSV -> CSV #
Semigroup Row # |
Instance details Defined in Foundation.Format.CSV.Types Methods (<>) :: Row -> Row -> Row # sconcat :: NonEmpty Row -> Row # stimes :: Integral b => b -> Row -> Row #
Semigroup FileName # |
Instance details Defined in Foundation.VFS.FilePath Methods (<>) :: FileName -> FileName -> FileName # sconcat :: NonEmpty FileName -> FileName # stimes :: Integral b => b -> FileName -> FileName #
Semigroup Void | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Base Methods (<>) :: Void -> Void -> Void # sconcat :: NonEmpty Void -> Void # stimes :: Integral b => b -> Void -> Void #
Semigroup All | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods (<>) :: All -> All -> All # sconcat :: NonEmpty All -> All # stimes :: Integral b => b -> All -> All #
Semigroup Any | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods (<>) :: Any -> Any -> Any # sconcat :: NonEmpty Any -> Any # stimes :: Integral b => b -> Any -> Any #
Semigroup Ordering | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Base Methods (<>) :: Ordering -> Ordering -> Ordering # sconcat :: NonEmpty Ordering -> Ordering # stimes :: Integral b => b -> Ordering -> Ordering #
Semigroup () | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Base Methods (<>) :: () -> () -> () # sconcat :: NonEmpty () -> () # stimes :: Integral b => b -> () -> () #
Semigroup (FromMaybe b) |
Instance details Defined in Data.Foldable1 Methods (<>) :: FromMaybe b -> FromMaybe b -> FromMaybe b # sconcat :: NonEmpty (FromMaybe b) -> FromMaybe b # stimes :: Integral b0 => b0 -> FromMaybe b -> FromMaybe b #
Semigroup a => Semigroup (JoinWith a) |
Instance details Defined in Data.Foldable1 Methods (<>) :: JoinWith a -> JoinWith a -> JoinWith a # sconcat :: NonEmpty (JoinWith a) -> JoinWith a # stimes :: Integral b => b -> JoinWith a -> JoinWith a #
Semigroup (NonEmptyDList a) |
Instance details Defined in Data.Foldable1 Methods (<>) :: NonEmptyDList a -> NonEmptyDList a -> NonEmptyDList a # sconcat :: NonEmpty (NonEmptyDList a) -> NonEmptyDList a # stimes :: Integral b => b -> NonEmptyDList a -> NonEmptyDList a #
Semigroup (Comparison a) | `(`<>`)` on comparisons combines results with `(`<>`) @Ordering`. Without newtypes this equals ``liftA2` (`liftA2` (`<>`))`.
    (<>) :: Comparison a -> Comparison a -> Comparison a
    Comparison cmp <> Comparison cmp' = Comparison a a' ->
      cmp a a' <> cmp a a'
Instance details Defined in Data.Functor.Contravariant Methods (<>) :: Comparison a -> Comparison a -> Comparison a # sconcat :: NonEmpty (Comparison a) -> Comparison a # stimes :: Integral b => b -> Comparison a -> Comparison a #
Semigroup (Equivalence a) | `(`<>`)` on equivalences uses logical conjunction `(`&&`)` on the results. Without newtypes this equals ``liftA2` (`liftA2` (&&))`.
    (<>) :: Equivalence a -> Equivalence a -> Equivalence a
    Equivalence equiv <> Equivalence equiv' = Equivalence a b ->
      equiv a b && equiv' a b
Instance details Defined in Data.Functor.Contravariant Methods (<>) :: Equivalence a -> Equivalence a -> Equivalence a # sconcat :: NonEmpty (Equivalence a) -> Equivalence a # stimes :: Integral b => b -> Equivalence a -> Equivalence a #
Semigroup (Predicate a) | `(`<>`)` on predicates uses logical conjunction `(`&&`)` on the results. Without newtypes this equals ``liftA2` (&&)`.
    (<>) :: Predicate a -> Predicate a -> Predicate a
    Predicate pred <> Predicate pred' = Predicate a ->
      pred a && pred' a
Instance details Defined in Data.Functor.Contravariant Methods (<>) :: Predicate a -> Predicate a -> Predicate a # sconcat :: NonEmpty (Predicate a) -> Predicate a # stimes :: Integral b => b -> Predicate a -> Predicate a #
Semigroup (First a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods (<>) :: First a -> First a -> First a # sconcat :: NonEmpty (First a) -> First a # stimes :: Integral b => b -> First a -> First a #
Semigroup (Last a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods (<>) :: Last a -> Last a -> Last a # sconcat :: NonEmpty (Last a) -> Last a # stimes :: Integral b => b -> Last a -> Last a #
Ord a => Semigroup (Max a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods (<>) :: Max a -> Max a -> Max a # sconcat :: NonEmpty (Max a) -> Max a # stimes :: Integral b => b -> Max a -> Max a #
Ord a => Semigroup (Min a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods (<>) :: Min a -> Min a -> Min a # sconcat :: NonEmpty (Min a) -> Min a # stimes :: Integral b => b -> Min a -> Min a #
Monoid m => Semigroup (WrappedMonoid m) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods (<>) :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m # sconcat :: NonEmpty (WrappedMonoid m) -> WrappedMonoid m # stimes :: Integral b => b -> WrappedMonoid m -> WrappedMonoid m #
PrimType ty => Semigroup (Block ty) |
Instance details Defined in Basement.Block.Base Methods (<>) :: Block ty -> Block ty -> Block ty # sconcat :: NonEmpty (Block ty) -> Block ty # stimes :: Integral b => b -> Block ty -> Block ty #
Semigroup (Array a) |
Instance details Defined in Basement.BoxedArray Methods (<>) :: Array a -> Array a -> Array a # sconcat :: NonEmpty (Array a) -> Array a # stimes :: Integral b => b -> Array a -> Array a #
Semigroup (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize Methods (<>) :: CountOf ty -> CountOf ty -> CountOf ty # sconcat :: NonEmpty (CountOf ty) -> CountOf ty # stimes :: Integral b => b -> CountOf ty -> CountOf ty #
PrimType ty => Semigroup (UArray ty) |
Instance details Defined in Basement.UArray.Base Methods (<>) :: UArray ty -> UArray ty -> UArray ty # sconcat :: NonEmpty (UArray ty) -> UArray ty # stimes :: Integral b => b -> UArray ty -> UArray ty #
Semigroup (ChunkedUArray a) # |
Instance details Defined in Foundation.Array.Chunked.Unboxed Methods (<>) :: ChunkedUArray a -> ChunkedUArray a -> ChunkedUArray a # sconcat :: NonEmpty (ChunkedUArray a) -> ChunkedUArray a # stimes :: Integral b => b -> ChunkedUArray a -> ChunkedUArray a #
Semigroup (DList a) # |
Instance details Defined in Foundation.List.DList Methods (<>) :: DList a -> DList a -> DList a # sconcat :: NonEmpty (DList a) -> DList a # stimes :: Integral b => b -> DList a -> DList a #
Semigroup (NonEmpty a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Base Methods (<>) :: NonEmpty a -> NonEmpty a -> NonEmpty a # sconcat :: NonEmpty (NonEmpty a) -> NonEmpty a # stimes :: Integral b => b -> NonEmpty a -> NonEmpty a #
Semigroup a => Semigroup (STM a) | @since base-4.17.0.0
Instance details Defined in GHC.Internal.Conc.Sync Methods (<>) :: STM a -> STM a -> STM a # sconcat :: NonEmpty (STM a) -> STM a # stimes :: Integral b => b -> STM a -> STM a #
Semigroup a => Semigroup (Identity a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Functor.Identity Methods (<>) :: Identity a -> Identity a -> Identity a # sconcat :: NonEmpty (Identity a) -> Identity a # stimes :: Integral b => b -> Identity a -> Identity a #
Semigroup (First a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Monoid Methods (<>) :: First a -> First a -> First a # sconcat :: NonEmpty (First a) -> First a # stimes :: Integral b => b -> First a -> First a #
Semigroup (Last a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Monoid Methods (<>) :: Last a -> Last a -> Last a # sconcat :: NonEmpty (Last a) -> Last a # stimes :: Integral b => b -> Last a -> Last a #
Semigroup a => Semigroup (Dual a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods (<>) :: Dual a -> Dual a -> Dual a # sconcat :: NonEmpty (Dual a) -> Dual a # stimes :: Integral b => b -> Dual a -> Dual a #
Semigroup (Endo a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods (<>) :: Endo a -> Endo a -> Endo a # sconcat :: NonEmpty (Endo a) -> Endo a # stimes :: Integral b => b -> Endo a -> Endo a #
Num a => Semigroup (Product a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods (<>) :: Product a -> Product a -> Product a # sconcat :: NonEmpty (Product a) -> Product a # stimes :: Integral b => b -> Product a -> Product a #
Num a => Semigroup (Sum a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods (<>) :: Sum a -> Sum a -> Sum a # sconcat :: NonEmpty (Sum a) -> Sum a # stimes :: Integral b => b -> Sum a -> Sum a #
(Generic a, Semigroup (Rep a ())) => Semigroup (Generically a) | @since base-4.17.0.0
Instance details Defined in GHC.Internal.Generics Methods (<>) :: Generically a -> Generically a -> Generically a # sconcat :: NonEmpty (Generically a) -> Generically a # stimes :: Integral b => b -> Generically a -> Generically a #
Semigroup p => Semigroup (Par1 p) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Generics Methods (<>) :: Par1 p -> Par1 p -> Par1 p # sconcat :: NonEmpty (Par1 p) -> Par1 p # stimes :: Integral b => b -> Par1 p -> Par1 p #
Semigroup a => Semigroup (IO a) | @since base-4.10.0.0
Instance details Defined in GHC.Internal.Base Methods (<>) :: IO a -> IO a -> IO a # sconcat :: NonEmpty (IO a) -> IO a # stimes :: Integral b => b -> IO a -> IO a #
Semigroup a => Semigroup (Maybe a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Base Methods (<>) :: Maybe a -> Maybe a -> Maybe a # sconcat :: NonEmpty (Maybe a) -> Maybe a # stimes :: Integral b => b -> Maybe a -> Maybe a #
Semigroup a => Semigroup (Solo a) | @since base-4.15
Instance details Defined in GHC.Internal.Base Methods (<>) :: Solo a -> Solo a -> Solo a # sconcat :: NonEmpty (Solo a) -> Solo a # stimes :: Integral b => b -> Solo a -> Solo a #
Semigroup [a] | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Base Methods (<>) :: [a] -> [a] -> [a] # sconcat :: NonEmpty [a] -> [a] # stimes :: Integral b => b -> [a] -> [a] #
Semigroup a => Semigroup (Op a b) | `(`<>`) @(Op a b)` without newtypes is `(`<>`) @(b->a)` = `liftA2 (`<>`)`. This lifts the `Semigroup` operation `(`<>`)` over the output of `a`.
    (<>) :: Op a b -> Op a b -> Op a b
    Op f <> Op g = Op a -> f a <> g a
Instance details Defined in Data.Functor.Contravariant Methods (<>) :: Op a b -> Op a b -> Op a b # sconcat :: NonEmpty (Op a b) -> Op a b # stimes :: Integral b0 => b0 -> Op a b -> Op a b #
Semigroup (Either a b) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Either Methods (<>) :: Either a b -> Either a b -> Either a b # sconcat :: NonEmpty (Either a b) -> Either a b # stimes :: Integral b0 => b0 -> Either a b -> Either a b #
Semigroup (Proxy s) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Proxy Methods (<>) :: Proxy s -> Proxy s -> Proxy s # sconcat :: NonEmpty (Proxy s) -> Proxy s # stimes :: Integral b => b -> Proxy s -> Proxy s #
Semigroup (U1 p) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Generics Methods (<>) :: U1 p -> U1 p -> U1 p # sconcat :: NonEmpty (U1 p) -> U1 p # stimes :: Integral b => b -> U1 p -> U1 p #
Semigroup (V1 p) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Generics Methods (<>) :: V1 p -> V1 p -> V1 p # sconcat :: NonEmpty (V1 p) -> V1 p # stimes :: Integral b => b -> V1 p -> V1 p #
Semigroup a => Semigroup (ST s a) | @since base-4.11.0.0
Instance details Defined in GHC.Internal.ST Methods (<>) :: ST s a -> ST s a -> ST s a # sconcat :: NonEmpty (ST s a) -> ST s a # stimes :: Integral b => b -> ST s a -> ST s a #
(Semigroup a, Semigroup b) => Semigroup (a, b) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Base Methods (<>) :: (a, b) -> (a, b) -> (a, b) # sconcat :: NonEmpty (a, b) -> (a, b) # stimes :: Integral b0 => b0 -> (a, b) -> (a, b) #
Semigroup b => Semigroup (a -> b) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Base Methods (<>) :: (a -> b) -> (a -> b) -> a -> b # sconcat :: NonEmpty (a -> b) -> a -> b # stimes :: Integral b0 => b0 -> (a -> b) -> a -> b #
Semigroup a => Semigroup (Const a b) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Functor.Const Methods (<>) :: Const a b -> Const a b -> Const a b # sconcat :: NonEmpty (Const a b) -> Const a b # stimes :: Integral b0 => b0 -> Const a b -> Const a b #
(Applicative f, Semigroup a) => Semigroup (Ap f a) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Data.Monoid Methods (<>) :: Ap f a -> Ap f a -> Ap f a # sconcat :: NonEmpty (Ap f a) -> Ap f a # stimes :: Integral b => b -> Ap f a -> Ap f a #
Alternative f => Semigroup (Alt f a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods (<>) :: Alt f a -> Alt f a -> Alt f a # sconcat :: NonEmpty (Alt f a) -> Alt f a # stimes :: Integral b => b -> Alt f a -> Alt f a #
Semigroup (f p) => Semigroup (Rec1 f p) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Generics Methods (<>) :: Rec1 f p -> Rec1 f p -> Rec1 f p # sconcat :: NonEmpty (Rec1 f p) -> Rec1 f p # stimes :: Integral b => b -> Rec1 f p -> Rec1 f p #
(Semigroup a, Semigroup b, Semigroup c) => Semigroup (a, b, c) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Base Methods (<>) :: (a, b, c) -> (a, b, c) -> (a, b, c) # sconcat :: NonEmpty (a, b, c) -> (a, b, c) # stimes :: Integral b0 => b0 -> (a, b, c) -> (a, b, c) #
(Semigroup (f a), Semigroup (g a)) => Semigroup (Product f g a) | Since: base-4.16.0.0
Instance details Defined in Data.Functor.Product Methods (<>) :: Product f g a -> Product f g a -> Product f g a # sconcat :: NonEmpty (Product f g a) -> Product f g a # stimes :: Integral b => b -> Product f g a -> Product f g a #
(Semigroup (f p), Semigroup (g p)) => Semigroup ((f :*: g) p) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Generics Methods (<>) :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p # sconcat :: NonEmpty ((f :*: g) p) -> (f :*: g) p # stimes :: Integral b => b -> (f :*: g) p -> (f :*: g) p #
Semigroup c => Semigroup (K1 i c p) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Generics Methods (<>) :: K1 i c p -> K1 i c p -> K1 i c p # sconcat :: NonEmpty (K1 i c p) -> K1 i c p # stimes :: Integral b => b -> K1 i c p -> K1 i c p #
(Semigroup a, Semigroup b, Semigroup c, Semigroup d) => Semigroup (a, b, c, d) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Base Methods (<>) :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) # sconcat :: NonEmpty (a, b, c, d) -> (a, b, c, d) # stimes :: Integral b0 => b0 -> (a, b, c, d) -> (a, b, c, d) #
Semigroup (f (g a)) => Semigroup (Compose f g a) | Since: base-4.16.0.0
Instance details Defined in Data.Functor.Compose Methods (<>) :: Compose f g a -> Compose f g a -> Compose f g a # sconcat :: NonEmpty (Compose f g a) -> Compose f g a # stimes :: Integral b => b -> Compose f g a -> Compose f g a #
Semigroup (f (g p)) => Semigroup ((f :.: g) p) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Generics Methods (<>) :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p # sconcat :: NonEmpty ((f :.: g) p) -> (f :.: g) p # stimes :: Integral b => b -> (f :.: g) p -> (f :.: g) p #
Semigroup (f p) => Semigroup (M1 i c f p) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Generics Methods (<>) :: M1 i c f p -> M1 i c f p -> M1 i c f p # sconcat :: NonEmpty (M1 i c f p) -> M1 i c f p # stimes :: Integral b => b -> M1 i c f p -> M1 i c f p #
(Semigroup a, Semigroup b, Semigroup c, Semigroup d, Semigroup e) => Semigroup (a, b, c, d, e) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Base Methods (<>) :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) # sconcat :: NonEmpty (a, b, c, d, e) -> (a, b, c, d, e) # stimes :: Integral b0 => b0 -> (a, b, c, d, e) -> (a, b, c, d, e) #

class Semigroup a => Monoid a where #

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

Right identity
  `x `<>` `mempty` = x`
Left identity
  ``mempty` `<>` x = x`
Associativity
  `x `<>` (y `<>` z) = (x `<>` y) `<>` z` (`Semigroup` law)
Concatenation
  ``mconcat` = `foldr` (`<>`) `mempty``

You can alternatively define `mconcat` instead of `mempty`, in which case the laws are:

Unit
  ``mconcat` (`pure` x) = x`
Multiplication
  ``mconcat` (`join` xss) = `mconcat` (`fmap` `mconcat` xss)`
Subclass
  ``mconcat` (`toList` xs) = `sconcat` xs`

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

NOTE: `Semigroup` is a superclass of `Monoid` since base-4.11.0.0.

Minimal complete definition

mempty | mconcat

Methods

mempty :: a #

Identity of `mappend`

#### Examples

Expand

    >>> "Hello world" <> mempty
    "Hello world"

    >>> mempty <> [1, 2, 3]
    [1,2,3]

mappend :: a -> a -> a #

An associative operation

NOTE: This method is redundant and has the default implementation ``mappend` = (`<>`)` since base-4.11.0.0. Should it be implemented manually, since `mappend` is a synonym for (`<>`), it is expected that the two functions are defined the same way. In a future GHC release `mappend` will be removed from `Monoid`.

mconcat :: [a] -> a #

Fold a list using the monoid.

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

    >>> mconcat ["Hello", " ", "Haskell", "!"]
    "Hello Haskell!"

#### Instances

Instances details

Monoid ByteArray | Since: base-4.17.0.0
Instance details Defined in Data.Array.Byte Methods mempty :: ByteArray # mappend :: ByteArray -> ByteArray -> ByteArray # mconcat :: [ByteArray] -> ByteArray #
Monoid Builder |
Instance details Defined in Basement.Block.Builder Methods mempty :: Builder # mappend :: Builder -> Builder -> Builder # mconcat :: [Builder] -> Builder #
Monoid Builder |
Instance details Defined in Basement.String.Builder Methods mempty :: Builder # mappend :: Builder -> Builder -> Builder # mconcat :: [Builder] -> Builder #
Monoid AsciiString |
Instance details Defined in Basement.Types.AsciiString Methods mempty :: AsciiString # mappend :: AsciiString -> AsciiString -> AsciiString # mconcat :: [AsciiString] -> AsciiString #
Monoid String |
Instance details Defined in Basement.UTF8.Base Methods mempty :: String # mappend :: String -> String -> String # mconcat :: [String] -> String #
Monoid Bitmap # |
Instance details Defined in Foundation.Array.Bitmap Methods mempty :: Bitmap # mappend :: Bitmap -> Bitmap -> Bitmap # mconcat :: [Bitmap] -> Bitmap #
Monoid CSV # |
Instance details Defined in Foundation.Format.CSV.Types Methods mempty :: CSV # mappend :: CSV -> CSV -> CSV # mconcat :: [CSV] -> CSV #
Monoid Row # |
Instance details Defined in Foundation.Format.CSV.Types Methods mempty :: Row # mappend :: Row -> Row -> Row # mconcat :: [Row] -> Row #
Monoid FileName # |
Instance details Defined in Foundation.VFS.FilePath Methods mempty :: FileName # mappend :: FileName -> FileName -> FileName # mconcat :: [FileName] -> FileName #
Monoid All | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods mempty :: All # mappend :: All -> All -> All # mconcat :: [All] -> All #
Monoid Any | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods mempty :: Any # mappend :: Any -> Any -> Any # mconcat :: [Any] -> Any #
Monoid Ordering | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods mempty :: Ordering # mappend :: Ordering -> Ordering -> Ordering # mconcat :: [Ordering] -> Ordering #
Monoid () | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods mempty :: () # mappend :: () -> () -> () # mconcat :: [()] -> () #
Monoid (Comparison a) | ``mempty`` on comparisons always returns `EQ`. Without newtypes this equals ``pure` (`pure` EQ)`.
    mempty :: Comparison a
    mempty = Comparison _ _ -> EQ
Instance details Defined in Data.Functor.Contravariant Methods mempty :: Comparison a # mappend :: Comparison a -> Comparison a -> Comparison a # mconcat :: [Comparison a] -> Comparison a #
Monoid (Equivalence a) | ``mempty`` on equivalences always returns `True`. Without newtypes this equals ``pure` (`pure` True)`.
    mempty :: Equivalence a
    mempty = Equivalence _ _ -> True
Instance details Defined in Data.Functor.Contravariant Methods mempty :: Equivalence a # mappend :: Equivalence a -> Equivalence a -> Equivalence a # mconcat :: [Equivalence a] -> Equivalence a #
Monoid (Predicate a) | ``mempty`` on predicates always returns `True`. Without newtypes this equals ``pure` True`.
    mempty :: Predicate a
    mempty = _ -> True
Instance details Defined in Data.Functor.Contravariant Methods mempty :: Predicate a # mappend :: Predicate a -> Predicate a -> Predicate a # mconcat :: [Predicate a] -> Predicate a #
(Ord a, Bounded a) => Monoid (Max a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods mempty :: Max a # mappend :: Max a -> Max a -> Max a # mconcat :: [Max a] -> Max a #
(Ord a, Bounded a) => Monoid (Min a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods mempty :: Min a # mappend :: Min a -> Min a -> Min a # mconcat :: [Min a] -> Min a #
Monoid m => Monoid (WrappedMonoid m) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods mempty :: WrappedMonoid m # mappend :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m # mconcat :: [WrappedMonoid m] -> WrappedMonoid m #
PrimType ty => Monoid (Block ty) |
Instance details Defined in Basement.Block.Base Methods mempty :: Block ty # mappend :: Block ty -> Block ty -> Block ty # mconcat :: [Block ty] -> Block ty #
Monoid (Array a) |
Instance details Defined in Basement.BoxedArray Methods mempty :: Array a # mappend :: Array a -> Array a -> Array a # mconcat :: [Array a] -> Array a #
Monoid (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize Methods mempty :: CountOf ty # mappend :: CountOf ty -> CountOf ty -> CountOf ty # mconcat :: [CountOf ty] -> CountOf ty #
PrimType ty => Monoid (UArray ty) |
Instance details Defined in Basement.UArray.Base Methods mempty :: UArray ty # mappend :: UArray ty -> UArray ty -> UArray ty # mconcat :: [UArray ty] -> UArray ty #
Monoid (ChunkedUArray a) # |
Instance details Defined in Foundation.Array.Chunked.Unboxed Methods mempty :: ChunkedUArray a # mappend :: ChunkedUArray a -> ChunkedUArray a -> ChunkedUArray a # mconcat :: [ChunkedUArray a] -> ChunkedUArray a #
Monoid (DList a) # |
Instance details Defined in Foundation.List.DList Methods mempty :: DList a # mappend :: DList a -> DList a -> DList a # mconcat :: [DList a] -> DList a #
Monoid a => Monoid (STM a) | @since base-4.17.0.0
Instance details Defined in GHC.Internal.Conc.Sync Methods mempty :: STM a # mappend :: STM a -> STM a -> STM a # mconcat :: [STM a] -> STM a #
Monoid a => Monoid (Identity a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Functor.Identity Methods mempty :: Identity a # mappend :: Identity a -> Identity a -> Identity a # mconcat :: [Identity a] -> Identity a #
Monoid (First a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Monoid Methods mempty :: First a # mappend :: First a -> First a -> First a # mconcat :: [First a] -> First a #
Monoid (Last a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Monoid Methods mempty :: Last a # mappend :: Last a -> Last a -> Last a # mconcat :: [Last a] -> Last a #
Monoid a => Monoid (Dual a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods mempty :: Dual a # mappend :: Dual a -> Dual a -> Dual a # mconcat :: [Dual a] -> Dual a #
Monoid (Endo a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods mempty :: Endo a # mappend :: Endo a -> Endo a -> Endo a # mconcat :: [Endo a] -> Endo a #
Num a => Monoid (Product a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods mempty :: Product a # mappend :: Product a -> Product a -> Product a # mconcat :: [Product a] -> Product a #
Num a => Monoid (Sum a) | @since base-2.01
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods mempty :: Sum a # mappend :: Sum a -> Sum a -> Sum a # mconcat :: [Sum a] -> Sum a #
(Generic a, Monoid (Rep a ())) => Monoid (Generically a) | @since base-4.17.0.0
Instance details Defined in GHC.Internal.Generics Methods mempty :: Generically a # mappend :: Generically a -> Generically a -> Generically a # mconcat :: [Generically a] -> Generically a #
Monoid p => Monoid (Par1 p) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Generics Methods mempty :: Par1 p # mappend :: Par1 p -> Par1 p -> Par1 p # mconcat :: [Par1 p] -> Par1 p #
Monoid a => Monoid (IO a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Base Methods mempty :: IO a # mappend :: IO a -> IO a -> IO a # mconcat :: [IO a] -> IO a #
Semigroup 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 4.11.0: constraint on inner `a` value generalised from `Monoid` to `Semigroup`. @since base-2.01
Instance details Defined in GHC.Internal.Base Methods mempty :: Maybe a # mappend :: Maybe a -> Maybe a -> Maybe a # mconcat :: [Maybe a] -> Maybe a #
Monoid a => Monoid (Solo a) | @since base-4.15
Instance details Defined in GHC.Internal.Base Methods mempty :: Solo a # mappend :: Solo a -> Solo a -> Solo a # mconcat :: [Solo a] -> Solo a #
Monoid [a] | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods mempty :: [a] # mappend :: [a] -> [a] -> [a] # mconcat :: [[a]] -> [a] #
Monoid a => Monoid (Op a b) | ``mempty` @(Op a b)` without newtypes is `mempty @(b->a)` = `_ -> mempty`.
    mempty :: Op a b
    mempty = Op _ -> mempty
Instance details Defined in Data.Functor.Contravariant Methods mempty :: Op a b # mappend :: Op a b -> Op a b -> Op a b # mconcat :: [Op a b] -> Op a b #
Monoid (Proxy s) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Proxy Methods mempty :: Proxy s # mappend :: Proxy s -> Proxy s -> Proxy s # mconcat :: [Proxy s] -> Proxy s #
Monoid (U1 p) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Generics Methods mempty :: U1 p # mappend :: U1 p -> U1 p -> U1 p # mconcat :: [U1 p] -> U1 p #
Monoid a => Monoid (ST s a) | @since base-4.11.0.0
Instance details Defined in GHC.Internal.ST Methods mempty :: ST s a # mappend :: ST s a -> ST s a -> ST s a # mconcat :: [ST s a] -> ST s a #
(Monoid a, Monoid b) => Monoid (a, b) | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods mempty :: (a, b) # mappend :: (a, b) -> (a, b) -> (a, b) # mconcat :: [(a, b)] -> (a, b) #
Monoid b => Monoid (a -> b) | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods mempty :: a -> b # mappend :: (a -> b) -> (a -> b) -> a -> b # mconcat :: [a -> b] -> a -> b #
Monoid a => Monoid (Const a b) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Functor.Const Methods mempty :: Const a b # mappend :: Const a b -> Const a b -> Const a b # mconcat :: [Const a b] -> Const a b #
(Applicative f, Monoid a) => Monoid (Ap f a) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Data.Monoid Methods mempty :: Ap f a # mappend :: Ap f a -> Ap f a -> Ap f a # mconcat :: [Ap f a] -> Ap f a #
Alternative f => Monoid (Alt f a) | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods mempty :: Alt f a # mappend :: Alt f a -> Alt f a -> Alt f a # mconcat :: [Alt f a] -> Alt f a #
Monoid (f p) => Monoid (Rec1 f p) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Generics Methods mempty :: Rec1 f p # mappend :: Rec1 f p -> Rec1 f p -> Rec1 f p # mconcat :: [Rec1 f p] -> Rec1 f p #
(Monoid a, Monoid b, Monoid c) => Monoid (a, b, c) | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods mempty :: (a, b, c) # mappend :: (a, b, c) -> (a, b, c) -> (a, b, c) # mconcat :: [(a, b, c)] -> (a, b, c) #
(Monoid (f a), Monoid (g a)) => Monoid (Product f g a) | Since: base-4.16.0.0
Instance details Defined in Data.Functor.Product Methods mempty :: Product f g a # mappend :: Product f g a -> Product f g a -> Product f g a # mconcat :: [Product f g a] -> Product f g a #
(Monoid (f p), Monoid (g p)) => Monoid ((f :*: g) p) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Generics Methods mempty :: (f :*: g) p # mappend :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p # mconcat :: [(f :*: g) p] -> (f :*: g) p #
Monoid c => Monoid (K1 i c p) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Generics Methods mempty :: K1 i c p # mappend :: K1 i c p -> K1 i c p -> K1 i c p # mconcat :: [K1 i c p] -> K1 i c p #
(Monoid a, Monoid b, Monoid c, Monoid d) => Monoid (a, b, c, d) | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods mempty :: (a, b, c, d) # mappend :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) # mconcat :: [(a, b, c, d)] -> (a, b, c, d) #
Monoid (f (g a)) => Monoid (Compose f g a) | Since: base-4.16.0.0
Instance details Defined in Data.Functor.Compose Methods mempty :: Compose f g a # mappend :: Compose f g a -> Compose f g a -> Compose f g a # mconcat :: [Compose f g a] -> Compose f g a #
Monoid (f (g p)) => Monoid ((f :.: g) p) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Generics Methods mempty :: (f :.: g) p # mappend :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p # mconcat :: [(f :.: g) p] -> (f :.: g) p #
Monoid (f p) => Monoid (M1 i c f p) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Generics Methods mempty :: M1 i c f p # mappend :: M1 i c f p -> M1 i c f p -> M1 i c f p # mconcat :: [M1 i c f p] -> M1 i c f p #
(Monoid a, Monoid b, Monoid c, Monoid d, Monoid e) => Monoid (a, b, c, d, e) | @since base-2.01
Instance details Defined in GHC.Internal.Base Methods mempty :: (a, b, c, d, e) # mappend :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) # mconcat :: [(a, b, c, d, e)] -> (a, b, c, d, e) #

(<>) :: Semigroup a => a -> a -> a infixr 6 #

An associative operation.

#### Examples

Expand

    >>> [1,2,3] <> [4,5,6]
    [1,2,3,4,5,6]

    >>> Just [1, 2, 3] <> Just [4, 5, 6]
    Just [1,2,3,4,5,6]

    >>> putStr "Hello, " <> putStrLn "World!"
    Hello, World!

## Collection

class (IsList c, Item c ~ Element c) => Collection c where #

A set of methods for ordered colection

Minimal complete definition

null, length, (elem | notElem), minimum, maximum, all, any

Methods

null :: c -> Bool #

Check if a collection is empty

length :: c -> CountOf (Element c) #

Length of a collection (number of Element c)

elem :: (Eq a, a ~ Element c) => Element c -> c -> Bool #

Check if a collection contains a specific element

This is the inverse of `notElem`.

notElem :: (Eq a, a ~ Element c) => Element c -> c -> Bool #

Check if a collection does *not* contain a specific element

This is the inverse of `elem`.

maximum :: (Ord a, a ~ Element c) => NonEmpty c -> Element c #

Get the maximum element of a collection

minimum :: (Ord a, a ~ Element c) => NonEmpty c -> Element c #

Get the minimum element of a collection

any :: (Element c -> Bool) -> c -> Bool #

Determine is any elements of the collection satisfy the predicate

all :: (Element c -> Bool) -> c -> Bool #

Determine is all elements of the collection satisfy the predicate

#### Instances

Instances details

Collection AsciiString # |
Instance details Defined in Foundation.Collection.Collection Methods null :: AsciiString -> Bool # length :: AsciiString -> CountOf (Element AsciiString) # elem :: (Eq a, a ~ Element AsciiString) => Element AsciiString -> AsciiString -> Bool # notElem :: (Eq a, a ~ Element AsciiString) => Element AsciiString -> AsciiString -> Bool # maximum :: (Ord a, a ~ Element AsciiString) => NonEmpty AsciiString -> Element AsciiString # minimum :: (Ord a, a ~ Element AsciiString) => NonEmpty AsciiString -> Element AsciiString # any :: (Element AsciiString -> Bool) -> AsciiString -> Bool # all :: (Element AsciiString -> Bool) -> AsciiString -> Bool #
Collection String # |
Instance details Defined in Foundation.Collection.Collection Methods null :: String -> Bool # length :: String -> CountOf (Element String) # elem :: (Eq a, a ~ Element String) => Element String -> String -> Bool # notElem :: (Eq a, a ~ Element String) => Element String -> String -> Bool # maximum :: (Ord a, a ~ Element String) => NonEmpty String -> Element String # minimum :: (Ord a, a ~ Element String) => NonEmpty String -> Element String # any :: (Element String -> Bool) -> String -> Bool # all :: (Element String -> Bool) -> String -> Bool #
Collection Bitmap # |
Instance details Defined in Foundation.Array.Bitmap Methods null :: Bitmap -> Bool # length :: Bitmap -> CountOf (Element Bitmap) # elem :: (Eq a, a ~ Element Bitmap) => Element Bitmap -> Bitmap -> Bool # notElem :: (Eq a, a ~ Element Bitmap) => Element Bitmap -> Bitmap -> Bool # maximum :: (Ord a, a ~ Element Bitmap) => NonEmpty Bitmap -> Element Bitmap # minimum :: (Ord a, a ~ Element Bitmap) => NonEmpty Bitmap -> Element Bitmap # any :: (Element Bitmap -> Bool) -> Bitmap -> Bool # all :: (Element Bitmap -> Bool) -> Bitmap -> Bool #
Collection CSV # |
Instance details Defined in Foundation.Format.CSV.Types Methods null :: CSV -> Bool # length :: CSV -> CountOf (Element CSV) # elem :: (Eq a, a ~ Element CSV) => Element CSV -> CSV -> Bool # notElem :: (Eq a, a ~ Element CSV) => Element CSV -> CSV -> Bool # maximum :: (Ord a, a ~ Element CSV) => NonEmpty CSV -> Element CSV # minimum :: (Ord a, a ~ Element CSV) => NonEmpty CSV -> Element CSV # any :: (Element CSV -> Bool) -> CSV -> Bool # all :: (Element CSV -> Bool) -> CSV -> Bool #
Collection Row # |
Instance details Defined in Foundation.Format.CSV.Types Methods null :: Row -> Bool # length :: Row -> CountOf (Element Row) # elem :: (Eq a, a ~ Element Row) => Element Row -> Row -> Bool # notElem :: (Eq a, a ~ Element Row) => Element Row -> Row -> Bool # maximum :: (Ord a, a ~ Element Row) => NonEmpty Row -> Element Row # minimum :: (Ord a, a ~ Element Row) => NonEmpty Row -> Element Row # any :: (Element Row -> Bool) -> Row -> Bool # all :: (Element Row -> Bool) -> Row -> Bool #
PrimType ty => Collection (Block ty) # |
Instance details Defined in Foundation.Collection.Collection Methods null :: Block ty -> Bool # length :: Block ty -> CountOf (Element (Block ty)) # elem :: (Eq a, a ~ Element (Block ty)) => Element (Block ty) -> Block ty -> Bool # notElem :: (Eq a, a ~ Element (Block ty)) => Element (Block ty) -> Block ty -> Bool # maximum :: (Ord a, a ~ Element (Block ty)) => NonEmpty (Block ty) -> Element (Block ty) # minimum :: (Ord a, a ~ Element (Block ty)) => NonEmpty (Block ty) -> Element (Block ty) # any :: (Element (Block ty) -> Bool) -> Block ty -> Bool # all :: (Element (Block ty) -> Bool) -> Block ty -> Bool #
Collection (Array ty) # |
Instance details Defined in Foundation.Collection.Collection Methods null :: Array ty -> Bool # length :: Array ty -> CountOf (Element (Array ty)) # elem :: (Eq a, a ~ Element (Array ty)) => Element (Array ty) -> Array ty -> Bool # notElem :: (Eq a, a ~ Element (Array ty)) => Element (Array ty) -> Array ty -> Bool # maximum :: (Ord a, a ~ Element (Array ty)) => NonEmpty (Array ty) -> Element (Array ty) # minimum :: (Ord a, a ~ Element (Array ty)) => NonEmpty (Array ty) -> Element (Array ty) # any :: (Element (Array ty) -> Bool) -> Array ty -> Bool # all :: (Element (Array ty) -> Bool) -> Array ty -> Bool #
Collection c => Collection (NonEmpty c) # |
Instance details Defined in Foundation.Collection.Collection Methods null :: NonEmpty c -> Bool # length :: NonEmpty c -> CountOf (Element (NonEmpty c)) # elem :: (Eq a, a ~ Element (NonEmpty c)) => Element (NonEmpty c) -> NonEmpty c -> Bool # notElem :: (Eq a, a ~ Element (NonEmpty c)) => Element (NonEmpty c) -> NonEmpty c -> Bool # maximum :: (Ord a, a ~ Element (NonEmpty c)) => NonEmpty (NonEmpty c) -> Element (NonEmpty c) # minimum :: (Ord a, a ~ Element (NonEmpty c)) => NonEmpty (NonEmpty c) -> Element (NonEmpty c) # any :: (Element (NonEmpty c) -> Bool) -> NonEmpty c -> Bool # all :: (Element (NonEmpty c) -> Bool) -> NonEmpty c -> Bool #
PrimType ty => Collection (UArray ty) # |
Instance details Defined in Foundation.Collection.Collection Methods null :: UArray ty -> Bool # length :: UArray ty -> CountOf (Element (UArray ty)) # elem :: (Eq a, a ~ Element (UArray ty)) => Element (UArray ty) -> UArray ty -> Bool # notElem :: (Eq a, a ~ Element (UArray ty)) => Element (UArray ty) -> UArray ty -> Bool # maximum :: (Ord a, a ~ Element (UArray ty)) => NonEmpty (UArray ty) -> Element (UArray ty) # minimum :: (Ord a, a ~ Element (UArray ty)) => NonEmpty (UArray ty) -> Element (UArray ty) # any :: (Element (UArray ty) -> Bool) -> UArray ty -> Bool # all :: (Element (UArray ty) -> Bool) -> UArray ty -> Bool #
PrimType ty => Collection (ChunkedUArray ty) # |
Instance details Defined in Foundation.Array.Chunked.Unboxed Methods null :: ChunkedUArray ty -> Bool # length :: ChunkedUArray ty -> CountOf (Element (ChunkedUArray ty)) # elem :: (Eq a, a ~ Element (ChunkedUArray ty)) => Element (ChunkedUArray ty) -> ChunkedUArray ty -> Bool # notElem :: (Eq a, a ~ Element (ChunkedUArray ty)) => Element (ChunkedUArray ty) -> ChunkedUArray ty -> Bool # maximum :: (Ord a, a ~ Element (ChunkedUArray ty)) => NonEmpty (ChunkedUArray ty) -> Element (ChunkedUArray ty) # minimum :: (Ord a, a ~ Element (ChunkedUArray ty)) => NonEmpty (ChunkedUArray ty) -> Element (ChunkedUArray ty) # any :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> Bool # all :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> Bool #
Collection (DList a) # |
Instance details Defined in Foundation.List.DList Methods null :: DList a -> Bool # length :: DList a -> CountOf (Element (DList a)) # elem :: (Eq a0, a0 ~ Element (DList a)) => Element (DList a) -> DList a -> Bool # notElem :: (Eq a0, a0 ~ Element (DList a)) => Element (DList a) -> DList a -> Bool # maximum :: (Ord a0, a0 ~ Element (DList a)) => NonEmpty (DList a) -> Element (DList a) # minimum :: (Ord a0, a0 ~ Element (DList a)) => NonEmpty (DList a) -> Element (DList a) # any :: (Element (DList a) -> Bool) -> DList a -> Bool # all :: (Element (DList a) -> Bool) -> DList a -> Bool #
Collection [a] # |
Instance details Defined in Foundation.Collection.Collection Methods null :: [a] -> Bool # length :: [a] -> CountOf (Element [a]) # elem :: (Eq a0, a0 ~ Element [a]) => Element [a] -> [a] -> Bool # notElem :: (Eq a0, a0 ~ Element [a]) => Element [a] -> [a] -> Bool # maximum :: (Ord a0, a0 ~ Element [a]) => NonEmpty [a] -> Element [a] # minimum :: (Ord a0, a0 ~ Element [a]) => NonEmpty [a] -> Element [a] # any :: (Element [a] -> Bool) -> [a] -> Bool # all :: (Element [a] -> Bool) -> [a] -> Bool #

and :: (Collection col, Element col ~ Bool) => col -> Bool #

Return True if all the elements in the collection are True

or :: (Collection col, Element col ~ Bool) => col -> Bool #

Return True if at least one element in the collection is True

class (IsList c, Item c ~ Element c, Monoid c, Collection c) => Sequential c where #

A set of methods for ordered colection

Minimal complete definition

(take, drop | splitAt), (revTake, revDrop | revSplitAt), splitOn, (break | span), (breakEnd | spanEnd), intersperse, filter, reverse, uncons, unsnoc, snoc, cons, find, sortBy, singleton, replicate

Methods

take :: CountOf (Element c) -> c -> c #

Take the first @n elements of a collection

revTake :: CountOf (Element c) -> c -> c #

Take the last @n elements of a collection

drop :: CountOf (Element c) -> c -> c #

Drop the first @n elements of a collection

revDrop :: CountOf (Element c) -> c -> c #

Drop the last @n elements of a collection

splitAt :: CountOf (Element c) -> c -> (c, c) #

Split the collection at the @n'th elements

revSplitAt :: CountOf (Element c) -> c -> (c, c) #

Split the collection at the @n'th elements from the end

splitOn :: (Element c -> Bool) -> c -> [c] #

Split on a specific elements returning a list of colletion

break :: (Element c -> Bool) -> c -> (c, c) #

Split a collection when the predicate return true

breakEnd :: (Element c -> Bool) -> c -> (c, c) #

Split a collection when the predicate return true starting from the end of the collection

breakElem :: Element c -> c -> (c, c) #

Split a collection at the given element

takeWhile :: (Element c -> Bool) -> c -> c #

Return the longest prefix in the collection that satisfy the predicate

dropWhile :: (Element c -> Bool) -> c -> c #

Return the longest prefix in the collection that satisfy the predicate

intersperse :: Element c -> c -> c #

The `intersperse` function takes an element and a list and `intersperses' that element between the elements of the list. For example,

    intersperse ',' "abcde" == "a,b,c,d,e"

intercalate :: Element c -> c -> Element c #

`intercalate` `xs xss` is equivalent to `(`mconcat` (`intersperse` xs xss))`. It inserts the list `xs` in between the lists in `xss` and concatenates the result.

span :: (Element c -> Bool) -> c -> (c, c) #

Split a collection while the predicate return true

spanEnd :: (Element c -> Bool) -> c -> (c, c) #

Split a collection while the predicate return true starting from the end of the collection

filter :: (Element c -> Bool) -> c -> c #

Filter all the elements that satisfy the predicate

partition :: (Element c -> Bool) -> c -> (c, c) #

Partition the elements that satisfy the predicate and those that don't

reverse :: c -> c #

Reverse a collection

uncons :: c -> Maybe (Element c, c) #

Decompose a collection into its first element and the remaining collection. If the collection is empty, returns Nothing.

unsnoc :: c -> Maybe (c, Element c) #

Decompose a collection into a collection without its last element, and the last element If the collection is empty, returns Nothing.

snoc :: c -> Element c -> c #

Prepend an element to an ordered collection

cons :: Element c -> c -> c #

Append an element to an ordered collection

find :: (Element c -> Bool) -> c -> Maybe (Element c) #

Find an element in an ordered collection

sortBy :: (Element c -> Element c -> Ordering) -> c -> c #

Sort an ordered collection using the specified order function

singleton :: Element c -> c #

Create a collection with a single element

head :: NonEmpty c -> Element c #

get the first element of a non-empty collection

last :: NonEmpty c -> Element c #

get the last element of a non-empty collection

tail :: NonEmpty c -> c #

Extract the elements after the first element of a non-empty collection.

init :: NonEmpty c -> c #

Extract the elements before the last element of a non-empty collection.

replicate :: CountOf (Element c) -> Element c -> c #

Create a collection where the element in parameter is repeated N time

isPrefixOf :: c -> c -> Bool #

Takes two collections and returns True iff the first collection is a prefix of the second.

default isPrefixOf :: Eq c => c -> c -> Bool #

isSuffixOf :: c -> c -> Bool #

Takes two collections and returns True iff the first collection is a suffix of the second.

default isSuffixOf :: Eq c => c -> c -> Bool #

isInfixOf :: c -> c -> Bool #

Takes two collections and returns True iff the first collection is an infix of the second.

default isInfixOf :: Eq c => c -> c -> Bool #

stripPrefix :: c -> c -> Maybe c #

Try to strip a prefix from a collection

stripSuffix :: c -> c -> Maybe c #

Try to strip a suffix from a collection

#### Instances

Instances details

Sequential AsciiString # |
Instance details Defined in Foundation.Collection.Sequential Methods take :: CountOf (Element AsciiString) -> AsciiString -> AsciiString # revTake :: CountOf (Element AsciiString) -> AsciiString -> AsciiString # drop :: CountOf (Element AsciiString) -> AsciiString -> AsciiString # revDrop :: CountOf (Element AsciiString) -> AsciiString -> AsciiString # splitAt :: CountOf (Element AsciiString) -> AsciiString -> (AsciiString, AsciiString) # revSplitAt :: CountOf (Element AsciiString) -> AsciiString -> (AsciiString, AsciiString) # splitOn :: (Element AsciiString -> Bool) -> AsciiString -> [AsciiString] # break :: (Element AsciiString -> Bool) -> AsciiString -> (AsciiString, AsciiString) # breakEnd :: (Element AsciiString -> Bool) -> AsciiString -> (AsciiString, AsciiString) # breakElem :: Element AsciiString -> AsciiString -> (AsciiString, AsciiString) # takeWhile :: (Element AsciiString -> Bool) -> AsciiString -> AsciiString # dropWhile :: (Element AsciiString -> Bool) -> AsciiString -> AsciiString # intersperse :: Element AsciiString -> AsciiString -> AsciiString # intercalate :: Element AsciiString -> AsciiString -> Element AsciiString # span :: (Element AsciiString -> Bool) -> AsciiString -> (AsciiString, AsciiString) # spanEnd :: (Element AsciiString -> Bool) -> AsciiString -> (AsciiString, AsciiString) # filter :: (Element AsciiString -> Bool) -> AsciiString -> AsciiString # partition :: (Element AsciiString -> Bool) -> AsciiString -> (AsciiString, AsciiString) # reverse :: AsciiString -> AsciiString # uncons :: AsciiString -> Maybe (Element AsciiString, AsciiString) # unsnoc :: AsciiString -> Maybe (AsciiString, Element AsciiString) # snoc :: AsciiString -> Element AsciiString -> AsciiString # cons :: Element AsciiString -> AsciiString -> AsciiString # find :: (Element AsciiString -> Bool) -> AsciiString -> Maybe (Element AsciiString) # sortBy :: (Element AsciiString -> Element AsciiString -> Ordering) -> AsciiString -> AsciiString # singleton :: Element AsciiString -> AsciiString # head :: NonEmpty AsciiString -> Element AsciiString # last :: NonEmpty AsciiString -> Element AsciiString # tail :: NonEmpty AsciiString -> AsciiString # init :: NonEmpty AsciiString -> AsciiString # replicate :: CountOf (Element AsciiString) -> Element AsciiString -> AsciiString # isPrefixOf :: AsciiString -> AsciiString -> Bool # isSuffixOf :: AsciiString -> AsciiString -> Bool # isInfixOf :: AsciiString -> AsciiString -> Bool # stripPrefix :: AsciiString -> AsciiString -> Maybe AsciiString # stripSuffix :: AsciiString -> AsciiString -> Maybe AsciiString #
Sequential String # |
Instance details Defined in Foundation.Collection.Sequential Methods take :: CountOf (Element String) -> String -> String # revTake :: CountOf (Element String) -> String -> String # drop :: CountOf (Element String) -> String -> String # revDrop :: CountOf (Element String) -> String -> String # splitAt :: CountOf (Element String) -> String -> (String, String) # revSplitAt :: CountOf (Element String) -> String -> (String, String) # splitOn :: (Element String -> Bool) -> String -> [String] # break :: (Element String -> Bool) -> String -> (String, String) # breakEnd :: (Element String -> Bool) -> String -> (String, String) # breakElem :: Element String -> String -> (String, String) # takeWhile :: (Element String -> Bool) -> String -> String # dropWhile :: (Element String -> Bool) -> String -> String # intersperse :: Element String -> String -> String # intercalate :: Element String -> String -> Element String # span :: (Element String -> Bool) -> String -> (String, String) # spanEnd :: (Element String -> Bool) -> String -> (String, String) # filter :: (Element String -> Bool) -> String -> String # partition :: (Element String -> Bool) -> String -> (String, String) # reverse :: String -> String # uncons :: String -> Maybe (Element String, String) # unsnoc :: String -> Maybe (String, Element String) # snoc :: String -> Element String -> String # cons :: Element String -> String -> String # find :: (Element String -> Bool) -> String -> Maybe (Element String) # sortBy :: (Element String -> Element String -> Ordering) -> String -> String # singleton :: Element String -> String # head :: NonEmpty String -> Element String # last :: NonEmpty String -> Element String # tail :: NonEmpty String -> String # init :: NonEmpty String -> String # replicate :: CountOf (Element String) -> Element String -> String # isPrefixOf :: String -> String -> Bool # isSuffixOf :: String -> String -> Bool # isInfixOf :: String -> String -> Bool # stripPrefix :: String -> String -> Maybe String # stripSuffix :: String -> String -> Maybe String #
Sequential Bitmap # |
Instance details Defined in Foundation.Array.Bitmap Methods take :: CountOf (Element Bitmap) -> Bitmap -> Bitmap # revTake :: CountOf (Element Bitmap) -> Bitmap -> Bitmap # drop :: CountOf (Element Bitmap) -> Bitmap -> Bitmap # revDrop :: CountOf (Element Bitmap) -> Bitmap -> Bitmap # splitAt :: CountOf (Element Bitmap) -> Bitmap -> (Bitmap, Bitmap) # revSplitAt :: CountOf (Element Bitmap) -> Bitmap -> (Bitmap, Bitmap) # splitOn :: (Element Bitmap -> Bool) -> Bitmap -> [Bitmap] # break :: (Element Bitmap -> Bool) -> Bitmap -> (Bitmap, Bitmap) # breakEnd :: (Element Bitmap -> Bool) -> Bitmap -> (Bitmap, Bitmap) # breakElem :: Element Bitmap -> Bitmap -> (Bitmap, Bitmap) # takeWhile :: (Element Bitmap -> Bool) -> Bitmap -> Bitmap # dropWhile :: (Element Bitmap -> Bool) -> Bitmap -> Bitmap # intersperse :: Element Bitmap -> Bitmap -> Bitmap # intercalate :: Element Bitmap -> Bitmap -> Element Bitmap # span :: (Element Bitmap -> Bool) -> Bitmap -> (Bitmap, Bitmap) # spanEnd :: (Element Bitmap -> Bool) -> Bitmap -> (Bitmap, Bitmap) # filter :: (Element Bitmap -> Bool) -> Bitmap -> Bitmap # partition :: (Element Bitmap -> Bool) -> Bitmap -> (Bitmap, Bitmap) # reverse :: Bitmap -> Bitmap # uncons :: Bitmap -> Maybe (Element Bitmap, Bitmap) # unsnoc :: Bitmap -> Maybe (Bitmap, Element Bitmap) # snoc :: Bitmap -> Element Bitmap -> Bitmap # cons :: Element Bitmap -> Bitmap -> Bitmap # find :: (Element Bitmap -> Bool) -> Bitmap -> Maybe (Element Bitmap) # sortBy :: (Element Bitmap -> Element Bitmap -> Ordering) -> Bitmap -> Bitmap # singleton :: Element Bitmap -> Bitmap # head :: NonEmpty Bitmap -> Element Bitmap # last :: NonEmpty Bitmap -> Element Bitmap # tail :: NonEmpty Bitmap -> Bitmap # init :: NonEmpty Bitmap -> Bitmap # replicate :: CountOf (Element Bitmap) -> Element Bitmap -> Bitmap # isPrefixOf :: Bitmap -> Bitmap -> Bool # isSuffixOf :: Bitmap -> Bitmap -> Bool # isInfixOf :: Bitmap -> Bitmap -> Bool # stripPrefix :: Bitmap -> Bitmap -> Maybe Bitmap # stripSuffix :: Bitmap -> Bitmap -> Maybe Bitmap #
Sequential CSV # |
Instance details Defined in Foundation.Format.CSV.Types Methods take :: CountOf (Element CSV) -> CSV -> CSV # revTake :: CountOf (Element CSV) -> CSV -> CSV # drop :: CountOf (Element CSV) -> CSV -> CSV # revDrop :: CountOf (Element CSV) -> CSV -> CSV # splitAt :: CountOf (Element CSV) -> CSV -> (CSV, CSV) # revSplitAt :: CountOf (Element CSV) -> CSV -> (CSV, CSV) # splitOn :: (Element CSV -> Bool) -> CSV -> [CSV] # break :: (Element CSV -> Bool) -> CSV -> (CSV, CSV) # breakEnd :: (Element CSV -> Bool) -> CSV -> (CSV, CSV) # breakElem :: Element CSV -> CSV -> (CSV, CSV) # takeWhile :: (Element CSV -> Bool) -> CSV -> CSV # dropWhile :: (Element CSV -> Bool) -> CSV -> CSV # intersperse :: Element CSV -> CSV -> CSV # intercalate :: Element CSV -> CSV -> Element CSV # span :: (Element CSV -> Bool) -> CSV -> (CSV, CSV) # spanEnd :: (Element CSV -> Bool) -> CSV -> (CSV, CSV) # filter :: (Element CSV -> Bool) -> CSV -> CSV # partition :: (Element CSV -> Bool) -> CSV -> (CSV, CSV) # reverse :: CSV -> CSV # uncons :: CSV -> Maybe (Element CSV, CSV) # unsnoc :: CSV -> Maybe (CSV, Element CSV) # snoc :: CSV -> Element CSV -> CSV # cons :: Element CSV -> CSV -> CSV # find :: (Element CSV -> Bool) -> CSV -> Maybe (Element CSV) # sortBy :: (Element CSV -> Element CSV -> Ordering) -> CSV -> CSV # singleton :: Element CSV -> CSV # head :: NonEmpty CSV -> Element CSV # last :: NonEmpty CSV -> Element CSV # tail :: NonEmpty CSV -> CSV # init :: NonEmpty CSV -> CSV # replicate :: CountOf (Element CSV) -> Element CSV -> CSV # isPrefixOf :: CSV -> CSV -> Bool # isSuffixOf :: CSV -> CSV -> Bool # isInfixOf :: CSV -> CSV -> Bool # stripPrefix :: CSV -> CSV -> Maybe CSV # stripSuffix :: CSV -> CSV -> Maybe CSV #
Sequential Row # |
Instance details Defined in Foundation.Format.CSV.Types Methods take :: CountOf (Element Row) -> Row -> Row # revTake :: CountOf (Element Row) -> Row -> Row # drop :: CountOf (Element Row) -> Row -> Row # revDrop :: CountOf (Element Row) -> Row -> Row # splitAt :: CountOf (Element Row) -> Row -> (Row, Row) # revSplitAt :: CountOf (Element Row) -> Row -> (Row, Row) # splitOn :: (Element Row -> Bool) -> Row -> [Row] # break :: (Element Row -> Bool) -> Row -> (Row, Row) # breakEnd :: (Element Row -> Bool) -> Row -> (Row, Row) # breakElem :: Element Row -> Row -> (Row, Row) # takeWhile :: (Element Row -> Bool) -> Row -> Row # dropWhile :: (Element Row -> Bool) -> Row -> Row # intersperse :: Element Row -> Row -> Row # intercalate :: Element Row -> Row -> Element Row # span :: (Element Row -> Bool) -> Row -> (Row, Row) # spanEnd :: (Element Row -> Bool) -> Row -> (Row, Row) # filter :: (Element Row -> Bool) -> Row -> Row # partition :: (Element Row -> Bool) -> Row -> (Row, Row) # reverse :: Row -> Row # uncons :: Row -> Maybe (Element Row, Row) # unsnoc :: Row -> Maybe (Row, Element Row) # snoc :: Row -> Element Row -> Row # cons :: Element Row -> Row -> Row # find :: (Element Row -> Bool) -> Row -> Maybe (Element Row) # sortBy :: (Element Row -> Element Row -> Ordering) -> Row -> Row # singleton :: Element Row -> Row # head :: NonEmpty Row -> Element Row # last :: NonEmpty Row -> Element Row # tail :: NonEmpty Row -> Row # init :: NonEmpty Row -> Row # replicate :: CountOf (Element Row) -> Element Row -> Row # isPrefixOf :: Row -> Row -> Bool # isSuffixOf :: Row -> Row -> Bool # isInfixOf :: Row -> Row -> Bool # stripPrefix :: Row -> Row -> Maybe Row # stripSuffix :: Row -> Row -> Maybe Row #
PrimType ty => Sequential (Block ty) # |
Instance details Defined in Foundation.Collection.Sequential Methods take :: CountOf (Element (Block ty)) -> Block ty -> Block ty # revTake :: CountOf (Element (Block ty)) -> Block ty -> Block ty # drop :: CountOf (Element (Block ty)) -> Block ty -> Block ty # revDrop :: CountOf (Element (Block ty)) -> Block ty -> Block ty # splitAt :: CountOf (Element (Block ty)) -> Block ty -> (Block ty, Block ty) # revSplitAt :: CountOf (Element (Block ty)) -> Block ty -> (Block ty, Block ty) # splitOn :: (Element (Block ty) -> Bool) -> Block ty -> [Block ty] # break :: (Element (Block ty) -> Bool) -> Block ty -> (Block ty, Block ty) # breakEnd :: (Element (Block ty) -> Bool) -> Block ty -> (Block ty, Block ty) # breakElem :: Element (Block ty) -> Block ty -> (Block ty, Block ty) # takeWhile :: (Element (Block ty) -> Bool) -> Block ty -> Block ty # dropWhile :: (Element (Block ty) -> Bool) -> Block ty -> Block ty # intersperse :: Element (Block ty) -> Block ty -> Block ty # intercalate :: Element (Block ty) -> Block ty -> Element (Block ty) # span :: (Element (Block ty) -> Bool) -> Block ty -> (Block ty, Block ty) # spanEnd :: (Element (Block ty) -> Bool) -> Block ty -> (Block ty, Block ty) # filter :: (Element (Block ty) -> Bool) -> Block ty -> Block ty # partition :: (Element (Block ty) -> Bool) -> Block ty -> (Block ty, Block ty) # reverse :: Block ty -> Block ty # uncons :: Block ty -> Maybe (Element (Block ty), Block ty) # unsnoc :: Block ty -> Maybe (Block ty, Element (Block ty)) # snoc :: Block ty -> Element (Block ty) -> Block ty # cons :: Element (Block ty) -> Block ty -> Block ty # find :: (Element (Block ty) -> Bool) -> Block ty -> Maybe (Element (Block ty)) # sortBy :: (Element (Block ty) -> Element (Block ty) -> Ordering) -> Block ty -> Block ty # singleton :: Element (Block ty) -> Block ty # head :: NonEmpty (Block ty) -> Element (Block ty) # last :: NonEmpty (Block ty) -> Element (Block ty) # tail :: NonEmpty (Block ty) -> Block ty # init :: NonEmpty (Block ty) -> Block ty # replicate :: CountOf (Element (Block ty)) -> Element (Block ty) -> Block ty # isPrefixOf :: Block ty -> Block ty -> Bool # isSuffixOf :: Block ty -> Block ty -> Bool # isInfixOf :: Block ty -> Block ty -> Bool # stripPrefix :: Block ty -> Block ty -> Maybe (Block ty) # stripSuffix :: Block ty -> Block ty -> Maybe (Block ty) #
Sequential (Array ty) # |
Instance details Defined in Foundation.Collection.Sequential Methods take :: CountOf (Element (Array ty)) -> Array ty -> Array ty # revTake :: CountOf (Element (Array ty)) -> Array ty -> Array ty # drop :: CountOf (Element (Array ty)) -> Array ty -> Array ty # revDrop :: CountOf (Element (Array ty)) -> Array ty -> Array ty # splitAt :: CountOf (Element (Array ty)) -> Array ty -> (Array ty, Array ty) # revSplitAt :: CountOf (Element (Array ty)) -> Array ty -> (Array ty, Array ty) # splitOn :: (Element (Array ty) -> Bool) -> Array ty -> [Array ty] # break :: (Element (Array ty) -> Bool) -> Array ty -> (Array ty, Array ty) # breakEnd :: (Element (Array ty) -> Bool) -> Array ty -> (Array ty, Array ty) # breakElem :: Element (Array ty) -> Array ty -> (Array ty, Array ty) # takeWhile :: (Element (Array ty) -> Bool) -> Array ty -> Array ty # dropWhile :: (Element (Array ty) -> Bool) -> Array ty -> Array ty # intersperse :: Element (Array ty) -> Array ty -> Array ty # intercalate :: Element (Array ty) -> Array ty -> Element (Array ty) # span :: (Element (Array ty) -> Bool) -> Array ty -> (Array ty, Array ty) # spanEnd :: (Element (Array ty) -> Bool) -> Array ty -> (Array ty, Array ty) # filter :: (Element (Array ty) -> Bool) -> Array ty -> Array ty # partition :: (Element (Array ty) -> Bool) -> Array ty -> (Array ty, Array ty) # reverse :: Array ty -> Array ty # uncons :: Array ty -> Maybe (Element (Array ty), Array ty) # unsnoc :: Array ty -> Maybe (Array ty, Element (Array ty)) # snoc :: Array ty -> Element (Array ty) -> Array ty # cons :: Element (Array ty) -> Array ty -> Array ty # find :: (Element (Array ty) -> Bool) -> Array ty -> Maybe (Element (Array ty)) # sortBy :: (Element (Array ty) -> Element (Array ty) -> Ordering) -> Array ty -> Array ty # singleton :: Element (Array ty) -> Array ty # head :: NonEmpty (Array ty) -> Element (Array ty) # last :: NonEmpty (Array ty) -> Element (Array ty) # tail :: NonEmpty (Array ty) -> Array ty # init :: NonEmpty (Array ty) -> Array ty # replicate :: CountOf (Element (Array ty)) -> Element (Array ty) -> Array ty # isPrefixOf :: Array ty -> Array ty -> Bool # isSuffixOf :: Array ty -> Array ty -> Bool # isInfixOf :: Array ty -> Array ty -> Bool # stripPrefix :: Array ty -> Array ty -> Maybe (Array ty) # stripSuffix :: Array ty -> Array ty -> Maybe (Array ty) #
PrimType ty => Sequential (UArray ty) # |
Instance details Defined in Foundation.Collection.Sequential Methods take :: CountOf (Element (UArray ty)) -> UArray ty -> UArray ty # revTake :: CountOf (Element (UArray ty)) -> UArray ty -> UArray ty # drop :: CountOf (Element (UArray ty)) -> UArray ty -> UArray ty # revDrop :: CountOf (Element (UArray ty)) -> UArray ty -> UArray ty # splitAt :: CountOf (Element (UArray ty)) -> UArray ty -> (UArray ty, UArray ty) # revSplitAt :: CountOf (Element (UArray ty)) -> UArray ty -> (UArray ty, UArray ty) # splitOn :: (Element (UArray ty) -> Bool) -> UArray ty -> [UArray ty] # break :: (Element (UArray ty) -> Bool) -> UArray ty -> (UArray ty, UArray ty) # breakEnd :: (Element (UArray ty) -> Bool) -> UArray ty -> (UArray ty, UArray ty) # breakElem :: Element (UArray ty) -> UArray ty -> (UArray ty, UArray ty) # takeWhile :: (Element (UArray ty) -> Bool) -> UArray ty -> UArray ty # dropWhile :: (Element (UArray ty) -> Bool) -> UArray ty -> UArray ty # intersperse :: Element (UArray ty) -> UArray ty -> UArray ty # intercalate :: Element (UArray ty) -> UArray ty -> Element (UArray ty) # span :: (Element (UArray ty) -> Bool) -> UArray ty -> (UArray ty, UArray ty) # spanEnd :: (Element (UArray ty) -> Bool) -> UArray ty -> (UArray ty, UArray ty) # filter :: (Element (UArray ty) -> Bool) -> UArray ty -> UArray ty # partition :: (Element (UArray ty) -> Bool) -> UArray ty -> (UArray ty, UArray ty) # reverse :: UArray ty -> UArray ty # uncons :: UArray ty -> Maybe (Element (UArray ty), UArray ty) # unsnoc :: UArray ty -> Maybe (UArray ty, Element (UArray ty)) # snoc :: UArray ty -> Element (UArray ty) -> UArray ty # cons :: Element (UArray ty) -> UArray ty -> UArray ty # find :: (Element (UArray ty) -> Bool) -> UArray ty -> Maybe (Element (UArray ty)) # sortBy :: (Element (UArray ty) -> Element (UArray ty) -> Ordering) -> UArray ty -> UArray ty # singleton :: Element (UArray ty) -> UArray ty # head :: NonEmpty (UArray ty) -> Element (UArray ty) # last :: NonEmpty (UArray ty) -> Element (UArray ty) # tail :: NonEmpty (UArray ty) -> UArray ty # init :: NonEmpty (UArray ty) -> UArray ty # replicate :: CountOf (Element (UArray ty)) -> Element (UArray ty) -> UArray ty # isPrefixOf :: UArray ty -> UArray ty -> Bool # isSuffixOf :: UArray ty -> UArray ty -> Bool # isInfixOf :: UArray ty -> UArray ty -> Bool # stripPrefix :: UArray ty -> UArray ty -> Maybe (UArray ty) # stripSuffix :: UArray ty -> UArray ty -> Maybe (UArray ty) #
PrimType ty => Sequential (ChunkedUArray ty) # |
Instance details Defined in Foundation.Array.Chunked.Unboxed Methods take :: CountOf (Element (ChunkedUArray ty)) -> ChunkedUArray ty -> ChunkedUArray ty # revTake :: CountOf (Element (ChunkedUArray ty)) -> ChunkedUArray ty -> ChunkedUArray ty # drop :: CountOf (Element (ChunkedUArray ty)) -> ChunkedUArray ty -> ChunkedUArray ty # revDrop :: CountOf (Element (ChunkedUArray ty)) -> ChunkedUArray ty -> ChunkedUArray ty # splitAt :: CountOf (Element (ChunkedUArray ty)) -> ChunkedUArray ty -> (ChunkedUArray ty, ChunkedUArray ty) # revSplitAt :: CountOf (Element (ChunkedUArray ty)) -> ChunkedUArray ty -> (ChunkedUArray ty, ChunkedUArray ty) # splitOn :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> [ChunkedUArray ty] # break :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> (ChunkedUArray ty, ChunkedUArray ty) # breakEnd :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> (ChunkedUArray ty, ChunkedUArray ty) # breakElem :: Element (ChunkedUArray ty) -> ChunkedUArray ty -> (ChunkedUArray ty, ChunkedUArray ty) # takeWhile :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> ChunkedUArray ty # dropWhile :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> ChunkedUArray ty # intersperse :: Element (ChunkedUArray ty) -> ChunkedUArray ty -> ChunkedUArray ty # intercalate :: Element (ChunkedUArray ty) -> ChunkedUArray ty -> Element (ChunkedUArray ty) # span :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> (ChunkedUArray ty, ChunkedUArray ty) # spanEnd :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> (ChunkedUArray ty, ChunkedUArray ty) # filter :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> ChunkedUArray ty # partition :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> (ChunkedUArray ty, ChunkedUArray ty) # reverse :: ChunkedUArray ty -> ChunkedUArray ty # uncons :: ChunkedUArray ty -> Maybe (Element (ChunkedUArray ty), ChunkedUArray ty) # unsnoc :: ChunkedUArray ty -> Maybe (ChunkedUArray ty, Element (ChunkedUArray ty)) # snoc :: ChunkedUArray ty -> Element (ChunkedUArray ty) -> ChunkedUArray ty # cons :: Element (ChunkedUArray ty) -> ChunkedUArray ty -> ChunkedUArray ty # find :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> Maybe (Element (ChunkedUArray ty)) # sortBy :: (Element (ChunkedUArray ty) -> Element (ChunkedUArray ty) -> Ordering) -> ChunkedUArray ty -> ChunkedUArray ty # singleton :: Element (ChunkedUArray ty) -> ChunkedUArray ty # head :: NonEmpty (ChunkedUArray ty) -> Element (ChunkedUArray ty) # last :: NonEmpty (ChunkedUArray ty) -> Element (ChunkedUArray ty) # tail :: NonEmpty (ChunkedUArray ty) -> ChunkedUArray ty # init :: NonEmpty (ChunkedUArray ty) -> ChunkedUArray ty # replicate :: CountOf (Element (ChunkedUArray ty)) -> Element (ChunkedUArray ty) -> ChunkedUArray ty # isPrefixOf :: ChunkedUArray ty -> ChunkedUArray ty -> Bool # isSuffixOf :: ChunkedUArray ty -> ChunkedUArray ty -> Bool # isInfixOf :: ChunkedUArray ty -> ChunkedUArray ty -> Bool # stripPrefix :: ChunkedUArray ty -> ChunkedUArray ty -> Maybe (ChunkedUArray ty) # stripSuffix :: ChunkedUArray ty -> ChunkedUArray ty -> Maybe (ChunkedUArray ty) #
Sequential (DList a) # |
Instance details Defined in Foundation.List.DList Methods take :: CountOf (Element (DList a)) -> DList a -> DList a # revTake :: CountOf (Element (DList a)) -> DList a -> DList a # drop :: CountOf (Element (DList a)) -> DList a -> DList a # revDrop :: CountOf (Element (DList a)) -> DList a -> DList a # splitAt :: CountOf (Element (DList a)) -> DList a -> (DList a, DList a) # revSplitAt :: CountOf (Element (DList a)) -> DList a -> (DList a, DList a) # splitOn :: (Element (DList a) -> Bool) -> DList a -> [DList a] # break :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) # breakEnd :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) # breakElem :: Element (DList a) -> DList a -> (DList a, DList a) # takeWhile :: (Element (DList a) -> Bool) -> DList a -> DList a # dropWhile :: (Element (DList a) -> Bool) -> DList a -> DList a # intersperse :: Element (DList a) -> DList a -> DList a # intercalate :: Element (DList a) -> DList a -> Element (DList a) # span :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) # spanEnd :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) # filter :: (Element (DList a) -> Bool) -> DList a -> DList a # partition :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) # reverse :: DList a -> DList a # uncons :: DList a -> Maybe (Element (DList a), DList a) # unsnoc :: DList a -> Maybe (DList a, Element (DList a)) # snoc :: DList a -> Element (DList a) -> DList a # cons :: Element (DList a) -> DList a -> DList a # find :: (Element (DList a) -> Bool) -> DList a -> Maybe (Element (DList a)) # sortBy :: (Element (DList a) -> Element (DList a) -> Ordering) -> DList a -> DList a # singleton :: Element (DList a) -> DList a # head :: NonEmpty (DList a) -> Element (DList a) # last :: NonEmpty (DList a) -> Element (DList a) # tail :: NonEmpty (DList a) -> DList a # init :: NonEmpty (DList a) -> DList a # replicate :: CountOf (Element (DList a)) -> Element (DList a) -> DList a # isPrefixOf :: DList a -> DList a -> Bool # isSuffixOf :: DList a -> DList a -> Bool # isInfixOf :: DList a -> DList a -> Bool # stripPrefix :: DList a -> DList a -> Maybe (DList a) # stripSuffix :: DList a -> DList a -> Maybe (DList a) #
Sequential [a] # |
Instance details Defined in Foundation.Collection.Sequential Methods take :: CountOf (Element [a]) -> [a] -> [a] # revTake :: CountOf (Element [a]) -> [a] -> [a] # drop :: CountOf (Element [a]) -> [a] -> [a] # revDrop :: CountOf (Element [a]) -> [a] -> [a] # splitAt :: CountOf (Element [a]) -> [a] -> ([a], [a]) # revSplitAt :: CountOf (Element [a]) -> [a] -> ([a], [a]) # splitOn :: (Element [a] -> Bool) -> [a] -> [[a]] # break :: (Element [a] -> Bool) -> [a] -> ([a], [a]) # breakEnd :: (Element [a] -> Bool) -> [a] -> ([a], [a]) # breakElem :: Element [a] -> [a] -> ([a], [a]) # takeWhile :: (Element [a] -> Bool) -> [a] -> [a] # dropWhile :: (Element [a] -> Bool) -> [a] -> [a] # intersperse :: Element [a] -> [a] -> [a] # intercalate :: Element [a] -> [a] -> Element [a] # span :: (Element [a] -> Bool) -> [a] -> ([a], [a]) # spanEnd :: (Element [a] -> Bool) -> [a] -> ([a], [a]) # filter :: (Element [a] -> Bool) -> [a] -> [a] # partition :: (Element [a] -> Bool) -> [a] -> ([a], [a]) # reverse :: [a] -> [a] # uncons :: [a] -> Maybe (Element [a], [a]) # unsnoc :: [a] -> Maybe ([a], Element [a]) # snoc :: [a] -> Element [a] -> [a] # cons :: Element [a] -> [a] -> [a] # find :: (Element [a] -> Bool) -> [a] -> Maybe (Element [a]) # sortBy :: (Element [a] -> Element [a] -> Ordering) -> [a] -> [a] # singleton :: Element [a] -> [a] # head :: NonEmpty [a] -> Element [a] # last :: NonEmpty [a] -> Element [a] # tail :: NonEmpty [a] -> [a] # init :: NonEmpty [a] -> [a] # replicate :: CountOf (Element [a]) -> Element [a] -> [a] # isPrefixOf :: [a] -> [a] -> Bool # isSuffixOf :: [a] -> [a] -> Bool # isInfixOf :: [a] -> [a] -> Bool # stripPrefix :: [a] -> [a] -> Maybe [a] # stripSuffix :: [a] -> [a] -> Maybe [a] #

data NonEmpty a #

NonEmpty property for any Collection

#### Instances

Instances details

Collection c => Collection (NonEmpty c) # |
Instance details Defined in Foundation.Collection.Collection Methods null :: NonEmpty c -> Bool # length :: NonEmpty c -> CountOf (Element (NonEmpty c)) # elem :: (Eq a, a ~ Element (NonEmpty c)) => Element (NonEmpty c) -> NonEmpty c -> Bool # notElem :: (Eq a, a ~ Element (NonEmpty c)) => Element (NonEmpty c) -> NonEmpty c -> Bool # maximum :: (Ord a, a ~ Element (NonEmpty c)) => NonEmpty (NonEmpty c) -> Element (NonEmpty c) # minimum :: (Ord a, a ~ Element (NonEmpty c)) => NonEmpty (NonEmpty c) -> Element (NonEmpty c) # any :: (Element (NonEmpty c) -> Bool) -> NonEmpty c -> Bool # all :: (Element (NonEmpty c) -> Bool) -> NonEmpty c -> Bool #
IsList c => IsList (NonEmpty c) |
Instance details Defined in Basement.NonEmpty Associated Types
type Item (NonEmpty c) |
Instance details Defined in Basement.NonEmpty type Item (NonEmpty c) = Item c
Methods fromList :: [Item (NonEmpty c)] -> NonEmpty c # fromListN :: Int -> [Item (NonEmpty c)] -> NonEmpty c # toList :: NonEmpty c -> [Item (NonEmpty c)] #
Show a => Show (NonEmpty a) |
Instance details Defined in Basement.NonEmpty Methods showsPrec :: Int -> NonEmpty a -> ShowS # show :: NonEmpty a -> String # showList :: [NonEmpty a] -> ShowS #
Eq a => Eq (NonEmpty a) |
Instance details Defined in Basement.NonEmpty Methods (==) :: NonEmpty a -> NonEmpty a -> Bool # (/=) :: NonEmpty a -> NonEmpty a -> Bool #
type Element (NonEmpty a) # |
Instance details Defined in Foundation.Collection.Element type Element (NonEmpty a) = Element a
type Item (NonEmpty c) |
Instance details Defined in Basement.NonEmpty type Item (NonEmpty c) = Item c

nonEmpty :: Collection c => c -> Maybe (NonEmpty c) #

Smart constructor to create a NonEmpty collection

If the collection is empty, then Nothing is returned Otherwise, the collection is wrapped in the NonEmpty property

## Folds

class Foldable collection where #

Give the ability to fold a collection on itself

Minimal complete definition

foldl', foldr

Methods

foldl' :: (a -> Element collection -> a) -> a -> collection -> a #

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.

Note that Foundation only provides `foldl'`, a strict version of `foldl` because the lazy version is seldom useful.

Left-associative fold of a structure with strict application of the operator.

foldr :: (Element collection -> a -> a) -> a -> collection -> a #

Right-associative fold of a structure.

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

foldr' :: (Element collection -> a -> a) -> a -> collection -> a #

Right-associative fold of a structure, but with strict application of the operator.

#### Instances

Instances details

Foldable Bitmap # |
Instance details Defined in Foundation.Array.Bitmap Methods foldl' :: (a -> Element Bitmap -> a) -> a -> Bitmap -> a # foldr :: (Element Bitmap -> a -> a) -> a -> Bitmap -> a # foldr' :: (Element Bitmap -> a -> a) -> a -> Bitmap -> a #
PrimType ty => Foldable (Block ty) # |
Instance details Defined in Foundation.Collection.Foldable Methods foldl' :: (a -> Element (Block ty) -> a) -> a -> Block ty -> a # foldr :: (Element (Block ty) -> a -> a) -> a -> Block ty -> a # foldr' :: (Element (Block ty) -> a -> a) -> a -> Block ty -> a #
Foldable (Array ty) # |
Instance details Defined in Foundation.Collection.Foldable Methods foldl' :: (a -> Element (Array ty) -> a) -> a -> Array ty -> a # foldr :: (Element (Array ty) -> a -> a) -> a -> Array ty -> a # foldr' :: (Element (Array ty) -> a -> a) -> a -> Array ty -> a #
PrimType ty => Foldable (UArray ty) # |
Instance details Defined in Foundation.Collection.Foldable Methods foldl' :: (a -> Element (UArray ty) -> a) -> a -> UArray ty -> a # foldr :: (Element (UArray ty) -> a -> a) -> a -> UArray ty -> a # foldr' :: (Element (UArray ty) -> a -> a) -> a -> UArray ty -> a #
PrimType ty => Foldable (ChunkedUArray ty) # |
Instance details Defined in Foundation.Array.Chunked.Unboxed Methods foldl' :: (a -> Element (ChunkedUArray ty) -> a) -> a -> ChunkedUArray ty -> a # foldr :: (Element (ChunkedUArray ty) -> a -> a) -> a -> ChunkedUArray ty -> a # foldr' :: (Element (ChunkedUArray ty) -> a -> a) -> a -> ChunkedUArray ty -> a #
Foldable (DList a) # |
Instance details Defined in Foundation.List.DList Methods foldl' :: (a0 -> Element (DList a) -> a0) -> a0 -> DList a -> a0 # foldr :: (Element (DList a) -> a0 -> a0) -> a0 -> DList a -> a0 # foldr' :: (Element (DList a) -> a0 -> a0) -> a0 -> DList a -> a0 #
Foldable [a] # |
Instance details Defined in Foundation.Collection.Foldable Methods foldl' :: (a0 -> Element [a] -> a0) -> a0 -> [a] -> a0 # foldr :: (Element [a] -> a0 -> a0) -> a0 -> [a] -> a0 # foldr' :: (Element [a] -> a0 -> a0) -> a0 -> [a] -> a0 #
PrimType ty => Foldable (BlockN n ty) # |
Instance details Defined in Foundation.Collection.Foldable Methods foldl' :: (a -> Element (BlockN n ty) -> a) -> a -> BlockN n ty -> a # foldr :: (Element (BlockN n ty) -> a -> a) -> a -> BlockN n ty -> a # foldr' :: (Element (BlockN n ty) -> a -> a) -> a -> BlockN n ty -> a #
Foldable (ListN n a) # |
Instance details Defined in Foundation.Collection.Foldable Methods foldl' :: (a0 -> Element (ListN n a) -> a0) -> a0 -> ListN n a -> a0 # foldr :: (Element (ListN n a) -> a0 -> a0) -> a0 -> ListN n a -> a0 # foldr' :: (Element (ListN n a) -> a0 -> a0) -> a0 -> ListN n a -> a0 #

## Maybe

mapMaybe :: (a -> Maybe b) -> [a] -> [b] #

The `mapMaybe` function is a version of `map` which can throw out elements. In particular, the functional argument returns something of type ``Maybe` b`. If this is `Nothing`, no element is added on to the result list. If it is ``Just` b`, then `b` is included in the result list.

#### Examples

Expand

Using ``mapMaybe` f x` is a shortcut for ``catMaybes` $ `map` f x` in most cases:

    >>> import GHC.Internal.Text.Read ( readMaybe )
    >>> let readMaybeInt = readMaybe :: String -> Maybe Int
    >>> mapMaybe readMaybeInt ["1", "Foo", "3"]
    [1,3]
    >>> catMaybes $ map readMaybeInt ["1", "Foo", "3"]
    [1,3]

If we map the `Just` constructor, the entire list should be returned:

    >>> mapMaybe Just [1,2,3]
    [1,2,3]

catMaybes :: [Maybe a] -> [a] #

The `catMaybes` function takes a list of `Maybe`s and returns a list of all the `Just` values.

#### Examples

Expand

Basic usage:

    >>> catMaybes [Just 1, Nothing, Just 3]
    [1,3]

When constructing a list of `Maybe` values, `catMaybes` can be used to return all of the "success" results (if the list is the result of a `map`, then `mapMaybe` would be more appropriate):

    >>> import GHC.Internal.Text.Read ( readMaybe )
    >>> [readMaybe x :: Maybe Int | x <- ["1", "Foo", "3"] ]
    [Just 1,Nothing,Just 3]
    >>> catMaybes $ [readMaybe x :: Maybe Int | x <- ["1", "Foo", "3"] ]
    [1,3]

fromMaybe :: a -> Maybe a -> a #

The `fromMaybe` function takes a default value and a `Maybe` value. If the `Maybe` is `Nothing`, it returns the default value; otherwise, it returns the value contained in the `Maybe`.

#### Examples

Expand

Basic usage:

    >>> fromMaybe "" (Just "Hello, World!")
    "Hello, World!"

    >>> fromMaybe "" Nothing
    ""

Read an integer from a string using `readMaybe`. If we fail to parse an integer, we want to return `0` by default:

    >>> import GHC.Internal.Text.Read ( readMaybe )
    >>> fromMaybe 0 (readMaybe "5")
    5
    >>> fromMaybe 0 (readMaybe "")
    0

isJust :: Maybe a -> Bool #

The `isJust` function returns `True` iff its argument is of the form `Just _`.

#### Examples

Expand

Basic usage:

    >>> isJust (Just 3)
    True

    >>> isJust (Just ())
    True

    >>> isJust Nothing
    False

Only the outer constructor is taken into consideration:

    >>> isJust (Just Nothing)
    True

isNothing :: Maybe a -> Bool #

The `isNothing` function returns `True` iff its argument is `Nothing`.

#### Examples

Expand

Basic usage:

    >>> isNothing (Just 3)
    False

    >>> isNothing (Just ())
    False

    >>> isNothing Nothing
    True

Only the outer constructor is taken into consideration:

    >>> isNothing (Just Nothing)
    False

listToMaybe :: [a] -> Maybe a #

The `listToMaybe` function returns `Nothing` on an empty list or ``Just` a` where `a` is the first element of the list.

#### Examples

Expand

Basic usage:

    >>> listToMaybe []
    Nothing

    >>> listToMaybe [9]
    Just 9

    >>> listToMaybe [1,2,3]
    Just 1

Composing `maybeToList` with `listToMaybe` should be the identity on singleton/empty lists:

    >>> maybeToList $ listToMaybe [5]
    [5]
    >>> maybeToList $ listToMaybe []
    []

But not on lists with more than one element:

    >>> maybeToList $ listToMaybe [1,2,3]
    [1]

maybeToList :: Maybe a -> [a] #

The `maybeToList` function returns an empty list when given `Nothing` or a singleton list when given `Just`.

#### Examples

Expand

Basic usage:

    >>> maybeToList (Just 7)
    [7]

    >>> maybeToList Nothing
    []

One can use `maybeToList` to avoid pattern matching when combined with a function that (safely) works on lists:

    >>> import GHC.Internal.Text.Read ( readMaybe )
    >>> sum $ maybeToList (readMaybe "3")
    3
    >>> sum $ maybeToList (readMaybe "")
    0

## Either

partitionEithers :: [Either a b] -> ([a], [b]) #

Partitions a list of `Either` into two lists. All the `Left` elements are extracted, in order, to the first component of the output. Similarly the `Right` elements are extracted to the second component of the output.

#### Examples

Expand

Basic usage:

    >>> let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]
    >>> partitionEithers list
    (["foo","bar","baz"],[3,7])

The pair returned by ``partitionEithers` x` should be the same pair as `(`lefts` x, `rights` x)`:

    >>> let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]
    >>> partitionEithers list == (lefts list, rights list)
    True

lefts :: [Either a b] -> [a] #

Extracts from a list of `Either` all the `Left` elements. All the `Left` elements are extracted in order.

#### Examples

Expand

Basic usage:

    >>> let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]
    >>> lefts list
    ["foo","bar","baz"]

rights :: [Either a b] -> [b] #

Extracts from a list of `Either` all the `Right` elements. All the `Right` elements are extracted in order.

#### Examples

Expand

Basic usage:

    >>> let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]
    >>> rights list
    [3,7]

## Function

on :: (b -> b -> c) -> (a -> b) -> a -> a -> c infixl 0 #

``on` b u x y` runs the binary function `b` on the results of applying unary function `u` to two arguments `x` and `y`. From the opposite perspective, it transforms two inputs and combines the outputs.

    (op `on` f) x y = f x `op` f y

#### Examples

Expand

    >>> sortBy (compare `on` length) [[0, 1, 2], [0, 1], [], [0]]
    [[],[0],[0,1],[0,1,2]]

    >>> ((+) `on` length) [1, 2, 3] [-1]
    4

    >>> ((,) `on` (*2)) 2 3
    (4,6)

#### Algebraic properties

Expand

-     (*) `on` id = (*) -- (if (*) ∉ {⊥, const ⊥})

-     ((*) `on` f) `on` g = (*) `on` (f . g)

-     flip on f . flip on g = flip on (g . f)

## Applicative

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

An infix synonym for `fmap`.

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

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

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

#### Examples

Expand

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)

(<|>) :: Alternative f => f a -> f a -> f a infixl 3 #

An associative binary operation

## Monad

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

Left-to-right composition of `Kleisli` arrows.

'`(bs `>=>` cs) a`' can be understood as the `do` expression

    do b <- bs a
       cs b

or in terms of ``(>>=)`` as

    bs a >>= cs

## Exceptions

class (Typeable e, Show e) => Exception e where #

Any type that you wish to throw or catch as an exception must be an instance of the `Exception` class. The simplest case is a new exception type directly below the root:

    data MyException = ThisException | ThatException
        deriving Show

    instance Exception MyException

The default method definitions in the `Exception` class do what we need in this case. You can now throw and catch `ThisException` and `ThatException` as exceptions:

    *Main> throw ThisException `catch` \e -> putStrLn ("Caught " ++ show (e :: MyException))
    Caught ThisException

In more complicated examples, you may wish to define a whole hierarchy of exceptions:

    ---------------------------------------------------------------------
    -- Make the root exception type for all the exceptions in a compiler

    data SomeCompilerException = forall e . Exception e => SomeCompilerException e

    instance Show SomeCompilerException where
        show (SomeCompilerException e) = show e

    instance Exception SomeCompilerException

    compilerExceptionToException :: Exception e => e -> SomeException
    compilerExceptionToException = toException . SomeCompilerException

    compilerExceptionFromException :: Exception e => SomeException -> Maybe e
    compilerExceptionFromException x = do
        SomeCompilerException a <- fromException x
        cast a

    ---------------------------------------------------------------------
    -- Make a subhierarchy for exceptions in the frontend of the compiler

    data SomeFrontendException = forall e . Exception e => SomeFrontendException e

    instance Show SomeFrontendException where
        show (SomeFrontendException e) = show e

    instance Exception SomeFrontendException where
        toException = compilerExceptionToException
        fromException = compilerExceptionFromException

    frontendExceptionToException :: Exception e => e -> SomeException
    frontendExceptionToException = toException . SomeFrontendException

    frontendExceptionFromException :: Exception e => SomeException -> Maybe e
    frontendExceptionFromException x = do
        SomeFrontendException a <- fromException x
        cast a

    ---------------------------------------------------------------------
    -- Make an exception type for a particular frontend compiler exception

    data MismatchedParentheses = MismatchedParentheses
        deriving Show

    instance Exception MismatchedParentheses where
        toException   = frontendExceptionToException
        fromException = frontendExceptionFromException

We can now catch a `MismatchedParentheses` exception as `MismatchedParentheses`, `SomeFrontendException` or `SomeCompilerException`, but not other types, e.g. `IOException`:

    *Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: MismatchedParentheses))
    Caught MismatchedParentheses
    *Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeFrontendException))
    Caught MismatchedParentheses
    *Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeCompilerException))
    Caught MismatchedParentheses
    *Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: IOException))
    *** Exception: MismatchedParentheses

Minimal complete definition

Nothing

Methods

toException :: e -> SomeException #

`toException` should produce a `SomeException` with no attached `ExceptionContext`.

fromException :: SomeException -> Maybe e #

displayException :: e -> String #

Render this exception value in a human-friendly manner.

Default implementation: ``show``.

@since base-4.8.0.0

backtraceDesired :: e -> Bool #

#### Instances

Instances details

Exception Timeout | Since: base-4.7.0.0
Instance details Defined in System.Timeout Methods toException :: Timeout -> SomeException # fromException :: SomeException -> Maybe Timeout # displayException :: Timeout -> String # backtraceDesired :: Timeout -> Bool #
Exception InvalidRecast |
Instance details Defined in Basement.Exception Methods toException :: InvalidRecast -> SomeException # fromException :: SomeException -> Maybe InvalidRecast # displayException :: InvalidRecast -> String # backtraceDesired :: InvalidRecast -> Bool #
Exception NonEmptyCollectionIsEmpty |
Instance details Defined in Basement.Exception Methods toException :: NonEmptyCollectionIsEmpty -> SomeException # fromException :: SomeException -> Maybe NonEmptyCollectionIsEmpty # displayException :: NonEmptyCollectionIsEmpty -> String # backtraceDesired :: NonEmptyCollectionIsEmpty -> Bool #
Exception OutOfBound |
Instance details Defined in Basement.Exception Methods toException :: OutOfBound -> SomeException # fromException :: SomeException -> Maybe OutOfBound # displayException :: OutOfBound -> String # backtraceDesired :: OutOfBound -> Bool #
Exception ASCII7_Invalid |
Instance details Defined in Basement.String.Encoding.ASCII7 Methods toException :: ASCII7_Invalid -> SomeException # fromException :: SomeException -> Maybe ASCII7_Invalid # displayException :: ASCII7_Invalid -> String # backtraceDesired :: ASCII7_Invalid -> Bool #
Exception ISO_8859_1_Invalid |
Instance details Defined in Basement.String.Encoding.ISO_8859_1 Methods toException :: ISO_8859_1_Invalid -> SomeException # fromException :: SomeException -> Maybe ISO_8859_1_Invalid # displayException :: ISO_8859_1_Invalid -> String # backtraceDesired :: ISO_8859_1_Invalid -> Bool #
Exception UTF16_Invalid |
Instance details Defined in Basement.String.Encoding.UTF16 Methods toException :: UTF16_Invalid -> SomeException # fromException :: SomeException -> Maybe UTF16_Invalid # displayException :: UTF16_Invalid -> String # backtraceDesired :: UTF16_Invalid -> Bool #
Exception UTF32_Invalid |
Instance details Defined in Basement.String.Encoding.UTF32 Methods toException :: UTF32_Invalid -> SomeException # fromException :: SomeException -> Maybe UTF32_Invalid # displayException :: UTF32_Invalid -> String # backtraceDesired :: UTF32_Invalid -> Bool #
Exception ValidationFailure |
Instance details Defined in Basement.UTF8.Types Methods toException :: ValidationFailure -> SomeException # fromException :: SomeException -> Maybe ValidationFailure # displayException :: ValidationFailure -> String # backtraceDesired :: ValidationFailure -> Bool #
Exception PartialError # |
Instance details Defined in Foundation.Partial Methods toException :: PartialError -> SomeException # fromException :: SomeException -> Maybe PartialError # displayException :: PartialError -> String # backtraceDesired :: PartialError -> Bool #
Exception Void | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Exception.Type Methods toException :: Void -> SomeException # fromException :: SomeException -> Maybe Void # displayException :: Void -> String # backtraceDesired :: Void -> Bool #
Exception NestedAtomically | @since base-4.0
Instance details Defined in GHC.Internal.Control.Exception.Base Methods toException :: NestedAtomically -> SomeException # fromException :: SomeException -> Maybe NestedAtomically # displayException :: NestedAtomically -> String # backtraceDesired :: NestedAtomically -> Bool #
Exception NoMatchingContinuationPrompt | @since base-4.18
Instance details Defined in GHC.Internal.Control.Exception.Base Methods toException :: NoMatchingContinuationPrompt -> SomeException # fromException :: SomeException -> Maybe NoMatchingContinuationPrompt # displayException :: NoMatchingContinuationPrompt -> String # backtraceDesired :: NoMatchingContinuationPrompt -> Bool #
Exception NoMethodError | @since base-4.0
Instance details Defined in GHC.Internal.Control.Exception.Base Methods toException :: NoMethodError -> SomeException # fromException :: SomeException -> Maybe NoMethodError # displayException :: NoMethodError -> String # backtraceDesired :: NoMethodError -> Bool #
Exception NonTermination | @since base-4.0
Instance details Defined in GHC.Internal.Control.Exception.Base Methods toException :: NonTermination -> SomeException # fromException :: SomeException -> Maybe NonTermination # displayException :: NonTermination -> String # backtraceDesired :: NonTermination -> Bool #
Exception PatternMatchFail | @since base-4.0
Instance details Defined in GHC.Internal.Control.Exception.Base Methods toException :: PatternMatchFail -> SomeException # fromException :: SomeException -> Maybe PatternMatchFail # displayException :: PatternMatchFail -> String # backtraceDesired :: PatternMatchFail -> Bool #
Exception RecConError | @since base-4.0
Instance details Defined in GHC.Internal.Control.Exception.Base Methods toException :: RecConError -> SomeException # fromException :: SomeException -> Maybe RecConError # displayException :: RecConError -> String # backtraceDesired :: RecConError -> Bool #
Exception RecSelError | @since base-4.0
Instance details Defined in GHC.Internal.Control.Exception.Base Methods toException :: RecSelError -> SomeException # fromException :: SomeException -> Maybe RecSelError # displayException :: RecSelError -> String # backtraceDesired :: RecSelError -> Bool #
Exception RecUpdError | @since base-4.0
Instance details Defined in GHC.Internal.Control.Exception.Base Methods toException :: RecUpdError -> SomeException # fromException :: SomeException -> Maybe RecUpdError # displayException :: RecUpdError -> String # backtraceDesired :: RecUpdError -> Bool #
Exception TypeError | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Control.Exception.Base Methods toException :: TypeError -> SomeException # fromException :: SomeException -> Maybe TypeError # displayException :: TypeError -> String # backtraceDesired :: TypeError -> Bool #
Exception ErrorCall | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Exception Methods toException :: ErrorCall -> SomeException # fromException :: SomeException -> Maybe ErrorCall # displayException :: ErrorCall -> String # backtraceDesired :: ErrorCall -> Bool #
Exception ArithException | @since base-4.0.0.0
Instance details Defined in GHC.Internal.Exception.Type Methods toException :: ArithException -> SomeException # fromException :: SomeException -> Maybe ArithException # displayException :: ArithException -> String # backtraceDesired :: ArithException -> Bool #
Exception SomeException | This drops any attached `ExceptionContext`. @since base-3.0
Instance details Defined in GHC.Internal.Exception.Type Methods toException :: SomeException -> SomeException # fromException :: SomeException -> Maybe SomeException # displayException :: SomeException -> String # backtraceDesired :: SomeException -> Bool #
Exception AllocationLimitExceeded | @since base-4.8.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods toException :: AllocationLimitExceeded -> SomeException # fromException :: SomeException -> Maybe AllocationLimitExceeded # displayException :: AllocationLimitExceeded -> String # backtraceDesired :: AllocationLimitExceeded -> Bool #
Exception ArrayException | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods toException :: ArrayException -> SomeException # fromException :: SomeException -> Maybe ArrayException # displayException :: ArrayException -> String # backtraceDesired :: ArrayException -> Bool #
Exception AssertionFailed | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods toException :: AssertionFailed -> SomeException # fromException :: SomeException -> Maybe AssertionFailed # displayException :: AssertionFailed -> String # backtraceDesired :: AssertionFailed -> Bool #
Exception AsyncException | @since base-4.7.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods toException :: AsyncException -> SomeException # fromException :: SomeException -> Maybe AsyncException # displayException :: AsyncException -> String # backtraceDesired :: AsyncException -> Bool #
Exception BlockedIndefinitelyOnMVar | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods toException :: BlockedIndefinitelyOnMVar -> SomeException # fromException :: SomeException -> Maybe BlockedIndefinitelyOnMVar # displayException :: BlockedIndefinitelyOnMVar -> String # backtraceDesired :: BlockedIndefinitelyOnMVar -> Bool #
Exception BlockedIndefinitelyOnSTM | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods toException :: BlockedIndefinitelyOnSTM -> SomeException # fromException :: SomeException -> Maybe BlockedIndefinitelyOnSTM # displayException :: BlockedIndefinitelyOnSTM -> String # backtraceDesired :: BlockedIndefinitelyOnSTM -> Bool #
Exception CompactionFailed | @since base-4.10.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods toException :: CompactionFailed -> SomeException # fromException :: SomeException -> Maybe CompactionFailed # displayException :: CompactionFailed -> String # backtraceDesired :: CompactionFailed -> Bool #
Exception Deadlock | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods toException :: Deadlock -> SomeException # fromException :: SomeException -> Maybe Deadlock # displayException :: Deadlock -> String # backtraceDesired :: Deadlock -> Bool #
Exception ExitCode | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods toException :: ExitCode -> SomeException # fromException :: SomeException -> Maybe ExitCode # displayException :: ExitCode -> String # backtraceDesired :: ExitCode -> Bool #
Exception FixIOException | @since base-4.11.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods toException :: FixIOException -> SomeException # fromException :: SomeException -> Maybe FixIOException # displayException :: FixIOException -> String # backtraceDesired :: FixIOException -> Bool #
Exception IOException | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods toException :: IOException -> SomeException # fromException :: SomeException -> Maybe IOException # displayException :: IOException -> String # backtraceDesired :: IOException -> Bool #
Exception SomeAsyncException | @since base-4.7.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods toException :: SomeAsyncException -> SomeException # fromException :: SomeException -> Maybe SomeAsyncException # displayException :: SomeAsyncException -> String # backtraceDesired :: SomeAsyncException -> Bool #
(Typeable input, Show input) => Exception (ParseError input) # |
Instance details Defined in Foundation.Parser Methods toException :: ParseError input -> SomeException # fromException :: SomeException -> Maybe (ParseError input) # displayException :: ParseError input -> String # backtraceDesired :: ParseError input -> Bool #
Exception a => Exception (ExceptionWithContext a) |
Instance details Defined in GHC.Internal.Exception.Type Methods toException :: ExceptionWithContext a -> SomeException # fromException :: SomeException -> Maybe (ExceptionWithContext a) # displayException :: ExceptionWithContext a -> String # backtraceDesired :: ExceptionWithContext a -> Bool #
Exception e => Exception (NoBacktrace e) |
Instance details Defined in GHC.Internal.Exception.Type Methods toException :: NoBacktrace e -> SomeException # fromException :: SomeException -> Maybe (NoBacktrace e) # displayException :: NoBacktrace e -> String # backtraceDesired :: NoBacktrace e -> Bool #

class Typeable (a :: k) #

The class `Typeable` allows a concrete representation of a type to be calculated.

Minimal complete definition

typeRep#

data SomeException #

The `SomeException` type is the root of the exception type hierarchy. When an exception of type `e` is thrown, behind the scenes it is encapsulated in a `SomeException`.

#### Instances

Instances details

Exception SomeException | This drops any attached `ExceptionContext`. @since base-3.0
Instance details Defined in GHC.Internal.Exception.Type Methods toException :: SomeException -> SomeException # fromException :: SomeException -> Maybe SomeException # displayException :: SomeException -> String # backtraceDesired :: SomeException -> Bool #
Show SomeException | Since: ghc-internal-3.0
Instance details Defined in GHC.Internal.Exception.Type Methods showsPrec :: Int -> SomeException -> ShowS # show :: SomeException -> String # showList :: [SomeException] -> ShowS #

data IOException #

Exceptions that occur in the `IO` monad. An `IOException` records a more specific error type, a descriptive string and maybe the handle that was used when the error was flagged.

#### Instances

Instances details

Exception IOException | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods toException :: IOException -> SomeException # fromException :: SomeException -> Maybe IOException # displayException :: IOException -> String # backtraceDesired :: IOException -> Bool #
Show IOException | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods showsPrec :: Int -> IOException -> ShowS # show :: IOException -> String # showList :: [IOException] -> ShowS #
Eq IOException | @since base-4.1.0.0
Instance details Defined in GHC.Internal.IO.Exception Methods (==) :: IOException -> IOException -> Bool # (/=) :: IOException -> IOException -> Bool #

## Proxy

data Proxy (t :: k) #

`Proxy` is a type that holds no data, but has a phantom parameter of arbitrary type (or even kind). Its use is to provide type information, even though there is no value available of that type (or it may be too costly to create one).

Historically, ``Proxy` :: `Proxy` a` is a safer alternative to the ``undefined` :: a` idiom.

    >>> Proxy :: Proxy (Void, Int -> Int)
    Proxy

Proxy can even hold types of higher kinds,

    >>> Proxy :: Proxy Either
    Proxy

    >>> Proxy :: Proxy Functor
    Proxy

    >>> Proxy :: Proxy complicatedStructure
    Proxy

Constructors

Proxy |

#### Instances

Instances details

Generic1 (Proxy :: k -> Type) |
Instance details Defined in GHC.Internal.Generics Associated Types
type Rep1 (Proxy :: k -> Type) | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Generics type Rep1 (Proxy :: k -> Type) = D1 ('MetaData "Proxy" "GHC.Internal.Data.Proxy" "ghc-internal" 'False) (C1 ('MetaCons "Proxy" 'PrefixI 'False) (U1 :: k -> Type))
Methods from1 :: forall (a :: k). Proxy a -> Rep1 (Proxy :: k -> Type) a # to1 :: forall (a :: k). Rep1 (Proxy :: k -> Type) a -> Proxy a #
MonadZip (Proxy :: Type -> Type) | Since: base-4.9.0.0
Instance details Defined in Control.Monad.Zip Methods mzip :: Proxy a -> Proxy b -> Proxy (a, b) # mzipWith :: (a -> b -> c) -> Proxy a -> Proxy b -> Proxy c # munzip :: Proxy (a, b) -> (Proxy a, Proxy b) #
Eq1 (Proxy :: Type -> Type) | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Classes Methods liftEq :: (a -> b -> Bool) -> Proxy a -> Proxy b -> Bool #
Ord1 (Proxy :: Type -> Type) | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Classes Methods liftCompare :: (a -> b -> Ordering) -> Proxy a -> Proxy b -> Ordering #
Read1 (Proxy :: Type -> Type) | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Classes Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Proxy a) # liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Proxy a] # liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Proxy a) # liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Proxy a] #
Show1 (Proxy :: Type -> Type) | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Classes Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Proxy a -> ShowS # liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Proxy a] -> ShowS #
Contravariant (Proxy :: Type -> Type) |
Instance details Defined in Data.Functor.Contravariant Methods contramap :: (a' -> a) -> Proxy a -> Proxy a' # (>$) :: b -> Proxy b -> Proxy a #
Alternative (Proxy :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Proxy Methods empty :: Proxy a # (<|>) :: Proxy a -> Proxy a -> Proxy a # some :: Proxy a -> Proxy [a] # many :: Proxy a -> Proxy [a] #
Applicative (Proxy :: Type -> Type) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Proxy Methods pure :: a -> Proxy a # (<*>) :: Proxy (a -> b) -> Proxy a -> Proxy b # liftA2 :: (a -> b -> c) -> Proxy a -> Proxy b -> Proxy c # (*>) :: Proxy a -> Proxy b -> Proxy b # (<*) :: Proxy a -> Proxy b -> Proxy a #
Functor (Proxy :: Type -> Type) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Proxy Methods fmap :: (a -> b) -> Proxy a -> Proxy b # (<$) :: a -> Proxy b -> Proxy a #
Monad (Proxy :: Type -> Type) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Proxy Methods (>>=) :: Proxy a -> (a -> Proxy b) -> Proxy b # (>>) :: Proxy a -> Proxy b -> Proxy b # return :: a -> Proxy a #
MonadPlus (Proxy :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Proxy Methods mzero :: Proxy a # mplus :: Proxy a -> Proxy a -> Proxy a #
Foldable (Proxy :: Type -> Type) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Proxy m -> m # foldMap :: Monoid m => (a -> m) -> Proxy a -> m # foldMap' :: Monoid m => (a -> m) -> Proxy a -> m # foldr :: (a -> b -> b) -> b -> Proxy a -> b # foldr' :: (a -> b -> b) -> b -> Proxy a -> b # foldl :: (b -> a -> b) -> b -> Proxy a -> b # foldl' :: (b -> a -> b) -> b -> Proxy a -> b # foldr1 :: (a -> a -> a) -> Proxy a -> a # foldl1 :: (a -> a -> a) -> Proxy a -> a # toList :: Proxy a -> [a] # null :: Proxy a -> Bool # length :: Proxy a -> Int # elem :: Eq a => a -> Proxy a -> Bool # maximum :: Ord a => Proxy a -> a # minimum :: Ord a => Proxy a -> a # sum :: Num a => Proxy a -> a # product :: Num a => Proxy a -> a #
Traversable (Proxy :: Type -> Type) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Traversable Methods traverse :: Applicative f => (a -> f b) -> Proxy a -> f (Proxy b) # sequenceA :: Applicative f => Proxy (f a) -> f (Proxy a) # mapM :: Monad m => (a -> m b) -> Proxy a -> m (Proxy b) # sequence :: Monad m => Proxy (m a) -> m (Proxy a) #
Monoid (Proxy s) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Proxy Methods mempty :: Proxy s # mappend :: Proxy s -> Proxy s -> Proxy s # mconcat :: [Proxy s] -> Proxy s #
Semigroup (Proxy s) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Proxy Methods (<>) :: Proxy s -> Proxy s -> Proxy s # sconcat :: NonEmpty (Proxy s) -> Proxy s # stimes :: Integral b => b -> Proxy s -> Proxy s #
Data t => Data (Proxy t) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Proxy t -> c (Proxy t) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Proxy t) # toConstr :: Proxy t -> Constr # dataTypeOf :: Proxy t -> DataType # dataCast1 :: Typeable t0 => (forall d. Data d => c (t0 d)) -> Maybe (c (Proxy t)) # dataCast2 :: Typeable t0 => (forall d e. (Data d, Data e) => c (t0 d e)) -> Maybe (c (Proxy t)) # gmapT :: (forall b. Data b => b -> b) -> Proxy t -> Proxy t # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Proxy t -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Proxy t -> r # gmapQ :: (forall d. Data d => d -> u) -> Proxy t -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Proxy t -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Proxy t -> m (Proxy t) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Proxy t -> m (Proxy t) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Proxy t -> m (Proxy t) #
Bounded (Proxy t) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Proxy Methods minBound :: Proxy t # maxBound :: Proxy t #
Enum (Proxy s) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Proxy Methods succ :: Proxy s -> Proxy s # pred :: Proxy s -> Proxy s # toEnum :: Int -> Proxy s # fromEnum :: Proxy s -> Int # enumFrom :: Proxy s -> [Proxy s] # enumFromThen :: Proxy s -> Proxy s -> [Proxy s] # enumFromTo :: Proxy s -> Proxy s -> [Proxy s] # enumFromThenTo :: Proxy s -> Proxy s -> Proxy s -> [Proxy s] #
Generic (Proxy t) |
Instance details Defined in GHC.Internal.Generics Associated Types
type Rep (Proxy t) | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Generics type Rep (Proxy t) = D1 ('MetaData "Proxy" "GHC.Internal.Data.Proxy" "ghc-internal" 'False) (C1 ('MetaCons "Proxy" 'PrefixI 'False) (U1 :: Type -> Type))
Methods from :: Proxy t -> Rep (Proxy t) x # to :: Rep (Proxy t) x -> Proxy t #
Ix (Proxy s) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Proxy Methods range :: (Proxy s, Proxy s) -> [Proxy s] # index :: (Proxy s, Proxy s) -> Proxy s -> Int # unsafeIndex :: (Proxy s, Proxy s) -> Proxy s -> Int # inRange :: (Proxy s, Proxy s) -> Proxy s -> Bool # rangeSize :: (Proxy s, Proxy s) -> Int # unsafeRangeSize :: (Proxy s, Proxy s) -> Int #
Read (Proxy t) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Proxy Methods readsPrec :: Int -> ReadS (Proxy t) # readList :: ReadS [Proxy t] # readPrec :: ReadPrec (Proxy t) # readListPrec :: ReadPrec [Proxy t] #
Show (Proxy s) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Proxy Methods showsPrec :: Int -> Proxy s -> ShowS # show :: Proxy s -> String # showList :: [Proxy s] -> ShowS #
Eq (Proxy s) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Proxy Methods (==) :: Proxy s -> Proxy s -> Bool # (/=) :: Proxy s -> Proxy s -> Bool #
Ord (Proxy s) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Proxy Methods compare :: Proxy s -> Proxy s -> Ordering # (<) :: Proxy s -> Proxy s -> Bool # (<=) :: Proxy s -> Proxy s -> Bool # (>) :: Proxy s -> Proxy s -> Bool # (>=) :: Proxy s -> Proxy s -> Bool # max :: Proxy s -> Proxy s -> Proxy s # min :: Proxy s -> Proxy s -> Proxy s #
type Rep1 (Proxy :: k -> Type) | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Generics type Rep1 (Proxy :: k -> Type) = D1 ('MetaData "Proxy" "GHC.Internal.Data.Proxy" "ghc-internal" 'False) (C1 ('MetaCons "Proxy" 'PrefixI 'False) (U1 :: k -> Type))
type Rep (Proxy t) | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Generics type Rep (Proxy t) = D1 ('MetaData "Proxy" "GHC.Internal.Data.Proxy" "ghc-internal" 'False) (C1 ('MetaCons "Proxy" 'PrefixI 'False) (U1 :: Type -> Type))

asProxyTypeOf :: a -> proxy a -> a #

`asProxyTypeOf` 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 tag of the second.

    >>> import GHC.Internal.Word
    >>> :type asProxyTypeOf 123 (Proxy :: Proxy Word8)
    asProxyTypeOf 123 (Proxy :: Proxy Word8) :: Word8

Note the lower-case `proxy` in the definition. This allows any type constructor with just one argument to be passed to the function, for example we could also write

    >>> import GHC.Internal.Word
    >>> :type asProxyTypeOf 123 (Just (undefined :: Word8))
    asProxyTypeOf 123 (Just (undefined :: Word8)) :: Word8

## Partial

data Partial a #

Partialiality wrapper.

#### Instances

Instances details

Applicative Partial # |
Instance details Defined in Foundation.Partial Methods pure :: a -> Partial a # (<*>) :: Partial (a -> b) -> Partial a -> Partial b # liftA2 :: (a -> b -> c) -> Partial a -> Partial b -> Partial c # (*>) :: Partial a -> Partial b -> Partial b # (<*) :: Partial a -> Partial b -> Partial a #
Functor Partial # |
Instance details Defined in Foundation.Partial Methods fmap :: (a -> b) -> Partial a -> Partial b # (<$) :: a -> Partial b -> Partial a #
Monad Partial # |
Instance details Defined in Foundation.Partial Methods (>>=) :: Partial a -> (a -> Partial b) -> Partial b # (>>) :: Partial a -> Partial b -> Partial b # return :: a -> Partial a #

partial :: a -> Partial a #

Create a value that is partial. this can only be unwrap using the `fromPartial` function

data PartialError #

An error related to the evaluation of a Partial value that failed.

it contains the name of the function and the reason for failure

#### Instances

Instances details

Exception PartialError # |
Instance details Defined in Foundation.Partial Methods toException :: PartialError -> SomeException # fromException :: SomeException -> Maybe PartialError # displayException :: PartialError -> String # backtraceDesired :: PartialError -> Bool #
Show PartialError # |
Instance details Defined in Foundation.Partial Methods showsPrec :: Int -> PartialError -> ShowS # show :: PartialError -> String # showList :: [PartialError] -> ShowS #
Eq PartialError # |
Instance details Defined in Foundation.Partial Methods (==) :: PartialError -> PartialError -> Bool # (/=) :: PartialError -> PartialError -> Bool #

fromPartial :: Partial a -> a #

Dewrap a possible partial value

ifThenElse :: Bool -> a -> a -> a #

for support of if .. then .. else

## Old Prelude Strings as [Char] with bridge back and forth

type LString = String #

Alias to Prelude String ([Char]) for compatibility purpose