HORIZON HASKELLDocslts/ghc-10.0.x8c2f8e82026-10-19Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8c2f8e8 · 2026-10-19

Moduleprotolude-0.3.5Haskell2010

Protolude.Base

  • 24 types
  • 15 classes
  • 59 values
value(++) :: [a] -> [a] -> [a]
#

(++) 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

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 GHC.Internal.Data.List.concat = GHC.Internal.Data.List.foldr (++) [] has linear performance, while GHC.Internal.Data.List.foldl (++) [] is prone to quadratic slowdown

Examples
Example1 expression
[1, 2, 3] ++ [4, 5, 6][1,2,3,4,5,6]
Example1 expression
[] ++ [1, 2, 3][1,2,3]
Example1 expression
[3, 2, 1] ++ [][3,2,1]
valueasTypeOf :: 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.

valueord :: Char -> Int
#

The Prelude.fromEnum method restricted to the type Char.

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

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

valuegetStackTrace :: IO (Maybe [Location])
#

Get a trace of the current execution stack state.

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

valueshowFloat :: 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.

valuesubtract :: 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.

value(%) :: Integral a => a -> a -> Ratio a
#

Forms the ratio of two integral numbers.

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

raise a number to a non-negative integral power

valuedenominator :: 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.

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

valuegcd :: 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.

valuelcm :: Integral a => a -> a -> a
#

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

valuenumerator :: 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.

valuereduce :: 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.

valueshowSigned
  1. :: Real a
  2. => (a -> ShowS)

    a function that can show unsigned values

  3. -> Int

    the precedence of the enclosing context

  4. -> a

    the value to show

  5. -> ShowS
#

Converts a possibly-negative Real value to a string.

valuecurrentCallStack :: 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.

valueprint :: 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.

print is implemented as putStrLn . show

This operation may fail with the same errors, and has the same issues with concurrency, as hPutStr!

Examples
Example1 expression
print [1, 2, 3][1,2,3]

Be careful when using print for outputting strings, as this will invoke show and cause strings to be printed with quotation marks and non-ascii symbols escaped.

Example1 expression
print "λ :D""\995 :D"

A program to print the first 8 integers and their powers of 2 could be written as:

Example1 expression
print [(n, 2^n) | n <- [0..8]][(0,1),(1,2),(2,4),(3,8),(4,16),(5,32),(6,64),(7,128),(8,256)]
valueputStr :: String -> IO ()
#

Write a string to the standard output device

putStr is implemented as hPutStr stdout.

This operation may fail with the same errors, and has the same issues with concurrency, as hPutStr!

Examples

Note that the following do not put a newline.

Example1 expression
putStr "Hello, World!"Hello, World!
Example1 expression
putStr "\0052\0042\0050"4*2
valueputStrLn :: String -> IO ()
#

The same as putStr, but adds a newline character.

This operation may fail with the same errors, and has the same issues with concurrency, as hPutStr!

valueseq :: a -> b -> b
#

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.

classclass 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

Instances108Bounded, …
classclass 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:

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

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
    • 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
    • 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
    • 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
    • enumFromThenTo 4 2 -6 :: [Integer] = [4,2,0,-2,-4,-6]
    • enumFromThenTo 6 8 2 :: [Int] = []
