Protolude.Base

protolude-0.3.4: A small prelude.

Safe Haskell | Unsafe
Language | Haskell2010

Protolude.Base

Synopsis

- module GHC.OverloadedLabels
- module GHC.Records
- data Int
- data Float = F# Float#
- data Char
- data IO a
- data Bool
- data Double = D# Double#
- data Word
- data Ordering
- class a ~R# b => Coercible (a :: k) (b :: k)
- data Symbol
- data Integer
- type Type = TYPE LiftedRep
- type Constraint = CONSTRAINT LiftedRep
- (++) :: [a] -> [a] -> [a]
- seq :: a -> b -> b
- print :: Show a => a -> IO ()
- class Num a where
  - (+) :: a -> a -> a
  - (-) :: a -> a -> a
  - (*) :: a -> a -> a
  - negate :: a -> a
  - abs :: a -> a
  - signum :: a -> a
  - fromInteger :: Integer -> a
- class Num a => Fractional a where
  - (/) :: a -> a -> a
  - recip :: a -> a
  - fromRational :: Rational -> 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]
- fromIntegral :: (Integral a, Num b) => a -> b
- realToFrac :: (Real a, Fractional b) => a -> b
- class (Real a, Enum a) => Integral a where
  - quot :: a -> a -> a
  - rem :: a -> a -> a
  - div :: a -> a -> a
  - mod :: a -> a -> a
  - quotRem :: a -> a -> (a, a)
  - divMod :: a -> a -> (a, a)
  - toInteger :: a -> Integer
- class (Num a, Ord a) => Real a where
  - toRational :: a -> Rational
- class Bounded a where
  - minBound :: a
  - maxBound :: a
- class Fractional a => Floating a where
  - pi :: a
  - exp :: a -> a
  - log :: a -> a
  - sqrt :: a -> a
  - (**) :: a -> a -> a
  - logBase :: a -> a -> a
  - sin :: a -> a
  - cos :: a -> a
  - tan :: a -> a
  - asin :: a -> a
  - acos :: a -> a
  - atan :: a -> a
  - sinh :: a -> a
  - cosh :: a -> a
  - tanh :: a -> a
  - asinh :: a -> a
  - acosh :: a -> a
  - atanh :: a -> a
  - log1p :: a -> a
  - expm1 :: a -> a
  - log1pexp :: a -> a
  - log1mexp :: a -> a
- class (RealFrac a, Floating a) => RealFloat a where
  - floatRadix :: a -> Integer
  - floatDigits :: a -> Int
  - floatRange :: a -> (Int, Int)
  - decodeFloat :: a -> (Integer, Int)
  - encodeFloat :: Integer -> Int -> a
  - exponent :: a -> Int
  - significand :: a -> a
  - scaleFloat :: Int -> a -> a
  - isNaN :: a -> Bool
  - isInfinite :: a -> Bool
  - isDenormalized :: a -> Bool
  - isNegativeZero :: a -> Bool
  - isIEEE :: a -> Bool
  - atan2 :: a -> a -> a
- class (Real a, Fractional a) => RealFrac a where
  - properFraction :: Integral b => a -> (b, a)
  - truncate :: Integral b => a -> b
  - round :: Integral b => a -> b
  - ceiling :: Integral b => a -> b
  - floor :: Integral b => a -> b
- class Show a where
  - showsPrec :: Int -> a -> ShowS
  - show :: a -> String
  - showList :: [a] -> ShowS
- class KnownNat (n :: Nat)
- class KnownSymbol (n :: Symbol)
- data Ratio a
- type Rational = Ratio Integer
- data Ptr a
- data FunPtr a
- data StaticPtr a
- data CallStack
- (^) :: (Num a, Integral b) => a -> b -> a
- type family CmpNat (a :: Natural) (b :: Natural) :: Ordering where ...
- data SrcLoc = SrcLoc String Int Int
- type HasCallStack = ?callStack :: CallStack
- getCallStack :: CallStack -> [([Char], SrcLoc)]
- ord :: Char -> Int
- minInt :: Int
- maxInt :: Int
- until :: (a -> Bool) -> (a -> a) -> a -> a
- asTypeOf :: a -> a -> a
- currentCallStack :: IO [String]
- prettySrcLoc :: SrcLoc -> String
- prettyCallStack :: CallStack -> String
- subtract :: Num a => a -> a -> a
- boundedEnumFrom :: (Enum a, Bounded a) => a -> [a]
- boundedEnumFromThen :: (Enum a, Bounded a) => a -> a -> [a]
- divZeroError :: a
- ratioZeroDenominatorError :: a
- overflowError :: a
- underflowError :: a
- ratioPrec :: Int
- ratioPrec1 :: Int
- infinity :: Rational
- notANumber :: Rational
- reduce :: Integral a => a -> a -> Ratio a
- (%) :: Integral a => a -> a -> Ratio a
- numerator :: Ratio a -> a
- denominator :: Ratio a -> a
- numericEnumFrom :: Fractional a => a -> [a]
- numericEnumFromThen :: Fractional a => a -> a -> [a]
- numericEnumFromTo :: (Ord a, Fractional a) => a -> a -> [a]
- numericEnumFromThenTo :: (Ord a, Fractional a) => a -> a -> a -> [a]
- showSigned :: Real a => (a -> ShowS) -> Int -> a -> ShowS
- even :: Integral a => a -> Bool
- odd :: Integral a => a -> Bool
- (^^) :: (Fractional a, Integral b) => a -> b -> a
- (^%^) :: Integral a => Rational -> a -> Rational
- (^^%^^) :: Integral a => Rational -> a -> Rational
- gcd :: Integral a => a -> a -> a
- lcm :: Integral a => a -> a -> a
- integralEnumFrom :: (Integral a, Bounded a) => a -> [a]
- integralEnumFromThen :: (Integral a, Bounded a) => a -> a -> [a]
- integralEnumFromTo :: Integral a => a -> a -> [a]
- integralEnumFromThenTo :: Integral a => a -> a -> a -> [a]
- showFloat :: RealFloat a => a -> ShowS
- showSignedFloat :: RealFloat a => (a -> ShowS) -> Int -> a -> ShowS
- data SomeNat = KnownNat n => SomeNat (Proxy n)
- type Nat = Natural
- natVal :: forall (n :: Nat) proxy. KnownNat n => proxy n -> Integer
- someNatVal :: Integer -> Maybe SomeNat
- data SomeSymbol = KnownSymbol n => SomeSymbol (Proxy n)
- symbolVal :: forall (n :: Symbol) proxy. KnownSymbol n => proxy n -> String
- someSymbolVal :: String -> SomeSymbol
- putStr :: String -> IO ()
- putStrLn :: String -> IO ()
- callStack :: HasCallStack => CallStack
- withFrozenCallStack :: HasCallStack => (HasCallStack => a) -> a
- data Location = Location {
  - objectName :: String
  - functionName :: String
  - srcLoc :: Maybe SrcLoc
  }
- getStackTrace :: IO (Maybe [Location])
- showStackTrace :: IO (Maybe String)
- ($!) :: (a -> b) -> a -> b

# Documentation

module GHC.OverloadedLabels

module GHC.Records

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 #
NFData Int |
Instance details Defined in Control.DeepSeq Methods rnf :: Int -> () #
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 #
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 #
Hashable Int |
Instance details Defined in Data.Hashable.Class Methods hashWithSalt :: Int -> Int -> Int # hash :: Int -> Int #
IArray UArray Int |
Instance details Defined in Data.Array.Base Methods bounds :: Ix i => UArray i Int -> (i, i) # numElements :: Ix i => UArray i Int -> Int # unsafeArray :: Ix i => (i, i) -> [(Int, Int)] -> UArray i Int # unsafeAt :: Ix i => UArray i Int -> Int -> Int # unsafeReplace :: Ix i => UArray i Int -> [(Int, Int)] -> UArray i Int # unsafeAccum :: Ix i => (Int -> e' -> Int) -> UArray i Int -> [(Int, e')] -> UArray i Int # unsafeAccumArray :: Ix i => (Int -> e' -> Int) -> Int -> (i, i) -> [(Int, e')] -> UArray i Int #
Lift Int |
Instance details Defined in Language.Haskell.TH.Syntax Methods lift :: Quote m => Int -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => Int -> Code m Int #
MArray IOUArray Int IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i Int -> IO (i, i) # getNumElements :: Ix i => IOUArray i Int -> IO Int # newArray :: Ix i => (i, i) -> Int -> IO (IOUArray i Int) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i Int) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i Int) # unsafeRead :: Ix i => IOUArray i Int -> Int -> IO Int # unsafeWrite :: Ix i => IOUArray i Int -> Int -> Int -> IO () #
GEq1 v (UInt :: Type -> Type) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftEq :: Eq1Args v a b -> UInt a -> UInt b -> Bool #
GOrd1 v (UInt :: Type -> Type) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftCompare :: Ord1Args v a b -> UInt a -> UInt b -> Ordering #
GShow1Con v (UInt :: Type -> Type) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftShowsPrecCon :: Options -> ConType -> Show1Args v a -> Int -> UInt a -> ShowS #
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) #
IsNullaryCon (UInt :: Type -> Type) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods isNullaryCon :: UInt a -> Bool #
MArray (STUArray s) Int (ST s) |
Instance details Defined in Data.Array.Base Methods getBounds :: Ix i => STUArray s i Int -> ST s (i, i) # getNumElements :: Ix i => STUArray s i Int -> ST s Int # newArray :: Ix i => (i, i) -> Int -> ST s (STUArray s i Int) # newArray_ :: Ix i => (i, i) -> ST s (STUArray s i Int) # unsafeNewArray_ :: Ix i => (i, i) -> ST s (STUArray s i Int) # unsafeRead :: Ix i => STUArray s i Int -> Int -> ST s Int # unsafeWrite :: Ix i => STUArray s i Int -> Int -> Int -> ST s () #
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 #
GEq (UInt p) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods geq :: UInt p -> UInt p -> Bool #
GOrd (UInt p) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gcompare :: UInt p -> UInt p -> Ordering #
GShowCon (UInt p) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gshowsPrecCon :: Options -> ConType -> Int -> UInt p -> ShowS
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 #
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 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.

Constructors

F# Float# |

#### Instances

Instances details

PrintfArg Float | Since: base-2.1
Instance details Defined in Text.Printf Methods formatArg :: Float -> FieldFormatter # parseFormat :: Float -> ModifierParser #
NFData Float |
Instance details Defined in Control.DeepSeq Methods rnf :: 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 #
Hashable Float | Note: prior to `hashable-1.3.0.0`, `hash 0.0 /= hash (-0.0)` The `hash` of NaN is not well defined. Since: hashable-1.3.0.0
Instance details Defined in Data.Hashable.Class Methods hashWithSalt :: Int -> Float -> Int # hash :: Float -> Int #
IArray UArray Float |
Instance details Defined in Data.Array.Base Methods bounds :: Ix i => UArray i Float -> (i, i) # numElements :: Ix i => UArray i Float -> Int # unsafeArray :: Ix i => (i, i) -> [(Int, Float)] -> UArray i Float # unsafeAt :: Ix i => UArray i Float -> Int -> Float # unsafeReplace :: Ix i => UArray i Float -> [(Int, Float)] -> UArray i Float # unsafeAccum :: Ix i => (Float -> e' -> Float) -> UArray i Float -> [(Int, e')] -> UArray i Float # unsafeAccumArray :: Ix i => (Float -> e' -> Float) -> Float -> (i, i) -> [(Int, e')] -> UArray i Float #
Lift Float |
Instance details Defined in Language.Haskell.TH.Syntax Methods lift :: Quote m => Float -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => Float -> Code m Float #
MArray IOUArray Float IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i Float -> IO (i, i) # getNumElements :: Ix i => IOUArray i Float -> IO Int # newArray :: Ix i => (i, i) -> Float -> IO (IOUArray i Float) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i Float) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i Float) # unsafeRead :: Ix i => IOUArray i Float -> Int -> IO Float # unsafeWrite :: Ix i => IOUArray i Float -> Int -> Float -> IO () #
GEq1 v (UFloat :: Type -> Type) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftEq :: Eq1Args v a b -> UFloat a -> UFloat b -> Bool #
GOrd1 v (UFloat :: Type -> Type) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftCompare :: Ord1Args v a b -> UFloat a -> UFloat b -> Ordering #
GShow1Con v (UFloat :: Type -> Type) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftShowsPrecCon :: Options -> ConType -> Show1Args v a -> Int -> UFloat a -> ShowS #
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) #
IsNullaryCon (UFloat :: Type -> Type) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods isNullaryCon :: UFloat a -> Bool #
MArray (STUArray s) Float (ST s) |
Instance details Defined in Data.Array.Base Methods getBounds :: Ix i => STUArray s i Float -> ST s (i, i) # getNumElements :: Ix i => STUArray s i Float -> ST s Int # newArray :: Ix i => (i, i) -> Float -> ST s (STUArray s i Float) # newArray_ :: Ix i => (i, i) -> ST s (STUArray s i Float) # unsafeNewArray_ :: Ix i => (i, i) -> ST s (STUArray s i Float) # unsafeRead :: Ix i => STUArray s i Float -> Int -> ST s Float # unsafeWrite :: Ix i => STUArray s i Float -> Int -> Float -> ST s () #
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 #
GEq (UFloat p) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods geq :: UFloat p -> UFloat p -> Bool #
GOrd (UFloat p) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gcompare :: UFloat p -> UFloat p -> Ordering #
GShowCon (UFloat p) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gshowsPrecCon :: Options -> ConType -> Int -> UFloat p -> ShowS
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 #
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 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 #
NFData Char |
Instance details Defined in Control.DeepSeq Methods rnf :: 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 #
Hashable Char |
Instance details Defined in Data.Hashable.Class Methods hashWithSalt :: Int -> Char -> Int # hash :: Char -> Int #
IArray UArray Char |
Instance details Defined in Data.Array.Base Methods bounds :: Ix i => UArray i Char -> (i, i) # numElements :: Ix i => UArray i Char -> Int # unsafeArray :: Ix i => (i, i) -> [(Int, Char)] -> UArray i Char # unsafeAt :: Ix i => UArray i Char -> Int -> Char # unsafeReplace :: Ix i => UArray i Char -> [(Int, Char)] -> UArray i Char # unsafeAccum :: Ix i => (Char -> e' -> Char) -> UArray i Char -> [(Int, e')] -> UArray i Char # unsafeAccumArray :: Ix i => (Char -> e' -> Char) -> Char -> (i, i) -> [(Int, e')] -> UArray i Char #
TestCoercion SChar | @since base-4.18.0.0
Instance details Defined in GHC.Internal.TypeLits Methods testCoercion :: forall (a :: Char) (b :: Char). SChar a -> SChar b -> Maybe (Coercion a b) #
TestEquality SChar | @since base-4.18.0.0
Instance details Defined in GHC.Internal.TypeLits Methods testEquality :: forall (a :: Char) (b :: Char). SChar a -> SChar b -> Maybe (a :~: b) #
StringConv ByteString String # |
Instance details Defined in Protolude.Conv Methods strConv :: Leniency -> ByteString -> String #
StringConv ByteString String # |
Instance details Defined in Protolude.Conv Methods strConv :: Leniency -> ByteString -> String #
StringConv Text String # |
Instance details Defined in Protolude.Conv Methods strConv :: Leniency -> Text -> String #
StringConv Text String # |
Instance details Defined in Protolude.Conv Methods strConv :: Leniency -> Text -> String #
StringConv String ByteString # |
Instance details Defined in Protolude.Conv Methods strConv :: Leniency -> String -> ByteString #
StringConv String ByteString # |
Instance details Defined in Protolude.Conv Methods strConv :: Leniency -> String -> ByteString #
StringConv String Text # |
Instance details Defined in Protolude.Conv Methods strConv :: Leniency -> String -> Text #
StringConv String Text # |
Instance details Defined in Protolude.Conv Methods strConv :: Leniency -> String -> Text #
StringConv String String # |
Instance details Defined in Protolude.Conv Methods strConv :: Leniency -> String -> String #
ConvertText Text String # |
Instance details Defined in Protolude.ConvertText Methods toS :: Text -> String #
ConvertText Text String # |
Instance details Defined in Protolude.ConvertText Methods toS :: Text -> String #
ConvertText String Text # |
Instance details Defined in Protolude.ConvertText Methods toS :: String -> Text #
ConvertText String Text # |
Instance details Defined in Protolude.ConvertText Methods toS :: String -> Text #
ConvertText String String # |
Instance details Defined in Protolude.ConvertText Methods toS :: String -> String #
Lift Char |
Instance details Defined in Language.Haskell.TH.Syntax Methods lift :: Quote m => Char -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => Char -> Code m Char #
MArray IOUArray Char IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i Char -> IO (i, i) # getNumElements :: Ix i => IOUArray i Char -> IO Int # newArray :: Ix i => (i, i) -> Char -> IO (IOUArray i Char) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i Char) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i Char) # unsafeRead :: Ix i => IOUArray i Char -> Int -> IO Char # unsafeWrite :: Ix i => IOUArray i Char -> Int -> Char -> IO () #
GEq1 v (UChar :: Type -> Type) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftEq :: Eq1Args v a b -> UChar a -> UChar b -> Bool #
GOrd1 v (UChar :: Type -> Type) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftCompare :: Ord1Args v a b -> UChar a -> UChar b -> Ordering #
GShow1Con v (UChar :: Type -> Type) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftShowsPrecCon :: Options -> ConType -> Show1Args v a -> Int -> UChar a -> ShowS #
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 #
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) #
Print [Char] # |
Instance details Defined in Protolude.Show Methods hPutStr :: MonadIO m => Handle -> [Char] -> m () # putStr :: MonadIO m => [Char] -> m () # hPutStrLn :: MonadIO m => Handle -> [Char] -> m () # putStrLn :: MonadIO m => [Char] -> m () # putErrLn :: MonadIO m => [Char] -> m () #
IsNullaryCon (UChar :: Type -> Type) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods isNullaryCon :: UChar a -> Bool #
MArray (STUArray s) Char (ST s) |
Instance details Defined in Data.Array.Base Methods getBounds :: Ix i => STUArray s i Char -> ST s (i, i) # getNumElements :: Ix i => STUArray s i Char -> ST s Int # newArray :: Ix i => (i, i) -> Char -> ST s (STUArray s i Char) # newArray_ :: Ix i => (i, i) -> ST s (STUArray s i Char) # unsafeNewArray_ :: Ix i => (i, i) -> ST s (STUArray s i Char) # unsafeRead :: Ix i => STUArray s i Char -> Int -> ST s Char # unsafeWrite :: Ix i => STUArray s i Char -> Int -> Char -> ST s () #
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 #
GEq (UChar p) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods geq :: UChar p -> UChar p -> Bool #
GOrd (UChar p) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gcompare :: UChar p -> UChar p -> Ordering #
GShowCon (UChar p) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gshowsPrecCon :: Options -> ConType -> Int -> UChar p -> ShowS
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 #
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 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 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 #
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 #
Quasi IO |
Instance details Defined in Language.Haskell.TH.Syntax Methods qNewName :: String -> IO Name # qReport :: Bool -> String -> IO () # qRecover :: IO a -> IO a -> IO a # qLookupName :: Bool -> String -> IO (Maybe Name) # qReify :: Name -> IO Info # qReifyFixity :: Name -> IO (Maybe Fixity) # qReifyType :: Name -> IO Type # qReifyInstances :: Name -> [Type] -> IO [Dec] # qReifyRoles :: Name -> IO [Role] # qReifyAnnotations :: Data a => AnnLookup -> IO [a] # qReifyModule :: Module -> IO ModuleInfo # qReifyConStrictness :: Name -> IO [DecidedStrictness] # qLocation :: IO Loc # qRunIO :: IO a -> IO a # qGetPackageRoot :: IO FilePath # qAddDependentFile :: FilePath -> IO () # qAddTempFile :: String -> IO FilePath # qAddTopDecls :: [Dec] -> IO () # qAddForeignFilePath :: ForeignSrcLang -> String -> IO () # qAddModFinalizer :: Q () -> IO () # qAddCorePlugin :: String -> IO () # qGetQ :: Typeable a => IO (Maybe a) # qPutQ :: Typeable a => a -> IO () # qIsExtEnabled :: Extension -> IO Bool # qExtsEnabled :: IO [Extension] # qPutDoc :: DocLoc -> String -> IO () # qGetDoc :: DocLoc -> IO (Maybe String) #
Quote IO |
Instance details Defined in Language.Haskell.TH.Syntax Methods newName :: String -> IO Name #
MonadError IOException IO |
Instance details Defined in Control.Monad.Error.Class Methods throwError :: IOException -> IO a # catchError :: IO a -> (IOException -> IO a) -> IO a #
MArray IOUArray Int16 IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i Int16 -> IO (i, i) # getNumElements :: Ix i => IOUArray i Int16 -> IO Int # newArray :: Ix i => (i, i) -> Int16 -> IO (IOUArray i Int16) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i Int16) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i Int16) # unsafeRead :: Ix i => IOUArray i Int16 -> Int -> IO Int16 # unsafeWrite :: Ix i => IOUArray i Int16 -> Int -> Int16 -> IO () #
MArray IOUArray Int32 IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i Int32 -> IO (i, i) # getNumElements :: Ix i => IOUArray i Int32 -> IO Int # newArray :: Ix i => (i, i) -> Int32 -> IO (IOUArray i Int32) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i Int32) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i Int32) # unsafeRead :: Ix i => IOUArray i Int32 -> Int -> IO Int32 # unsafeWrite :: Ix i => IOUArray i Int32 -> Int -> Int32 -> IO () #
MArray IOUArray Int64 IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i Int64 -> IO (i, i) # getNumElements :: Ix i => IOUArray i Int64 -> IO Int # newArray :: Ix i => (i, i) -> Int64 -> IO (IOUArray i Int64) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i Int64) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i Int64) # unsafeRead :: Ix i => IOUArray i Int64 -> Int -> IO Int64 # unsafeWrite :: Ix i => IOUArray i Int64 -> Int -> Int64 -> IO () #
MArray IOUArray Int8 IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i Int8 -> IO (i, i) # getNumElements :: Ix i => IOUArray i Int8 -> IO Int # newArray :: Ix i => (i, i) -> Int8 -> IO (IOUArray i Int8) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i Int8) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i Int8) # unsafeRead :: Ix i => IOUArray i Int8 -> Int -> IO Int8 # unsafeWrite :: Ix i => IOUArray i Int8 -> Int -> Int8 -> IO () #
MArray IOUArray Word16 IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i Word16 -> IO (i, i) # getNumElements :: Ix i => IOUArray i Word16 -> IO Int # newArray :: Ix i => (i, i) -> Word16 -> IO (IOUArray i Word16) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i Word16) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i Word16) # unsafeRead :: Ix i => IOUArray i Word16 -> Int -> IO Word16 # unsafeWrite :: Ix i => IOUArray i Word16 -> Int -> Word16 -> IO () #
MArray IOUArray Word32 IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i Word32 -> IO (i, i) # getNumElements :: Ix i => IOUArray i Word32 -> IO Int # newArray :: Ix i => (i, i) -> Word32 -> IO (IOUArray i Word32) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i Word32) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i Word32) # unsafeRead :: Ix i => IOUArray i Word32 -> Int -> IO Word32 # unsafeWrite :: Ix i => IOUArray i Word32 -> Int -> Word32 -> IO () #
MArray IOUArray Word64 IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i Word64 -> IO (i, i) # getNumElements :: Ix i => IOUArray i Word64 -> IO Int # newArray :: Ix i => (i, i) -> Word64 -> IO (IOUArray i Word64) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i Word64) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i Word64) # unsafeRead :: Ix i => IOUArray i Word64 -> Int -> IO Word64 # unsafeWrite :: Ix i => IOUArray i Word64 -> Int -> Word64 -> IO () #
MArray IOUArray Word8 IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i Word8 -> IO (i, i) # getNumElements :: Ix i => IOUArray i Word8 -> IO Int # newArray :: Ix i => (i, i) -> Word8 -> IO (IOUArray i Word8) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i Word8) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i Word8) # unsafeRead :: Ix i => IOUArray i Word8 -> Int -> IO Word8 # unsafeWrite :: Ix i => IOUArray i Word8 -> Int -> Word8 -> IO () #
MArray IOUArray Bool IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i Bool -> IO (i, i) # getNumElements :: Ix i => IOUArray i Bool -> IO Int # newArray :: Ix i => (i, i) -> Bool -> IO (IOUArray i Bool) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i Bool) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i Bool) # unsafeRead :: Ix i => IOUArray i Bool -> Int -> IO Bool # unsafeWrite :: Ix i => IOUArray i Bool -> Int -> Bool -> IO () #
MArray IOUArray Char IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i Char -> IO (i, i) # getNumElements :: Ix i => IOUArray i Char -> IO Int # newArray :: Ix i => (i, i) -> Char -> IO (IOUArray i Char) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i Char) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i Char) # unsafeRead :: Ix i => IOUArray i Char -> Int -> IO Char # unsafeWrite :: Ix i => IOUArray i Char -> Int -> Char -> IO () #
MArray IOUArray Double IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i Double -> IO (i, i) # getNumElements :: Ix i => IOUArray i Double -> IO Int # newArray :: Ix i => (i, i) -> Double -> IO (IOUArray i Double) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i Double) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i Double) # unsafeRead :: Ix i => IOUArray i Double -> Int -> IO Double # unsafeWrite :: Ix i => IOUArray i Double -> Int -> Double -> IO () #
MArray IOUArray Float IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i Float -> IO (i, i) # getNumElements :: Ix i => IOUArray i Float -> IO Int # newArray :: Ix i => (i, i) -> Float -> IO (IOUArray i Float) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i Float) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i Float) # unsafeRead :: Ix i => IOUArray i Float -> Int -> IO Float # unsafeWrite :: Ix i => IOUArray i Float -> Int -> Float -> IO () #
MArray IOUArray Int IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i Int -> IO (i, i) # getNumElements :: Ix i => IOUArray i Int -> IO Int # newArray :: Ix i => (i, i) -> Int -> IO (IOUArray i Int) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i Int) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i Int) # unsafeRead :: Ix i => IOUArray i Int -> Int -> IO Int # unsafeWrite :: Ix i => IOUArray i Int -> Int -> Int -> IO () #
MArray IOUArray Word IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i Word -> IO (i, i) # getNumElements :: Ix i => IOUArray i Word -> IO Int # newArray :: Ix i => (i, i) -> Word -> IO (IOUArray i Word) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i Word) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i Word) # unsafeRead :: Ix i => IOUArray i Word -> Int -> IO Word # unsafeWrite :: Ix i => IOUArray i Word -> Int -> Word -> IO () #
Storable e => MArray StorableArray e IO |
Instance details Defined in Data.Array.Storable.Internals Methods getBounds :: Ix i => StorableArray i e -> IO (i, i) # getNumElements :: Ix i => StorableArray i e -> IO Int # newArray :: Ix i => (i, i) -> e -> IO (StorableArray i e) # newArray_ :: Ix i => (i, i) -> IO (StorableArray i e) # unsafeNewArray_ :: Ix i => (i, i) -> IO (StorableArray i e) # unsafeRead :: Ix i => StorableArray i e -> Int -> IO e # unsafeWrite :: Ix i => StorableArray i e -> Int -> e -> IO () #
MArray IOArray e IO |
Instance details Defined in Data.Array.Base Methods getBounds :: Ix i => IOArray i e -> IO (i, i) # getNumElements :: Ix i => IOArray i e -> IO Int # newArray :: Ix i => (i, i) -> e -> IO (IOArray i e) # newArray_ :: Ix i => (i, i) -> IO (IOArray i e) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOArray i e) # unsafeRead :: Ix i => IOArray i e -> Int -> IO e # unsafeWrite :: Ix i => IOArray i e -> Int -> e -> IO () #
MArray TArray e IO | Writes are slow in `IO`.
Instance details Defined in Control.Concurrent.STM.TArray Methods getBounds :: Ix i => TArray i e -> IO (i, i) # getNumElements :: Ix i => TArray i e -> IO Int # newArray :: Ix i => (i, i) -> e -> IO (TArray i e) # newArray_ :: Ix i => (i, i) -> IO (TArray i e) # unsafeNewArray_ :: Ix i => (i, i) -> IO (TArray i e) # unsafeRead :: Ix i => TArray i e -> Int -> IO e # unsafeWrite :: Ix i => TArray i e -> Int -> e -> IO () #
MArray IOUArray (FunPtr a) IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i (FunPtr a) -> IO (i, i) # getNumElements :: Ix i => IOUArray i (FunPtr a) -> IO Int # newArray :: Ix i => (i, i) -> FunPtr a -> IO (IOUArray i (FunPtr a)) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i (FunPtr a)) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i (FunPtr a)) # unsafeRead :: Ix i => IOUArray i (FunPtr a) -> Int -> IO (FunPtr a) # unsafeWrite :: Ix i => IOUArray i (FunPtr a) -> Int -> FunPtr a -> IO () #
MArray IOUArray (Ptr a) IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i (Ptr a) -> IO (i, i) # getNumElements :: Ix i => IOUArray i (Ptr a) -> IO Int # newArray :: Ix i => (i, i) -> Ptr a -> IO (IOUArray i (Ptr a)) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i (Ptr a)) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i (Ptr a)) # unsafeRead :: Ix i => IOUArray i (Ptr a) -> Int -> IO (Ptr a) # unsafeWrite :: Ix i => IOUArray i (Ptr a) -> Int -> Ptr a -> IO () #
MArray IOUArray (StablePtr a) IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i (StablePtr a) -> IO (i, i) # getNumElements :: Ix i => IOUArray i (StablePtr a) -> IO Int # newArray :: Ix i => (i, i) -> StablePtr a -> IO (IOUArray i (StablePtr a)) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i (StablePtr a)) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i (StablePtr a)) # unsafeRead :: Ix i => IOUArray i (StablePtr a) -> Int -> IO (StablePtr a) # unsafeWrite :: Ix i => IOUArray i (StablePtr a) -> Int -> StablePtr a -> IO () #
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 #

data Bool #

#### Instances

Instances details

NFData Bool |
Instance details Defined in Control.DeepSeq Methods rnf :: 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 #
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 #
Hashable Bool |
Instance details Defined in Data.Hashable.Class Methods hashWithSalt :: Int -> Bool -> Int # hash :: Bool -> Int #
IArray UArray Bool |
Instance details Defined in Data.Array.Base Methods bounds :: Ix i => UArray i Bool -> (i, i) # numElements :: Ix i => UArray i Bool -> Int # unsafeArray :: Ix i => (i, i) -> [(Int, Bool)] -> UArray i Bool # unsafeAt :: Ix i => UArray i Bool -> Int -> Bool # unsafeReplace :: Ix i => UArray i Bool -> [(Int, Bool)] -> UArray i Bool # unsafeAccum :: Ix i => (Bool -> e' -> Bool) -> UArray i Bool -> [(Int, e')] -> UArray i Bool # unsafeAccumArray :: Ix i => (Bool -> e' -> Bool) -> Bool -> (i, i) -> [(Int, e')] -> UArray i 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
Lift Bool |
Instance details Defined in Language.Haskell.TH.Syntax Methods lift :: Quote m => Bool -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => Bool -> Code m Bool #
MArray IOUArray Bool IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i Bool -> IO (i, i) # getNumElements :: Ix i => IOUArray i Bool -> IO Int # newArray :: Ix i => (i, i) -> Bool -> IO (IOUArray i Bool) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i Bool) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i Bool) # unsafeRead :: Ix i => IOUArray i Bool -> Int -> IO Bool # unsafeWrite :: Ix i => IOUArray i Bool -> Int -> Bool -> IO () #
MArray (STUArray s) Bool (ST s) |
Instance details Defined in Data.Array.Base Methods getBounds :: Ix i => STUArray s i Bool -> ST s (i, i) # getNumElements :: Ix i => STUArray s i Bool -> ST s Int # newArray :: Ix i => (i, i) -> Bool -> ST s (STUArray s i Bool) # newArray_ :: Ix i => (i, i) -> ST s (STUArray s i Bool) # unsafeNewArray_ :: Ix i => (i, i) -> ST s (STUArray s i Bool) # unsafeRead :: Ix i => STUArray s i Bool -> Int -> ST s Bool # unsafeWrite :: Ix i => STUArray s i Bool -> Int -> Bool -> ST s () #
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 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.

Constructors

D# Double# |

#### Instances

Instances details

PrintfArg Double | Since: base-2.1
Instance details Defined in Text.Printf Methods formatArg :: Double -> FieldFormatter # parseFormat :: Double -> ModifierParser #
NFData Double |
Instance details Defined in Control.DeepSeq Methods rnf :: 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 #
Hashable Double | Note: prior to `hashable-1.3.0.0`, `hash 0.0 /= hash (-0.0)` The `hash` of NaN is not well defined. Since: hashable-1.3.0.0
Instance details Defined in Data.Hashable.Class Methods hashWithSalt :: Int -> Double -> Int # hash :: Double -> Int #
IArray UArray Double |
Instance details Defined in Data.Array.Base Methods bounds :: Ix i => UArray i Double -> (i, i) # numElements :: Ix i => UArray i Double -> Int # unsafeArray :: Ix i => (i, i) -> [(Int, Double)] -> UArray i Double # unsafeAt :: Ix i => UArray i Double -> Int -> Double # unsafeReplace :: Ix i => UArray i Double -> [(Int, Double)] -> UArray i Double # unsafeAccum :: Ix i => (Double -> e' -> Double) -> UArray i Double -> [(Int, e')] -> UArray i Double # unsafeAccumArray :: Ix i => (Double -> e' -> Double) -> Double -> (i, i) -> [(Int, e')] -> UArray i Double #
Lift Double |
Instance details Defined in Language.Haskell.TH.Syntax Methods lift :: Quote m => Double -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => Double -> Code m Double #
MArray IOUArray Double IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i Double -> IO (i, i) # getNumElements :: Ix i => IOUArray i Double -> IO Int # newArray :: Ix i => (i, i) -> Double -> IO (IOUArray i Double) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i Double) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i Double) # unsafeRead :: Ix i => IOUArray i Double -> Int -> IO Double # unsafeWrite :: Ix i => IOUArray i Double -> Int -> Double -> IO () #
GEq1 v (UDouble :: Type -> Type) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftEq :: Eq1Args v a b -> UDouble a -> UDouble b -> Bool #
GOrd1 v (UDouble :: Type -> Type) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftCompare :: Ord1Args v a b -> UDouble a -> UDouble b -> Ordering #
GShow1Con v (UDouble :: Type -> Type) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftShowsPrecCon :: Options -> ConType -> Show1Args v a -> Int -> UDouble a -> ShowS #
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) #
IsNullaryCon (UDouble :: Type -> Type) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods isNullaryCon :: UDouble a -> Bool #
MArray (STUArray s) Double (ST s) |
Instance details Defined in Data.Array.Base Methods getBounds :: Ix i => STUArray s i Double -> ST s (i, i) # getNumElements :: Ix i => STUArray s i Double -> ST s Int # newArray :: Ix i => (i, i) -> Double -> ST s (STUArray s i Double) # newArray_ :: Ix i => (i, i) -> ST s (STUArray s i Double) # unsafeNewArray_ :: Ix i => (i, i) -> ST s (STUArray s i Double) # unsafeRead :: Ix i => STUArray s i Double -> Int -> ST s Double # unsafeWrite :: Ix i => STUArray s i Double -> Int -> Double -> ST s () #
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 #
GEq (UDouble p) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods geq :: UDouble p -> UDouble p -> Bool #
GOrd (UDouble p) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gcompare :: UDouble p -> UDouble p -> Ordering #
GShowCon (UDouble p) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gshowsPrecCon :: Options -> ConType -> Int -> UDouble p -> ShowS
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 #
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)))

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 #
NFData Word |
Instance details Defined in Control.DeepSeq Methods rnf :: 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 #
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 #
Hashable Word |
Instance details Defined in Data.Hashable.Class Methods hashWithSalt :: Int -> Word -> Int # hash :: Word -> Int #
IArray UArray Word |
Instance details Defined in Data.Array.Base Methods bounds :: Ix i => UArray i Word -> (i, i) # numElements :: Ix i => UArray i Word -> Int # unsafeArray :: Ix i => (i, i) -> [(Int, Word)] -> UArray i Word # unsafeAt :: Ix i => UArray i Word -> Int -> Word # unsafeReplace :: Ix i => UArray i Word -> [(Int, Word)] -> UArray i Word # unsafeAccum :: Ix i => (Word -> e' -> Word) -> UArray i Word -> [(Int, e')] -> UArray i Word # unsafeAccumArray :: Ix i => (Word -> e' -> Word) -> Word -> (i, i) -> [(Int, e')] -> UArray i Word #
Lift Word |
Instance details Defined in Language.Haskell.TH.Syntax Methods lift :: Quote m => Word -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => Word -> Code m Word #
MArray IOUArray Word IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i Word -> IO (i, i) # getNumElements :: Ix i => IOUArray i Word -> IO Int # newArray :: Ix i => (i, i) -> Word -> IO (IOUArray i Word) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i Word) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i Word) # unsafeRead :: Ix i => IOUArray i Word -> Int -> IO Word # unsafeWrite :: Ix i => IOUArray i Word -> Int -> Word -> IO () #
GEq1 v (UWord :: Type -> Type) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftEq :: Eq1Args v a b -> UWord a -> UWord b -> Bool #
GOrd1 v (UWord :: Type -> Type) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftCompare :: Ord1Args v a b -> UWord a -> UWord b -> Ordering #
GShow1Con v (UWord :: Type -> Type) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftShowsPrecCon :: Options -> ConType -> Show1Args v a -> Int -> UWord a -> ShowS #
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) #
IsNullaryCon (UWord :: Type -> Type) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods isNullaryCon :: UWord a -> Bool #
MArray (STUArray s) Word (ST s) |
Instance details Defined in Data.Array.Base Methods getBounds :: Ix i => STUArray s i Word -> ST s (i, i) # getNumElements :: Ix i => STUArray s i Word -> ST s Int # newArray :: Ix i => (i, i) -> Word -> ST s (STUArray s i Word) # newArray_ :: Ix i => (i, i) -> ST s (STUArray s i Word) # unsafeNewArray_ :: Ix i => (i, i) -> ST s (STUArray s i Word) # unsafeRead :: Ix i => STUArray s i Word -> Int -> ST s Word # unsafeWrite :: Ix i => STUArray s i Word -> Int -> Word -> ST s () #
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 #
GEq (UWord p) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods geq :: UWord p -> UWord p -> Bool #
GOrd (UWord p) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gcompare :: UWord p -> UWord p -> Ordering #
GShowCon (UWord p) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gshowsPrecCon :: Options -> ConType -> Int -> UWord p -> ShowS
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 #
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 Ordering #

#### Instances

Instances details

NFData Ordering |
Instance details Defined in Control.DeepSeq Methods rnf :: Ordering -> () #
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 #
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 #
Hashable Ordering |
Instance details Defined in Data.Hashable.Class Methods hashWithSalt :: Int -> Ordering -> Int # hash :: Ordering -> Int #
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)))

class a ~R# b => Coercible (a :: k) (b :: k) #

`Coercible` is a two-parameter class that has instances for types `a` and `b` if the compiler can infer that they have the same representation. This class does not have regular instances; instead they are created on-the-fly during type-checking. Trying to manually declare an instance of `Coercible` is an error.

Nevertheless one can pretend that the following three kinds of instances exist. First, as a trivial base-case:

    instance Coercible a a

Furthermore, for every type constructor there is an instance that allows to coerce under the type constructor. For example, let `D` be a prototypical type constructor (`data` or `newtype`) with three type arguments, which have roles `nominal`, `representational` resp. `phantom`. Then there is an instance of the form

    instance Coercible b b' => Coercible (D a b c) (D a b' c')

Note that the `nominal` type arguments are equal, the `representational` type arguments can differ, but need to have a `Coercible` instance themself, and the `phantom` type arguments can be changed arbitrarily.

The third kind of instance exists for every `newtype NT = MkNT T` and comes in two variants, namely

    instance Coercible a T => Coercible a NT

    instance Coercible T b => Coercible NT b

This instance is only usable if the constructor `MkNT` is in scope.

If, as a library author of a type constructor like `Set a`, you want to prevent a user of your module to write `coerce :: Set T -> Set NT`, you need to set the role of `Set`'s type parameter to `nominal`, by writing

    type role Set nominal

For more details about this feature, please refer to Safe Coercions by Joachim Breitner, Richard A. Eisenberg, Simon Peyton Jones and Stephanie Weirich.

Since: ghc-prim-0.4.0

data Symbol #

(Kind) This is the kind of type-level symbols.

#### Instances

Instances details

SingKind Symbol | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Associated Types
type DemoteRep Symbol |
Instance details Defined in GHC.Internal.Generics type DemoteRep Symbol = String
Methods fromSing :: forall (a :: Symbol). Sing a -> DemoteRep Symbol
TestCoercion SSymbol | @since base-4.18.0.0
Instance details Defined in GHC.Internal.TypeLits Methods testCoercion :: forall (a :: Symbol) (b :: Symbol). SSymbol a -> SSymbol b -> Maybe (Coercion a b) #
TestEquality SSymbol | @since base-4.18.0.0
Instance details Defined in GHC.Internal.TypeLits Methods testEquality :: forall (a :: Symbol) (b :: Symbol). SSymbol a -> SSymbol b -> Maybe (a :~: b) #
KnownSymbol a => SingI (a :: Symbol) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods sing :: Sing a
type DemoteRep Symbol |
Instance details Defined in GHC.Internal.Generics type DemoteRep Symbol = String
data Sing (s :: Symbol) |
Instance details Defined in GHC.Internal.Generics data Sing (s :: Symbol) where SSym :: forall (s :: Symbol). KnownSymbol s => Sing s

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 #
NFData Integer |
Instance details Defined in Control.DeepSeq Methods rnf :: Integer -> () #
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 #
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 #
Hashable Integer |
Instance details Defined in Data.Hashable.Class Methods hashWithSalt :: Int -> Integer -> Int # hash :: Integer -> Int #
Lift Integer |
Instance details Defined in Language.Haskell.TH.Syntax Methods lift :: Quote m => Integer -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => Integer -> Code m Integer #

type Type = TYPE LiftedRep #

The kind of types with lifted values. For example `Int :: Type`.

type Constraint = CONSTRAINT LiftedRep #

The kind of lifted constraints

(++) :: [a] -> [a] -> [a] infixr 5 #

`(++)` appends two lists, i.e.,

    [x1, ..., xm] ++ [y1, ..., yn] == [x1, ..., xm, y1, ..., yn]
    [x1, ..., xm] ++ [y1, ...] == [x1, ..., xm, y1, ...]

If the first list is not finite, the result is the first list.

#### Performance considerations

Expand

This function takes linear time in the number of elements of the first list. Thus it is better to associate repeated applications of `(++)` to the right (which is the default behaviour): `xs ++ (ys ++ zs)` or simply `xs ++ ys ++ zs`, but not `(xs ++ ys) ++ zs`. For the same reason `concat` `=` `foldr` `(++)` `[]` has linear performance, while `foldl` `(++)` `[]` is prone to quadratic slowdown

#### Examples

Expand

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

    >>> [] ++ [1, 2, 3]
    [1,2,3]

    >>> [3, 2, 1] ++ []
    [3,2,1]

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.

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

The `print` function outputs a value of any printable type to the standard output device. Printable types are those that are instances of class `Show`; `print` converts values to strings for output using the `show` operation and adds a newline.

For example, a program to print the first 20 integers and their powers of 2 could be written as:

    main = print ([(n, 2^n) | n <- [0..19]])

class Num a where #

Basic numeric class.

The Haskell Report defines no laws for `Num`. However, `(`+`)` and `(`*`)` are customarily expected to define a ring and have the following properties:

Associativity of `(`+`)`
  `(x + y) + z` = `x + (y + z)`
Commutativity of `(`+`)`
  `x + y` = `y + x`
``fromInteger` 0` is the additive identity
  `x + fromInteger 0` = `x`
`negate` gives the additive inverse
  `x + negate x` = `fromInteger 0`
Associativity of `(`*`)`
  `(x * y) * z` = `x * (y * z)`
``fromInteger` 1` is the multiplicative identity
  `x * fromInteger 1` = `x` and `fromInteger 1 * x` = `x`
Distributivity of `(`*`)` with respect to `(`+`)`
  `a * (b + c)` = `(a * b) + (a * c)` and `(b + c) * a` = `(b * a) + (c * a)`
Coherence with `toInteger`
  if the type also implements `Integral`, then `fromInteger` is a left inverse for `toInteger`, i.e. `fromInteger (toInteger i) == i`