Instances119Enum, …
  • Enum IoManagerFlagDefined in base-4.23.0.0 · GHC.RTS.Flags
  • Enum IntegerDefined in ghc-internal-10.0.0 · GHC.Internal.Enum
  • Enum NaturalDefined in ghc-internal-10.0.0 · GHC.Internal.Enum
  • Enum ByteOrderDefined in ghc-internal-10.0.0 · GHC.Internal.ByteOrder
  • Enum ClosureTypeDefined in ghc-internal-10.0.0 · GHC.Internal.ClosureTypes
  • Enum CBoolDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CCharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CClockDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CDoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CFloatDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CIntDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CIntMaxDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CIntPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CLLongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CLongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CPtrdiffDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CSCharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CSUSecondsDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CShortDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CSigAtomicDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CSizeDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CTimeDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CUCharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CUIntDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CUIntMaxDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CUIntPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CULLongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CULongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CUSecondsDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CUShortDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum CWcharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Enum IntPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.Ptr
  • Enum WordPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.Ptr
  • Enum AssociativityDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Enum DecidedStrictnessDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Enum SourceStrictnessDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Enum SourceUnpackednessDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Enum HalfWordDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.InfoTable.Types
  • Enum SeekModeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Device
  • Enum IOModeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.IOMode
  • Enum IoSubSystemDefined in ghc-internal-10.0.0 · GHC.Internal.IO.SubSystem
  • Enum Int16Defined in ghc-internal-10.0.0 · GHC.Internal.Int
  • Enum Int32Defined in ghc-internal-10.0.0 · GHC.Internal.Int
  • Enum Int64Defined in ghc-internal-10.0.0 · GHC.Internal.Int
  • Enum Int8Defined in ghc-internal-10.0.0 · GHC.Internal.Int
  • Enum ExtensionDefined in ghc-internal-10.0.0 · GHC.Internal.LanguageExtensions
  • Enum DoCostCentresDefined in ghc-internal-10.0.0 · GHC.Internal.RTS.Flags
  • Enum DoHeapProfileDefined in ghc-internal-10.0.0 · GHC.Internal.RTS.Flags
  • Enum DoTraceDefined in ghc-internal-10.0.0 · GHC.Internal.RTS.Flags
  • Enum GiveGCStatsDefined in ghc-internal-10.0.0 · GHC.Internal.RTS.Flags
  • Enum IoManagerFlagDefined in ghc-internal-10.0.0 · GHC.Internal.RTS.Flags
  • Enum ByteOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.Constants
  • Enum WordOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.Constants
  • Enum ByteOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.ConstantsProf
  • Enum WordOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.ConstantsProf
  • Enum CBlkCntDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Enum CBlkSizeDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Enum CCcDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Enum CClockIdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Enum CDevDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Enum CFsBlkCntDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Enum CFsFilCntDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Enum CGidDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Enum CIdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Enum CInoDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Enum CKeyDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Enum CModeDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Enum CNfdsDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Enum CNlinkDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Enum COffDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Enum CPidDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Enum CRLimDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Enum CSocklenDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Enum CSpeedDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Enum CSsizeDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Enum CTcflagDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Enum CUidDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Enum FdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Enum BoolDefined in ghc-internal-10.0.0 · GHC.Internal.Enum
  • Enum CharDefined in ghc-internal-10.0.0 · GHC.Internal.Enum
  • Enum DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphan

    fromEnum just truncates its argument, beware of all sorts of overflows.

    List generators have extremely peculiar behavior, mandated by Haskell Report 2010:

    Example1 expression
    [0..1.5][0.0,1.0,2.0]
  • Enum FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphan

    fromEnum just truncates its argument, beware of all sorts of overflows.

    List generators have extremely peculiar behavior, mandated by Haskell Report 2010:

    Example1 expression
    [0..1.5 :: Float][0.0,1.0,2.0]
  • Enum IntDefined in ghc-internal-10.0.0 · GHC.Internal.Enum
  • Enum LevityDefined in ghc-internal-10.0.0 · GHC.Internal.Enum
  • Enum OrderingDefined in ghc-internal-10.0.0 · GHC.Internal.Enum
  • Enum VecCountDefined in ghc-internal-10.0.0 · GHC.Internal.Enum
  • Enum VecElemDefined in ghc-internal-10.0.0 · GHC.Internal.Enum
  • Enum WordDefined in ghc-internal-10.0.0 · GHC.Internal.Enum
  • Enum GeneralCategoryDefined in ghc-internal-10.0.0 · GHC.Internal.Unicode
  • Enum Word16Defined in ghc-internal-10.0.0 · GHC.Internal.Word
  • Enum Word32Defined in ghc-internal-10.0.0 · GHC.Internal.Word
  • Enum Word64Defined in ghc-internal-10.0.0 · GHC.Internal.Word
  • Enum Word8Defined in ghc-internal-10.0.0 · GHC.Internal.Word
  • Enum LeniencyDefined in protolude-0.3.5 · Protolude.Conv
  • Enum I8Defined in text-2.1.4 · Data.Text.Foreign
  • Enum FPFormatDefined in text-2.1.4 · Data.Text.Lazy.Builder.RealFloat
  • Enum ()Defined in ghc-internal-10.0.0 · GHC.Internal.Enum
  • Enum a => Enum (First a)Defined in base-4.23.0.0 · Data.Semigroup
  • Enum a => Enum (Last a)Defined in base-4.23.0.0 · Data.Semigroup
  • Enum a => Enum (Max a)Defined in base-4.23.0.0 · Data.Semigroup
  • Enum a => Enum (Min a)Defined in base-4.23.0.0 · Data.Semigroup
  • Enum a => Enum (WrappedMonoid a)Defined in base-4.23.0.0 · Data.Semigroup
  • Enum a => Enum (And a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Bits
  • Enum a => Enum (Iff a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Bits
  • Enum a => Enum (Ior a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Bits
  • Enum a => Enum (Xor a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Bits
  • Enum a => Enum (Identity a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.Identity
  • Enum a => Enum (a)Defined in ghc-internal-10.0.0 · GHC.Internal.Enum
  • Integral a => Enum (Ratio a)Defined in ghc-internal-10.0.0 · GHC.Internal.Real
  • (Enum a, Bounded a, Eq a) => Enum (Down a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Ord

    Swaps succ and pred of the underlying type.

  • Enum (Fixed a)Defined in base-4.23.0.0 · Data.Fixed

    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,

    Example1 expression
    succ (0.000 :: Milli)0.001

    and likewise

    Example1 expression
    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

    Example1 expression
    succ (0.000000000000 :: Pico)0.000000000001

    and similarly

    Example1 expression
    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.

  • Enum (Proxy s)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Proxy
  • Enum (f a) => Enum (Ap f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Monoid
  • Enum (f a) => Enum (Alt f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.Internal
  • Enum a => Enum (Const a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.Const
  • Coercible a b => Enum (Coercion a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Type.Coercion
  • a ~ b => Enum (a :~: b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Type.Equality
  • a ~~ b => Enum (a :~~: b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Type.Equality
  • Enum (f (g a)) => Enum (Compose f g a)Defined in base-4.23.0.0 · Data.Functor.Compose
classclass 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

Methods

  • pi :: a
  • exp :: a -> a
  • log :: a -> a
  • sqrt :: a -> a
  • (**) :: a -> a -> ainfixr 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.

  • expm1 :: a -> a

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

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

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

Instances10Floating, …
classclass (RealFrac a, Floating a) => RealFloat a where
#

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

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 that exponent x may assume for a normal x. The relation to IEEE emin and emax is floatRange x = (emin + 1, emax + 1).

  • 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, Prelude.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.

Instances8RealFloat, …
classclass 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

GHC.Real.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 Data.Ratio.Rational do.

Methods

  • (+) :: a -> a -> ainfixl 6
  • (-) :: a -> a -> ainfixl 6
  • (*) :: a -> a -> ainfixl 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.

Instances89Num, …
  • Num IntegerDefined in ghc-internal-10.0.0 · GHC.Internal.Num
  • Num NaturalDefined in ghc-internal-10.0.0 · GHC.Internal.Num

    Note that Natural's Num instance isn't a ring: no element but 0 has an additive inverse. It is a semiring though.

  • Num EventTypeDefined in ghc-internal-10.0.0 · GHC.Internal.Event.EPoll
  • Num EventDefined in ghc-internal-10.0.0 · GHC.Internal.Event.Poll
  • Num UniqueDefined in ghc-internal-10.0.0 · GHC.Internal.Event.Unique
  • Num CBoolDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CCharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CClockDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CDoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CFloatDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CIntDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CIntMaxDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CIntPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CLLongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CLongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CPtrdiffDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CSCharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CSUSecondsDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CShortDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CSigAtomicDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CSizeDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CTimeDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CUCharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CUIntDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CUIntMaxDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CUIntPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CULLongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CULongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CUSecondsDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CUShortDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num CWcharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Num IntPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.Ptr
  • Num WordPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.Ptr
  • Num HalfWordDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.InfoTable.Types
  • Num Int16Defined in ghc-internal-10.0.0 · GHC.Internal.Int
  • Num Int32Defined in ghc-internal-10.0.0 · GHC.Internal.Int
  • Num Int64Defined in ghc-internal-10.0.0 · GHC.Internal.Int
  • Num Int8Defined in ghc-internal-10.0.0 · GHC.Internal.Int
  • Num ByteOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.Constants
  • Num WordOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.Constants
  • Num ByteOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.ConstantsProf
  • Num WordOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.ConstantsProf
  • Num CBlkCntDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Num CBlkSizeDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Num CCcDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Num CClockIdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Num CDevDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Num CFsBlkCntDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Num CFsFilCntDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Num CGidDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Num CIdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Num CInoDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Num CKeyDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Num CModeDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Num CNfdsDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Num CNlinkDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Num COffDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Num CPidDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Num CRLimDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Num CSocklenDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Num CSpeedDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Num CSsizeDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Num CTcflagDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Num CUidDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Num FdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Num DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphan

    This instance implements IEEE 754 standard with all its usual pitfalls about NaN, infinities and negative zero. Neither addition nor multiplication are associative or distributive:

    Example3 expressions
    (0.1 + 0.1) + 0.4 == 0.1 + (0.1 + 0.4)False(0.1 + 0.2) * 0.3 == 0.1 * 0.3 + 0.2 * 0.3False(0.1 * 0.1) * 0.3 == 0.1 * (0.1 * 0.3)False
  • Num FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphan

    This instance implements IEEE 754 standard with all its usual pitfalls about NaN, infinities and negative zero. Neither addition nor multiplication are associative or distributive:

    Example3 expressions
    (0.1 + 0.1 :: Float) + 0.5 == 0.1 + (0.1 + 0.5)False(0.1 + 0.2 :: Float) * 0.9 == 0.1 * 0.9 + 0.2 * 0.9False(0.1 * 0.1 :: Float) * 0.9 == 0.1 * (0.1 * 0.9)False
  • Num IntDefined in ghc-internal-10.0.0 · GHC.Internal.Num
  • Num WordDefined in ghc-internal-10.0.0 · GHC.Internal.Num
  • Num Word16Defined in ghc-internal-10.0.0 · GHC.Internal.Word
  • Num Word32Defined in ghc-internal-10.0.0 · GHC.Internal.Word
  • Num Word64Defined in ghc-internal-10.0.0 · GHC.Internal.Word
  • Num Word8Defined in ghc-internal-10.0.0 · GHC.Internal.Word
  • Num I8Defined in text-2.1.4 · Data.Text.Foreign
  • Num SizeDefined in text-2.1.4 · Data.Text.Internal.Fusion.Size
  • RealFloat a => Num (Complex a)Defined in base-4.23.0.0 · Data.Complex
  • Num a => Num (Max a)Defined in base-4.23.0.0 · Data.Semigroup
  • Num a => Num (Min a)Defined in base-4.23.0.0 · Data.Semigroup
  • Num a => Num (Identity a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.Identity
  • Num a => Num (Down a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Ord
  • Num a => Num (Product a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.Internal
  • Num a => Num (Sum a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.Internal
  • Integral a => Num (Ratio a)Defined in ghc-internal-10.0.0 · GHC.Internal.Real
  • HasResolution a => Num (Fixed a)Defined in base-4.23.0.0 · Data.Fixed

    Multiplication is not associative or distributive:

    Example1 expression
    (0.2 * 0.6 :: Deci) * 0.9 == 0.2 * (0.6 * 0.9)False
    Example1 expression
    (0.1 + 0.1 :: Deci) * 0.5 == 0.1 * 0.5 + 0.1 * 0.5False
  • Num a => Num (Op a b)Defined in base-4.23.0.0 · Data.Functor.Contravariant
  • Num (f a) => Num (Alt f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.Internal
  • Num a => Num (Const a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.Const
  • (Applicative f, Num a) => Num (Ap f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Monoid

    Note that even if the underlying Num and Applicative instances are lawful, for most Applicatives, this instance will not be lawful. If you use this instance with the list Applicative, the following customary laws will not hold:

    Commutativity:

    Example2 expressions
    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:

    Example2 expressions
    Ap [] + negate (Ap [])Ap {getAp = []}fromInteger 0 :: Ap [] IntAp {getAp = [0]}

    Distributivity:

    Example2 expressions
    Ap [1,2] * (3 + 4)Ap {getAp = [7,14]}(Ap [1,2] * 3) + (Ap [1,2] * 4)Ap {getAp = [7,11,10,14]}
  • Num (f (g a)) => Num (Compose f g a)Defined in base-4.23.0.0 · Data.Functor.Compose
datadata 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
Instances10NFData1, IArray, Eq, Ord, Show, Storable, …
datadata 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.

Instances22NFData1, IArray, Generic1, Data, Foldable, Traversable, …
classclass 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.

Methods

Instances12Fractional, …
  • Fractional CDoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Fractional CFloatDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Fractional DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphan

    This instance implements IEEE 754 standard with all its usual pitfalls about NaN, infinities and negative zero.

    Example4 expressions
    0 == (-0 :: Double)Truerecip 0 == recip (-0 :: Double)Falsemap (/ 0) [-1, 0, 1][-Infinity,NaN,Infinity]map (* 0) $ map (/ 0) [-1, 0, 1][NaN,NaN,NaN]
  • Fractional FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphan

    This instance implements IEEE 754 standard with all its usual pitfalls about NaN, infinities and negative zero.

    Example4 expressions
    0 == (-0 :: Float)Truerecip 0 == recip (-0 :: Float)Falsemap (/ 0) [-1, 0, 1 :: Float][-Infinity,NaN,Infinity]map (* 0) $ map (/ 0) [-1, 0, 1 :: Float][NaN,NaN,NaN]
  • RealFloat a => Fractional (Complex a)Defined in base-4.23.0.0 · Data.Complex
  • Fractional a => Fractional (Identity a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.Identity
  • Fractional a => Fractional (Down a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Ord
  • Integral a => Fractional (Ratio a)Defined in ghc-internal-10.0.0 · GHC.Internal.Real
  • HasResolution a => Fractional (Fixed a)Defined in base-4.23.0.0 · Data.Fixed
  • Fractional a => Fractional (Op a b)Defined in base-4.23.0.0 · Data.Functor.Contravariant
  • Fractional a => Fractional (Const a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.Const
  • Fractional (f (g a)) => Fractional (Compose f g a)Defined in base-4.23.0.0 · Data.Functor.Compose
classclass (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.

Methods

  • quot :: a -> a -> ainfixl 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 -> ainfixl 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 -> ainfixl 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 -> ainfixl 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.

Instances64Integral, …
  • Integral IntegerDefined in ghc-internal-10.0.0 · GHC.Internal.Real
  • Integral NaturalDefined in ghc-internal-10.0.0 · GHC.Internal.Real
  • Integral CBoolDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Integral CCharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Integral CIntDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Integral CIntMaxDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Integral CIntPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Integral CLLongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Integral CLongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Integral CPtrdiffDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Integral CSCharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Integral CShortDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Integral CSigAtomicDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Integral CSizeDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Integral CUCharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Integral CUIntDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Integral CUIntMaxDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Integral CUIntPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Integral CULLongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Integral CULongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Integral CUShortDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Integral CWcharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Integral IntPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.Ptr
  • Integral WordPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.Ptr
  • Integral HalfWordDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.InfoTable.Types
  • Integral Int16Defined in ghc-internal-10.0.0 · GHC.Internal.Int
  • Integral Int32Defined in ghc-internal-10.0.0 · GHC.Internal.Int
  • Integral Int64Defined in ghc-internal-10.0.0 · GHC.Internal.Int
  • Integral Int8Defined in ghc-internal-10.0.0 · GHC.Internal.Int
  • Integral ByteOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.Constants
  • Integral WordOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.Constants
  • Integral ByteOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.ConstantsProf
  • Integral WordOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.ConstantsProf
  • Integral CBlkCntDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Integral CBlkSizeDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Integral CClockIdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Integral CDevDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Integral CFsBlkCntDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Integral CFsFilCntDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Integral CGidDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Integral CIdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Integral CInoDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Integral CKeyDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Integral CModeDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Integral CNfdsDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Integral CNlinkDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Integral COffDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Integral CPidDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Integral CRLimDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Integral CSocklenDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Integral CSsizeDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Integral CTcflagDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Integral CUidDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Integral FdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Integral IntDefined in ghc-internal-10.0.0 · GHC.Internal.Real
  • Integral WordDefined in ghc-internal-10.0.0 · GHC.Internal.Real
  • Integral Word16Defined in ghc-internal-10.0.0 · GHC.Internal.Word
  • Integral Word32Defined in ghc-internal-10.0.0 · GHC.Internal.Word
  • Integral Word64Defined in ghc-internal-10.0.0 · GHC.Internal.Word
  • Integral Word8Defined in ghc-internal-10.0.0 · GHC.Internal.Word
  • Integral I8Defined in text-2.1.4 · Data.Text.Foreign
  • Integral a => Integral (Identity a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.Identity
  • Integral a => Integral (Const a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.Const
  • Integral (f (g a)) => Integral (Compose f g a)Defined in base-4.23.0.0 · Data.Functor.Compose
datadata 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 Numeric.Natural.Natural's.

Instances16NFData1, Lift, Enum, Eq, Fractional, Data, …
typetype Rational = Ratio Integer
#

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

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

Instances77Real, …
  • Real IntegerDefined in ghc-internal-10.0.0 · GHC.Internal.Real
  • Real NaturalDefined in ghc-internal-10.0.0 · GHC.Internal.Real
  • Real CBoolDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CCharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CClockDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CDoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CFloatDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CIntDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CIntMaxDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CIntPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CLLongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CLongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CPtrdiffDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CSCharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CSUSecondsDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CShortDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CSigAtomicDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CSizeDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CTimeDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CUCharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CUIntDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CUIntMaxDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CUIntPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CULLongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CULongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CUSecondsDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CUShortDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real CWcharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Real IntPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.Ptr
  • Real WordPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.Ptr
  • Real HalfWordDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.InfoTable.Types
  • Real Int16Defined in ghc-internal-10.0.0 · GHC.Internal.Int
  • Real Int32Defined in ghc-internal-10.0.0 · GHC.Internal.Int
  • Real Int64Defined in ghc-internal-10.0.0 · GHC.Internal.Int
  • Real Int8Defined in ghc-internal-10.0.0 · GHC.Internal.Int
  • Real ByteOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.Constants
  • Real WordOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.Constants
  • Real ByteOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.ConstantsProf
  • Real WordOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.ConstantsProf
  • Real CBlkCntDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Real CBlkSizeDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Real CCcDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Real CClockIdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Real CDevDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Real CFsBlkCntDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Real CFsFilCntDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Real CGidDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Real CIdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Real CInoDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Real CKeyDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Real CModeDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Real CNfdsDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Real CNlinkDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Real COffDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Real CPidDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Real CRLimDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Real CSocklenDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Real CSpeedDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Real CSsizeDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Real CTcflagDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Real CUidDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Real FdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Real DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphan
  • Real FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphan
  • Real IntDefined in ghc-internal-10.0.0 · GHC.Internal.Real
  • Real WordDefined in ghc-internal-10.0.0 · GHC.Internal.Real
  • Real Word16Defined in ghc-internal-10.0.0 · GHC.Internal.Word
  • Real Word32Defined in ghc-internal-10.0.0 · GHC.Internal.Word
  • Real Word64Defined in ghc-internal-10.0.0 · GHC.Internal.Word
  • Real Word8Defined in ghc-internal-10.0.0 · GHC.Internal.Word
  • Real I8Defined in text-2.1.4 · Data.Text.Foreign
  • Integral a => Real (Ratio a)Defined in ghc-internal-10.0.0 · GHC.Internal.Real
  • Real a => Real (Identity a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.Identity
  • Real a => Real (Down a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Ord
  • HasResolution a => Real (Fixed a)Defined in base-4.23.0.0 · Data.Fixed
  • Real a => Real (Const a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.Const
  • Real (f (g a)) => Real (Compose f g a)Defined in base-4.23.0.0 · Data.Functor.Compose
classclass (Real a, Fractional a) => RealFrac a where
#

Extracting components of fractions.

Methods

Instances10RealFrac, …
  • RealFrac CDoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • RealFrac CFloatDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • RealFrac DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphan

    Beware that results for non-finite arguments are garbage:

    Example2 expressions
    [ f x | f <- [round, floor, ceiling], x <- [-1/0, 0/0, 1/0] ] :: [Int][0,0,0,0,0,0,0,0,0]map properFraction [-1/0, 0/0, 1/0] :: [(Int, Double)][(0,0.0),(0,0.0),(0,0.0)]

    and get even more non-sensical if you ask for Integer instead of Int.

  • RealFrac FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphan

    Beware that results for non-finite arguments are garbage:

    Example2 expressions
    [ f x | f <- [round, floor, ceiling], x <- [-1/0, 0/0, 1/0 :: Float] ] :: [Int][0,0,0,0,0,0,0,0,0]map properFraction [-1/0, 0/0, 1/0] :: [(Int, Float)][(0,0.0),(0,0.0),(0,0.0)]

    and get even more non-sensical if you ask for Integer instead of Int.

  • Integral a => RealFrac (Ratio a)Defined in ghc-internal-10.0.0 · GHC.Internal.Real
  • RealFrac a => RealFrac (Identity a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.Identity
  • RealFrac a => RealFrac (Down a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Ord
  • HasResolution a => RealFrac (Fixed a)Defined in base-4.23.0.0 · Data.Fixed
  • RealFrac a => RealFrac (Const a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.Const
  • RealFrac (f (g a)) => RealFrac (Compose f g a)Defined in base-4.23.0.0 · Data.Functor.Compose
classclass HasField (x :: k) (r :: TYPE r_rep) (a :: TYPE a_rep) | x r -> a where
#

Constraint representing the fact that the field x belongs to the record type r and has field type a. This will be solved automatically, but manual instances may be provided as well.

Methods

  • getField :: r -> a

    Selector function to extract the field from the record.

classclass Show a where
#

Conversion of values to readable Strings.

Derived instances of Show have the following properties, which are compatible with derived instances of Text.Read.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)".

Methods

  • showsPrec :: Int -> a -> 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 Text.Read.Read and Show satisfy the following:

    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.

Instances440Show, …
  • Show AsyncCancelledDefined in async-2.2.6 · Control.Concurrent.Async.Internal
  • Show ExceptionInLinkedThreadDefined in async-2.2.6 · Control.Concurrent.Async.Internal
  • Show WardenExceptionDefined in async-2.2.6 · Control.Concurrent.Async.Warden
  • Show ByteArrayDefined in base-4.23.0.0 · Data.Array.Byte
  • Show CCFlagsDefined in base-4.23.0.0 · GHC.RTS.Flags
  • Show ConcFlagsDefined in base-4.23.0.0 · GHC.RTS.Flags
  • Show DebugFlagsDefined in base-4.23.0.0 · GHC.RTS.Flags
  • Show DoCostCentresDefined in base-4.23.0.0 · GHC.RTS.Flags
  • Show DoHeapProfileDefined in base-4.23.0.0 · GHC.RTS.Flags
  • Show DoTraceDefined in base-4.23.0.0 · GHC.RTS.Flags
  • Show GCFlagsDefined in base-4.23.0.0 · GHC.RTS.Flags
  • Show GiveGCStatsDefined in base-4.23.0.0 · GHC.RTS.Flags
  • Show HpcFlagsDefined in base-4.23.0.0 · GHC.RTS.Flags
  • Show IoManagerFlagDefined in base-4.23.0.0 · GHC.RTS.Flags
  • Show MiscFlagsDefined in base-4.23.0.0 · GHC.RTS.Flags
  • Show ParFlagsDefined in base-4.23.0.0 · GHC.RTS.Flags
  • Show ProfFlagsDefined in base-4.23.0.0 · GHC.RTS.Flags
  • Show RTSFlagsDefined in base-4.23.0.0 · GHC.RTS.Flags
  • Show TickyFlagsDefined in base-4.23.0.0 · GHC.RTS.Flags
  • Show TraceFlagsDefined in base-4.23.0.0 · GHC.RTS.Flags
  • Show GCDetailsDefined in base-4.23.0.0 · GHC.Stats
  • Show RTSStatsDefined in base-4.23.0.0 · GHC.Stats
  • Show TimeoutDefined in base-4.23.0.0 · System.Timeout
  • Show BuilderDefined in bytestring-0.12.2.0 · Data.ByteString.Builder · orphan
  • Show FormatModeDefined in bytestring-0.12.2.0 · Data.ByteString.Builder.RealFloat
  • Show FloatingDecimalDefined in bytestring-0.12.2.0 · Data.ByteString.Builder.RealFloat.D2S
  • Show FloatingDecimalDefined in bytestring-0.12.2.0 · Data.ByteString.Builder.RealFloat.F2S
  • Show ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.Type
  • Show SizeOverflowExceptionDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.Type
  • Show ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Lazy.Internal
  • Show ShortByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Short.Internal
  • Show IntSetDefined in containers-0.8 · Data.IntSet.Internal
  • Show IntersectionDefined in containers-0.8 · Data.IntSet.Internal
  • Show BitQueueDefined in containers-0.8 · Utils.Containers.Internal.BitQueue
  • Show BitQueueBDefined in containers-0.8 · Utils.Containers.Internal.BitQueue
  • Show ForallVisFlagDefined in ghc-boot-th-10.0.0.20260917 · GHC.Boot.TH.Ppr
  • Show DocDefined in ghc-boot-th-10.0.0.20260917 · GHC.Boot.TH.PprLib
  • Show VoidDefined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show IntegerDefined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show NaturalDefined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show ByteOrderDefined in ghc-internal-10.0.0 · GHC.Internal.ByteOrder
  • Show ClosureTypeDefined in ghc-internal-10.0.0 · GHC.Internal.ClosureTypes
  • Show BlockReasonDefined in ghc-internal-10.0.0 · GHC.Internal.Conc.Sync
  • Show ThreadIdDefined in ghc-internal-10.0.0 · GHC.Internal.Conc.Sync
  • Show ThreadStatusDefined in ghc-internal-10.0.0 · GHC.Internal.Conc.Sync
  • Show NestedAtomicallyDefined in ghc-internal-10.0.0 · GHC.Internal.Control.Exception.Base
  • Show NoMatchingContinuationPromptDefined in ghc-internal-10.0.0 · GHC.Internal.Control.Exception.Base
  • Show NoMethodErrorDefined in ghc-internal-10.0.0 · GHC.Internal.Control.Exception.Base
  • Show NonTerminationDefined in ghc-internal-10.0.0 · GHC.Internal.Control.Exception.Base
  • Show PatternMatchFailDefined in ghc-internal-10.0.0 · GHC.Internal.Control.Exception.Base
  • Show RecConErrorDefined in ghc-internal-10.0.0 · GHC.Internal.Control.Exception.Base
  • Show RecSelErrorDefined in ghc-internal-10.0.0 · GHC.Internal.Control.Exception.Base
  • Show RecUpdErrorDefined in ghc-internal-10.0.0 · GHC.Internal.Control.Exception.Base
  • Show TypeErrorDefined in ghc-internal-10.0.0 · GHC.Internal.Control.Exception.Base
  • Show ConstrDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Data
  • Show ConstrRepDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Data
  • Show DataRepDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Data
  • Show DataTypeDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Data
  • Show FixityDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Data
  • Show DynamicDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Dynamic
  • Show AllDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.Internal
  • Show AnyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.Internal
  • Show SomeTypeRepDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Typeable.Internal
  • Show VersionDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Version
  • Show ControlMessageDefined in ghc-internal-10.0.0 · GHC.Internal.Event.Control
  • Show EPollFdDefined in ghc-internal-10.0.0 · GHC.Internal.Event.EPoll
  • Show EventDefined in ghc-internal-10.0.0 · GHC.Internal.Event.EPoll
  • Show EventTypeDefined in ghc-internal-10.0.0 · GHC.Internal.Event.EPoll
  • Show EventDefined in ghc-internal-10.0.0 · GHC.Internal.Event.Internal.Types
  • Show EventLifetimeDefined in ghc-internal-10.0.0 · GHC.Internal.Event.Internal.Types
  • Show LifetimeDefined in ghc-internal-10.0.0 · GHC.Internal.Event.Internal.Types
  • Show TimeoutDefined in ghc-internal-10.0.0 · GHC.Internal.Event.Internal.Types
  • Show FdKeyDefined in ghc-internal-10.0.0 · GHC.Internal.Event.Manager
  • Show StateDefined in ghc-internal-10.0.0 · GHC.Internal.Event.Manager
  • Show EventDefined in ghc-internal-10.0.0 · GHC.Internal.Event.Poll
  • Show PollFdDefined in ghc-internal-10.0.0 · GHC.Internal.Event.Poll
  • Show StateDefined in ghc-internal-10.0.0 · GHC.Internal.Event.TimerManager
  • Show UniqueDefined in ghc-internal-10.0.0 · GHC.Internal.Event.Unique
  • Show ErrorCallDefined in ghc-internal-10.0.0 · GHC.Internal.Exception
  • Show ArithExceptionDefined in ghc-internal-10.0.0 · GHC.Internal.Exception.Type
  • Show SomeExceptionDefined in ghc-internal-10.0.0 · GHC.Internal.Exception.Type
  • Show WhileHandlingDefined in ghc-internal-10.0.0 · GHC.Internal.Exception.Type
  • Show FingerprintDefined in ghc-internal-10.0.0 · GHC.Internal.Fingerprint.Type
  • Show CBoolDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CCharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CClockDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CDoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CFloatDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CIntDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CIntMaxDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CIntPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CLLongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CLongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CPtrdiffDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CSCharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CSUSecondsDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CShortDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CSigAtomicDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CSizeDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CTimeDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CUCharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CUIntDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CUIntMaxDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CUIntPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CULLongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CULongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CUSecondsDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CUShortDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show CWcharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.Types
  • Show IntPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.Ptr
  • Show WordPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.Ptr
  • Show ForeignSrcLangDefined in ghc-internal-10.0.0 · GHC.Internal.ForeignSrcLang
  • Show AssociativityDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Show DecidedStrictnessDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Show FixityDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Show SourceStrictnessDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Show SourceUnpackednessDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Show BoxDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.Closures
  • Show PrimTypeDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.Closures
  • Show TsoFlagsDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.Closures
  • Show WhatNextDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.Closures
  • Show WhyBlockedDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.Closures
  • Show HalfWordDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.InfoTable.Types
  • Show StgInfoTableDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.InfoTable.Types
  • Show CostCentreDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.ProfInfo.Types
  • Show CostCentreStackDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.ProfInfo.Types
  • Show IndexTableDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.ProfInfo.Types
  • Show StgTSOProfInfoDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.ProfInfo.Types
  • Show MaskingStateDefined in ghc-internal-10.0.0 · GHC.Internal.IO
  • Show SeekModeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Device
  • Show CodingFailureModeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Encoding.Failure
  • Show CodingProgressDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Encoding.Types
  • Show TextEncodingDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Encoding.Types
  • Show AllocationLimitExceededDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Exception
  • Show ArrayExceptionDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Exception
  • Show AssertionFailedDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Exception
  • Show AsyncExceptionDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Exception
  • Show BlockedIndefinitelyOnMVarDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Exception
  • Show BlockedIndefinitelyOnSTMDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Exception
  • Show CompactionFailedDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Exception
  • Show DeadlockDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Exception
  • Show ExitCodeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Exception
  • Show FixIOExceptionDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Exception
  • Show IOErrorTypeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Exception
  • Show IOExceptionDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Exception
  • Show SomeAsyncExceptionDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Exception
  • Show FDDefined in ghc-internal-10.0.0 · GHC.Internal.IO.FD
  • Show HandlePosnDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Handle
  • Show FileLockingNotSupportedDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Handle.Lock.Common
  • Show BufferModeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Handle.Types
  • Show HandleDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Handle.Types
  • Show HandleTypeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Handle.Types
  • Show NewlineDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Handle.Types
  • Show NewlineModeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Handle.Types
  • Show IOModeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.IOMode
  • Show IoSubSystemDefined in ghc-internal-10.0.0 · GHC.Internal.IO.SubSystem
  • Show InfoProvDefined in ghc-internal-10.0.0 · GHC.Internal.InfoProv.Types
  • Show Int16Defined in ghc-internal-10.0.0 · GHC.Internal.Int
  • Show Int32Defined in ghc-internal-10.0.0 · GHC.Internal.Int
  • Show Int64Defined in ghc-internal-10.0.0 · GHC.Internal.Int
  • Show Int8Defined in ghc-internal-10.0.0 · GHC.Internal.Int
  • Show ExtensionDefined in ghc-internal-10.0.0 · GHC.Internal.LanguageExtensions
  • Show CCFlagsDefined in ghc-internal-10.0.0 · GHC.Internal.RTS.Flags
  • Show ConcFlagsDefined in ghc-internal-10.0.0 · GHC.Internal.RTS.Flags
  • Show DebugFlagsDefined in ghc-internal-10.0.0 · GHC.Internal.RTS.Flags
  • Show DoCostCentresDefined in ghc-internal-10.0.0 · GHC.Internal.RTS.Flags
  • Show DoHeapProfileDefined in ghc-internal-10.0.0 · GHC.Internal.RTS.Flags
  • Show DoTraceDefined in ghc-internal-10.0.0 · GHC.Internal.RTS.Flags
  • Show GCFlagsDefined in ghc-internal-10.0.0 · GHC.Internal.RTS.Flags
  • Show GiveGCStatsDefined in ghc-internal-10.0.0 · GHC.Internal.RTS.Flags
  • Show HpcFlagsDefined in ghc-internal-10.0.0 · GHC.Internal.RTS.Flags
  • Show IoManagerFlagDefined in ghc-internal-10.0.0 · GHC.Internal.RTS.Flags
  • Show MiscFlagsDefined in ghc-internal-10.0.0 · GHC.Internal.RTS.Flags
  • Show ParFlagsDefined in ghc-internal-10.0.0 · GHC.Internal.RTS.Flags
  • Show ProfFlagsDefined in ghc-internal-10.0.0 · GHC.Internal.RTS.Flags
  • Show RTSFlagsDefined in ghc-internal-10.0.0 · GHC.Internal.RTS.Flags
  • Show TickyFlagsDefined in ghc-internal-10.0.0 · GHC.Internal.RTS.Flags
  • Show TraceFlagsDefined in ghc-internal-10.0.0 · GHC.Internal.RTS.Flags
  • Show FractionalExponentBaseDefined in ghc-internal-10.0.0 · GHC.Internal.Real
  • Show ByteOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.Constants
  • Show WordOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.Constants
  • Show ByteOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.ConstantsProf
  • Show WordOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.ConstantsProf
  • Show PointernessDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.Decode
  • Show StackEntryDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.Decode
  • Show CallStackDefined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show SrcLocDefined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show StaticPtrInfoDefined in ghc-internal-10.0.0 · GHC.Internal.StaticPtr
  • Show GCDetailsDefined in ghc-internal-10.0.0 · GHC.Internal.Stats
  • Show RTSStatsDefined in ghc-internal-10.0.0 · GHC.Internal.Stats
  • Show CBlkCntDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show CBlkSizeDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show CCcDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show CClockIdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show CDevDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show CFsBlkCntDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show CFsFilCntDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show CGidDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show CIdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show CInoDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show CKeyDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show CModeDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show CNfdsDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show CNlinkDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show COffDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show CPidDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show CRLimDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show CSocklenDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show CSpeedDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show CSsizeDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show CTcflagDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show CTimerDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show CUidDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show FdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.Types
  • Show AnnLookupDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show AnnTargetDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show BangDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show BndrVisDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show BodyDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show BytesDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show CallconvDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show ClauseDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show ConDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show DecDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show DecidedStrictnessDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show DerivClauseDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show DerivStrategyDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show DocLocDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show ExpDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show FamilyResultSigDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show FixityDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show FixityDirectionDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show ForeignDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show FunDepDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show GuardDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show InfoDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show InjectivityAnnDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show InlineDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show LitDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show LocDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show MatchDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show ModNameDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show ModuleDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show ModuleInfoDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show NameDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show NameFlavourDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show NameSpaceDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show NamespaceSpecifierDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show OccNameDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show OverlapDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show PatDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show PatSynArgsDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show PatSynDirDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show PhasesDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show PkgNameDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show PragmaDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show RangeDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show RoleDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show RuleBndrDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show RuleMatchDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show SafetyDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show SourceStrictnessDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show SourceUnpackednessDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show SpecificityDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show StmtDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show TyLitDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show TySynEqnDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show TypeDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show TypeFamilyHeadDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show LexemeDefined in ghc-internal-10.0.0 · GHC.Internal.Text.Read.Lex
  • Show NumberDefined in ghc-internal-10.0.0 · GHC.Internal.Text.Read.Lex
  • Show SomeCharDefined in ghc-internal-10.0.0 · GHC.Internal.TypeLits
  • Show SomeSymbolDefined in ghc-internal-10.0.0 · GHC.Internal.TypeLits
  • Show SomeNatDefined in ghc-internal-10.0.0 · GHC.Internal.TypeNats
  • Show BoolDefined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show CharDefined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphan
  • Show FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphan
  • Show IntDefined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show KindRepDefined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show LevityDefined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show ModuleDefined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show OrderingDefined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show RuntimeRepDefined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show TrNameDefined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show TyConDefined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show TypeLitSortDefined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show VecCountDefined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show VecElemDefined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show WordDefined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show GeneralCategoryDefined in ghc-internal-10.0.0 · GHC.Internal.Unicode
  • Show Word16Defined in ghc-internal-10.0.0 · GHC.Internal.Word
  • Show Word32Defined in ghc-internal-10.0.0 · GHC.Internal.Word
  • Show Word64Defined in ghc-internal-10.0.0 · GHC.Internal.Word
  • Show Word8Defined in ghc-internal-10.0.0 · GHC.Internal.Word
  • Show EncodingExceptionDefined in os-string-2.0.11 · System.OsString.Encoding.Internal
  • Show OsCharDefined in os-string-2.0.11 · System.OsString.Internal.Types
  • Show OsStringDefined in os-string-2.0.11 · System.OsString.Internal.Types

    On windows, decodes as UCS-2. On unix prints the raw bytes without decoding.

  • Show PosixCharDefined in os-string-2.0.11 · System.OsString.Internal.Types
  • Show PosixStringDefined in os-string-2.0.11 · System.OsString.Internal.Types

    Prints the raw bytes without decoding.

  • Show WindowsCharDefined in os-string-2.0.11 · System.OsString.Internal.Types
  • Show WindowsStringDefined in os-string-2.0.11 · System.OsString.Internal.Types

    Decodes as UCS-2.

  • Show ModeDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Show StyleDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Show TextDetailsDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Show PrettyLevelDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJClass
  • Show DocDefined in pretty-1.1.3.6 · Text.PrettyPrint.HughesPJ
  • Show PrettyLevelDefined in pretty-1.1.3.6 · Text.PrettyPrint.HughesPJClass
  • Show LeniencyDefined in protolude-0.3.5 · Protolude.Conv
  • Show FatalErrorDefined in protolude-0.3.5 · Protolude.Panic
  • Show DecodingDefined in text-2.1.4 · Data.Text.Encoding
  • Show UnicodeExceptionDefined in text-2.1.4 · Data.Text.Encoding.Error
  • Show I8Defined in text-2.1.4 · Data.Text.Foreign
  • Show TextDefined in text-2.1.4 · Data.Text.Show · orphan
  • Show BuilderDefined in text-2.1.4 · Data.Text.Internal.Builder
  • Show PartialUtf8CodePointDefined in text-2.1.4 · Data.Text.Internal.Encoding
  • Show Utf8StateDefined in text-2.1.4 · Data.Text.Internal.Encoding
  • Show DecoderStateDefined in text-2.1.4 · Data.Text.Internal.Encoding.Utf8
  • Show SizeDefined in text-2.1.4 · Data.Text.Internal.Fusion.Size
  • Show TextDefined in text-2.1.4 · Data.Text.Lazy · orphan
  • Show FPFormatDefined in text-2.1.4 · Data.Text.Lazy.Builder.RealFloat
  • Show IterDefined in text-2.1.4 · Data.Text.Unsafe
  • Show SubHashPathDefined in unordered-containers-0.2.21 · Data.HashMap.Internal.Debug
  • Show ()Defined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show (ConstPtr a)Defined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.ConstPtr
  • Show (ForeignPtr a)Defined in ghc-internal-10.0.0 · GHC.Internal.ForeignPtr
  • Show (FunPtr a)Defined in ghc-internal-10.0.0 · GHC.Internal.Ptr
  • Show (Ptr a)Defined in ghc-internal-10.0.0 · GHC.Internal.Ptr
  • Show (SChar c)Defined in ghc-internal-10.0.0 · GHC.Internal.TypeLits
  • Show (SSymbol s)Defined in ghc-internal-10.0.0 · GHC.Internal.TypeLits
  • Show (SNat n)Defined in ghc-internal-10.0.0 · GHC.Internal.TypeNats
  • Show (Doc a)Defined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Show a => Show (Complex a)Defined in base-4.23.0.0 · Data.Complex
  • Show a => Show (First a)Defined in base-4.23.0.0 · Data.Semigroup
  • Show a => Show (Last a)Defined in base-4.23.0.0 · Data.Semigroup
  • Show a => Show (Max a)Defined in base-4.23.0.0 · Data.Semigroup
  • Show a => Show (Min a)Defined in base-4.23.0.0 · Data.Semigroup
  • Show a => Show (Decoder a)Defined in binary-0.8.9.3 · Data.Binary.Get.Internal
  • Show a => Show (IntMap a)Defined in containers-0.8 · Data.IntMap.Internal
  • Show a => Show (Seq a)Defined in containers-0.8 · Data.Sequence.Internal
  • Show a => Show (ViewL a)Defined in containers-0.8 · Data.Sequence.Internal
  • Show a => Show (ViewR a)Defined in containers-0.8 · Data.Sequence.Internal
  • Show a => Show (Intersection a)Defined in containers-0.8 · Data.Set.Internal
  • Show a => Show (Set a)Defined in containers-0.8 · Data.Set.Internal
  • Show a => Show (PostOrder a)Defined in containers-0.8 · Data.Tree
  • Show a => Show (Tree a)Defined in containers-0.8 · Data.Tree
  • Show a => Show (ExitCase a)Defined in exceptions-0.10.12 · Control.Monad.Catch
  • Show a => Show (NonEmpty a)Defined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show a => Show (And a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Bits
  • Show a => Show (Iff a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Bits
  • Show a => Show (Ior a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Bits
  • Show a => Show (Xor a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Bits
  • Show a => Show (Identity a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.Identity

    This instance would be equivalent to the derived instances of the Identity newtype if the runIdentity field were removed

  • Show a => Show (First a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Monoid
  • Show a => Show (Last a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Monoid
  • Show a => Show (Down a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Ord

    This instance would be equivalent to the derived instances of the Down newtype if the getDown field were removed

  • Show a => Show (Dual a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.Internal
  • Show a => Show (Product a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.Internal
  • Show a => Show (Sum a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.Internal
  • Show a => Show (ExceptionWithContext a)Defined in ghc-internal-10.0.0 · GHC.Internal.Exception.Type
  • Show a => Show (ZipList a)Defined in ghc-internal-10.0.0 · GHC.Internal.Functor.ZipList
  • Show a => Show (Maybe a)Defined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show a => Show (Ratio a)Defined in ghc-internal-10.0.0 · GHC.Internal.Real
  • Show a => Show (Hashed a)Defined in hashable-1.5.1.0 · Data.Hashable.Class
  • Show a => Show (AnnotDetails a)Defined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Show a => Show (Span a)Defined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Show a => Show (Array a)Defined in unordered-containers-0.2.21 · Data.HashMap.Internal.Array
  • Show a => Show (HashSet a)Defined in unordered-containers-0.2.21 · Data.HashSet.Internal
  • Show a => Show (a)Defined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show a => Show [a]Defined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show b => Show (GenClosure b)Defined in ghc-internal-10.0.0 · GHC.Internal.Heap.Closures
  • Show b => Show (GenStackField b)Defined in ghc-internal-10.0.0 · GHC.Internal.Heap.Closures
  • Show b => Show (GenStackFrame b)Defined in ghc-internal-10.0.0 · GHC.Internal.Heap.Closures
  • Show b => Show (GenStgStackClosure b)Defined in ghc-internal-10.0.0 · GHC.Internal.Heap.Closures
  • Show e => Show (NoBacktrace e)Defined in ghc-internal-10.0.0 · GHC.Internal.Exception.Type
  • Show flag => Show (TyVarBndr flag)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax
  • Show k => Show (Error k)Defined in unordered-containers-0.2.21 · Data.HashMap.Internal.Debug
  • Show k => Show (Validity k)Defined in unordered-containers-0.2.21 · Data.HashMap.Internal.Debug
  • Show m => Show (WrappedMonoid m)Defined in base-4.23.0.0 · Data.Semigroup
  • Show p => Show (Par1 p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Show vertex => Show (SCC vertex)Defined in containers-0.8 · Data.Graph
  • HasResolution a => Show (Fixed a)Defined in base-4.23.0.0 · Data.Fixed
  • Show (Proxy s)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Proxy
  • Show (TypeRep a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Typeable.Internal
  • Show (U1 p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Show (UAddr p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Show (V1 p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Show (ST s a)Defined in ghc-internal-10.0.0 · GHC.Internal.ST
  • Show (a -> b)Defined in base-4.23.0.0 · Text.Show.Functions · orphan
  • (Show1 f, Show a) => Show (Lift f a)Defined in transformers-0.6.3.0 · Control.Applicative.Lift
  • (Show1 m, Show a) => Show (MaybeT m a)Defined in transformers-0.6.3.0 · Control.Monad.Trans.Maybe
  • (Ix a, Show a, Show b) => Show (Array a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Arr
  • (Ix ix, Show ix, Show e, IArray UArray e) => Show (UArray ix e)Defined in array-0.5.8.0 · Data.Array.Base
  • (Show a, Show b) => Show (Arg a b)Defined in base-4.23.0.0 · Data.Semigroup
  • (Show a, Show b) => Show (Either a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Either
  • (Show a, Show b) => Show (a, b)Defined in ghc-internal-10.0.0 · GHC.Internal.Show
  • (Show k, Show a) => Show (Map k a)Defined in containers-0.8 · Data.Map.Internal
  • (Show k, Show v) => Show (HashMap k v)Defined in unordered-containers-0.2.21 · Data.HashMap.Internal
  • (GShow (Rep1 f a), Generic1 f) => Show (FunctorClassesDefault f a)Defined in transformers-compat-0.7.2 · Data.Functor.Classes.Generic.Internal
  • Show (Coercion a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Type.Coercion
  • Show (OrderingI a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Type.Ord
  • Show (URec Char p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Show (URec Double p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Show (URec Float p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Show (URec Int p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Show (URec Word p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Show (a :~: b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Type.Equality
  • Show (f a) => Show (Ap f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Monoid
  • Show (f a) => Show (Alt f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.Internal
  • Show (f p) => Show (Rec1 f p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Show a => Show (Const a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.Const

    This instance would be equivalent to the derived instances of the Const newtype if the getConst field were removed

  • Show a => Show (Constant a b)Defined in transformers-0.6.3.0 · Data.Functor.Constant
  • (Show1 f, Show a) => Show (Backwards f a)Defined in transformers-0.6.3.0 · Control.Applicative.Backwards
  • (Show1 f, Show a) => Show (IdentityT f a)Defined in transformers-0.6.3.0 · Control.Monad.Trans.Identity
  • (Show1 f, Show a) => Show (Reverse f a)Defined in transformers-0.6.3.0 · Data.Functor.Reverse
  • (Show a, Show b, Show c) => Show (a, b, c)Defined in ghc-internal-10.0.0 · GHC.Internal.Show
  • (Show e, Show1 m, Show a) => Show (ExceptT e m a)Defined in transformers-0.6.3.0 · Control.Monad.Trans.Except
  • (Show w, Show1 m, Show a) => Show (WriterT w m a)Defined in transformers-0.6.3.0 · Control.Monad.Trans.Writer.Lazy
  • (Show w, Show1 m, Show a) => Show (WriterT w m a)Defined in transformers-0.6.3.0 · Control.Monad.Trans.Writer.Strict
  • Show (a :~~: b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Type.Equality
  • Show c => Show (K1 i c p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • (Show (f a), Show (g a)) => Show (Product f g a)Defined in base-4.23.0.0 · Data.Functor.Product
  • (Show (f a), Show (g a)) => Show (Sum f g a)Defined in base-4.23.0.0 · Data.Functor.Sum
  • (Show (f p), Show (g p)) => Show ((:*:) f g p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • (Show (f p), Show (g p)) => Show ((:+:) f g p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • (Show a, Show b, Show c, Show d) => Show (a, b, c, d)Defined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Show (f (g a)) => Show (Compose f g a)Defined in base-4.23.0.0 · Data.Functor.Compose
  • Show (f (g p)) => Show ((:.:) f g p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Show (f p) => Show (M1 i c f p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • (Show a, Show b, Show c, Show d, Show e) => Show (a, b, c, d, e)Defined in ghc-internal-10.0.0 · GHC.Internal.Show
  • (Show a, Show b, Show c, Show d, Show e, Show f) => Show (a, b, c, d, e, f)Defined in ghc-internal-10.0.0 · GHC.Internal.Show
  • (Show a, Show b, Show c, Show d, Show e, Show f, Show g) => Show (a, b, c, d, e, f, g)Defined in ghc-internal-10.0.0 · GHC.Internal.Show
  • (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)Defined in ghc-internal-10.0.0 · GHC.Internal.Show
  • (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)Defined in ghc-internal-10.0.0 · GHC.Internal.Show
  • (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)Defined in ghc-internal-10.0.0 · GHC.Internal.Show
  • (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)Defined in ghc-internal-10.0.0 · GHC.Internal.Show
  • (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)Defined in ghc-internal-10.0.0 · GHC.Internal.Show
  • (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)Defined in ghc-internal-10.0.0 · GHC.Internal.Show
  • (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)Defined in ghc-internal-10.0.0 · GHC.Internal.Show
  • (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)Defined in ghc-internal-10.0.0 · GHC.Internal.Show
datadata CallStack
#

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

Example1 expression
:{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.

Example1 expression
putStrLnWithCallStack "hello"helloCallStack (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.

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

Instances4IsList, Show, NFData, Item
typetype HasCallStack = IP "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.

datadata StaticPtr a
#

A reference to a value of type a.

Instances1IsStatic
classclass KnownSymbol (n :: Symbol) where
#

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

classclass KnownNat (n :: Nat) where
#

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.

typetype Nat = Natural
#

A type synonym for Natural.

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

Instances1HasResolution
  • KnownNat n => HasResolution nDefined in base-4.23.0.0 · Data.Fixed

    For example, Fixed 1000 will give you a Fixed with a resolution of 1000.

datadata SomeNat
#

This type represents unknown type-level natural numbers.

Constructors

Instances4Eq, Ord, Read, Show
  • Eq SomeNatDefined in ghc-internal-10.0.0 · GHC.Internal.TypeNats
  • Ord SomeNatDefined in ghc-internal-10.0.0 · GHC.Internal.TypeNats
  • Read SomeNatDefined in ghc-internal-10.0.0 · GHC.Internal.TypeNats
  • Show SomeNatDefined in ghc-internal-10.0.0 · GHC.Internal.TypeNats
newtypenewtype 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 Prelude.>> and Prelude.>>= operations from the Prelude.Monad class.

Instances39Monad, Functor, MonadFix, MonadFail, Applicative, GHCiSandboxIO, …
datadata Ordering
#
Instances17Bounded, Enum, Eq, Data, Ord, Read, …
datadata 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.

Instances18Enum, Eq, Integral, Data, Num, Ord, …
  • Enum IntegerDefined in ghc-internal-10.0.0 · GHC.Internal.Enum
  • Eq IntegerDefined in ghc-internal-10.0.0 · GHC.Internal.Bignum.Integer
  • Integral IntegerDefined in ghc-internal-10.0.0 · GHC.Internal.Real
  • Data IntegerDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Data
  • Num IntegerDefined in ghc-internal-10.0.0 · GHC.Internal.Num
  • Ord IntegerDefined in ghc-internal-10.0.0 · GHC.Internal.Bignum.Integer
  • Read IntegerDefined in ghc-internal-10.0.0 · GHC.Internal.Read
  • Real IntegerDefined in ghc-internal-10.0.0 · GHC.Internal.Real
  • Show IntegerDefined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Ix IntegerDefined in ghc-internal-10.0.0 · GHC.Internal.Ix
  • Bits IntegerDefined in ghc-internal-10.0.0 · GHC.Internal.Bits
  • PrintfArg IntegerDefined in base-4.23.0.0 · Text.Printf
  • NFData IntegerDefined in deepseq-1.5.2.0 · Control.DeepSeq
  • Pretty IntegerDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJClass
  • Pretty IntegerDefined in pretty-1.1.3.6 · Text.PrettyPrint.HughesPJClass
  • Binary IntegerDefined in binary-0.8.9.3 · Data.Binary.Class
  • Hashable IntegerDefined in hashable-1.5.1.0 · Data.Hashable.Class
  • Lift IntegerDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift
datadata Bool
#
Instances27Bounded, Enum, Eq, Data, Ord, Read, …
  • Bounded BoolDefined in ghc-internal-10.0.0 · GHC.Internal.Enum
  • Enum BoolDefined in ghc-internal-10.0.0 · GHC.Internal.Enum
  • Eq BoolDefined in ghc-internal-10.0.0 · GHC.Internal.Classes
  • Data BoolDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Data
  • Ord BoolDefined in ghc-internal-10.0.0 · GHC.Internal.Classes
  • Read BoolDefined in ghc-internal-10.0.0 · GHC.Internal.Read
  • Show BoolDefined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Ix BoolDefined in ghc-internal-10.0.0 · GHC.Internal.Ix
  • Generic BoolDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Bits BoolDefined in ghc-internal-10.0.0 · GHC.Internal.Bits

    Interpret Bool as 1-bit bit-field

  • FiniteBits BoolDefined in ghc-internal-10.0.0 · GHC.Internal.Bits
  • Storable BoolDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.Storable
  • SingKind BoolDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • NFData BoolDefined in deepseq-1.5.2.0 · Control.DeepSeq
  • Pretty BoolDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJClass
  • Pretty BoolDefined in pretty-1.1.3.6 · Text.PrettyPrint.HughesPJClass
  • Binary BoolDefined in binary-0.8.9.3 · Data.Binary.Class
  • Hashable BoolDefined in hashable-1.5.1.0 · Data.Hashable.Class
  • Lift BoolDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift
  • SingI 'FalseDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • SingI 'TrueDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • IArray UArray BoolDefined in array-0.5.8.0 · Data.Array.Base
  • MArray IOUArray Bool IODefined in array-0.5.8.0 · Data.Array.IO.Internals
  • MArray (STUArray s) Bool (ST s)Defined in array-0.5.8.0 · Data.Array.Base
  • type Rep Bool = D1 ('MetaData "Bool" "GHC.Internal.Types" "ghc-internal" 'False) (C1 ('MetaCons "False" 'PrefixI 'False) U1 :+: C1 ('MetaCons "True" 'PrefixI 'False) U1)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • type DemoteRep Bool = BoolDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • data Sing
    • STrue :: R:SingBoola 'True
    • SFalse :: R:SingBoola 'False
    Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
datadata 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.

Instances35Bounded, Enum, Data, Read, Ix, Storable, …
classclass a ~ 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.

datadata 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

Instances34Enum, Floating, Fractional, Data, Num, Read, …
  • Enum DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphan

    fromEnum just truncates its argument, beware of all sorts of overflows.

    List generators have extremely peculiar behavior, mandated by Haskell Report 2010:

    Example1 expression
    [0..1.5][0.0,1.0,2.0]
  • Eq DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Classes

    Note that due to the presence of NaN, Double's Eq instance does not satisfy reflexivity.

    Example1 expression
    0/0 == (0/0 :: Double)False

    Also note that Double's Eq instance does not satisfy substitutivity:

    Example2 expressions
    0 == (-0 :: Double)Truerecip 0 == recip (-0 :: Double)False
  • Floating DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Float
  • Fractional DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphan

    This instance implements IEEE 754 standard with all its usual pitfalls about NaN, infinities and negative zero.

    Example4 expressions
    0 == (-0 :: Double)Truerecip 0 == recip (-0 :: Double)Falsemap (/ 0) [-1, 0, 1][-Infinity,NaN,Infinity]map (* 0) $ map (/ 0) [-1, 0, 1][NaN,NaN,NaN]
  • Data DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Data
  • Num DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphan

    This instance implements IEEE 754 standard with all its usual pitfalls about NaN, infinities and negative zero. Neither addition nor multiplication are associative or distributive:

    Example3 expressions
    (0.1 + 0.1) + 0.4 == 0.1 + (0.1 + 0.4)False(0.1 + 0.2) * 0.3 == 0.1 * 0.3 + 0.2 * 0.3False(0.1 * 0.1) * 0.3 == 0.1 * (0.1 * 0.3)False
  • Ord DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Classes

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

  • Read DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Read
  • Real DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphan
  • RealFloat DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Float
  • RealFrac DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphan

    Beware that results for non-finite arguments are garbage:

    Example2 expressions
    [ f x | f <- [round, floor, ceiling], x <- [-1/0, 0/0, 1/0] ] :: [Int][0,0,0,0,0,0,0,0,0]map properFraction [-1/0, 0/0, 1/0] :: [(Int, Double)][(0,0.0),(0,0.0),(0,0.0)]

    and get even more non-sensical if you ask for Integer instead of Int.

  • Show DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphan
  • Storable DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.Storable
  • PrintfArg DoubleDefined in base-4.23.0.0 · Text.Printf
  • NFData DoubleDefined in deepseq-1.5.2.0 · Control.DeepSeq
  • Pretty DoubleDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJClass
  • Pretty DoubleDefined in pretty-1.1.3.6 · Text.PrettyPrint.HughesPJClass
  • Binary DoubleDefined in binary-0.8.9.3 · Data.Binary.Class

    Uses non-IEEE754 encoding. Does not round-trip NaN.

  • Hashable DoubleDefined in hashable-1.5.1.0 · Data.Hashable.Class

    Note: prior to hashable-1.3.0.0, hash 0.0 /= hash (-0.0)

    The hash of NaN is not well defined.

  • Lift DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift
  • IArray UArray DoubleDefined in array-0.5.8.0 · Data.Array.Base
  • MArray IOUArray Double IODefined in array-0.5.8.0 · Data.Array.IO.Internals
  • Generic1 (URec Double)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Foldable UDoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Traversable UDoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • MArray (STUArray s) Double (ST s)Defined in array-0.5.8.0 · Data.Array.Base
  • Functor (URec Double)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Eq (URec Double p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Ord (URec Double p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Show (URec Double p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Generic (URec Double p)Defined in ghc-internal-10.0.0 · 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))Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • type Rep1 (URec Double) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UDouble" 'PrefixI 'True) (S1 ('MetaSel ('Just "uDouble#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) UDouble))Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • data URec DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Generics

    Used for marking occurrences of Double#

datadata 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

Instances34Enum, Floating, Fractional, Data, Num, Read, …
  • Enum FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphan

    fromEnum just truncates its argument, beware of all sorts of overflows.

    List generators have extremely peculiar behavior, mandated by Haskell Report 2010:

    Example1 expression
    [0..1.5 :: Float][0.0,1.0,2.0]
  • Eq FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Classes

    Note that due to the presence of NaN, Float's Eq instance does not satisfy reflexivity.

    Example1 expression
    0/0 == (0/0 :: Float)False

    Also note that Float's Eq instance does not satisfy extensionality:

    Example2 expressions
    0 == (-0 :: Float)Truerecip 0 == recip (-0 :: Float)False
  • Floating FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Float
  • Fractional FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphan

    This instance implements IEEE 754 standard with all its usual pitfalls about NaN, infinities and negative zero.

    Example4 expressions
    0 == (-0 :: Float)Truerecip 0 == recip (-0 :: Float)Falsemap (/ 0) [-1, 0, 1 :: Float][-Infinity,NaN,Infinity]map (* 0) $ map (/ 0) [-1, 0, 1 :: Float][NaN,NaN,NaN]
  • Data FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Data
  • Num FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphan

    This instance implements IEEE 754 standard with all its usual pitfalls about NaN, infinities and negative zero. Neither addition nor multiplication are associative or distributive:

    Example3 expressions
    (0.1 + 0.1 :: Float) + 0.5 == 0.1 + (0.1 + 0.5)False(0.1 + 0.2 :: Float) * 0.9 == 0.1 * 0.9 + 0.2 * 0.9False(0.1 * 0.1 :: Float) * 0.9 == 0.1 * (0.1 * 0.9)False
  • Ord FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Classes

    See instance Ord Double for discussion of deviations from IEEE 754 standard.

  • Read FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Read
  • Real FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphan
  • RealFloat FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Float
  • RealFrac FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphan

    Beware that results for non-finite arguments are garbage:

    Example2 expressions
    [ f x | f <- [round, floor, ceiling], x <- [-1/0, 0/0, 1/0 :: Float] ] :: [Int][0,0,0,0,0,0,0,0,0]map properFraction [-1/0, 0/0, 1/0] :: [(Int, Float)][(0,0.0),(0,0.0),(0,0.0)]

    and get even more non-sensical if you ask for Integer instead of Int.

  • Show FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphan
  • Storable FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.Storable
  • PrintfArg FloatDefined in base-4.23.0.0 · Text.Printf
  • NFData FloatDefined in deepseq-1.5.2.0 · Control.DeepSeq
  • Pretty FloatDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJClass
  • Pretty FloatDefined in pretty-1.1.3.6 · Text.PrettyPrint.HughesPJClass
  • Binary FloatDefined in binary-0.8.9.3 · Data.Binary.Class

    Uses non-IEEE754 encoding. Does not round-trip NaN.

  • Hashable FloatDefined in hashable-1.5.1.0 · Data.Hashable.Class

    Note: prior to hashable-1.3.0.0, hash 0.0 /= hash (-0.0)

    The hash of NaN is not well defined.

  • Lift FloatDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift
  • IArray UArray FloatDefined in array-0.5.8.0 · Data.Array.Base
  • MArray IOUArray Float IODefined in array-0.5.8.0 · Data.Array.IO.Internals
  • Generic1 (URec Float)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Foldable UFloatDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Traversable UFloatDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • MArray (STUArray s) Float (ST s)Defined in array-0.5.8.0 · Data.Array.Base
  • Functor (URec Float)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Eq (URec Float p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Ord (URec Float p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Show (URec Float p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Generic (URec Float p)Defined in ghc-internal-10.0.0 · 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))Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • type Rep1 (URec Float) = D1 ('MetaData "URec" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "UFloat" 'PrefixI 'True) (S1 ('MetaSel ('Just "uFloat#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) UFloat))Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • data URec FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Generics

    Used for marking occurrences of Float#

datadata 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 Prelude.minBound and Prelude.maxBound from the Prelude.Bounded class.

Instances35Bounded, Enum, Integral, Data, Num, Read, …
datadata Symbol
#

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

Instances7SingKind, TestCoercion, TestEquality, SingI, Compare, DemoteRep, …
  • SingKind SymbolDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • TestCoercion SSymbolDefined in ghc-internal-10.0.0 · GHC.Internal.TypeLits
  • TestEquality SSymbolDefined in ghc-internal-10.0.0 · GHC.Internal.TypeLits
  • KnownSymbol a => SingI aDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • type Compare a b = CmpSymbol a bDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Type.Ord
  • type DemoteRep Symbol = StringDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • data SingDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
typetype Type = TYPE LiftedRep
#

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

datadata Word
#

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

Instances33Bounded, Enum, Integral, Data, Num, Read, …
value($!) :: (a -> b) -> a -> b
#