Note that it isn't customarily expected that a type instance of both `Num` and `Ord` implement an ordered ring. Indeed, in `base` only `Integer` and `Rational` do.

Minimal complete definition

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

Methods

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

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

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

negate :: a -> a #

Unary negation.

abs :: a -> a #

Absolute value.

signum :: a -> a #

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

    abs x * signum x == x

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

fromInteger :: Integer -> a #

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

#### Instances

Instances details

Num CBool |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CBool -> CBool -> CBool # (-) :: CBool -> CBool -> CBool # (*) :: CBool -> CBool -> CBool # negate :: CBool -> CBool # abs :: CBool -> CBool # signum :: CBool -> CBool # fromInteger :: Integer -> CBool #
Num CChar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CChar -> CChar -> CChar # (-) :: CChar -> CChar -> CChar # (*) :: CChar -> CChar -> CChar # negate :: CChar -> CChar # abs :: CChar -> CChar # signum :: CChar -> CChar # fromInteger :: Integer -> CChar #
Num CClock |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CClock -> CClock -> CClock # (-) :: CClock -> CClock -> CClock # (*) :: CClock -> CClock -> CClock # negate :: CClock -> CClock # abs :: CClock -> CClock # signum :: CClock -> CClock # fromInteger :: Integer -> CClock #
Num CDouble |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CDouble -> CDouble -> CDouble # (-) :: CDouble -> CDouble -> CDouble # (*) :: CDouble -> CDouble -> CDouble # negate :: CDouble -> CDouble # abs :: CDouble -> CDouble # signum :: CDouble -> CDouble # fromInteger :: Integer -> CDouble #
Num CFloat |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CFloat -> CFloat -> CFloat # (-) :: CFloat -> CFloat -> CFloat # (*) :: CFloat -> CFloat -> CFloat # negate :: CFloat -> CFloat # abs :: CFloat -> CFloat # signum :: CFloat -> CFloat # fromInteger :: Integer -> CFloat #
Num CInt |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CInt -> CInt -> CInt # (-) :: CInt -> CInt -> CInt # (*) :: CInt -> CInt -> CInt # negate :: CInt -> CInt # abs :: CInt -> CInt # signum :: CInt -> CInt # fromInteger :: Integer -> CInt #
Num CIntMax |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CIntMax -> CIntMax -> CIntMax # (-) :: CIntMax -> CIntMax -> CIntMax # (*) :: CIntMax -> CIntMax -> CIntMax # negate :: CIntMax -> CIntMax # abs :: CIntMax -> CIntMax # signum :: CIntMax -> CIntMax # fromInteger :: Integer -> CIntMax #
Num CIntPtr |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CIntPtr -> CIntPtr -> CIntPtr # (-) :: CIntPtr -> CIntPtr -> CIntPtr # (*) :: CIntPtr -> CIntPtr -> CIntPtr # negate :: CIntPtr -> CIntPtr # abs :: CIntPtr -> CIntPtr # signum :: CIntPtr -> CIntPtr # fromInteger :: Integer -> CIntPtr #
Num CLLong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CLLong -> CLLong -> CLLong # (-) :: CLLong -> CLLong -> CLLong # (*) :: CLLong -> CLLong -> CLLong # negate :: CLLong -> CLLong # abs :: CLLong -> CLLong # signum :: CLLong -> CLLong # fromInteger :: Integer -> CLLong #
Num CLong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CLong -> CLong -> CLong # (-) :: CLong -> CLong -> CLong # (*) :: CLong -> CLong -> CLong # negate :: CLong -> CLong # abs :: CLong -> CLong # signum :: CLong -> CLong # fromInteger :: Integer -> CLong #
Num CPtrdiff |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CPtrdiff -> CPtrdiff -> CPtrdiff # (-) :: CPtrdiff -> CPtrdiff -> CPtrdiff # (*) :: CPtrdiff -> CPtrdiff -> CPtrdiff # negate :: CPtrdiff -> CPtrdiff # abs :: CPtrdiff -> CPtrdiff # signum :: CPtrdiff -> CPtrdiff # fromInteger :: Integer -> CPtrdiff #
Num CSChar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CSChar -> CSChar -> CSChar # (-) :: CSChar -> CSChar -> CSChar # (*) :: CSChar -> CSChar -> CSChar # negate :: CSChar -> CSChar # abs :: CSChar -> CSChar # signum :: CSChar -> CSChar # fromInteger :: Integer -> CSChar #
Num CSUSeconds |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CSUSeconds -> CSUSeconds -> CSUSeconds # (-) :: CSUSeconds -> CSUSeconds -> CSUSeconds # (*) :: CSUSeconds -> CSUSeconds -> CSUSeconds # negate :: CSUSeconds -> CSUSeconds # abs :: CSUSeconds -> CSUSeconds # signum :: CSUSeconds -> CSUSeconds # fromInteger :: Integer -> CSUSeconds #
Num CShort |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CShort -> CShort -> CShort # (-) :: CShort -> CShort -> CShort # (*) :: CShort -> CShort -> CShort # negate :: CShort -> CShort # abs :: CShort -> CShort # signum :: CShort -> CShort # fromInteger :: Integer -> CShort #
Num CSigAtomic |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CSigAtomic -> CSigAtomic -> CSigAtomic # (-) :: CSigAtomic -> CSigAtomic -> CSigAtomic # (*) :: CSigAtomic -> CSigAtomic -> CSigAtomic # negate :: CSigAtomic -> CSigAtomic # abs :: CSigAtomic -> CSigAtomic # signum :: CSigAtomic -> CSigAtomic # fromInteger :: Integer -> CSigAtomic #
Num CSize |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CSize -> CSize -> CSize # (-) :: CSize -> CSize -> CSize # (*) :: CSize -> CSize -> CSize # negate :: CSize -> CSize # abs :: CSize -> CSize # signum :: CSize -> CSize # fromInteger :: Integer -> CSize #
Num CTime |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CTime -> CTime -> CTime # (-) :: CTime -> CTime -> CTime # (*) :: CTime -> CTime -> CTime # negate :: CTime -> CTime # abs :: CTime -> CTime # signum :: CTime -> CTime # fromInteger :: Integer -> CTime #
Num CUChar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CUChar -> CUChar -> CUChar # (-) :: CUChar -> CUChar -> CUChar # (*) :: CUChar -> CUChar -> CUChar # negate :: CUChar -> CUChar # abs :: CUChar -> CUChar # signum :: CUChar -> CUChar # fromInteger :: Integer -> CUChar #
Num CUInt |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CUInt -> CUInt -> CUInt # (-) :: CUInt -> CUInt -> CUInt # (*) :: CUInt -> CUInt -> CUInt # negate :: CUInt -> CUInt # abs :: CUInt -> CUInt # signum :: CUInt -> CUInt # fromInteger :: Integer -> CUInt #
Num CUIntMax |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CUIntMax -> CUIntMax -> CUIntMax # (-) :: CUIntMax -> CUIntMax -> CUIntMax # (*) :: CUIntMax -> CUIntMax -> CUIntMax # negate :: CUIntMax -> CUIntMax # abs :: CUIntMax -> CUIntMax # signum :: CUIntMax -> CUIntMax # fromInteger :: Integer -> CUIntMax #
Num CUIntPtr |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CUIntPtr -> CUIntPtr -> CUIntPtr # (-) :: CUIntPtr -> CUIntPtr -> CUIntPtr # (*) :: CUIntPtr -> CUIntPtr -> CUIntPtr # negate :: CUIntPtr -> CUIntPtr # abs :: CUIntPtr -> CUIntPtr # signum :: CUIntPtr -> CUIntPtr # fromInteger :: Integer -> CUIntPtr #
Num CULLong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CULLong -> CULLong -> CULLong # (-) :: CULLong -> CULLong -> CULLong # (*) :: CULLong -> CULLong -> CULLong # negate :: CULLong -> CULLong # abs :: CULLong -> CULLong # signum :: CULLong -> CULLong # fromInteger :: Integer -> CULLong #
Num CULong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CULong -> CULong -> CULong # (-) :: CULong -> CULong -> CULong # (*) :: CULong -> CULong -> CULong # negate :: CULong -> CULong # abs :: CULong -> CULong # signum :: CULong -> CULong # fromInteger :: Integer -> CULong #
Num CUSeconds |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CUSeconds -> CUSeconds -> CUSeconds # (-) :: CUSeconds -> CUSeconds -> CUSeconds # (*) :: CUSeconds -> CUSeconds -> CUSeconds # negate :: CUSeconds -> CUSeconds # abs :: CUSeconds -> CUSeconds # signum :: CUSeconds -> CUSeconds # fromInteger :: Integer -> CUSeconds #
Num CUShort |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CUShort -> CUShort -> CUShort # (-) :: CUShort -> CUShort -> CUShort # (*) :: CUShort -> CUShort -> CUShort # negate :: CUShort -> CUShort # abs :: CUShort -> CUShort # signum :: CUShort -> CUShort # fromInteger :: Integer -> CUShort #
Num CWchar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (+) :: CWchar -> CWchar -> CWchar # (-) :: CWchar -> CWchar -> CWchar # (*) :: CWchar -> CWchar -> CWchar # negate :: CWchar -> CWchar # abs :: CWchar -> CWchar # signum :: CWchar -> CWchar # fromInteger :: Integer -> CWchar #
Num IntPtr |
Instance details Defined in GHC.Internal.Foreign.Ptr Methods (+) :: IntPtr -> IntPtr -> IntPtr # (-) :: IntPtr -> IntPtr -> IntPtr # (*) :: IntPtr -> IntPtr -> IntPtr # negate :: IntPtr -> IntPtr # abs :: IntPtr -> IntPtr # signum :: IntPtr -> IntPtr # fromInteger :: Integer -> IntPtr #
Num WordPtr |
Instance details Defined in GHC.Internal.Foreign.Ptr Methods (+) :: WordPtr -> WordPtr -> WordPtr # (-) :: WordPtr -> WordPtr -> WordPtr # (*) :: WordPtr -> WordPtr -> WordPtr # negate :: WordPtr -> WordPtr # abs :: WordPtr -> WordPtr # signum :: WordPtr -> WordPtr # fromInteger :: Integer -> WordPtr #
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 #
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 #
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 #
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 #
Num CBlkCnt |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (+) :: CBlkCnt -> CBlkCnt -> CBlkCnt # (-) :: CBlkCnt -> CBlkCnt -> CBlkCnt # (*) :: CBlkCnt -> CBlkCnt -> CBlkCnt # negate :: CBlkCnt -> CBlkCnt # abs :: CBlkCnt -> CBlkCnt # signum :: CBlkCnt -> CBlkCnt # fromInteger :: Integer -> CBlkCnt #
Num CBlkSize |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (+) :: CBlkSize -> CBlkSize -> CBlkSize # (-) :: CBlkSize -> CBlkSize -> CBlkSize # (*) :: CBlkSize -> CBlkSize -> CBlkSize # negate :: CBlkSize -> CBlkSize # abs :: CBlkSize -> CBlkSize # signum :: CBlkSize -> CBlkSize # fromInteger :: Integer -> CBlkSize #
Num CCc |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (+) :: CCc -> CCc -> CCc # (-) :: CCc -> CCc -> CCc # (*) :: CCc -> CCc -> CCc # negate :: CCc -> CCc # abs :: CCc -> CCc # signum :: CCc -> CCc # fromInteger :: Integer -> CCc #
Num CClockId |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (+) :: CClockId -> CClockId -> CClockId # (-) :: CClockId -> CClockId -> CClockId # (*) :: CClockId -> CClockId -> CClockId # negate :: CClockId -> CClockId # abs :: CClockId -> CClockId # signum :: CClockId -> CClockId # fromInteger :: Integer -> CClockId #
Num CDev |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (+) :: CDev -> CDev -> CDev # (-) :: CDev -> CDev -> CDev # (*) :: CDev -> CDev -> CDev # negate :: CDev -> CDev # abs :: CDev -> CDev # signum :: CDev -> CDev # fromInteger :: Integer -> CDev #
Num CFsBlkCnt |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (+) :: CFsBlkCnt -> CFsBlkCnt -> CFsBlkCnt # (-) :: CFsBlkCnt -> CFsBlkCnt -> CFsBlkCnt # (*) :: CFsBlkCnt -> CFsBlkCnt -> CFsBlkCnt # negate :: CFsBlkCnt -> CFsBlkCnt # abs :: CFsBlkCnt -> CFsBlkCnt # signum :: CFsBlkCnt -> CFsBlkCnt # fromInteger :: Integer -> CFsBlkCnt #
Num CFsFilCnt |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (+) :: CFsFilCnt -> CFsFilCnt -> CFsFilCnt # (-) :: CFsFilCnt -> CFsFilCnt -> CFsFilCnt # (*) :: CFsFilCnt -> CFsFilCnt -> CFsFilCnt # negate :: CFsFilCnt -> CFsFilCnt # abs :: CFsFilCnt -> CFsFilCnt # signum :: CFsFilCnt -> CFsFilCnt # fromInteger :: Integer -> CFsFilCnt #
Num CGid |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (+) :: CGid -> CGid -> CGid # (-) :: CGid -> CGid -> CGid # (*) :: CGid -> CGid -> CGid # negate :: CGid -> CGid # abs :: CGid -> CGid # signum :: CGid -> CGid # fromInteger :: Integer -> CGid #
Num CId |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (+) :: CId -> CId -> CId # (-) :: CId -> CId -> CId # (*) :: CId -> CId -> CId # negate :: CId -> CId # abs :: CId -> CId # signum :: CId -> CId # fromInteger :: Integer -> CId #
Num CIno |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (+) :: CIno -> CIno -> CIno # (-) :: CIno -> CIno -> CIno # (*) :: CIno -> CIno -> CIno # negate :: CIno -> CIno # abs :: CIno -> CIno # signum :: CIno -> CIno # fromInteger :: Integer -> CIno #
Num CKey |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (+) :: CKey -> CKey -> CKey # (-) :: CKey -> CKey -> CKey # (*) :: CKey -> CKey -> CKey # negate :: CKey -> CKey # abs :: CKey -> CKey # signum :: CKey -> CKey # fromInteger :: Integer -> CKey #
Num CMode |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (+) :: CMode -> CMode -> CMode # (-) :: CMode -> CMode -> CMode # (*) :: CMode -> CMode -> CMode # negate :: CMode -> CMode # abs :: CMode -> CMode # signum :: CMode -> CMode # fromInteger :: Integer -> CMode #
Num CNfds |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (+) :: CNfds -> CNfds -> CNfds # (-) :: CNfds -> CNfds -> CNfds # (*) :: CNfds -> CNfds -> CNfds # negate :: CNfds -> CNfds # abs :: CNfds -> CNfds # signum :: CNfds -> CNfds # fromInteger :: Integer -> CNfds #
Num CNlink |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (+) :: CNlink -> CNlink -> CNlink # (-) :: CNlink -> CNlink -> CNlink # (*) :: CNlink -> CNlink -> CNlink # negate :: CNlink -> CNlink # abs :: CNlink -> CNlink # signum :: CNlink -> CNlink # fromInteger :: Integer -> CNlink #
Num COff |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (+) :: COff -> COff -> COff # (-) :: COff -> COff -> COff # (*) :: COff -> COff -> COff # negate :: COff -> COff # abs :: COff -> COff # signum :: COff -> COff # fromInteger :: Integer -> COff #
Num CPid |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (+) :: CPid -> CPid -> CPid # (-) :: CPid -> CPid -> CPid # (*) :: CPid -> CPid -> CPid # negate :: CPid -> CPid # abs :: CPid -> CPid # signum :: CPid -> CPid # fromInteger :: Integer -> CPid #
Num CRLim |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (+) :: CRLim -> CRLim -> CRLim # (-) :: CRLim -> CRLim -> CRLim # (*) :: CRLim -> CRLim -> CRLim # negate :: CRLim -> CRLim # abs :: CRLim -> CRLim # signum :: CRLim -> CRLim # fromInteger :: Integer -> CRLim #
Num CSocklen |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (+) :: CSocklen -> CSocklen -> CSocklen # (-) :: CSocklen -> CSocklen -> CSocklen # (*) :: CSocklen -> CSocklen -> CSocklen # negate :: CSocklen -> CSocklen # abs :: CSocklen -> CSocklen # signum :: CSocklen -> CSocklen # fromInteger :: Integer -> CSocklen #
Num CSpeed |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (+) :: CSpeed -> CSpeed -> CSpeed # (-) :: CSpeed -> CSpeed -> CSpeed # (*) :: CSpeed -> CSpeed -> CSpeed # negate :: CSpeed -> CSpeed # abs :: CSpeed -> CSpeed # signum :: CSpeed -> CSpeed # fromInteger :: Integer -> CSpeed #
Num CSsize |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (+) :: CSsize -> CSsize -> CSsize # (-) :: CSsize -> CSsize -> CSsize # (*) :: CSsize -> CSsize -> CSsize # negate :: CSsize -> CSsize # abs :: CSsize -> CSsize # signum :: CSsize -> CSsize # fromInteger :: Integer -> CSsize #
Num CTcflag |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (+) :: CTcflag -> CTcflag -> CTcflag # (-) :: CTcflag -> CTcflag -> CTcflag # (*) :: CTcflag -> CTcflag -> CTcflag # negate :: CTcflag -> CTcflag # abs :: CTcflag -> CTcflag # signum :: CTcflag -> CTcflag # fromInteger :: Integer -> CTcflag #
Num CUid |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (+) :: CUid -> CUid -> CUid # (-) :: CUid -> CUid -> CUid # (*) :: CUid -> CUid -> CUid # negate :: CUid -> CUid # abs :: CUid -> CUid # signum :: CUid -> CUid # fromInteger :: Integer -> CUid #
Num Fd |
Instance details Defined in GHC.Internal.System.Posix.Types Methods (+) :: Fd -> Fd -> Fd # (-) :: Fd -> Fd -> Fd # (*) :: Fd -> Fd -> Fd # negate :: Fd -> Fd # abs :: Fd -> Fd # signum :: Fd -> Fd # fromInteger :: Integer -> Fd #
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 #
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 #
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 #
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 #
Num I8 |
Instance details Defined in Data.Text.Foreign Methods (+) :: I8 -> I8 -> I8 # (-) :: I8 -> I8 -> I8 # (*) :: I8 -> I8 -> I8 # negate :: I8 -> I8 # abs :: I8 -> I8 # signum :: I8 -> I8 # fromInteger :: Integer -> I8 #
Num Size |
Instance details Defined in Data.Text.Internal.Fusion.Size Methods (+) :: Size -> Size -> Size # (-) :: Size -> Size -> Size # (*) :: Size -> Size -> Size # negate :: Size -> Size # abs :: Size -> Size # signum :: Size -> Size # fromInteger :: Integer -> Size #
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 #
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 #
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 #
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 #
RealFloat a => Num (Complex a) | Since: base-2.1
Instance details Defined in Data.Complex Methods (+) :: Complex a -> Complex a -> Complex a # (-) :: Complex a -> Complex a -> Complex a # (*) :: Complex a -> Complex a -> Complex a # negate :: Complex a -> Complex a # abs :: Complex a -> Complex a # signum :: Complex a -> Complex a # fromInteger :: Integer -> Complex a #
Num a => Num (Max a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods (+) :: Max a -> Max a -> Max a # (-) :: Max a -> Max a -> Max a # (*) :: Max a -> Max a -> Max a # negate :: Max a -> Max a # abs :: Max a -> Max a # signum :: Max a -> Max a # fromInteger :: Integer -> Max a #
Num a => Num (Min a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods (+) :: Min a -> Min a -> Min a # (-) :: Min a -> Min a -> Min a # (*) :: Min a -> Min a -> Min a # negate :: Min a -> Min a # abs :: Min a -> Min a # signum :: Min a -> Min a # fromInteger :: Integer -> Min a #
Num a => Num (Identity a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Functor.Identity Methods (+) :: Identity a -> Identity a -> Identity a # (-) :: Identity a -> Identity a -> Identity a # (*) :: Identity a -> Identity a -> Identity a # negate :: Identity a -> Identity a # abs :: Identity a -> Identity a # signum :: Identity a -> Identity a # fromInteger :: Integer -> Identity a #
Num a => Num (Down a) | @since base-4.11.0.0
Instance details Defined in GHC.Internal.Data.Ord Methods (+) :: Down a -> Down a -> Down a # (-) :: Down a -> Down a -> Down a # (*) :: Down a -> Down a -> Down a # negate :: Down a -> Down a # abs :: Down a -> Down a # signum :: Down a -> Down a # fromInteger :: Integer -> Down a #
Num a => Num (Product a) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods (+) :: Product a -> Product a -> Product a # (-) :: Product a -> Product a -> Product a # (*) :: Product a -> Product a -> Product a # negate :: Product a -> Product a # abs :: Product a -> Product a # signum :: Product a -> Product a # fromInteger :: Integer -> Product a #
Num a => Num (Sum a) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Semigroup.Internal Methods (+) :: Sum a -> Sum a -> Sum a # (-) :: Sum a -> Sum a -> Sum a # (*) :: Sum a -> Sum a -> Sum a # negate :: Sum a -> Sum a # abs :: Sum a -> Sum a # signum :: Sum a -> Sum a # fromInteger :: Integer -> Sum a #
Integral a => Num (Ratio a) | @since base-2.0.1
Instance details Defined in GHC.Internal.Real Methods (+) :: Ratio a -> Ratio a -> Ratio a # (-) :: Ratio a -> Ratio a -> Ratio a # (*) :: Ratio a -> Ratio a -> Ratio a # negate :: Ratio a -> Ratio a # abs :: Ratio a -> Ratio a # signum :: Ratio a -> Ratio a # fromInteger :: Integer -> Ratio a #
HasResolution a => Num (Fixed a) | Multiplication is not associative or distributive:
    >>> (0.2 * 0.6 :: Deci) * 0.9 == 0.2 * (0.6 * 0.9)
    False
    >>> (0.1 + 0.1 :: Deci) * 0.5 == 0.1 * 0.5 + 0.1 * 0.5
    False
Since: base-2.1
Instance details Defined in Data.Fixed Methods (+) :: Fixed a -> Fixed a -> Fixed a # (-) :: Fixed a -> Fixed a -> Fixed a # (*) :: Fixed a -> Fixed a -> Fixed a # negate :: Fixed a -> Fixed a # abs :: Fixed a -> Fixed a # signum :: Fixed a -> Fixed a # fromInteger :: Integer -> Fixed a #
Num a => Num (Op a b) |
Instance details Defined in Data.Functor.Contravariant Methods (+) :: Op a b -> Op a b -> Op a b # (-) :: Op a b -> Op a b -> Op a b # (*) :: Op a b -> Op a b -> Op a b # negate :: Op a b -> Op a b # abs :: Op a b -> Op a b # signum :: Op a b -> Op a b # fromInteger :: Integer -> Op a b #
Num a => Num (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 # (-) :: Const a b -> Const a b -> Const a b # (*) :: Const a b -> Const a b -> Const a b # negate :: Const a b -> Const a b # abs :: Const a b -> Const a b # signum :: Const a b -> Const a b # fromInteger :: Integer -> Const a b #
(Applicative f, Num a) => Num (Ap f a) | Note that even if the underlying `Num` and `Applicative` instances are lawful, for most `Applicative`s, this instance will not be lawful. If you use this instance with the list `Applicative`, the following customary laws will not hold: Commutativity:
    >>> Ap [10,20] + Ap [1,2]
    Ap {getAp = [11,12,21,22]}
    >>> Ap [1,2] + Ap [10,20]
    Ap {getAp = [11,21,12,22]}
Additive inverse:
    >>> Ap [] + negate (Ap [])
    Ap {getAp = []}
    >>> fromInteger 0 :: Ap [] Int
    Ap {getAp = [0]}
Distributivity:
    >>> Ap [1,2] * (3 + 4)
    Ap {getAp = [7,14]}
    >>> (Ap [1,2] * 3) + (Ap [1,2] * 4)
    Ap {getAp = [7,11,10,14]}
@since base-4.12.0.0
Instance details Defined in GHC.Internal.Data.Monoid Methods (+) :: Ap f a -> Ap f a -> Ap f a # (-) :: Ap f a -> Ap f a -> Ap f a # (*) :: Ap f a -> Ap f a -> Ap f a # negate :: Ap f a -> Ap f a # abs :: Ap f a -> Ap f a # signum :: Ap f a -> Ap f a # fromInteger :: Integer -> Ap f a #
Num (f a) => Num (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 -> Alt f a # (-) :: Alt f a -> Alt f a -> Alt f a # (*) :: Alt f a -> Alt f a -> Alt f a # negate :: Alt f a -> Alt f a # abs :: Alt f a -> Alt f a # signum :: Alt f a -> Alt f a # fromInteger :: Integer -> Alt f a #
Num (f (g a)) => Num (Compose f g a) | Since: base-4.19.0.0
Instance details Defined in Data.Functor.Compose Methods (+) :: Compose f g a -> Compose f g a -> Compose f g a # (-) :: Compose f g a -> Compose f g a -> Compose f g a # (*) :: Compose f g a -> Compose f g a -> Compose f g a # negate :: Compose f g a -> Compose f g a # abs :: Compose f g a -> Compose f g a # signum :: Compose f g a -> Compose f g a # fromInteger :: Integer -> Compose f g a #

class Num a => Fractional a where #

Fractional numbers, supporting real division.

The Haskell Report defines no laws for `Fractional`. However, `(`+`)` and `(`*`)` are customarily expected to define a division ring and have the following properties:

`recip` gives the multiplicative inverse
  `x * recip x` = `recip x * x` = `fromInteger 1`
Totality of `toRational`
  `toRational` is total
Coherence with `toRational`
  if the type also implements `Real`, then `fromRational` is a left inverse for `toRational`, i.e. `fromRational (toRational i) = i`

Note that it isn't customarily expected that a type instance of `Fractional` implement a field. However, all instances in `base` do.

Minimal complete definition

fromRational, (recip | (/))

Methods

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

Fractional division.

recip :: a -> a #

Reciprocal fraction.

fromRational :: Rational -> a #

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

#### Instances

Instances details

Fractional CDouble |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (/) :: CDouble -> CDouble -> CDouble # recip :: CDouble -> CDouble # fromRational :: Rational -> CDouble #
Fractional CFloat |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods (/) :: CFloat -> CFloat -> CFloat # recip :: CFloat -> CFloat # fromRational :: Rational -> CFloat #
RealFloat a => Fractional (Complex a) | Since: base-2.1
Instance details Defined in Data.Complex Methods (/) :: Complex a -> Complex a -> Complex a # recip :: Complex a -> Complex a # fromRational :: Rational -> Complex a #
Fractional a => Fractional (Identity a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Functor.Identity Methods (/) :: Identity a -> Identity a -> Identity a # recip :: Identity a -> Identity a # fromRational :: Rational -> Identity a #
Fractional a => Fractional (Down a) | @since base-4.14.0.0
Instance details Defined in GHC.Internal.Data.Ord Methods (/) :: Down a -> Down a -> Down a # recip :: Down a -> Down a # fromRational :: Rational -> Down a #
Integral a => Fractional (Ratio a) | @since base-2.0.1
Instance details Defined in GHC.Internal.Real Methods (/) :: Ratio a -> Ratio a -> Ratio a # recip :: Ratio a -> Ratio a # fromRational :: Rational -> Ratio a #
HasResolution a => Fractional (Fixed a) | Since: base-2.1
Instance details Defined in Data.Fixed Methods (/) :: Fixed a -> Fixed a -> Fixed a # recip :: Fixed a -> Fixed a # fromRational :: Rational -> Fixed a #
Fractional a => Fractional (Op a b) |
Instance details Defined in Data.Functor.Contravariant Methods (/) :: Op a b -> Op a b -> Op a b # recip :: Op a b -> Op a b # fromRational :: Rational -> Op a b #
Fractional a => Fractional (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 # recip :: Const a b -> Const a b # fromRational :: Rational -> Const a b #
Fractional (f (g a)) => Fractional (Compose f g a) | Since: base-4.20.0.0
Instance details Defined in Data.Functor.Compose Methods (/) :: Compose f g a -> Compose f g a -> Compose f g a # recip :: Compose f g a -> Compose f g a # fromRational :: Rational -> Compose f g a #

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 Extension |
Instance details Defined in GHC.LanguageExtensions.Type Methods succ :: Extension -> Extension # pred :: Extension -> Extension # toEnum :: Int -> Extension # fromEnum :: Extension -> Int # enumFrom :: Extension -> [Extension] # enumFromThen :: Extension -> Extension -> [Extension] # enumFromTo :: Extension -> Extension -> [Extension] # enumFromThenTo :: Extension -> Extension -> Extension -> [Extension] #
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 IntPtr |
Instance details Defined in GHC.Internal.Foreign.Ptr Methods succ :: IntPtr -> IntPtr # pred :: IntPtr -> IntPtr # toEnum :: Int -> IntPtr # fromEnum :: IntPtr -> Int # enumFrom :: IntPtr -> [IntPtr] # enumFromThen :: IntPtr -> IntPtr -> [IntPtr] # enumFromTo :: IntPtr -> IntPtr -> [IntPtr] # enumFromThenTo :: IntPtr -> IntPtr -> IntPtr -> [IntPtr] #
Enum WordPtr |
Instance details Defined in GHC.Internal.Foreign.Ptr Methods succ :: WordPtr -> WordPtr # pred :: WordPtr -> WordPtr # toEnum :: Int -> WordPtr # fromEnum :: WordPtr -> Int # enumFrom :: WordPtr -> [WordPtr] # enumFromThen :: WordPtr -> WordPtr -> [WordPtr] # enumFromTo :: WordPtr -> WordPtr -> [WordPtr] # enumFromThenTo :: WordPtr -> WordPtr -> WordPtr -> [WordPtr] #
Enum 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 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 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 Leniency # |
Instance details Defined in Protolude.Conv Methods succ :: Leniency -> Leniency # pred :: Leniency -> Leniency # toEnum :: Int -> Leniency # fromEnum :: Leniency -> Int # enumFrom :: Leniency -> [Leniency] # enumFromThen :: Leniency -> Leniency -> [Leniency] # enumFromTo :: Leniency -> Leniency -> [Leniency] # enumFromThenTo :: Leniency -> Leniency -> Leniency -> [Leniency] #
Enum I8 |
Instance details Defined in Data.Text.Foreign Methods succ :: I8 -> I8 # pred :: I8 -> I8 # toEnum :: Int -> I8 # fromEnum :: I8 -> Int # enumFrom :: I8 -> [I8] # enumFromThen :: I8 -> I8 -> [I8] # enumFromTo :: I8 -> I8 -> [I8] # enumFromThenTo :: I8 -> I8 -> I8 -> [I8] #
Enum FPFormat |
Instance details Defined in Data.Text.Lazy.Builder.RealFloat Methods succ :: FPFormat -> FPFormat # pred :: FPFormat -> FPFormat # toEnum :: Int -> FPFormat # fromEnum :: FPFormat -> Int # enumFrom :: FPFormat -> [FPFormat] # enumFromThen :: FPFormat -> FPFormat -> [FPFormat] # enumFromTo :: FPFormat -> FPFormat -> [FPFormat] # enumFromThenTo :: FPFormat -> FPFormat -> FPFormat -> [FPFormat] #
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] #
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] #
(Enum a, Bounded a, Eq a) => Enum (Down a) | Swaps ``succ`` and ``pred`` of the underlying type. @since base-4.18.0.0
Instance details Defined in GHC.Internal.Data.Ord Methods succ :: Down a -> Down a # pred :: Down a -> Down a # toEnum :: Int -> Down a # fromEnum :: Down a -> Int # enumFrom :: Down a -> [Down a] # enumFromThen :: Down a -> Down a -> [Down a] # enumFromTo :: Down a -> Down a -> [Down a] # enumFromThenTo :: Down a -> Down a -> Down a -> [Down 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] #
Coercible a b => Enum (Coercion a b) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Type.Coercion Methods succ :: Coercion a b -> Coercion a b # pred :: Coercion a b -> Coercion a b # toEnum :: Int -> Coercion a b # fromEnum :: Coercion a b -> Int # enumFrom :: Coercion a b -> [Coercion a b] # enumFromThen :: Coercion a b -> Coercion a b -> [Coercion a b] # enumFromTo :: Coercion a b -> Coercion a b -> [Coercion a b] # enumFromThenTo :: Coercion a b -> Coercion a b -> Coercion a b -> [Coercion a b] #
a ~ b => Enum (a :~: b) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Type.Equality Methods succ :: (a :~: b) -> a :~: b # pred :: (a :~: b) -> a :~: b # toEnum :: Int -> a :~: b # fromEnum :: (a :~: b) -> Int # enumFrom :: (a :~: b) -> [a :~: b] # enumFromThen :: (a :~: b) -> (a :~: b) -> [a :~: b] # enumFromTo :: (a :~: b) -> (a :~: b) -> [a :~: b] # enumFromThenTo :: (a :~: b) -> (a :~: b) -> (a :~: b) -> [a :~: b] #
a ~~ b => Enum (a :~~: b) | @since base-4.10.0.0
Instance details Defined in GHC.Internal.Data.Type.Equality Methods succ :: (a :~~: b) -> a :~~: b # pred :: (a :~~: b) -> a :~~: b # toEnum :: Int -> a :~~: b # fromEnum :: (a :~~: b) -> Int # enumFrom :: (a :~~: b) -> [a :~~: b] # enumFromThen :: (a :~~: b) -> (a :~~: b) -> [a :~~: b] # enumFromTo :: (a :~~: b) -> (a :~~: b) -> [a :~~: b] # enumFromThenTo :: (a :~~: b) -> (a :~~: b) -> (a :~~: b) -> [a :~~: b] #
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] #

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

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

Integral numbers, supporting integer division.

The Haskell Report defines no laws for `Integral`. However, `Integral` instances are customarily expected to define a Euclidean domain and have the following properties for the `div`/`mod` and `quot`/`rem` pairs, given suitable Euclidean functions `f` and `g`:

- `x` = `y * quot x y + rem x y` with `rem x y` = `fromInteger 0` or `g (rem x y)` < `g y`
- `x` = `y * div x y + mod x y` with `mod x y` = `fromInteger 0` or `f (mod x y)` < `f y`

An example of a suitable Euclidean function, for `Integer`'s instance, is `abs`.

In addition, `toInteger` should be total, and `fromInteger` should be a left inverse for it, i.e. `fromInteger (toInteger i) = i`.

Minimal complete definition

quotRem, toInteger

Methods

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

Integer division truncated toward zero.

WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in `base`.

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

Integer remainder, satisfying

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

WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in `base`.

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

Integer division truncated toward negative infinity.

WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in `base`.

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

Integer modulus, satisfying

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

WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in `base`.

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

Simultaneous `quot` and `rem`.

WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in `base`.

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

simultaneous `div` and `mod`.

WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in `base`.

toInteger :: a -> Integer #

Conversion to `Integer`.

#### Instances

Instances details

Integral CBool |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods quot :: CBool -> CBool -> CBool # rem :: CBool -> CBool -> CBool # div :: CBool -> CBool -> CBool # mod :: CBool -> CBool -> CBool # quotRem :: CBool -> CBool -> (CBool, CBool) # divMod :: CBool -> CBool -> (CBool, CBool) # toInteger :: CBool -> Integer #
Integral CChar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods quot :: CChar -> CChar -> CChar # rem :: CChar -> CChar -> CChar # div :: CChar -> CChar -> CChar # mod :: CChar -> CChar -> CChar # quotRem :: CChar -> CChar -> (CChar, CChar) # divMod :: CChar -> CChar -> (CChar, CChar) # toInteger :: CChar -> Integer #
Integral CInt |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods quot :: CInt -> CInt -> CInt # rem :: CInt -> CInt -> CInt # div :: CInt -> CInt -> CInt # mod :: CInt -> CInt -> CInt # quotRem :: CInt -> CInt -> (CInt, CInt) # divMod :: CInt -> CInt -> (CInt, CInt) # toInteger :: CInt -> Integer #
Integral CIntMax |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods quot :: CIntMax -> CIntMax -> CIntMax # rem :: CIntMax -> CIntMax -> CIntMax # div :: CIntMax -> CIntMax -> CIntMax # mod :: CIntMax -> CIntMax -> CIntMax # quotRem :: CIntMax -> CIntMax -> (CIntMax, CIntMax) # divMod :: CIntMax -> CIntMax -> (CIntMax, CIntMax) # toInteger :: CIntMax -> Integer #
Integral CIntPtr |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods quot :: CIntPtr -> CIntPtr -> CIntPtr # rem :: CIntPtr -> CIntPtr -> CIntPtr # div :: CIntPtr -> CIntPtr -> CIntPtr # mod :: CIntPtr -> CIntPtr -> CIntPtr # quotRem :: CIntPtr -> CIntPtr -> (CIntPtr, CIntPtr) # divMod :: CIntPtr -> CIntPtr -> (CIntPtr, CIntPtr) # toInteger :: CIntPtr -> Integer #
Integral CLLong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods quot :: CLLong -> CLLong -> CLLong # rem :: CLLong -> CLLong -> CLLong # div :: CLLong -> CLLong -> CLLong # mod :: CLLong -> CLLong -> CLLong # quotRem :: CLLong -> CLLong -> (CLLong, CLLong) # divMod :: CLLong -> CLLong -> (CLLong, CLLong) # toInteger :: CLLong -> Integer #
Integral CLong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods quot :: CLong -> CLong -> CLong # rem :: CLong -> CLong -> CLong # div :: CLong -> CLong -> CLong # mod :: CLong -> CLong -> CLong # quotRem :: CLong -> CLong -> (CLong, CLong) # divMod :: CLong -> CLong -> (CLong, CLong) # toInteger :: CLong -> Integer #
Integral CPtrdiff |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods quot :: CPtrdiff -> CPtrdiff -> CPtrdiff # rem :: CPtrdiff -> CPtrdiff -> CPtrdiff # div :: CPtrdiff -> CPtrdiff -> CPtrdiff # mod :: CPtrdiff -> CPtrdiff -> CPtrdiff # quotRem :: CPtrdiff -> CPtrdiff -> (CPtrdiff, CPtrdiff) # divMod :: CPtrdiff -> CPtrdiff -> (CPtrdiff, CPtrdiff) # toInteger :: CPtrdiff -> Integer #
Integral CSChar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods quot :: CSChar -> CSChar -> CSChar # rem :: CSChar -> CSChar -> CSChar # div :: CSChar -> CSChar -> CSChar # mod :: CSChar -> CSChar -> CSChar # quotRem :: CSChar -> CSChar -> (CSChar, CSChar) # divMod :: CSChar -> CSChar -> (CSChar, CSChar) # toInteger :: CSChar -> Integer #
Integral CShort |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods quot :: CShort -> CShort -> CShort # rem :: CShort -> CShort -> CShort # div :: CShort -> CShort -> CShort # mod :: CShort -> CShort -> CShort # quotRem :: CShort -> CShort -> (CShort, CShort) # divMod :: CShort -> CShort -> (CShort, CShort) # toInteger :: CShort -> Integer #
Integral CSigAtomic |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods quot :: CSigAtomic -> CSigAtomic -> CSigAtomic # rem :: CSigAtomic -> CSigAtomic -> CSigAtomic # div :: CSigAtomic -> CSigAtomic -> CSigAtomic # mod :: CSigAtomic -> CSigAtomic -> CSigAtomic # quotRem :: CSigAtomic -> CSigAtomic -> (CSigAtomic, CSigAtomic) # divMod :: CSigAtomic -> CSigAtomic -> (CSigAtomic, CSigAtomic) # toInteger :: CSigAtomic -> Integer #
Integral CSize |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods quot :: CSize -> CSize -> CSize # rem :: CSize -> CSize -> CSize # div :: CSize -> CSize -> CSize # mod :: CSize -> CSize -> CSize # quotRem :: CSize -> CSize -> (CSize, CSize) # divMod :: CSize -> CSize -> (CSize, CSize) # toInteger :: CSize -> Integer #
Integral CUChar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods quot :: CUChar -> CUChar -> CUChar # rem :: CUChar -> CUChar -> CUChar # div :: CUChar -> CUChar -> CUChar # mod :: CUChar -> CUChar -> CUChar # quotRem :: CUChar -> CUChar -> (CUChar, CUChar) # divMod :: CUChar -> CUChar -> (CUChar, CUChar) # toInteger :: CUChar -> Integer #
Integral CUInt |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods quot :: CUInt -> CUInt -> CUInt # rem :: CUInt -> CUInt -> CUInt # div :: CUInt -> CUInt -> CUInt # mod :: CUInt -> CUInt -> CUInt # quotRem :: CUInt -> CUInt -> (CUInt, CUInt) # divMod :: CUInt -> CUInt -> (CUInt, CUInt) # toInteger :: CUInt -> Integer #
Integral CUIntMax |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods quot :: CUIntMax -> CUIntMax -> CUIntMax # rem :: CUIntMax -> CUIntMax -> CUIntMax # div :: CUIntMax -> CUIntMax -> CUIntMax # mod :: CUIntMax -> CUIntMax -> CUIntMax # quotRem :: CUIntMax -> CUIntMax -> (CUIntMax, CUIntMax) # divMod :: CUIntMax -> CUIntMax -> (CUIntMax, CUIntMax) # toInteger :: CUIntMax -> Integer #
Integral CUIntPtr |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods quot :: CUIntPtr -> CUIntPtr -> CUIntPtr # rem :: CUIntPtr -> CUIntPtr -> CUIntPtr # div :: CUIntPtr -> CUIntPtr -> CUIntPtr # mod :: CUIntPtr -> CUIntPtr -> CUIntPtr # quotRem :: CUIntPtr -> CUIntPtr -> (CUIntPtr, CUIntPtr) # divMod :: CUIntPtr -> CUIntPtr -> (CUIntPtr, CUIntPtr) # toInteger :: CUIntPtr -> Integer #
Integral CULLong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods quot :: CULLong -> CULLong -> CULLong # rem :: CULLong -> CULLong -> CULLong # div :: CULLong -> CULLong -> CULLong # mod :: CULLong -> CULLong -> CULLong # quotRem :: CULLong -> CULLong -> (CULLong, CULLong) # divMod :: CULLong -> CULLong -> (CULLong, CULLong) # toInteger :: CULLong -> Integer #
Integral CULong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods quot :: CULong -> CULong -> CULong # rem :: CULong -> CULong -> CULong # div :: CULong -> CULong -> CULong # mod :: CULong -> CULong -> CULong # quotRem :: CULong -> CULong -> (CULong, CULong) # divMod :: CULong -> CULong -> (CULong, CULong) # toInteger :: CULong -> Integer #
Integral CUShort |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods quot :: CUShort -> CUShort -> CUShort # rem :: CUShort -> CUShort -> CUShort # div :: CUShort -> CUShort -> CUShort # mod :: CUShort -> CUShort -> CUShort # quotRem :: CUShort -> CUShort -> (CUShort, CUShort) # divMod :: CUShort -> CUShort -> (CUShort, CUShort) # toInteger :: CUShort -> Integer #
Integral CWchar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods quot :: CWchar -> CWchar -> CWchar # rem :: CWchar -> CWchar -> CWchar # div :: CWchar -> CWchar -> CWchar # mod :: CWchar -> CWchar -> CWchar # quotRem :: CWchar -> CWchar -> (CWchar, CWchar) # divMod :: CWchar -> CWchar -> (CWchar, CWchar) # toInteger :: CWchar -> Integer #
Integral IntPtr |
Instance details Defined in GHC.Internal.Foreign.Ptr Methods quot :: IntPtr -> IntPtr -> IntPtr # rem :: IntPtr -> IntPtr -> IntPtr # div :: IntPtr -> IntPtr -> IntPtr # mod :: IntPtr -> IntPtr -> IntPtr # quotRem :: IntPtr -> IntPtr -> (IntPtr, IntPtr) # divMod :: IntPtr -> IntPtr -> (IntPtr, IntPtr) # toInteger :: IntPtr -> Integer #
Integral WordPtr |
Instance details Defined in GHC.Internal.Foreign.Ptr Methods quot :: WordPtr -> WordPtr -> WordPtr # rem :: WordPtr -> WordPtr -> WordPtr # div :: WordPtr -> WordPtr -> WordPtr # mod :: WordPtr -> WordPtr -> WordPtr # quotRem :: WordPtr -> WordPtr -> (WordPtr, WordPtr) # divMod :: WordPtr -> WordPtr -> (WordPtr, WordPtr) # toInteger :: WordPtr -> Integer #
Integral 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 #
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 #
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 #
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 #
Integral CBlkCnt |
Instance details Defined in GHC.Internal.System.Posix.Types Methods quot :: CBlkCnt -> CBlkCnt -> CBlkCnt # rem :: CBlkCnt -> CBlkCnt -> CBlkCnt # div :: CBlkCnt -> CBlkCnt -> CBlkCnt # mod :: CBlkCnt -> CBlkCnt -> CBlkCnt # quotRem :: CBlkCnt -> CBlkCnt -> (CBlkCnt, CBlkCnt) # divMod :: CBlkCnt -> CBlkCnt -> (CBlkCnt, CBlkCnt) # toInteger :: CBlkCnt -> Integer #
Integral CBlkSize |
Instance details Defined in GHC.Internal.System.Posix.Types Methods quot :: CBlkSize -> CBlkSize -> CBlkSize # rem :: CBlkSize -> CBlkSize -> CBlkSize # div :: CBlkSize -> CBlkSize -> CBlkSize # mod :: CBlkSize -> CBlkSize -> CBlkSize # quotRem :: CBlkSize -> CBlkSize -> (CBlkSize, CBlkSize) # divMod :: CBlkSize -> CBlkSize -> (CBlkSize, CBlkSize) # toInteger :: CBlkSize -> Integer #
Integral CClockId |
Instance details Defined in GHC.Internal.System.Posix.Types Methods quot :: CClockId -> CClockId -> CClockId # rem :: CClockId -> CClockId -> CClockId # div :: CClockId -> CClockId -> CClockId # mod :: CClockId -> CClockId -> CClockId # quotRem :: CClockId -> CClockId -> (CClockId, CClockId) # divMod :: CClockId -> CClockId -> (CClockId, CClockId) # toInteger :: CClockId -> Integer #
Integral CDev |
Instance details Defined in GHC.Internal.System.Posix.Types Methods quot :: CDev -> CDev -> CDev # rem :: CDev -> CDev -> CDev # div :: CDev -> CDev -> CDev # mod :: CDev -> CDev -> CDev # quotRem :: CDev -> CDev -> (CDev, CDev) # divMod :: CDev -> CDev -> (CDev, CDev) # toInteger :: CDev -> Integer #
Integral CFsBlkCnt |
Instance details Defined in GHC.Internal.System.Posix.Types Methods quot :: CFsBlkCnt -> CFsBlkCnt -> CFsBlkCnt # rem :: CFsBlkCnt -> CFsBlkCnt -> CFsBlkCnt # div :: CFsBlkCnt -> CFsBlkCnt -> CFsBlkCnt # mod :: CFsBlkCnt -> CFsBlkCnt -> CFsBlkCnt # quotRem :: CFsBlkCnt -> CFsBlkCnt -> (CFsBlkCnt, CFsBlkCnt) # divMod :: CFsBlkCnt -> CFsBlkCnt -> (CFsBlkCnt, CFsBlkCnt) # toInteger :: CFsBlkCnt -> Integer #
Integral CFsFilCnt |
Instance details Defined in GHC.Internal.System.Posix.Types Methods quot :: CFsFilCnt -> CFsFilCnt -> CFsFilCnt # rem :: CFsFilCnt -> CFsFilCnt -> CFsFilCnt # div :: CFsFilCnt -> CFsFilCnt -> CFsFilCnt # mod :: CFsFilCnt -> CFsFilCnt -> CFsFilCnt # quotRem :: CFsFilCnt -> CFsFilCnt -> (CFsFilCnt, CFsFilCnt) # divMod :: CFsFilCnt -> CFsFilCnt -> (CFsFilCnt, CFsFilCnt) # toInteger :: CFsFilCnt -> Integer #
Integral CGid |
Instance details Defined in GHC.Internal.System.Posix.Types Methods quot :: CGid -> CGid -> CGid # rem :: CGid -> CGid -> CGid # div :: CGid -> CGid -> CGid # mod :: CGid -> CGid -> CGid # quotRem :: CGid -> CGid -> (CGid, CGid) # divMod :: CGid -> CGid -> (CGid, CGid) # toInteger :: CGid -> Integer #
Integral CId |
Instance details Defined in GHC.Internal.System.Posix.Types Methods quot :: CId -> CId -> CId # rem :: CId -> CId -> CId # div :: CId -> CId -> CId # mod :: CId -> CId -> CId # quotRem :: CId -> CId -> (CId, CId) # divMod :: CId -> CId -> (CId, CId) # toInteger :: CId -> Integer #
Integral CIno |
Instance details Defined in GHC.Internal.System.Posix.Types Methods quot :: CIno -> CIno -> CIno # rem :: CIno -> CIno -> CIno # div :: CIno -> CIno -> CIno # mod :: CIno -> CIno -> CIno # quotRem :: CIno -> CIno -> (CIno, CIno) # divMod :: CIno -> CIno -> (CIno, CIno) # toInteger :: CIno -> Integer #
Integral CKey |
Instance details Defined in GHC.Internal.System.Posix.Types Methods quot :: CKey -> CKey -> CKey # rem :: CKey -> CKey -> CKey # div :: CKey -> CKey -> CKey # mod :: CKey -> CKey -> CKey # quotRem :: CKey -> CKey -> (CKey, CKey) # divMod :: CKey -> CKey -> (CKey, CKey) # toInteger :: CKey -> Integer #
Integral CMode |
Instance details Defined in GHC.Internal.System.Posix.Types Methods quot :: CMode -> CMode -> CMode # rem :: CMode -> CMode -> CMode # div :: CMode -> CMode -> CMode # mod :: CMode -> CMode -> CMode # quotRem :: CMode -> CMode -> (CMode, CMode) # divMod :: CMode -> CMode -> (CMode, CMode) # toInteger :: CMode -> Integer #
Integral CNfds |
Instance details Defined in GHC.Internal.System.Posix.Types Methods quot :: CNfds -> CNfds -> CNfds # rem :: CNfds -> CNfds -> CNfds # div :: CNfds -> CNfds -> CNfds # mod :: CNfds -> CNfds -> CNfds # quotRem :: CNfds -> CNfds -> (CNfds, CNfds) # divMod :: CNfds -> CNfds -> (CNfds, CNfds) # toInteger :: CNfds -> Integer #
Integral CNlink |
Instance details Defined in GHC.Internal.System.Posix.Types Methods quot :: CNlink -> CNlink -> CNlink # rem :: CNlink -> CNlink -> CNlink # div :: CNlink -> CNlink -> CNlink # mod :: CNlink -> CNlink -> CNlink # quotRem :: CNlink -> CNlink -> (CNlink, CNlink) # divMod :: CNlink -> CNlink -> (CNlink, CNlink) # toInteger :: CNlink -> Integer #
Integral COff |
Instance details Defined in GHC.Internal.System.Posix.Types Methods quot :: COff -> COff -> COff # rem :: COff -> COff -> COff # div :: COff -> COff -> COff # mod :: COff -> COff -> COff # quotRem :: COff -> COff -> (COff, COff) # divMod :: COff -> COff -> (COff, COff) # toInteger :: COff -> Integer #
Integral CPid |
Instance details Defined in GHC.Internal.System.Posix.Types Methods quot :: CPid -> CPid -> CPid # rem :: CPid -> CPid -> CPid # div :: CPid -> CPid -> CPid # mod :: CPid -> CPid -> CPid # quotRem :: CPid -> CPid -> (CPid, CPid) # divMod :: CPid -> CPid -> (CPid, CPid) # toInteger :: CPid -> Integer #
Integral CRLim |
Instance details Defined in GHC.Internal.System.Posix.Types Methods quot :: CRLim -> CRLim -> CRLim # rem :: CRLim -> CRLim -> CRLim # div :: CRLim -> CRLim -> CRLim # mod :: CRLim -> CRLim -> CRLim # quotRem :: CRLim -> CRLim -> (CRLim, CRLim) # divMod :: CRLim -> CRLim -> (CRLim, CRLim) # toInteger :: CRLim -> Integer #
Integral CSocklen |
Instance details Defined in GHC.Internal.System.Posix.Types Methods quot :: CSocklen -> CSocklen -> CSocklen # rem :: CSocklen -> CSocklen -> CSocklen # div :: CSocklen -> CSocklen -> CSocklen # mod :: CSocklen -> CSocklen -> CSocklen # quotRem :: CSocklen -> CSocklen -> (CSocklen, CSocklen) # divMod :: CSocklen -> CSocklen -> (CSocklen, CSocklen) # toInteger :: CSocklen -> Integer #
Integral CSsize |
Instance details Defined in GHC.Internal.System.Posix.Types Methods quot :: CSsize -> CSsize -> CSsize # rem :: CSsize -> CSsize -> CSsize # div :: CSsize -> CSsize -> CSsize # mod :: CSsize -> CSsize -> CSsize # quotRem :: CSsize -> CSsize -> (CSsize, CSsize) # divMod :: CSsize -> CSsize -> (CSsize, CSsize) # toInteger :: CSsize -> Integer #
Integral CTcflag |
Instance details Defined in GHC.Internal.System.Posix.Types Methods quot :: CTcflag -> CTcflag -> CTcflag # rem :: CTcflag -> CTcflag -> CTcflag # div :: CTcflag -> CTcflag -> CTcflag # mod :: CTcflag -> CTcflag -> CTcflag # quotRem :: CTcflag -> CTcflag -> (CTcflag, CTcflag) # divMod :: CTcflag -> CTcflag -> (CTcflag, CTcflag) # toInteger :: CTcflag -> Integer #
Integral CUid |
Instance details Defined in GHC.Internal.System.Posix.Types Methods quot :: CUid -> CUid -> CUid # rem :: CUid -> CUid -> CUid # div :: CUid -> CUid -> CUid # mod :: CUid -> CUid -> CUid # quotRem :: CUid -> CUid -> (CUid, CUid) # divMod :: CUid -> CUid -> (CUid, CUid) # toInteger :: CUid -> Integer #
Integral Fd |
Instance details Defined in GHC.Internal.System.Posix.Types Methods quot :: Fd -> Fd -> Fd # rem :: Fd -> Fd -> Fd # div :: Fd -> Fd -> Fd # mod :: Fd -> Fd -> Fd # quotRem :: Fd -> Fd -> (Fd, Fd) # divMod :: Fd -> Fd -> (Fd, Fd) # toInteger :: Fd -> Integer #
Integral 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 #
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 #
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 #
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 #
Integral I8 |
Instance details Defined in Data.Text.Foreign Methods quot :: I8 -> I8 -> I8 # rem :: I8 -> I8 -> I8 # div :: I8 -> I8 -> I8 # mod :: I8 -> I8 -> I8 # quotRem :: I8 -> I8 -> (I8, I8) # divMod :: I8 -> I8 -> (I8, I8) # toInteger :: I8 -> 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 #
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 #
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 #
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 #
Integral a => Integral (Identity a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Functor.Identity Methods quot :: Identity a -> Identity a -> Identity a # rem :: Identity a -> Identity a -> Identity a # div :: Identity a -> Identity a -> Identity a # mod :: Identity a -> Identity a -> Identity a # quotRem :: Identity a -> Identity a -> (Identity a, Identity a) # divMod :: Identity a -> Identity a -> (Identity a, Identity a) # toInteger :: Identity a -> Integer #
Integral a => Integral (Const a b) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Functor.Const Methods quot :: Const a b -> Const a b -> Const a b # rem :: Const a b -> Const a b -> Const a b # div :: Const a b -> Const a b -> Const a b # mod :: Const a b -> Const a b -> Const a b # quotRem :: Const a b -> Const a b -> (Const a b, Const a b) # divMod :: Const a b -> Const a b -> (Const a b, Const a b) # toInteger :: Const a b -> Integer #
Integral (f (g a)) => Integral (Compose f g a) | Since: base-4.19.0.0
Instance details Defined in Data.Functor.Compose Methods quot :: Compose f g a -> Compose f g a -> Compose f g a # rem :: Compose f g a -> Compose f g a -> Compose f g a # div :: Compose f g a -> Compose f g a -> Compose f g a # mod :: Compose f g a -> Compose f g a -> Compose f g a # quotRem :: Compose f g a -> Compose f g a -> (Compose f g a, Compose f g a) # divMod :: Compose f g a -> Compose f g a -> (Compose f g a, Compose f g a) # toInteger :: Compose f g a -> Integer #

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

Real numbers.

The Haskell report defines no laws for `Real`, however `Real` instances are customarily expected to adhere to the following law:

Coherence with `fromRational`
  if the type also implements `Fractional`, then `fromRational` is a left inverse for `toRational`, i.e. `fromRational (toRational i) = i`

The law does not hold for `Float`, `Double`, `CFloat`, `CDouble`, etc., because these types contain non-finite values, which cannot be roundtripped through `Rational`.

Methods

toRational :: a -> Rational #

Rational equivalent of its real argument with full precision.

#### Instances

Instances details

Real CBool |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CBool -> Rational #
Real CChar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CChar -> Rational #
Real CClock |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CClock -> Rational #
Real CDouble |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CDouble -> Rational #
Real CFloat |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CFloat -> Rational #
Real CInt |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CInt -> Rational #
Real CIntMax |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CIntMax -> Rational #
Real CIntPtr |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CIntPtr -> Rational #
Real CLLong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CLLong -> Rational #
Real CLong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CLong -> Rational #
Real CPtrdiff |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CPtrdiff -> Rational #
Real CSChar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CSChar -> Rational #
Real CSUSeconds |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CSUSeconds -> Rational #
Real CShort |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CShort -> Rational #
Real CSigAtomic |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CSigAtomic -> Rational #
Real CSize |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CSize -> Rational #
Real CTime |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CTime -> Rational #
Real CUChar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CUChar -> Rational #
Real CUInt |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CUInt -> Rational #
Real CUIntMax |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CUIntMax -> Rational #
Real CUIntPtr |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CUIntPtr -> Rational #
Real CULLong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CULLong -> Rational #
Real CULong |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CULong -> Rational #
Real CUSeconds |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CUSeconds -> Rational #
Real CUShort |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CUShort -> Rational #
Real CWchar |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods toRational :: CWchar -> Rational #
Real IntPtr |
Instance details Defined in GHC.Internal.Foreign.Ptr Methods toRational :: IntPtr -> Rational #
Real WordPtr |
Instance details Defined in GHC.Internal.Foreign.Ptr Methods toRational :: WordPtr -> Rational #
Real Int16 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods toRational :: Int16 -> Rational #
Real Int32 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods toRational :: Int32 -> Rational #
Real Int64 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods toRational :: Int64 -> Rational #
Real Int8 | @since base-2.01
Instance details Defined in GHC.Internal.Int Methods toRational :: Int8 -> Rational #
Real CBlkCnt |
Instance details Defined in GHC.Internal.System.Posix.Types Methods toRational :: CBlkCnt -> Rational #
Real CBlkSize |
Instance details Defined in GHC.Internal.System.Posix.Types Methods toRational :: CBlkSize -> Rational #
Real CCc |
Instance details Defined in GHC.Internal.System.Posix.Types Methods toRational :: CCc -> Rational #
Real CClockId |
Instance details Defined in GHC.Internal.System.Posix.Types Methods toRational :: CClockId -> Rational #
Real CDev |
Instance details Defined in GHC.Internal.System.Posix.Types Methods toRational :: CDev -> Rational #
Real CFsBlkCnt |
Instance details Defined in GHC.Internal.System.Posix.Types Methods toRational :: CFsBlkCnt -> Rational #
Real CFsFilCnt |
Instance details Defined in GHC.Internal.System.Posix.Types Methods toRational :: CFsFilCnt -> Rational #
Real CGid |
Instance details Defined in GHC.Internal.System.Posix.Types Methods toRational :: CGid -> Rational #
Real CId |
Instance details Defined in GHC.Internal.System.Posix.Types Methods toRational :: CId -> Rational #
Real CIno |
Instance details Defined in GHC.Internal.System.Posix.Types Methods toRational :: CIno -> Rational #
Real CKey |
Instance details Defined in GHC.Internal.System.Posix.Types Methods toRational :: CKey -> Rational #
Real CMode |
Instance details Defined in GHC.Internal.System.Posix.Types Methods toRational :: CMode -> Rational #
Real CNfds |
Instance details Defined in GHC.Internal.System.Posix.Types Methods toRational :: CNfds -> Rational #
Real CNlink |
Instance details Defined in GHC.Internal.System.Posix.Types Methods toRational :: CNlink -> Rational #
Real COff |
Instance details Defined in GHC.Internal.System.Posix.Types Methods toRational :: COff -> Rational #
Real CPid |
Instance details Defined in GHC.Internal.System.Posix.Types Methods toRational :: CPid -> Rational #
Real CRLim |
Instance details Defined in GHC.Internal.System.Posix.Types Methods toRational :: CRLim -> Rational #
Real CSocklen |
Instance details Defined in GHC.Internal.System.Posix.Types Methods toRational :: CSocklen -> Rational #
Real CSpeed |
Instance details Defined in GHC.Internal.System.Posix.Types Methods toRational :: CSpeed -> Rational #
Real CSsize |
Instance details Defined in GHC.Internal.System.Posix.Types Methods toRational :: CSsize -> Rational #
Real CTcflag |
Instance details Defined in GHC.Internal.System.Posix.Types Methods toRational :: CTcflag -> Rational #
Real CUid |
Instance details Defined in GHC.Internal.System.Posix.Types Methods toRational :: CUid -> Rational #
Real Fd |
Instance details Defined in GHC.Internal.System.Posix.Types Methods toRational :: Fd -> Rational #
Real Word16 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods toRational :: Word16 -> Rational #
Real Word32 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods toRational :: Word32 -> Rational #
Real Word64 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods toRational :: Word64 -> Rational #
Real Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods toRational :: Word8 -> Rational #
Real I8 |
Instance details Defined in Data.Text.Foreign Methods toRational :: I8 -> Rational #
Real Integer | @since base-2.0.1
Instance details Defined in GHC.Internal.Real Methods toRational :: Integer -> Rational #
Real Natural | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Real Methods toRational :: Natural -> Rational #
Real Int | @since base-2.0.1
Instance details Defined in GHC.Internal.Real Methods toRational :: Int -> Rational #
Real Word | @since base-2.01
Instance details Defined in GHC.Internal.Real Methods toRational :: Word -> Rational #
Real a => Real (Identity a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Functor.Identity Methods toRational :: Identity a -> Rational #
Real a => Real (Down a) | @since base-4.14.0.0
Instance details Defined in GHC.Internal.Data.Ord Methods toRational :: Down a -> Rational #
Integral a => Real (Ratio a) | @since base-2.0.1
Instance details Defined in GHC.Internal.Real Methods toRational :: Ratio a -> Rational #
HasResolution a => Real (Fixed a) | Since: base-2.1
Instance details Defined in Data.Fixed Methods toRational :: Fixed a -> Rational #
Real a => Real (Const a b) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Functor.Const Methods toRational :: Const a b -> Rational #
Real (f (g a)) => Real (Compose f g a) | Since: base-4.19.0.0
Instance details Defined in Data.Functor.Compose Methods toRational :: Compose f g a -> Rational #

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 Extension |
Instance details Defined in GHC.LanguageExtensions.Type Methods minBound :: Extension # maxBound :: Extension #
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 IntPtr |
Instance details Defined in GHC.Internal.Foreign.Ptr Methods minBound :: IntPtr # maxBound :: IntPtr #
Bounded WordPtr |
Instance details Defined in GHC.Internal.Foreign.Ptr Methods minBound :: WordPtr # maxBound :: WordPtr #
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 Leniency # |
Instance details Defined in Protolude.Conv Methods minBound :: Leniency # maxBound :: Leniency #
Bounded I8 |
Instance details Defined in Data.Text.Foreign Methods minBound :: I8 # maxBound :: I8 #
Bounded FPFormat |
Instance details Defined in Data.Text.Lazy.Builder.RealFloat Methods minBound :: FPFormat # maxBound :: FPFormat #
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 #
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 (Down a) | Swaps ``minBound`` and ``maxBound`` of the underlying type. @since base-4.14.0.0
Instance details Defined in GHC.Internal.Data.Ord Methods minBound :: Down a # maxBound :: Down 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 #
Coercible a b => Bounded (Coercion a b) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Type.Coercion Methods minBound :: Coercion a b # maxBound :: Coercion a b #
a ~ b => Bounded (a :~: b) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Type.Equality Methods minBound :: a :~: b # maxBound :: a :~: b #
(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) #
a ~~ b => Bounded (a :~~: b) | @since base-4.10.0.0
Instance details Defined in GHC.Internal.Data.Type.Equality Methods minBound :: a :~~: b # maxBound :: a :~~: b #
(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 Fractional a => Floating a where #

Trigonometric and hyperbolic functions and related functions.

The Haskell Report defines no laws for `Floating`. However, `(`+`)`, `(`*`)` and `exp` are customarily expected to define an exponential field and have the following properties:

- `exp (a + b)` = `exp a * exp b`
- `exp (fromInteger 0)` = `fromInteger 1`

Minimal complete definition

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

Methods

pi :: a #

exp :: a -> a #

log :: a -> a #

sqrt :: a -> a #

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

logBase :: a -> a -> a #

sin :: a -> a #

cos :: a -> a #

tan :: a -> a #

asin :: a -> a #

acos :: a -> a #

atan :: a -> a #

sinh :: a -> a #

cosh :: a -> a #

tanh :: a -> a #

asinh :: a -> a #

acosh :: a -> a #

atanh :: a -> a #

log1p :: a -> a #

``log1p` x` computes ``log` (1 + x)`, but provides more precise results for small (absolute) values of `x` if possible.

@since base-4.9.0.0

expm1 :: a -> a #

``expm1` x` computes ``exp` x - 1`, but provides more precise results for small (absolute) values of `x` if possible.

@since base-4.9.0.0

log1pexp :: a -> a #

``log1pexp` x` computes ``log` (1 + `exp` x)`, but provides more precise results if possible.

Examples:

- if `x` is a large negative number, ``log` (1 + `exp` x)` will be imprecise for the reasons given in `log1p`.
- if ``exp` x` is close to `-1`, ``log` (1 + `exp` x)` will be imprecise for the reasons given in `expm1`.

@since base-4.9.0.0

log1mexp :: a -> a #

``log1mexp` x` computes ``log` (1 - `exp` x)`, but provides more precise results if possible.

Examples:

- if `x` is a large negative number, ``log` (1 - `exp` x)` will be imprecise for the reasons given in `log1p`.
- if ``exp` x` is close to `1`, ``log` (1 - `exp` x)` will be imprecise for the reasons given in `expm1`.

@since base-4.9.0.0

#### Instances

Instances details

Floating CDouble |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods pi :: CDouble # exp :: CDouble -> CDouble # log :: CDouble -> CDouble # sqrt :: CDouble -> CDouble # (**) :: CDouble -> CDouble -> CDouble # logBase :: CDouble -> CDouble -> CDouble # sin :: CDouble -> CDouble # cos :: CDouble -> CDouble # tan :: CDouble -> CDouble # asin :: CDouble -> CDouble # acos :: CDouble -> CDouble # atan :: CDouble -> CDouble # sinh :: CDouble -> CDouble # cosh :: CDouble -> CDouble # tanh :: CDouble -> CDouble # asinh :: CDouble -> CDouble # acosh :: CDouble -> CDouble # atanh :: CDouble -> CDouble # log1p :: CDouble -> CDouble # expm1 :: CDouble -> CDouble # log1pexp :: CDouble -> CDouble # log1mexp :: CDouble -> CDouble #
Floating CFloat |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods pi :: CFloat # exp :: CFloat -> CFloat # log :: CFloat -> CFloat # sqrt :: CFloat -> CFloat # (**) :: CFloat -> CFloat -> CFloat # logBase :: CFloat -> CFloat -> CFloat # sin :: CFloat -> CFloat # cos :: CFloat -> CFloat # tan :: CFloat -> CFloat # asin :: CFloat -> CFloat # acos :: CFloat -> CFloat # atan :: CFloat -> CFloat # sinh :: CFloat -> CFloat # cosh :: CFloat -> CFloat # tanh :: CFloat -> CFloat # asinh :: CFloat -> CFloat # acosh :: CFloat -> CFloat # atanh :: CFloat -> CFloat # log1p :: CFloat -> CFloat # expm1 :: CFloat -> CFloat # log1pexp :: CFloat -> CFloat # log1mexp :: CFloat -> CFloat #
Floating 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 #
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 a => Floating (Complex a) | Since: base-2.1
Instance details Defined in Data.Complex Methods pi :: Complex a # exp :: Complex a -> Complex a # log :: Complex a -> Complex a # sqrt :: Complex a -> Complex a # (**) :: Complex a -> Complex a -> Complex a # logBase :: Complex a -> Complex a -> Complex a # sin :: Complex a -> Complex a # cos :: Complex a -> Complex a # tan :: Complex a -> Complex a # asin :: Complex a -> Complex a # acos :: Complex a -> Complex a # atan :: Complex a -> Complex a # sinh :: Complex a -> Complex a # cosh :: Complex a -> Complex a # tanh :: Complex a -> Complex a # asinh :: Complex a -> Complex a # acosh :: Complex a -> Complex a # atanh :: Complex a -> Complex a # log1p :: Complex a -> Complex a # expm1 :: Complex a -> Complex a # log1pexp :: Complex a -> Complex a # log1mexp :: Complex a -> Complex a #
Floating a => Floating (Identity a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Functor.Identity Methods pi :: Identity a # exp :: Identity a -> Identity a # log :: Identity a -> Identity a # sqrt :: Identity a -> Identity a # (**) :: Identity a -> Identity a -> Identity a # logBase :: Identity a -> Identity a -> Identity a # sin :: Identity a -> Identity a # cos :: Identity a -> Identity a # tan :: Identity a -> Identity a # asin :: Identity a -> Identity a # acos :: Identity a -> Identity a # atan :: Identity a -> Identity a # sinh :: Identity a -> Identity a # cosh :: Identity a -> Identity a # tanh :: Identity a -> Identity a # asinh :: Identity a -> Identity a # acosh :: Identity a -> Identity a # atanh :: Identity a -> Identity a # log1p :: Identity a -> Identity a # expm1 :: Identity a -> Identity a # log1pexp :: Identity a -> Identity a # log1mexp :: Identity a -> Identity a #
Floating a => Floating (Down a) | @since base-4.14.0.0
Instance details Defined in GHC.Internal.Data.Ord Methods pi :: Down a # exp :: Down a -> Down a # log :: Down a -> Down a # sqrt :: Down a -> Down a # (**) :: Down a -> Down a -> Down a # logBase :: Down a -> Down a -> Down a # sin :: Down a -> Down a # cos :: Down a -> Down a # tan :: Down a -> Down a # asin :: Down a -> Down a # acos :: Down a -> Down a # atan :: Down a -> Down a # sinh :: Down a -> Down a # cosh :: Down a -> Down a # tanh :: Down a -> Down a # asinh :: Down a -> Down a # acosh :: Down a -> Down a # atanh :: Down a -> Down a # log1p :: Down a -> Down a # expm1 :: Down a -> Down a # log1pexp :: Down a -> Down a # log1mexp :: Down a -> Down a #
Floating a => Floating (Op a b) |
Instance details Defined in Data.Functor.Contravariant Methods pi :: Op a b # exp :: Op a b -> Op a b # log :: Op a b -> Op a b # sqrt :: Op a b -> Op a b # (**) :: Op a b -> Op a b -> Op a b # logBase :: Op a b -> Op a b -> Op a b # sin :: Op a b -> Op a b # cos :: Op a b -> Op a b # tan :: Op a b -> Op a b # asin :: Op a b -> Op a b # acos :: Op a b -> Op a b # atan :: Op a b -> Op a b # sinh :: Op a b -> Op a b # cosh :: Op a b -> Op a b # tanh :: Op a b -> Op a b # asinh :: Op a b -> Op a b # acosh :: Op a b -> Op a b # atanh :: Op a b -> Op a b # log1p :: Op a b -> Op a b # expm1 :: Op a b -> Op a b # log1pexp :: Op a b -> Op a b # log1mexp :: Op a b -> Op a b #
Floating a => Floating (Const a b) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Functor.Const Methods pi :: Const a b # exp :: Const a b -> Const a b # log :: Const a b -> Const a b # sqrt :: Const a b -> Const a b # (**) :: Const a b -> Const a b -> Const a b # logBase :: Const a b -> Const a b -> Const a b # sin :: Const a b -> Const a b # cos :: Const a b -> Const a b # tan :: Const a b -> Const a b # asin :: Const a b -> Const a b # acos :: Const a b -> Const a b # atan :: Const a b -> Const a b # sinh :: Const a b -> Const a b # cosh :: Const a b -> Const a b # tanh :: Const a b -> Const a b # asinh :: Const a b -> Const a b # acosh :: Const a b -> Const a b # atanh :: Const a b -> Const a b # log1p :: Const a b -> Const a b # expm1 :: Const a b -> Const a b # log1pexp :: Const a b -> Const a b # log1mexp :: Const a b -> Const a b #
Floating (f (g a)) => Floating (Compose f g a) | Since: base-4.20.0.0
Instance details Defined in Data.Functor.Compose Methods pi :: Compose f g a # exp :: Compose f g a -> Compose f g a # log :: Compose f g a -> Compose f g a # sqrt :: Compose f g a -> Compose f g a # (**) :: Compose f g a -> Compose f g a -> Compose f g a # logBase :: Compose f g a -> Compose f g a -> Compose f g a # sin :: Compose f g a -> Compose f g a # cos :: Compose f g a -> Compose f g a # tan :: Compose f g a -> Compose f g a # asin :: Compose f g a -> Compose f g a # acos :: Compose f g a -> Compose f g a # atan :: Compose f g a -> Compose f g a # sinh :: Compose f g a -> Compose f g a # cosh :: Compose f g a -> Compose f g a # tanh :: Compose f g a -> Compose f g a # asinh :: Compose f g a -> Compose f g a # acosh :: Compose f g a -> Compose f g a # atanh :: Compose f g a -> Compose f g a # log1p :: Compose f g a -> Compose f g a # expm1 :: Compose f g a -> Compose f g a # log1pexp :: Compose f g a -> Compose f g a # log1mexp :: Compose f g a -> Compose f g a #

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

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

Minimal complete definition

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

Methods

floatRadix :: a -> Integer #

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

floatDigits :: a -> Int #

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

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

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

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

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

encodeFloat :: Integer -> Int -> a #

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

exponent :: a -> Int #

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

significand :: a -> a #

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

scaleFloat :: Int -> a -> a #

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

isNaN :: a -> Bool #

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

isInfinite :: a -> Bool #

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

isDenormalized :: a -> Bool #

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

isNegativeZero :: a -> Bool #

`True` if the argument is an IEEE negative zero

isIEEE :: a -> Bool #

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

atan2 :: a -> a -> a #

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

#### Instances

Instances details

RealFloat CDouble |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods floatRadix :: CDouble -> Integer # floatDigits :: CDouble -> Int # floatRange :: CDouble -> (Int, Int) # decodeFloat :: CDouble -> (Integer, Int) # encodeFloat :: Integer -> Int -> CDouble # exponent :: CDouble -> Int # significand :: CDouble -> CDouble # scaleFloat :: Int -> CDouble -> CDouble # isNaN :: CDouble -> Bool # isInfinite :: CDouble -> Bool # isDenormalized :: CDouble -> Bool # isNegativeZero :: CDouble -> Bool # isIEEE :: CDouble -> Bool # atan2 :: CDouble -> CDouble -> CDouble #
RealFloat CFloat |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods floatRadix :: CFloat -> Integer # floatDigits :: CFloat -> Int # floatRange :: CFloat -> (Int, Int) # decodeFloat :: CFloat -> (Integer, Int) # encodeFloat :: Integer -> Int -> CFloat # exponent :: CFloat -> Int # significand :: CFloat -> CFloat # scaleFloat :: Int -> CFloat -> CFloat # isNaN :: CFloat -> Bool # isInfinite :: CFloat -> Bool # isDenormalized :: CFloat -> Bool # isNegativeZero :: CFloat -> Bool # isIEEE :: CFloat -> Bool # atan2 :: CFloat -> CFloat -> CFloat #
RealFloat 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 #
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 #
RealFloat a => RealFloat (Identity a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Functor.Identity Methods floatRadix :: Identity a -> Integer # floatDigits :: Identity a -> Int # floatRange :: Identity a -> (Int, Int) # decodeFloat :: Identity a -> (Integer, Int) # encodeFloat :: Integer -> Int -> Identity a # exponent :: Identity a -> Int # significand :: Identity a -> Identity a # scaleFloat :: Int -> Identity a -> Identity a # isNaN :: Identity a -> Bool # isInfinite :: Identity a -> Bool # isDenormalized :: Identity a -> Bool # isNegativeZero :: Identity a -> Bool # isIEEE :: Identity a -> Bool # atan2 :: Identity a -> Identity a -> Identity a #
RealFloat a => RealFloat (Down a) | @since base-4.14.0.0
Instance details Defined in GHC.Internal.Data.Ord Methods floatRadix :: Down a -> Integer # floatDigits :: Down a -> Int # floatRange :: Down a -> (Int, Int) # decodeFloat :: Down a -> (Integer, Int) # encodeFloat :: Integer -> Int -> Down a # exponent :: Down a -> Int # significand :: Down a -> Down a # scaleFloat :: Int -> Down a -> Down a # isNaN :: Down a -> Bool # isInfinite :: Down a -> Bool # isDenormalized :: Down a -> Bool # isNegativeZero :: Down a -> Bool # isIEEE :: Down a -> Bool # atan2 :: Down a -> Down a -> Down a #
RealFloat a => RealFloat (Const a b) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Functor.Const Methods floatRadix :: Const a b -> Integer # floatDigits :: Const a b -> Int # floatRange :: Const a b -> (Int, Int) # decodeFloat :: Const a b -> (Integer, Int) # encodeFloat :: Integer -> Int -> Const a b # exponent :: Const a b -> Int # significand :: Const a b -> Const a b # scaleFloat :: Int -> Const a b -> Const a b # isNaN :: Const a b -> Bool # isInfinite :: Const a b -> Bool # isDenormalized :: Const a b -> Bool # isNegativeZero :: Const a b -> Bool # isIEEE :: Const a b -> Bool # atan2 :: Const a b -> Const a b -> Const a b #
RealFloat (f (g a)) => RealFloat (Compose f g a) | Since: base-4.20.0.0
Instance details Defined in Data.Functor.Compose Methods floatRadix :: Compose f g a -> Integer # floatDigits :: Compose f g a -> Int # floatRange :: Compose f g a -> (Int, Int) # decodeFloat :: Compose f g a -> (Integer, Int) # encodeFloat :: Integer -> Int -> Compose f g a # exponent :: Compose f g a -> Int # significand :: Compose f g a -> Compose f g a # scaleFloat :: Int -> Compose f g a -> Compose f g a # isNaN :: Compose f g a -> Bool # isInfinite :: Compose f g a -> Bool # isDenormalized :: Compose f g a -> Bool # isNegativeZero :: Compose f g a -> Bool # isIEEE :: Compose f g a -> Bool # atan2 :: Compose f g a -> Compose f g a -> Compose f g a #

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

Extracting components of fractions.

Minimal complete definition

properFraction

Methods

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

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

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

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

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

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

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

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

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

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

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

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

#### Instances

Instances details

RealFrac CDouble |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods properFraction :: Integral b => CDouble -> (b, CDouble) # truncate :: Integral b => CDouble -> b # round :: Integral b => CDouble -> b # ceiling :: Integral b => CDouble -> b # floor :: Integral b => CDouble -> b #
RealFrac CFloat |
Instance details Defined in GHC.Internal.Foreign.C.Types Methods properFraction :: Integral b => CFloat -> (b, CFloat) # truncate :: Integral b => CFloat -> b # round :: Integral b => CFloat -> b # ceiling :: Integral b => CFloat -> b # floor :: Integral b => CFloat -> b #
RealFrac a => RealFrac (Identity a) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Functor.Identity Methods properFraction :: Integral b => Identity a -> (b, Identity a) # truncate :: Integral b => Identity a -> b # round :: Integral b => Identity a -> b # ceiling :: Integral b => Identity a -> b # floor :: Integral b => Identity a -> b #
RealFrac a => RealFrac (Down a) | @since base-4.14.0.0
Instance details Defined in GHC.Internal.Data.Ord Methods properFraction :: Integral b => Down a -> (b, Down a) # truncate :: Integral b => Down a -> b # round :: Integral b => Down a -> b # ceiling :: Integral b => Down a -> b # floor :: Integral b => Down a -> b #
Integral a => RealFrac (Ratio a) | @since base-2.0.1
Instance details Defined in GHC.Internal.Real Methods properFraction :: Integral b => Ratio a -> (b, Ratio a) # truncate :: Integral b => Ratio a -> b # round :: Integral b => Ratio a -> b # ceiling :: Integral b => Ratio a -> b # floor :: Integral b => Ratio a -> b #
HasResolution a => RealFrac (Fixed a) | Since: base-2.1
Instance details Defined in Data.Fixed Methods properFraction :: Integral b => Fixed a -> (b, Fixed a) # truncate :: Integral b => Fixed a -> b # round :: Integral b => Fixed a -> b # ceiling :: Integral b => Fixed a -> b # floor :: Integral b => Fixed a -> b #
RealFrac a => RealFrac (Const a b) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Functor.Const Methods properFraction :: Integral b0 => Const a b -> (b0, Const a b) # truncate :: Integral b0 => Const a b -> b0 # round :: Integral b0 => Const a b -> b0 # ceiling :: Integral b0 => Const a b -> b0 # floor :: Integral b0 => Const a b -> b0 #
RealFrac (f (g a)) => RealFrac (Compose f g a) | Since: base-4.20.0.0
Instance details Defined in Data.Functor.Compose Methods properFraction :: Integral b => Compose f g a -> (b, Compose f g a) # truncate :: Integral b => Compose f g a -> b # round :: Integral b => Compose f g a -> b # ceiling :: Integral b => Compose f g a -> b # floor :: Integral b => Compose f g a -> b #

class Show a where #

Conversion of values to readable `String`s.

Derived instances of `Show` have the following properties, which are compatible with derived instances of `Read`:

- The result of `show` is a syntactically correct Haskell expression containing only constants, given the fixity declarations in force at the point where the type is declared. It contains only the constructor names defined in the data type, parentheses, and spaces. When labelled constructor fields are used, braces, commas, field names, and equal signs are also used.
- If the constructor is defined to be an infix operator, then `showsPrec` will produce infix applications of the constructor.
- the representation will be enclosed in parentheses if the precedence of the top-level constructor in `x` is less than `d` (associativity is ignored). Thus, if `d` is `0` then the result is never surrounded in parentheses; if `d` is `11` it is always surrounded in parentheses, unless it is an atomic expression.
- If the constructor is defined using record syntax, then `show` will produce the record-syntax form, with the fields given in the same order as the original declaration.

For example, given the declarations

    infixr 5 :^:
    data Tree a =  Leaf a  |  Tree a :^: Tree a

the derived instance of `Show` is equivalent to

    instance (Show a) => Show (Tree a) where

           showsPrec d (Leaf m) = showParen (d > app_prec) $
                showString "Leaf " . showsPrec (app_prec+1) m
             where app_prec = 10

           showsPrec d (u :^: v) = showParen (d > up_prec) $
                showsPrec (up_prec+1) u .
                showString " :^: "      .
                showsPrec (up_prec+1) v
             where up_prec = 5

Note that right-associativity of `:^:` is ignored. For example,

- ``show` (Leaf 1 :^: Leaf 2 :^: Leaf 3)` produces the string `"Leaf 1 :^: (Leaf 2 :^: Leaf 3)"`.

Minimal complete definition

showsPrec | show

Methods

showsPrec #

Arguments

:: Int | the operator precedence of the enclosing context (a number from `0` to `11`). Function application has precedence `10`.
-> a | the value to be converted to a `String`
-> ShowS |

Convert a value to a readable `String`.

`showsPrec` should satisfy the law

    showsPrec d x r ++ s  ==  showsPrec d x (r ++ s)

Derived instances of `Read` and `Show` satisfy the following:

- `(x,"")` is an element of `(`readsPrec` d (`showsPrec` d x ""))`.

That is, `readsPrec` parses the string produced by `showsPrec`, and delivers the value that `showsPrec` started with.

show :: a -> String #

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

showList :: [a] -> ShowS #

The method `showList` is provided to allow the programmer to give a specialised way of showing lists of values. For example, this is used by the predefined `Show` instance of the `Char` type, where values of type `String` should be shown in double quotes, rather than between square brackets.

#### Instances

Instances details

Show AsyncCancelled |
Instance details Defined in Control.Concurrent.Async.Internal Methods showsPrec :: Int -> AsyncCancelled -> ShowS # show :: AsyncCancelled -> String # showList :: [AsyncCancelled] -> ShowS #
Show ExceptionInLinkedThread |
Instance details Defined in Control.Concurrent.Async.Internal Methods showsPrec :: Int -> ExceptionInLinkedThread -> ShowS # show :: ExceptionInLinkedThread -> String # showList :: [ExceptionInLinkedThread] -> ShowS #
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 FormatMode |
Instance details Defined in Data.ByteString.Builder.RealFloat Methods showsPrec :: Int -> FormatMode -> ShowS # show :: FormatMode -> String # showList :: [FormatMode] -> ShowS #
Show ByteString |
Instance details Defined in Data.ByteString.Internal.Type Methods showsPrec :: Int -> ByteString -> ShowS # show :: ByteString -> String # showList :: [ByteString] -> ShowS #
Show SizeOverflowException |
Instance details Defined in Data.ByteString.Internal.Type Methods showsPrec :: Int -> SizeOverflowException -> ShowS # show :: SizeOverflowException -> String # showList :: [SizeOverflowException] -> ShowS #
Show ByteString |
Instance details Defined in Data.ByteString.Lazy.Internal Methods showsPrec :: Int -> ByteString -> ShowS # show :: ByteString -> String # showList :: [ByteString] -> ShowS #
Show ShortByteString |
Instance details Defined in Data.ByteString.Short.Internal Methods showsPrec :: Int -> ShortByteString -> ShowS # show :: ShortByteString -> String # showList :: [ShortByteString] -> ShowS #
Show IntSet |
Instance details Defined in Data.IntSet.Internal Methods showsPrec :: Int -> IntSet -> ShowS # show :: IntSet -> String # showList :: [IntSet] -> ShowS #
Show BitQueue |
Instance details Defined in Utils.Containers.Internal.BitQueue Methods showsPrec :: Int -> BitQueue -> ShowS # show :: BitQueue -> String # showList :: [BitQueue] -> ShowS #
Show BitQueueB |
Instance details Defined in Utils.Containers.Internal.BitQueue Methods showsPrec :: Int -> BitQueueB -> ShowS # show :: BitQueueB -> String # showList :: [BitQueueB] -> ShowS #
Show ForeignSrcLang |
Instance details Defined in GHC.ForeignSrcLang.Type Methods showsPrec :: Int -> ForeignSrcLang -> ShowS # show :: ForeignSrcLang -> String # showList :: [ForeignSrcLang] -> ShowS #
Show Extension |
Instance details Defined in GHC.LanguageExtensions.Type Methods showsPrec :: Int -> Extension -> ShowS # show :: Extension -> String # showList :: [Extension] -> 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 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 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 IntPtr |
Instance details Defined in GHC.Internal.Foreign.Ptr Methods showsPrec :: Int -> IntPtr -> ShowS # show :: IntPtr -> String # showList :: [IntPtr] -> ShowS #
Show WordPtr |
Instance details Defined in GHC.Internal.Foreign.Ptr Methods showsPrec :: Int -> WordPtr -> ShowS # show :: WordPtr -> String # showList :: [WordPtr] -> 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 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 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 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 StaticPtrInfo | @since base-4.8.0.0
Instance details Defined in GHC.Internal.StaticPtr Methods showsPrec :: Int -> StaticPtrInfo -> ShowS # show :: StaticPtrInfo -> String # showList :: [StaticPtrInfo] -> 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 SomeChar |
Instance details Defined in GHC.Internal.TypeLits Methods showsPrec :: Int -> SomeChar -> ShowS # show :: SomeChar -> String # showList :: [SomeChar] -> ShowS #
Show SomeSymbol | @since base-4.7.0.0
Instance details Defined in GHC.Internal.TypeLits Methods showsPrec :: Int -> SomeSymbol -> ShowS # show :: SomeSymbol -> String # showList :: [SomeSymbol] -> 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 OsChar |
Instance details Defined in System.OsString.Internal.Types Methods showsPrec :: Int -> OsChar -> ShowS # show :: OsChar -> String # showList :: [OsChar] -> ShowS #
Show OsString | On windows, decodes as UCS-2. On unix prints the raw bytes without decoding.
Instance details Defined in System.OsString.Internal.Types Methods showsPrec :: Int -> OsString -> ShowS # show :: OsString -> String # showList :: [OsString] -> ShowS #
Show PosixChar |
Instance details Defined in System.OsString.Internal.Types Methods showsPrec :: Int -> PosixChar -> ShowS # show :: PosixChar -> String # showList :: [PosixChar] -> ShowS #
Show PosixString | Prints the raw bytes without decoding.
Instance details Defined in System.OsString.Internal.Types Methods showsPrec :: Int -> PosixString -> ShowS # show :: PosixString -> String # showList :: [PosixString] -> ShowS #
Show WindowsChar |
Instance details Defined in System.OsString.Internal.Types Methods showsPrec :: Int -> WindowsChar -> ShowS # show :: WindowsChar -> String # showList :: [WindowsChar] -> ShowS #
Show WindowsString | Decodes as UCS-2.
Instance details Defined in System.OsString.Internal.Types Methods showsPrec :: Int -> WindowsString -> ShowS # show :: WindowsString -> String # showList :: [WindowsString] -> ShowS #
Show Mode |
Instance details Defined in Text.PrettyPrint.Annotated.HughesPJ Methods showsPrec :: Int -> Mode -> ShowS # show :: Mode -> String # showList :: [Mode] -> ShowS #
Show Style |
Instance details Defined in Text.PrettyPrint.Annotated.HughesPJ Methods showsPrec :: Int -> Style -> ShowS # show :: Style -> String # showList :: [Style] -> ShowS #
Show TextDetails |
Instance details Defined in Text.PrettyPrint.Annotated.HughesPJ Methods showsPrec :: Int -> TextDetails -> ShowS # show :: TextDetails -> String # showList :: [TextDetails] -> ShowS #
Show Doc |
Instance details Defined in Text.PrettyPrint.HughesPJ Methods showsPrec :: Int -> Doc -> ShowS # show :: Doc -> String # showList :: [Doc] -> ShowS #
Show Leniency # |
Instance details Defined in Protolude.Conv Methods showsPrec :: Int -> Leniency -> ShowS # show :: Leniency -> String # showList :: [Leniency] -> ShowS #
Show FatalError # |
Instance details Defined in Protolude.Panic Methods showsPrec :: Int -> FatalError -> ShowS # show :: FatalError -> String # showList :: [FatalError] -> ShowS #
Show AnnLookup |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> AnnLookup -> ShowS # show :: AnnLookup -> String # showList :: [AnnLookup] -> ShowS #
Show AnnTarget |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> AnnTarget -> ShowS # show :: AnnTarget -> String # showList :: [AnnTarget] -> ShowS #
Show Bang |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Bang -> ShowS # show :: Bang -> String # showList :: [Bang] -> ShowS #
Show BndrVis |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> BndrVis -> ShowS # show :: BndrVis -> String # showList :: [BndrVis] -> ShowS #
Show Body |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Body -> ShowS # show :: Body -> String # showList :: [Body] -> ShowS #
Show Bytes |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Bytes -> ShowS # show :: Bytes -> String # showList :: [Bytes] -> ShowS #
Show Callconv |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Callconv -> ShowS # show :: Callconv -> String # showList :: [Callconv] -> ShowS #
Show Clause |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Clause -> ShowS # show :: Clause -> String # showList :: [Clause] -> ShowS #
Show Con |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Con -> ShowS # show :: Con -> String # showList :: [Con] -> ShowS #
Show Dec |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Dec -> ShowS # show :: Dec -> String # showList :: [Dec] -> ShowS #
Show DecidedStrictness |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> DecidedStrictness -> ShowS # show :: DecidedStrictness -> String # showList :: [DecidedStrictness] -> ShowS #
Show DerivClause |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> DerivClause -> ShowS # show :: DerivClause -> String # showList :: [DerivClause] -> ShowS #
Show DerivStrategy |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> DerivStrategy -> ShowS # show :: DerivStrategy -> String # showList :: [DerivStrategy] -> ShowS #
Show DocLoc |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> DocLoc -> ShowS # show :: DocLoc -> String # showList :: [DocLoc] -> ShowS #
Show Exp |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Exp -> ShowS # show :: Exp -> String # showList :: [Exp] -> ShowS #
Show FamilyResultSig |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> FamilyResultSig -> ShowS # show :: FamilyResultSig -> String # showList :: [FamilyResultSig] -> ShowS #
Show Fixity |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Fixity -> ShowS # show :: Fixity -> String # showList :: [Fixity] -> ShowS #
Show FixityDirection |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> FixityDirection -> ShowS # show :: FixityDirection -> String # showList :: [FixityDirection] -> ShowS #
Show Foreign |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Foreign -> ShowS # show :: Foreign -> String # showList :: [Foreign] -> ShowS #
Show FunDep |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> FunDep -> ShowS # show :: FunDep -> String # showList :: [FunDep] -> ShowS #
Show Guard |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Guard -> ShowS # show :: Guard -> String # showList :: [Guard] -> ShowS #
Show Info |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Info -> ShowS # show :: Info -> String # showList :: [Info] -> ShowS #
Show InjectivityAnn |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> InjectivityAnn -> ShowS # show :: InjectivityAnn -> String # showList :: [InjectivityAnn] -> ShowS #
Show Inline |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Inline -> ShowS # show :: Inline -> String # showList :: [Inline] -> ShowS #
Show Lit |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Lit -> ShowS # show :: Lit -> String # showList :: [Lit] -> ShowS #
Show Loc |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Loc -> ShowS # show :: Loc -> String # showList :: [Loc] -> ShowS #
Show Match |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Match -> ShowS # show :: Match -> String # showList :: [Match] -> ShowS #
Show ModName |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> ModName -> ShowS # show :: ModName -> String # showList :: [ModName] -> ShowS #
Show Module |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Module -> ShowS # show :: Module -> String # showList :: [Module] -> ShowS #
Show ModuleInfo |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> ModuleInfo -> ShowS # show :: ModuleInfo -> String # showList :: [ModuleInfo] -> ShowS #
Show Name |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Name -> ShowS # show :: Name -> String # showList :: [Name] -> ShowS #
Show NameFlavour |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> NameFlavour -> ShowS # show :: NameFlavour -> String # showList :: [NameFlavour] -> ShowS #
Show NameSpace |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> NameSpace -> ShowS # show :: NameSpace -> String # showList :: [NameSpace] -> ShowS #
Show NamespaceSpecifier |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> NamespaceSpecifier -> ShowS # show :: NamespaceSpecifier -> String # showList :: [NamespaceSpecifier] -> ShowS #
Show OccName |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> OccName -> ShowS # show :: OccName -> String # showList :: [OccName] -> ShowS #
Show Overlap |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Overlap -> ShowS # show :: Overlap -> String # showList :: [Overlap] -> ShowS #
Show Pat |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Pat -> ShowS # show :: Pat -> String # showList :: [Pat] -> ShowS #
Show PatSynArgs |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> PatSynArgs -> ShowS # show :: PatSynArgs -> String # showList :: [PatSynArgs] -> ShowS #
Show PatSynDir |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> PatSynDir -> ShowS # show :: PatSynDir -> String # showList :: [PatSynDir] -> ShowS #
Show Phases |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Phases -> ShowS # show :: Phases -> String # showList :: [Phases] -> ShowS #
Show PkgName |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> PkgName -> ShowS # show :: PkgName -> String # showList :: [PkgName] -> ShowS #
Show Pragma |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Pragma -> ShowS # show :: Pragma -> String # showList :: [Pragma] -> ShowS #
Show Range |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Range -> ShowS # show :: Range -> String # showList :: [Range] -> ShowS #
Show Role |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Role -> ShowS # show :: Role -> String # showList :: [Role] -> ShowS #
Show RuleBndr |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> RuleBndr -> ShowS # show :: RuleBndr -> String # showList :: [RuleBndr] -> ShowS #
Show RuleMatch |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> RuleMatch -> ShowS # show :: RuleMatch -> String # showList :: [RuleMatch] -> ShowS #
Show Safety |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Safety -> ShowS # show :: Safety -> String # showList :: [Safety] -> ShowS #
Show SourceStrictness |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> SourceStrictness -> ShowS # show :: SourceStrictness -> String # showList :: [SourceStrictness] -> ShowS #
Show SourceUnpackedness |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> SourceUnpackedness -> ShowS # show :: SourceUnpackedness -> String # showList :: [SourceUnpackedness] -> ShowS #
Show Specificity |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Specificity -> ShowS # show :: Specificity -> String # showList :: [Specificity] -> ShowS #
Show Stmt |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Stmt -> ShowS # show :: Stmt -> String # showList :: [Stmt] -> ShowS #
Show TyLit |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> TyLit -> ShowS # show :: TyLit -> String # showList :: [TyLit] -> ShowS #
Show TySynEqn |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> TySynEqn -> ShowS # show :: TySynEqn -> String # showList :: [TySynEqn] -> ShowS #
Show Type |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Type -> ShowS # show :: Type -> String # showList :: [Type] -> ShowS #
Show TypeFamilyHead |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> TypeFamilyHead -> ShowS # show :: TypeFamilyHead -> String # showList :: [TypeFamilyHead] -> ShowS #
Show Decoding |
Instance details Defined in Data.Text.Encoding Methods showsPrec :: Int -> Decoding -> ShowS # show :: Decoding -> String # showList :: [Decoding] -> ShowS #
Show UnicodeException |
Instance details Defined in Data.Text.Encoding.Error Methods showsPrec :: Int -> UnicodeException -> ShowS # show :: UnicodeException -> String # showList :: [UnicodeException] -> ShowS #
Show I8 |
Instance details Defined in Data.Text.Foreign Methods showsPrec :: Int -> I8 -> ShowS # show :: I8 -> String # showList :: [I8] -> ShowS #
Show Builder |
Instance details Defined in Data.Text.Internal.Builder Methods showsPrec :: Int -> Builder -> ShowS # show :: Builder -> String # showList :: [Builder] -> ShowS #
Show PartialUtf8CodePoint |
Instance details Defined in Data.Text.Internal.Encoding Methods showsPrec :: Int -> PartialUtf8CodePoint -> ShowS # show :: PartialUtf8CodePoint -> String # showList :: [PartialUtf8CodePoint] -> ShowS #
Show Utf8State |
Instance details Defined in Data.Text.Internal.Encoding Methods showsPrec :: Int -> Utf8State -> ShowS # show :: Utf8State -> String # showList :: [Utf8State] -> ShowS #
Show DecoderState |
Instance details Defined in Data.Text.Internal.Encoding.Utf8 Methods showsPrec :: Int -> DecoderState -> ShowS # show :: DecoderState -> String # showList :: [DecoderState] -> ShowS #
Show Size |
Instance details Defined in Data.Text.Internal.Fusion.Size Methods showsPrec :: Int -> Size -> ShowS # show :: Size -> String # showList :: [Size] -> ShowS #
Show FPFormat |
Instance details Defined in Data.Text.Lazy.Builder.RealFloat Methods showsPrec :: Int -> FPFormat -> ShowS # show :: FPFormat -> String # showList :: [FPFormat] -> ShowS #
Show Iter |
Instance details Defined in Data.Text.Unsafe Methods showsPrec :: Int -> Iter -> ShowS # show :: Iter -> String # showList :: [Iter] -> 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 vertex => Show (SCC vertex) | Since: containers-0.5.9
Instance details Defined in Data.Graph Methods showsPrec :: Int -> SCC vertex -> ShowS # show :: SCC vertex -> String # showList :: [SCC vertex] -> ShowS #
Show a => Show (IntMap a) |
Instance details Defined in Data.IntMap.Internal Methods showsPrec :: Int -> IntMap a -> ShowS # show :: IntMap a -> String # showList :: [IntMap a] -> ShowS #
Show a => Show (Seq a) |
Instance details Defined in Data.Sequence.Internal Methods showsPrec :: Int -> Seq a -> ShowS # show :: Seq a -> String # showList :: [Seq a] -> ShowS #
Show a => Show (ViewL a) |
Instance details Defined in Data.Sequence.Internal Methods showsPrec :: Int -> ViewL a -> ShowS # show :: ViewL a -> String # showList :: [ViewL a] -> ShowS #
Show a => Show (ViewR a) |
Instance details Defined in Data.Sequence.Internal Methods showsPrec :: Int -> ViewR a -> ShowS # show :: ViewR a -> String # showList :: [ViewR a] -> ShowS #
Show a => Show (Intersection a) |
Instance details Defined in Data.Set.Internal Methods showsPrec :: Int -> Intersection a -> ShowS # show :: Intersection a -> String # showList :: [Intersection a] -> ShowS #
Show a => Show (Set a) |
Instance details Defined in Data.Set.Internal Methods showsPrec :: Int -> Set a -> ShowS # show :: Set a -> String # showList :: [Set a] -> ShowS #
Show a => Show (Tree a) |
Instance details Defined in Data.Tree Methods showsPrec :: Int -> Tree a -> ShowS # show :: Tree a -> String # showList :: [Tree a] -> 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 (Down a) | This instance would be equivalent to the derived instances of the `Down` newtype if the `getDown` field were removed @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Ord Methods showsPrec :: Int -> Down a -> ShowS # show :: Down a -> String # showList :: [Down 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 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 (SChar c) | @since base-4.18.0.0
Instance details Defined in GHC.Internal.TypeLits Methods showsPrec :: Int -> SChar c -> ShowS # show :: SChar c -> String # showList :: [SChar c] -> ShowS #
Show (SSymbol s) | @since base-4.18.0.0
Instance details Defined in GHC.Internal.TypeLits Methods showsPrec :: Int -> SSymbol s -> ShowS # show :: SSymbol s -> String # showList :: [SSymbol s] -> 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 (Hashed a) |
Instance details Defined in Data.Hashable.Class Methods showsPrec :: Int -> Hashed a -> ShowS # show :: Hashed a -> String # showList :: [Hashed a] -> ShowS #
Show a => Show (AnnotDetails a) |
Instance details Defined in Text.PrettyPrint.Annotated.HughesPJ Methods showsPrec :: Int -> AnnotDetails a -> ShowS # show :: AnnotDetails a -> String # showList :: [AnnotDetails a] -> ShowS #
Show (Doc a) |
Instance details Defined in Text.PrettyPrint.Annotated.HughesPJ Methods showsPrec :: Int -> Doc a -> ShowS # show :: Doc a -> String # showList :: [Doc a] -> ShowS #
Show a => Show (Span a) |
Instance details Defined in Text.PrettyPrint.Annotated.HughesPJ Methods showsPrec :: Int -> Span a -> ShowS # show :: Span a -> String # showList :: [Span a] -> ShowS #
Show flag => Show (TyVarBndr flag) |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> TyVarBndr flag -> ShowS # show :: TyVarBndr flag -> String # showList :: [TyVarBndr flag] -> 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 #
(Ix ix, Show ix, Show e, IArray UArray e) => Show (UArray ix e) |
Instance details Defined in Data.Array.Base Methods showsPrec :: Int -> UArray ix e -> ShowS # show :: UArray ix e -> String # showList :: [UArray ix e] -> 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 #
(Show k, Show a) => Show (Map k a) |
Instance details Defined in Data.Map.Internal Methods showsPrec :: Int -> Map k a -> ShowS # show :: Map k a -> String # showList :: [Map k a] -> 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 #
(Show1 f, Show a) => Show (Lift f a) |
Instance details Defined in Control.Applicative.Lift Methods showsPrec :: Int -> Lift f a -> ShowS # show :: Lift f a -> String # showList :: [Lift f a] -> ShowS #
(Show1 m, Show a) => Show (MaybeT m a) |
Instance details Defined in Control.Monad.Trans.Maybe Methods showsPrec :: Int -> MaybeT m a -> ShowS # show :: MaybeT m a -> String # showList :: [MaybeT m a] -> ShowS #
(GShow (Rep1 f a), Generic1 f) => Show (FunctorClassesDefault f a) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods showsPrec :: Int -> FunctorClassesDefault f a -> ShowS # show :: FunctorClassesDefault f a -> String # showList :: [FunctorClassesDefault f 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 (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 (Coercion a b) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Type.Coercion Methods showsPrec :: Int -> Coercion a b -> ShowS # show :: Coercion a b -> String # showList :: [Coercion a b] -> ShowS #
Show (a :~: b) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Type.Equality Methods showsPrec :: Int -> (a :~: b) -> ShowS # show :: (a :~: b) -> String # showList :: [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 #
(Show1 f, Show a) => Show (Backwards f a) |
Instance details Defined in Control.Applicative.Backwards Methods showsPrec :: Int -> Backwards f a -> ShowS # show :: Backwards f a -> String # showList :: [Backwards f a] -> ShowS #
(Show e, Show1 m, Show a) => Show (ExceptT e m a) |
Instance details Defined in Control.Monad.Trans.Except Methods showsPrec :: Int -> ExceptT e m a -> ShowS # show :: ExceptT e m a -> String # showList :: [ExceptT e m a] -> ShowS #
(Show1 f, Show a) => Show (IdentityT f a) |
Instance details Defined in Control.Monad.Trans.Identity Methods showsPrec :: Int -> IdentityT f a -> ShowS # show :: IdentityT f a -> String # showList :: [IdentityT f a] -> ShowS #
(Show w, Show1 m, Show a) => Show (WriterT w m a) |
Instance details Defined in Control.Monad.Trans.Writer.Lazy Methods showsPrec :: Int -> WriterT w m a -> ShowS # show :: WriterT w m a -> String # showList :: [WriterT w m a] -> ShowS #
(Show w, Show1 m, Show a) => Show (WriterT w m a) |
Instance details Defined in Control.Monad.Trans.Writer.Strict Methods showsPrec :: Int -> WriterT w m a -> ShowS # show :: WriterT w m a -> String # showList :: [WriterT w m a] -> ShowS #
Show a => Show (Constant a b) |
Instance details Defined in Data.Functor.Constant Methods showsPrec :: Int -> Constant a b -> ShowS # show :: Constant a b -> String # showList :: [Constant a b] -> ShowS #
(Show1 f, Show a) => Show (Reverse f a) |
Instance details Defined in Data.Functor.Reverse Methods showsPrec :: Int -> Reverse f a -> ShowS # show :: Reverse f a -> String # showList :: [Reverse f a] -> 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 :~~: b) | @since base-4.10.0.0
Instance details Defined in GHC.Internal.Data.Type.Equality Methods showsPrec :: Int -> (a :~~: b) -> ShowS # show :: (a :~~: b) -> String # showList :: [a :~~: b] -> 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 #

class KnownNat (n :: Nat) #

This class gives the integer associated with a type-level natural. There are instances of the class for every concrete literal: 0, 1, 2, etc.

@since base-4.7.0.0

Minimal complete definition

natSing

class KnownSymbol (n :: Symbol) #

This class gives the string associated with a type-level symbol. There are instances of the class for every concrete literal: "hello", etc.

@since base-4.7.0.0

Minimal complete definition

symbolSing

data Ratio a #

Rational numbers, with numerator and denominator of some `Integral` type.

Note that `Ratio`'s instances inherit the deficiencies from the type parameter's. For example, `Ratio Natural`'s `Num` instance has similar problems to `Natural`'s.

#### Instances

Instances details

NFData1 Ratio | Available on `base >=4.9` Since: deepseq-1.4.3.0
Instance details Defined in Control.DeepSeq Methods liftRnf :: (a -> ()) -> Ratio a -> () #
Integral a => Lift (Ratio a :: Type) |
Instance details Defined in Language.Haskell.TH.Syntax Methods lift :: Quote m => Ratio a -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => Ratio a -> Code m (Ratio a) #
NFData a => NFData (Ratio a) |
Instance details Defined in Control.DeepSeq Methods rnf :: Ratio 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] #
(Storable a, Integral a) => Storable (Ratio a) | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Foreign.Storable Methods sizeOf :: Ratio a -> Int # alignment :: Ratio a -> Int # peekElemOff :: Ptr (Ratio a) -> Int -> IO (Ratio a) # pokeElemOff :: Ptr (Ratio a) -> Int -> Ratio a -> IO () # peekByteOff :: Ptr b -> Int -> IO (Ratio a) # pokeByteOff :: Ptr b -> Int -> Ratio a -> IO () # peek :: Ptr (Ratio a) -> IO (Ratio a) # poke :: Ptr (Ratio a) -> Ratio a -> IO () #
Integral a => Num (Ratio a) | @since base-2.0.1
Instance details Defined in GHC.Internal.Real Methods (+) :: Ratio a -> Ratio a -> Ratio a # (-) :: Ratio a -> Ratio a -> Ratio a # (*) :: Ratio a -> Ratio a -> Ratio a # negate :: Ratio a -> Ratio a # abs :: Ratio a -> Ratio a # signum :: Ratio a -> Ratio a # fromInteger :: Integer -> Ratio a #
(Integral a, Read a) => Read (Ratio a) | @since base-2.01
Instance details Defined in GHC.Internal.Read Methods readsPrec :: Int -> ReadS (Ratio a) # readList :: ReadS [Ratio a] # readPrec :: ReadPrec (Ratio a) # readListPrec :: ReadPrec [Ratio a] #
Integral a => Fractional (Ratio a) | @since base-2.0.1
Instance details Defined in GHC.Internal.Real Methods (/) :: Ratio a -> Ratio a -> Ratio a # recip :: Ratio a -> Ratio a # fromRational :: Rational -> Ratio a #
Integral a => Real (Ratio a) | @since base-2.0.1
Instance details Defined in GHC.Internal.Real Methods toRational :: Ratio a -> Rational #
Integral a => RealFrac (Ratio a) | @since base-2.0.1
Instance details Defined in GHC.Internal.Real Methods properFraction :: Integral b => Ratio a -> (b, Ratio a) # truncate :: Integral b => Ratio a -> b # round :: Integral b => Ratio a -> b # ceiling :: Integral b => Ratio a -> b # floor :: Integral b => Ratio a -> b #
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 #
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 #
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 #
Hashable a => Hashable (Ratio a) |
Instance details Defined in Data.Hashable.Class Methods hashWithSalt :: Int -> Ratio a -> Int # hash :: Ratio a -> Int #

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 Ptr a #

A value of type ``Ptr` a` represents a pointer to an object, or an array of objects, which may be marshalled to or from Haskell values of type `a`.

The type `a` will often be an instance of class `Storable` which provides the marshalling operations. However this is not essential, and you can provide your own operations to access the pointer. For example you might write small foreign functions to get or set the fields of a C `struct`.

#### Instances

Instances details

NFData1 Ptr | Since: deepseq-1.4.3.0
Instance details Defined in Control.DeepSeq Methods liftRnf :: (a -> ()) -> Ptr a -> () #
IArray UArray (Ptr a) |
Instance details Defined in Data.Array.Base Methods bounds :: Ix i => UArray i (Ptr a) -> (i, i) # numElements :: Ix i => UArray i (Ptr a) -> Int # unsafeArray :: Ix i => (i, i) -> [(Int, Ptr a)] -> UArray i (Ptr a) # unsafeAt :: Ix i => UArray i (Ptr a) -> Int -> Ptr a # unsafeReplace :: Ix i => UArray i (Ptr a) -> [(Int, Ptr a)] -> UArray i (Ptr a) # unsafeAccum :: Ix i => (Ptr a -> e' -> Ptr a) -> UArray i (Ptr a) -> [(Int, e')] -> UArray i (Ptr a) # unsafeAccumArray :: Ix i => (Ptr a -> e' -> Ptr a) -> Ptr a -> (i, i) -> [(Int, e')] -> UArray i (Ptr a) #
GEq1 v (UAddr :: Type -> Type) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftEq :: Eq1Args v a b -> UAddr a -> UAddr b -> Bool #
GOrd1 v (UAddr :: Type -> Type) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftCompare :: Ord1Args v a b -> UAddr a -> UAddr b -> Ordering #
MArray IOUArray (Ptr a) IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i (Ptr a) -> IO (i, i) # getNumElements :: Ix i => IOUArray i (Ptr a) -> IO Int # newArray :: Ix i => (i, i) -> Ptr a -> IO (IOUArray i (Ptr a)) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i (Ptr a)) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i (Ptr a)) # unsafeRead :: Ix i => IOUArray i (Ptr a) -> Int -> IO (Ptr a) # unsafeWrite :: Ix i => IOUArray i (Ptr a) -> Int -> Ptr a -> IO () #
Generic1 (URec (Ptr ()) :: k -> Type) |
Instance details Defined in GHC.Internal.Generics Associated Types
type Rep1 (URec (Ptr ()) :: k -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics type Rep1 (URec (Ptr ()) :: k -> Type) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UAddr" 'PrefixI 'True) (S1 ('MetaSel ('Just "uAddr#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UAddr :: k -> Type)))
Methods from1 :: forall (a :: k). URec (Ptr ()) a -> Rep1 (URec (Ptr ()) :: k -> Type) a # to1 :: forall (a :: k). Rep1 (URec (Ptr ()) :: k -> Type) a -> URec (Ptr ()) a #
NFData (Ptr a) | Since: deepseq-1.4.2.0
Instance details Defined in Control.DeepSeq Methods rnf :: Ptr a -> () #
Foldable (UAddr :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => UAddr m -> m # foldMap :: Monoid m => (a -> m) -> UAddr a -> m # foldMap' :: Monoid m => (a -> m) -> UAddr a -> m # foldr :: (a -> b -> b) -> b -> UAddr a -> b # foldr' :: (a -> b -> b) -> b -> UAddr a -> b # foldl :: (b -> a -> b) -> b -> UAddr a -> b # foldl' :: (b -> a -> b) -> b -> UAddr a -> b # foldr1 :: (a -> a -> a) -> UAddr a -> a # foldl1 :: (a -> a -> a) -> UAddr a -> a # toList :: UAddr a -> [a] # null :: UAddr a -> Bool # length :: UAddr a -> Int # elem :: Eq a => a -> UAddr a -> Bool # maximum :: Ord a => UAddr a -> a # minimum :: Ord a => UAddr a -> a # sum :: Num a => UAddr a -> a # product :: Num a => UAddr a -> a #
Traversable (UAddr :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Traversable Methods traverse :: Applicative f => (a -> f b) -> UAddr a -> f (UAddr b) # sequenceA :: Applicative f => UAddr (f a) -> f (UAddr a) # mapM :: Monad m => (a -> m b) -> UAddr a -> m (UAddr b) # sequence :: Monad m => UAddr (m a) -> m (UAddr a) #
Storable (Ptr a) | @since base-2.01
Instance details Defined in GHC.Internal.Foreign.Storable Methods sizeOf :: Ptr a -> Int # alignment :: Ptr a -> Int # peekElemOff :: Ptr (Ptr a) -> Int -> IO (Ptr a) # pokeElemOff :: Ptr (Ptr a) -> Int -> Ptr a -> IO () # peekByteOff :: Ptr b -> Int -> IO (Ptr a) # pokeByteOff :: Ptr b -> Int -> Ptr a -> IO () # peek :: Ptr (Ptr a) -> IO (Ptr a) # poke :: Ptr (Ptr a) -> Ptr a -> IO () #
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 #
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 #
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 #
Hashable (Ptr a) |
Instance details Defined in Data.Hashable.Class Methods hashWithSalt :: Int -> Ptr a -> Int # hash :: Ptr a -> Int #
MArray (STUArray s) (Ptr a) (ST s) |
Instance details Defined in Data.Array.Base Methods getBounds :: Ix i => STUArray s i (Ptr a) -> ST s (i, i) # getNumElements :: Ix i => STUArray s i (Ptr a) -> ST s Int # newArray :: Ix i => (i, i) -> Ptr a -> ST s (STUArray s i (Ptr a)) # newArray_ :: Ix i => (i, i) -> ST s (STUArray s i (Ptr a)) # unsafeNewArray_ :: Ix i => (i, i) -> ST s (STUArray s i (Ptr a)) # unsafeRead :: Ix i => STUArray s i (Ptr a) -> Int -> ST s (Ptr a) # unsafeWrite :: Ix i => STUArray s i (Ptr a) -> Int -> Ptr a -> ST s () #
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 #
GEq (UAddr p) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods geq :: UAddr p -> UAddr p -> Bool #
GOrd (UAddr p) |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gcompare :: UAddr p -> UAddr p -> Ordering #
Generic (URec (Ptr ()) p) |
Instance details Defined in GHC.Internal.Generics Associated Types
type Rep (URec (Ptr ()) p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics type Rep (URec (Ptr ()) p) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UAddr" 'PrefixI 'True) (S1 ('MetaSel ('Just "uAddr#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UAddr :: Type -> Type)))
Methods from :: URec (Ptr ()) p -> Rep (URec (Ptr ()) p) x # to :: Rep (URec (Ptr ()) p) x -> URec (Ptr ()) p #
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 #
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 #
data URec (Ptr ()) (p :: k) | Used for marking occurrences of `Addr#` @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics data URec (Ptr ()) (p :: k) = UAddr { uAddr# :: Addr# }
type Rep1 (URec (Ptr ()) :: k -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics type Rep1 (URec (Ptr ()) :: k -> Type) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UAddr" 'PrefixI 'True) (S1 ('MetaSel ('Just "uAddr#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UAddr :: k -> Type)))
type Rep (URec (Ptr ()) p) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Generics type Rep (URec (Ptr ()) p) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UAddr" 'PrefixI 'True) (S1 ('MetaSel ('Just "uAddr#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UAddr :: Type -> Type)))

data FunPtr a #

A value of type ``FunPtr` a` is a pointer to a function callable from foreign code. The type `a` will normally be a foreign type, a function type with zero or more arguments where

- the argument types are marshallable foreign types, i.e. `Char`, `Int`, `Double`, `Float`, `Bool`, `Int8`, `Int16`, `Int32`, `Int64`, `Word8`, `Word16`, `Word32`, `Word64`, ``Ptr` a`, ``FunPtr` a`, ``StablePtr` a` or a renaming of any of these using `newtype`.
- the return type is either a marshallable foreign type or has the form ``IO` t` where `t` is a marshallable foreign type or `()`.

A value of type ``FunPtr` a` may be a pointer to a foreign function, either returned by another foreign function or imported with a a static address import like

    foreign import ccall "stdlib.h &free"
      p_free :: FunPtr (Ptr a -> IO ())

or a pointer to a Haskell function created using a wrapper stub declared to produce a `FunPtr` of the correct type. For example:

    type Compare = Int -> Int -> Bool
    foreign import ccall "wrapper"
      mkCompare :: Compare -> IO (FunPtr Compare)

Calls to wrapper stubs like `mkCompare` allocate storage, which should be released with `freeHaskellFunPtr` when no longer required.

To convert `FunPtr` values to corresponding Haskell functions, one can define a dynamic stub for the specific foreign type, e.g.

    type IntFunction = CInt -> IO ()
    foreign import ccall "dynamic"
      mkFun :: FunPtr IntFunction -> IntFunction

#### Instances

Instances details

NFData1 FunPtr | Since: deepseq-1.4.3.0
Instance details Defined in Control.DeepSeq Methods liftRnf :: (a -> ()) -> FunPtr a -> () #
IArray UArray (FunPtr a) |
Instance details Defined in Data.Array.Base Methods bounds :: Ix i => UArray i (FunPtr a) -> (i, i) # numElements :: Ix i => UArray i (FunPtr a) -> Int # unsafeArray :: Ix i => (i, i) -> [(Int, FunPtr a)] -> UArray i (FunPtr a) # unsafeAt :: Ix i => UArray i (FunPtr a) -> Int -> FunPtr a # unsafeReplace :: Ix i => UArray i (FunPtr a) -> [(Int, FunPtr a)] -> UArray i (FunPtr a) # unsafeAccum :: Ix i => (FunPtr a -> e' -> FunPtr a) -> UArray i (FunPtr a) -> [(Int, e')] -> UArray i (FunPtr a) # unsafeAccumArray :: Ix i => (FunPtr a -> e' -> FunPtr a) -> FunPtr a -> (i, i) -> [(Int, e')] -> UArray i (FunPtr a) #
MArray IOUArray (FunPtr a) IO |
Instance details Defined in Data.Array.IO.Internals Methods getBounds :: Ix i => IOUArray i (FunPtr a) -> IO (i, i) # getNumElements :: Ix i => IOUArray i (FunPtr a) -> IO Int # newArray :: Ix i => (i, i) -> FunPtr a -> IO (IOUArray i (FunPtr a)) # newArray_ :: Ix i => (i, i) -> IO (IOUArray i (FunPtr a)) # unsafeNewArray_ :: Ix i => (i, i) -> IO (IOUArray i (FunPtr a)) # unsafeRead :: Ix i => IOUArray i (FunPtr a) -> Int -> IO (FunPtr a) # unsafeWrite :: Ix i => IOUArray i (FunPtr a) -> Int -> FunPtr a -> IO () #
NFData (FunPtr a) | Since: deepseq-1.4.2.0
Instance details Defined in Control.DeepSeq Methods rnf :: FunPtr a -> () #
Storable (FunPtr a) | @since base-2.01
Instance details Defined in GHC.Internal.Foreign.Storable Methods sizeOf :: FunPtr a -> Int # alignment :: FunPtr a -> Int # peekElemOff :: Ptr (FunPtr a) -> Int -> IO (FunPtr a) # pokeElemOff :: Ptr (FunPtr a) -> Int -> FunPtr a -> IO () # peekByteOff :: Ptr b -> Int -> IO (FunPtr a) # pokeByteOff :: Ptr b -> Int -> FunPtr a -> IO () # peek :: Ptr (FunPtr a) -> IO (FunPtr a) # poke :: Ptr (FunPtr a) -> FunPtr a -> IO () #
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 #
Eq (FunPtr a) |
Instance details Defined in GHC.Internal.Ptr Methods (==) :: FunPtr a -> FunPtr a -> Bool # (/=) :: FunPtr a -> FunPtr a -> Bool #
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 #
Hashable (FunPtr a) |
Instance details Defined in Data.Hashable.Class Methods hashWithSalt :: Int -> FunPtr a -> Int # hash :: FunPtr a -> Int #
MArray (STUArray s) (FunPtr a) (ST s) |
Instance details Defined in Data.Array.Base Methods getBounds :: Ix i => STUArray s i (FunPtr a) -> ST s (i, i) # getNumElements :: Ix i => STUArray s i (FunPtr a) -> ST s Int # newArray :: Ix i => (i, i) -> FunPtr a -> ST s (STUArray s i (FunPtr a)) # newArray_ :: Ix i => (i, i) -> ST s (STUArray s i (FunPtr a)) # unsafeNewArray_ :: Ix i => (i, i) -> ST s (STUArray s i (FunPtr a)) # unsafeRead :: Ix i => STUArray s i (FunPtr a) -> Int -> ST s (FunPtr a) # unsafeWrite :: Ix i => STUArray s i (FunPtr a) -> Int -> FunPtr a -> ST s () #

data StaticPtr a #

A reference to a value of type `a`.

#### Instances

Instances details

IsStatic StaticPtr | @since base-4.9.0.0
Instance details Defined in GHC.Internal.StaticPtr Methods fromStaticPtr :: Typeable a => StaticPtr a -> StaticPtr a #

data CallStack #

`CallStack`s are a lightweight method of obtaining a partial call-stack at any point in the program.

A function can request its call-site with the `HasCallStack` constraint. For example, we can define

    putStrLnWithCallStack :: HasCallStack => String -> IO ()

as a variant of `putStrLn` that will get its call-site and print it, along with the string given as argument. We can access the call-stack inside `putStrLnWithCallStack` with `callStack`.

    >>> :{
    putStrLnWithCallStack :: HasCallStack => String -> IO ()
    putStrLnWithCallStack msg = do
      putStrLn msg
      putStrLn (prettyCallStack callStack)
    :}

Thus, if we call `putStrLnWithCallStack` we will get a formatted call-stack alongside our string.

    >>> putStrLnWithCallStack "hello"
    hello
    CallStack (from HasCallStack):
      putStrLnWithCallStack, called at <interactive>:... in interactive:Ghci...

GHC solves `HasCallStack` constraints in three steps:

1. If there is a `CallStack` in scope -- i.e. the enclosing function has a `HasCallStack` constraint -- GHC will append the new call-site to the existing `CallStack`.
2. If there is no `CallStack` in scope -- e.g. in the GHCi session above -- and the enclosing definition does not have an explicit type signature, GHC will infer a `HasCallStack` constraint for the enclosing definition (subject to the monomorphism restriction).
3. If there is no `CallStack` in scope and the enclosing definition has an explicit type signature, GHC will solve the `HasCallStack` constraint for the singleton `CallStack` containing just the current call-site.

`CallStack`s do not interact with the RTS and do not require compilation with `-prof`. On the other hand, as they are built up explicitly via the `HasCallStack` constraints, they will generally not contain as much information as the simulated call-stacks maintained by the RTS.

A `CallStack` is a `[(String, SrcLoc)]`. The `String` is the name of function that was called, the `SrcLoc` is the call-site. The list is ordered with the most recently called function at the head.

NOTE: The intrepid user may notice that `HasCallStack` is just an alias for an implicit parameter `?callStack :: CallStack`. This is an implementation detail and should not be considered part of the `CallStack` API, we may decide to change the implementation in the future.

@since base-4.8.1.0

#### Instances

Instances details

NFData CallStack | Since: deepseq-1.4.2.0
Instance details Defined in Control.DeepSeq Methods rnf :: CallStack -> () #
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] #
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 #
type Item CallStack |
Instance details Defined in GHC.Internal.IsList type Item CallStack = (String, SrcLoc)

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

raise a number to a non-negative integral power

type family CmpNat (a :: Natural) (b :: Natural) :: Ordering where ... #

Comparison of type-level naturals, as a function.

@since base-4.7.0.0

data SrcLoc #

A location in the original program source.

Constructors

SrcLoc String Int Int |

type HasCallStack = ?callStack :: CallStack #

Request a CallStack.

NOTE: The implicit parameter `?callStack :: CallStack` is an implementation detail and should not be considered part of the `CallStack` API, we may decide to change the implementation in the future.

@since base-4.9.0.0

getCallStack :: CallStack -> [([Char], SrcLoc)] #

Extract a list of call-sites from the `CallStack`.

The list is ordered by most recent call.

@since base-4.8.1.0

ord :: Char -> Int #

The `fromEnum` method restricted to the type `Char`.

minInt :: Int #

maxInt :: Int #

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.

currentCallStack :: IO [String] #

Returns a `[String]` representing the current call stack. This can be useful for debugging.

The implementation uses the call-stack simulation maintained by the profiler, so it only works if the program was compiled with `-prof` and contains suitable SCC annotations (e.g. by using `-fprof-auto`). Otherwise, the list returned is likely to be empty or uninformative.

@since base-4.5.0.0

prettySrcLoc :: SrcLoc -> String #

Pretty print a `SrcLoc`.

Since: ghc-internal-4.9.0.0

prettyCallStack :: CallStack -> String #

Pretty print a `CallStack`.

Since: ghc-internal-4.9.0.0

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

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

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

boundedEnumFrom :: (Enum a, Bounded a) => a -> [a] #

boundedEnumFromThen :: (Enum a, Bounded a) => a -> a -> [a] #

divZeroError :: a #

ratioZeroDenominatorError :: a #

overflowError :: a #

underflowError :: a #

ratioPrec :: Int #

ratioPrec1 :: Int #

infinity :: Rational #

notANumber :: Rational #

reduce :: Integral a => a -> a -> Ratio a #

`reduce` is a subsidiary function used only in this module. It normalises a ratio by dividing both numerator and denominator by their greatest common divisor.

(%) :: Integral a => a -> a -> Ratio a infixl 7 #

Forms the ratio of two integral numbers.

numerator :: Ratio a -> a #

Extract the numerator of the ratio in reduced form: the numerator and denominator have no common factor and the denominator is positive.

denominator :: Ratio a -> a #

Extract the denominator of the ratio in reduced form: the numerator and denominator have no common factor and the denominator is positive.

numericEnumFrom :: Fractional a => a -> [a] #

numericEnumFromThen :: Fractional a => a -> a -> [a] #

numericEnumFromTo :: (Ord a, Fractional a) => a -> a -> [a] #

numericEnumFromThenTo :: (Ord a, Fractional a) => a -> a -> a -> [a] #

showSigned #

Arguments

:: Real a |
=> (a -> ShowS) | a function that can show unsigned values
-> Int | the precedence of the enclosing context
-> a | the value to show
-> ShowS |

Converts a possibly-negative `Real` value to a string.

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

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

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

raise a number to an integral power

(^%^) :: Integral a => Rational -> a -> Rational #

(^^%^^) :: Integral a => Rational -> a -> Rational #

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

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

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

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

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

integralEnumFrom :: (Integral a, Bounded a) => a -> [a] #

integralEnumFromThen :: (Integral a, Bounded a) => a -> a -> [a] #

integralEnumFromTo :: Integral a => a -> a -> [a] #

integralEnumFromThenTo :: Integral a => a -> a -> a -> [a] #

showFloat :: RealFloat a => a -> ShowS #

Show a signed `RealFloat` value to full precision using standard decimal notation for arguments whose absolute value lies between `0.1` and `9,999,999`, and scientific notation otherwise.

showSignedFloat #

Arguments

:: RealFloat a |
=> (a -> ShowS) | a function that can show unsigned values
-> Int | the precedence of the enclosing context
-> a | the value to show
-> ShowS |

data SomeNat #

This type represents unknown type-level natural numbers.

@since base-4.10.0.0

Constructors

KnownNat n => SomeNat (Proxy n) |

#### Instances

Instances details

Read SomeNat | @since base-4.7.0.0
Instance details Defined in GHC.Internal.TypeNats Methods readsPrec :: Int -> ReadS SomeNat # readList :: ReadS [SomeNat] # readPrec :: ReadPrec SomeNat # readListPrec :: ReadPrec [SomeNat] #
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 #
Eq SomeNat | @since base-4.7.0.0
Instance details Defined in GHC.Internal.TypeNats Methods (==) :: SomeNat -> SomeNat -> Bool # (/=) :: SomeNat -> SomeNat -> Bool #
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 #

type Nat = Natural #

A type synonym for `Natural`.

Previously, this was an opaque data type, but it was changed to a type synonym.

@since base-4.16.0.0

natVal :: forall (n :: Nat) proxy. KnownNat n => proxy n -> Integer #

@since base-4.7.0.0

someNatVal :: Integer -> Maybe SomeNat #

Convert an integer into an unknown type-level natural.

@since base-4.7.0.0

data SomeSymbol #

This type represents unknown type-level symbols.

Constructors

KnownSymbol n => SomeSymbol (Proxy n) | @since base-4.7.0.0

#### Instances

Instances details

Read SomeSymbol | @since base-4.7.0.0
Instance details Defined in GHC.Internal.TypeLits Methods readsPrec :: Int -> ReadS SomeSymbol # readList :: ReadS [SomeSymbol] # readPrec :: ReadPrec SomeSymbol # readListPrec :: ReadPrec [SomeSymbol] #
Show SomeSymbol | @since base-4.7.0.0
Instance details Defined in GHC.Internal.TypeLits Methods showsPrec :: Int -> SomeSymbol -> ShowS # show :: SomeSymbol -> String # showList :: [SomeSymbol] -> ShowS #
Eq SomeSymbol | @since base-4.7.0.0
Instance details Defined in GHC.Internal.TypeLits Methods (==) :: SomeSymbol -> SomeSymbol -> Bool # (/=) :: SomeSymbol -> SomeSymbol -> Bool #
Ord SomeSymbol | @since base-4.7.0.0
Instance details Defined in GHC.Internal.TypeLits Methods compare :: SomeSymbol -> SomeSymbol -> Ordering # (<) :: SomeSymbol -> SomeSymbol -> Bool # (<=) :: SomeSymbol -> SomeSymbol -> Bool # (>) :: SomeSymbol -> SomeSymbol -> Bool # (>=) :: SomeSymbol -> SomeSymbol -> Bool # max :: SomeSymbol -> SomeSymbol -> SomeSymbol # min :: SomeSymbol -> SomeSymbol -> SomeSymbol #

symbolVal :: forall (n :: Symbol) proxy. KnownSymbol n => proxy n -> String #

@since base-4.7.0.0

someSymbolVal :: String -> SomeSymbol #

Convert a string into an unknown type-level symbol.

@since base-4.7.0.0

putStr :: String -> IO () #

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

putStrLn :: String -> IO () #

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

callStack :: HasCallStack => CallStack #

Return the current `CallStack`.

Does *not* include the call-site of `callStack`.

@since base-4.9.0.0

withFrozenCallStack :: HasCallStack => (HasCallStack => a) -> a #

Perform some computation without adding new entries to the `CallStack`.

@since base-4.9.0.0

data Location #

Location information about an address from a backtrace.

Constructors

Location |
Fields objectName :: String functionName :: String srcLoc :: Maybe SrcLoc

getStackTrace :: IO (Maybe [Location]) #

Get a trace of the current execution stack state.

Returns `Nothing` if stack trace support isn't available on host machine.

showStackTrace :: IO (Maybe String) #

Get a string representation of the current execution stack state.

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