HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulecabal-install-solver-3.12.1.0Haskell2010

Distribution.Solver.Compat.Prelude

This module does two things:

  • Acts as a compatibility layer, like base-compat.

  • Provides commonly used imports.

This module is a superset of Distribution.Compat.Prelude (which this module re-exports)

  • 37 types
  • 32 classes
  • 170 values
valuedeepseq :: NFData a => a -> b -> b
#

deepseq: fully evaluates the first argument, before returning the second.

The name deepseq is used to illustrate the relationship to seq: where seq is shallow in the sense that it only evaluates the top level of its argument, deepseq traverses the entire data structure evaluating it completely.

deepseq can be useful for forcing pending exceptions, eradicating space leaks, or forcing lazy I/O to happen. It is also useful in conjunction with parallel Strategies (see the parallel package).

There is no guarantee about the ordering of evaluation. The implementation may evaluate the components of the structure in any order or in parallel. To impose an actual order on evaluation, use pseq from Control.Parallel in the parallel package.

datadata Bool
#
Instances34Bounded, Enum, Eq, Data, Ord, Read, …
  • Bounded BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Enum
  • Enum BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Enum
  • Eq BoolDefined in ghc-prim-0.12.0 · GHC.Classes
  • Data BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Ord BoolDefined in ghc-prim-0.12.0 · GHC.Classes
  • Read BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Show BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Ix BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Ix
  • Generic BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Bits BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Bits

    Interpret Bool as 1-bit bit-field

  • FiniteBits BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Bits
  • Storable BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Storable
  • SingKind BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • NFData BoolDefined in deepseq-1.5.0.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
  • Random BoolDefined in random-1.2.1.3 · System.Random
  • Finite BoolDefined in random-1.2.1.3 · System.Random.GFinite
  • Uniform BoolDefined in random-1.2.1.3 · System.Random.Internal
  • UniformRange BoolDefined in random-1.2.1.3 · System.Random.Internal
  • Binary BoolDefined in binary-0.8.9.3 · Data.Binary.Class
  • Parsec BoolDefined in Cabal-syntax-3.12.1.0 · Distribution.Parsec
  • Pretty BoolDefined in Cabal-syntax-3.12.1.0 · Distribution.Pretty
  • Structured BoolDefined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Structured
  • BooleanFlag BoolDefined in Cabal-3.12.1.0 · Distribution.Simple.Flag
  • Lift BoolDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • SingI 'FalseDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • SingI 'TrueDefined in ghc-internal-9.1003.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.Types" "ghc-prim" 'False) (C1 ('MetaCons "False" 'PrefixI 'False) U1 :+: C1 ('MetaCons "True" 'PrefixI 'False) U1)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • type DemoteRep Bool = BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • data Sing
    • STrue :: R:SingBoola 'True
    • SFalse :: R:SingBoola 'False
    Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
valueid :: a -> a
#

Identity function.

id x = x

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

Examples
Example1 expression
length $ filter id [True, True, False, True]3
Example1 expression
Just (Just 3) >>= idJust 3
Example1 expression
foldr id 0 [(^3), (*5), (+2)]1000
value(.) :: (b -> c) -> (a -> b) -> a -> c
#

Right to left function composition.

Property
(f . g) x = f (g x)
Property
f . id = f = id . f
Examples
Example1 expression
map ((*2) . length) [[], [0, 1, 2], [0]][0,6,2]
Example1 expression
foldr (.) id [(+1), (*3), (^3)] 225
Example1 expression
let (...) = (.).(.) in ((*2)...(+)) 5 1030
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 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.

Instances91Num, …
  • Num IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.Num
  • Num NaturalDefined in ghc-internal-9.1003.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-9.1003.0 · GHC.Internal.Event.EPoll
  • Num EventDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.Poll
  • Num UniqueDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.Unique
  • Num CBoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CClockDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CDoubleDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CFloatDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CIntDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CIntMaxDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CIntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CLLongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CLongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CPtrdiffDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CSCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CSUSecondsDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CShortDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CSigAtomicDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CSizeDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CTimeDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CUCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CUIntDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CUIntMaxDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CUIntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CULLongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CULongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CUSecondsDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CUShortDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num CWcharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Num IntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Ptr
  • Num WordPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Ptr
  • Num Int16Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Num Int32Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Num Int64Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Num Int8Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Num CBlkCntDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Num CBlkSizeDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Num CCcDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Num CClockIdDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Num CDevDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Num CFsBlkCntDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Num CFsFilCntDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Num CGidDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Num CIdDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Num CInoDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Num CKeyDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Num CModeDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Num CNfdsDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Num CNlinkDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Num COffDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Num CPidDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Num CRLimDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Num CSocklenDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Num CSpeedDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Num CSsizeDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Num CTcflagDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Num CUidDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Num FdDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Num Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Num Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Num Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Num Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Num DoubleDefined in ghc-internal-9.1003.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-9.1003.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-9.1003.0 · GHC.Internal.Num
  • Num WordDefined in ghc-internal-9.1003.0 · GHC.Internal.Num
  • Num CardinalityDefined in random-1.2.1.3 · System.Random.GFinite
  • Num I8Defined in text-2.1.3 · Data.Text.Foreign
  • Num SizeDefined in text-2.1.3 · Data.Text.Internal.Fusion.Size
  • Num DiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.DiffTime
  • Num NominalDiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.NominalDiffTime
  • Num CAttributesDefined in unix-2.8.7.0 · System.Posix.Files.Common
  • Num StatxFlagsDefined in unix-2.8.7.0 · System.Posix.Files.Common
  • Num StatxMaskDefined in unix-2.8.7.0 · System.Posix.Files.Common
  • Num BaudRateDefined in unix-2.8.7.0 · System.Posix.Terminal.Common
  • RealFloat a => Num (Complex a)Defined in base-4.20.2.0 · Data.Complex
  • Num a => Num (Max a)Defined in base-4.20.2.0 · Data.Semigroup
  • Num a => Num (Min a)Defined in base-4.20.2.0 · Data.Semigroup
  • Num a => Num (Identity a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Identity
  • Num a => Num (Down a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Ord
  • Num a => Num (Product a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Num a => Num (Sum a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Integral a => Num (Ratio a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Real
  • HasResolution a => Num (Fixed a)Defined in base-4.20.2.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.20.2.0 · Data.Functor.Contravariant
  • Num (f a) => Num (Alt f a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Num a => Num (Const a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Const
  • (Applicative f, Num a) => Num (Ap f a)Defined in ghc-internal-9.1003.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.20.2.0 · Data.Functor.Compose
classclass Typeable a => Data a where
#

The Data class comprehends a fundamental primitive gfoldl for folding over constructor applications, say terms. This primitive can be instantiated in several ways to map over the immediate subterms of a term; see the gmap combinators later in this class. Indeed, a generic programmer does not necessarily need to use the ingenious gfoldl primitive but rather the intuitive gmap combinators. The gfoldl primitive is completed by means to query top-level constructors, to turn constructor representations into proper terms, and to list all possible datatype constructors. This completion allows us to serve generic programming scenarios like read, show, equality, term generation.

The combinators gmapT, gmapQ, gmapM, etc are all provided with default definitions in terms of gfoldl, leaving open the opportunity to provide datatype-specific definitions. (The inclusion of the gmap combinators as members of class Data allows the programmer or the compiler to derive specialised, and maybe more efficient code per datatype. Note: gfoldl is more higher-order than the gmap combinators. This is subject to ongoing benchmarking experiments. It might turn out that the gmap combinators will be moved out of the class Data.)

Conceptually, the definition of the gmap combinators in terms of the primitive gfoldl requires the identification of the gfoldl function arguments. Technically, we also need to identify the type constructor c for the construction of the result type from the folded term type.

In the definition of gmapQx combinators, we use phantom type constructors for the c in the type of gfoldl because the result type of a query does not involve the (polymorphic) type of the term argument. In the definition of gmapQl we simply use the plain constant type constructor because gfoldl is left-associative anyway and so it is readily suited to fold a left-associative binary operation over the immediate subterms. In the definition of gmapQr, extra effort is needed. We use a higher-order accumulation trick to mediate between left-associative constructor application vs. right-associative binary operation (e.g., (:)). When the query is meant to compute a value of type r, then the result type within generic folding is r -> r. So the result of folding is a function to which we finally pass the right unit.

With the -XDeriveDataTypeable option, GHC can generate instances of the Data class automatically. For example, given the declaration

data T a b = C1 a b | C2 deriving (Typeable, Data)

GHC will generate an instance that is equivalent to

instance (Data a, Data b) => Data (T a b) where
    gfoldl k z (C1 a b) = z C1 `k` a `k` b
    gfoldl k z C2       = z C2

    gunfold k z c = case constrIndex c of
                        1 -> k (k (z C1))
                        2 -> z C2

    toConstr (C1 _ _) = con_C1
    toConstr C2       = con_C2

    dataTypeOf _ = ty_T

con_C1 = mkConstr ty_T "C1" [] Prefix
con_C2 = mkConstr ty_T "C2" [] Prefix
ty_T   = mkDataType "Module.T" [con_C1, con_C2]

This is suitable for datatypes that are exported transparently.

Instances255Data, …
  • Data OpenModuleDefined in Cabal-syntax-3.12.1.0 · Distribution.Backpack
  • Data OpenUnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Backpack
  • Data CabalSpecVersionDefined in Cabal-syntax-3.12.1.0 · Distribution.CabalSpecVersion
  • Data CompilerFlavorDefined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Data LicenseDefined in Cabal-syntax-3.12.1.0 · Distribution.License
  • Data ModuleNameDefined in Cabal-syntax-3.12.1.0 · Distribution.ModuleName
  • Data LicenseDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.License
  • Data LicenseExceptionIdDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExceptionId
  • Data LicenseExpressionDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExpression
  • Data SimpleLicenseExpressionDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExpression
  • Data LicenseIdDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseId
  • Data LicenseRefDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseReference
  • Data ArchDefined in Cabal-syntax-3.12.1.0 · Distribution.System
  • Data OSDefined in Cabal-syntax-3.12.1.0 · Distribution.System
  • Data PlatformDefined in Cabal-syntax-3.12.1.0 · Distribution.System
  • Data BenchmarkDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Benchmark
  • Data BenchmarkInterfaceDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BenchmarkInterface
  • Data BenchmarkTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BenchmarkType
  • Data BuildInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BuildInfo
  • Data BuildTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BuildType
  • Data ComponentIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentId
  • Data ConfVarDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ConfVar
  • Data DependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Dependency
  • Data ExeDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ExeDependency
  • Data ExecutableDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Executable
  • Data ExecutableScopeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ExecutableScope
  • Data FlagNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Flag
  • Data PackageFlagDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Flag
  • Data ForeignLibDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLib
  • Data LibVersionInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLib
  • Data ForeignLibOptionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLibOption
  • Data ForeignLibTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLibType
  • Data GenericPackageDescriptionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.GenericPackageDescription
  • Data IncludeRenamingDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.IncludeRenaming
  • Data LegacyExeDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LegacyExeDependency
  • Data LibraryDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Library
  • Data LibraryNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LibraryName
  • Data LibraryVisibilityDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LibraryVisibility
  • Data MixinDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Mixin
  • Data ModuleDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Module
  • Data ModuleReexportDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ModuleReexport
  • Data ModuleRenamingDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ModuleRenaming
  • Data MungedPackageIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.MungedPackageId
  • Data MungedPackageNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.MungedPackageName
  • Data PackageDescriptionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageDescription
  • Data PackageIdentifierDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageId
  • Data PackageNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageName
  • Data PackageVersionConstraintDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageVersionConstraint
  • Data PkgconfigDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigDependency
  • Data PkgconfigNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigName
  • Data PkgconfigVersionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigVersion
  • Data PkgconfigVersionRangeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigVersionRange
  • Data SetupBuildInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SetupBuildInfo
  • Data KnownRepoTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Data RepoKindDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Data RepoTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Data SourceRepoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Data TestSuiteDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.TestSuite
  • Data TestSuiteInterfaceDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.TestSuiteInterface
  • Data TestTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.TestType
  • Data DefUnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnitId
  • Data UnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnitId
  • Data UnqualComponentNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnqualComponentName
  • Data VersionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Version
  • Data VersionRangeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionRange.Internal
  • Data LicenseFileDefined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Path
  • Data PackageDirDefined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Path
  • Data SourceDirDefined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Path
  • Data ShortTextDefined in Cabal-syntax-3.12.1.0 · Distribution.Utils.ShortText
  • Data ExtensionDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.Extension
  • Data KnownExtensionDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.Extension
  • Data LanguageDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.Extension
  • Data ByteArrayDefined in base-4.20.2.0 · Data.Array.Byte
  • Data ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.Type
  • Data ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Lazy.Internal
  • Data ShortByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Short.Internal
  • Data IntSetDefined in containers-0.7 · Data.IntSet.Internal
  • Data IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data NaturalDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data VoidDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data AllDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data AnyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data VersionDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data SpecConstrAnnotationDefined in ghc-internal-9.1003.0 · GHC.Internal.Exts
  • Data IntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data WordPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data AssociativityDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data DecidedStrictnessDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data FixityDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data SourceStrictnessDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data SourceUnpackednessDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data Int16Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data Int32Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data Int64Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data Int8Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data CharDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data DoubleDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data FloatDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data IntDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data OrderingDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data WordDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data URIDefined in network-uri-2.6.4.2 · Network.URI
  • Data URIAuthDefined in network-uri-2.6.4.2 · Network.URI
  • Data SourcePosDefined in parsec-3.1.18.0 · Text.Parsec.Pos
  • Data AnnLookupDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data AnnTargetDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data BangDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data BndrVisDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data BodyDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data BytesDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data CallconvDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data ClauseDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data ConDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data DecDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data DecidedStrictnessDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data DerivClauseDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data DerivStrategyDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data DocLocDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data ExpDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data FamilyResultSigDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data FixityDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data FixityDirectionDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data ForeignDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data FunDepDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data GuardDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data InfoDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data InjectivityAnnDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data InlineDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data LitDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data LocDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data MatchDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data ModNameDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data ModuleDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data ModuleInfoDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data NameDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data NameFlavourDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data NameSpaceDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data NamespaceSpecifierDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data OccNameDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data OverlapDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data PatDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data PatSynArgsDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data PatSynDirDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data PhasesDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data PkgNameDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data PragmaDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data RangeDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data RoleDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data RuleBndrDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data RuleMatchDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data SafetyDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data SourceStrictnessDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data SourceUnpackednessDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data SpecificityDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data StmtDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data TyLitDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data TySynEqnDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data TypeDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data TypeFamilyHeadDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data TextDefined in text-2.1.3 · Data.Text · orphan

    This instance preserves data abstraction at the cost of inefficiency. We omit reflection services for the sake of data abstraction.

    This instance was created by copying the updated behavior of Data.Set.Set and Data.Map.Data.Map.Map. If you feel a mistake has been made, please feel free to submit improvements.

    The original discussion is archived here: could we get a Data instance for Data.Text.Text?

    The followup discussion that changed the behavior of Set and Data.Map.Map is archived here: Proposal: Allow gunfold for Data.Map, ...

  • Data TextDefined in text-2.1.3 · Data.Text.Lazy · orphan

    This instance preserves data abstraction at the cost of inefficiency. We omit reflection services for the sake of data abstraction.

    This instance was created by copying the updated behavior of Data.Text.Text

  • Data CalendarDiffDaysDefined in time-1.12.2 · Data.Time.Calendar.CalendarDiffDays
  • Data DayDefined in time-1.12.2 · Data.Time.Calendar.Days
  • Data MonthDefined in time-1.12.2 · Data.Time.Calendar.Month
  • Data QuarterDefined in time-1.12.2 · Data.Time.Calendar.Quarter
  • Data QuarterOfYearDefined in time-1.12.2 · Data.Time.Calendar.Quarter
  • Data DayOfWeekDefined in time-1.12.2 · Data.Time.Calendar.Week
  • Data AbsoluteTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.AbsoluteTime
  • Data DiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.DiffTime
  • Data NominalDiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.NominalDiffTime
  • Data SystemTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.SystemTime
  • Data UTCTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.UTCTime
  • Data UniversalTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.UniversalTime
  • Data CalendarDiffTimeDefined in time-1.12.2 · Data.Time.LocalTime.Internal.CalendarDiffTime
  • Data LocalTimeDefined in time-1.12.2 · Data.Time.LocalTime.Internal.LocalTime
  • Data TimeOfDayDefined in time-1.12.2 · Data.Time.LocalTime.Internal.TimeOfDay
  • Data TimeZoneDefined in time-1.12.2 · Data.Time.LocalTime.Internal.TimeZone
  • Data ZonedTimeDefined in time-1.12.2 · Data.Time.LocalTime.Internal.ZonedTime
  • Data ()Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (VersionRangeF a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionRange.Internal
  • Data a => Data (Complex a)Defined in base-4.20.2.0 · Data.Complex
  • Data a => Data (First a)Defined in base-4.20.2.0 · Data.Semigroup
  • Data a => Data (Last a)Defined in base-4.20.2.0 · Data.Semigroup
  • Data a => Data (Max a)Defined in base-4.20.2.0 · Data.Semigroup
  • Data a => Data (Min a)Defined in base-4.20.2.0 · Data.Semigroup
  • Data a => Data (IntMap a)Defined in containers-0.7 · Data.IntMap.Internal
  • Data a => Data (Seq a)Defined in containers-0.7 · Data.Sequence.Internal
  • Data a => Data (ViewL a)Defined in containers-0.7 · Data.Sequence.Internal
  • Data a => Data (ViewR a)Defined in containers-0.7 · Data.Sequence.Internal
  • Data a => Data (Tree a)Defined in containers-0.7 · Data.Tree
  • Data a => Data (NonEmpty a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (Identity a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (First a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (Last a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (Down a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (Dual a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (Product a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (Sum a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (ConstPtr a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (ForeignPtr a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (ZipList a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Functor.ZipList
  • Data a => Data (Maybe a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (Ptr a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data (a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data a => Data [a]Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data

    For historical reasons, the constructor name used for (:) is "(:)". In a derived instance, it would be ":".

  • Data c => Data (Condition c)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.Condition
  • Data flag => Data (TyVarBndr flag)Defined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Data m => Data (WrappedMonoid m)Defined in base-4.20.2.0 · Data.Semigroup
  • Data p => Data (Par1 p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data v => Data (PerCompilerFlavor v)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Data vertex => Data (SCC vertex)Defined in containers-0.7 · Data.Graph
  • Typeable s => Data (MutableByteArray s)Defined in base-4.20.2.0 · Data.Array.Byte
  • (Data a, Integral a) => Data (Ratio a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data a, Ord a) => Data (NonEmptySet a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.NonEmptySet
  • (Data a, Ord a) => Data (Set a)Defined in containers-0.7 · Data.Set.Internal
  • Data p => Data (U1 p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data p => Data (V1 p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Data t => Data (Proxy t)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data a, Data b) => Data (Arg a b)Defined in base-4.20.2.0 · Data.Semigroup
  • (Data a, Data b) => Data (Either a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data a, Data b) => Data (a, b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data a, Data b, Ix a) => Data (Array a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data from, Data to) => Data (SymbolicPath from to)Defined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Path
  • (Data k, Data a, Ord k) => Data (Map k a)Defined in containers-0.7 · Data.Map.Internal
  • (Typeable k, Typeable a) => Data (Fixed a)Defined in base-4.20.2.0 · Data.Fixed
  • (Typeable m, Typeable a, Data (m a)) => Data (WrappedMonad m a)Defined in base-4.20.2.0 · Control.Applicative
  • (Data (f a), Data a, Typeable f) => Data (Ap f a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data (f a), Data a, Typeable f) => Data (Alt f a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data (f p), Typeable f, Data p) => Data (Rec1 f p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data a, Data b, Data c) => Data (a, b, c)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data v, Data a, Data c) => Data (CondTree v c a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.CondTree
  • (Data v, Data c, Data a) => Data (CondBranch v c a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.CondTree
  • (Typeable a, Typeable b, Typeable c, Data (a b c)) => Data (WrappedArrow a b c)Defined in base-4.20.2.0 · Control.Applicative
  • (Typeable b, Typeable k, Data a) => Data (Constant a b)Defined in transformers-0.6.1.1 · Data.Functor.Constant
  • (Typeable k, Data a, Typeable b) => Data (Const a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Coercible a b, Data a, Data b) => Data (Coercion a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (a ~ b, Data a) => Data (a :~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data a, Data b, Data c, Data d) => Data (a, b, c, d)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Typeable a, Typeable f, Typeable g, Typeable k, Data (f a), Data (g a)) => Data (Product f g a)Defined in base-4.20.2.0 · Data.Functor.Product
  • (Typeable a, Typeable f, Typeable g, Typeable k, Data (f a), Data (g a)) => Data (Sum f g a)Defined in base-4.20.2.0 · Data.Functor.Sum
  • (Typeable f, Typeable g, Data p, Data (f p), Data (g p)) => Data ((:*:) f g p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Typeable f, Typeable g, Data p, Data (f p), Data (g p)) => Data ((:+:) f g p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Typeable i, Data p, Data c) => Data (K1 i c p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Typeable i, Typeable j, Typeable a, Typeable b, a ~~ b) => Data (a :~~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data a, Data b, Data c, Data d, Data e) => Data (a, b, c, d, e)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data p, Data (f p), Typeable c, Typeable i, Typeable f) => Data (M1 i c f p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Typeable a, Typeable f, Typeable g, Typeable k1, Typeable k2, Data (f (g a))) => Data (Compose f g a)Defined in base-4.20.2.0 · Data.Functor.Compose
  • (Typeable f, Typeable g, Data p, Data (f (g p))) => Data ((:.:) f g p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data a, Data b, Data c, Data d, Data e, Data f) => Data (a, b, c, d, e, f)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • (Data a, Data b, Data c, Data d, Data e, Data f, Data g) => Data (a, b, c, d, e, f, g)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
datadata Map k a
#

A Map from keys k to values a.

The Semigroup operation for Map is union, which prefers values from the left operand. If m1 maps a key k to a value a1, and m2 maps the same key to a different value a2, then their union m1 <> m2 maps k to a1.

Instances25Bifoldable, Eq2, Ord2, Show2, Lift, Functor, …
  • Bifoldable MapDefined in containers-0.7 · Data.Map.Internal
  • Eq2 MapDefined in containers-0.7 · Data.Map.Internal
  • Ord2 MapDefined in containers-0.7 · Data.Map.Internal
  • Show2 MapDefined in containers-0.7 · Data.Map.Internal
  • (Lift k, Lift a) => Lift (Map k a)Defined in containers-0.7 · Data.Map.Internal
  • Functor (Map k)Defined in containers-0.7 · Data.Map.Internal
  • Foldable (Map k)Defined in containers-0.7 · Data.Map.Internal

    Folds in order of increasing key.

  • Traversable (Map k)Defined in containers-0.7 · Data.Map.Internal

    Traverses in order of increasing key.

  • Eq k => Eq1 (Map k)Defined in containers-0.7 · Data.Map.Internal
  • Ord k => Ord1 (Map k)Defined in containers-0.7 · Data.Map.Internal
  • (Ord k, Read k) => Read1 (Map k)Defined in containers-0.7 · Data.Map.Internal
  • Show k => Show1 (Map k)Defined in containers-0.7 · Data.Map.Internal
  • Ord k => IsList (Map k v)Defined in containers-0.7 · Data.Map.Internal
  • (Eq k, Eq a) => Eq (Map k a)Defined in containers-0.7 · Data.Map.Internal
  • (Data k, Data a, Ord k) => Data (Map k a)Defined in containers-0.7 · Data.Map.Internal
  • (Ord k, Ord v) => Ord (Map k v)Defined in containers-0.7 · Data.Map.Internal
  • (Ord k, Read k, Read e) => Read (Map k e)Defined in containers-0.7 · Data.Map.Internal
  • (Show k, Show a) => Show (Map k a)Defined in containers-0.7 · Data.Map.Internal
  • Ord k => Semigroup (Map k v)Defined in containers-0.7 · Data.Map.Internal
  • Ord k => Monoid (Map k v)Defined in containers-0.7 · Data.Map.Internal
  • (NFData k, NFData a) => NFData (Map k a)Defined in containers-0.7 · Data.Map.Internal
  • (Binary k, Binary e) => Binary (Map k e)Defined in binary-0.8.9.3 · Data.Binary.Class
  • (Structured k, Structured v) => Structured (Map k v)Defined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Structured
  • ModSubst a => ModSubst (Map k a)Defined in Cabal-3.12.1.0 · Distribution.Backpack.ModSubst
  • type Item (Map k v) = (k, v)Defined in containers-0.7 · Data.Map.Internal
datadata Set a
#

A set of values a.

Instances19Foldable, Eq1, Ord1, Show1, Lift, IsList, …
  • Foldable SetDefined in containers-0.7 · Data.Set.Internal

    Folds in order of increasing key.

  • Eq1 SetDefined in containers-0.7 · Data.Set.Internal
  • Ord1 SetDefined in containers-0.7 · Data.Set.Internal
  • Show1 SetDefined in containers-0.7 · Data.Set.Internal
  • Lift a => Lift (Set a)Defined in containers-0.7 · Data.Set.Internal
  • Ord a => IsList (Set a)Defined in containers-0.7 · Data.Set.Internal
  • Eq a => Eq (Set a)Defined in containers-0.7 · Data.Set.Internal
  • (Data a, Ord a) => Data (Set a)Defined in containers-0.7 · Data.Set.Internal
  • Ord a => Ord (Set a)Defined in containers-0.7 · Data.Set.Internal
  • (Read a, Ord a) => Read (Set a)Defined in containers-0.7 · Data.Set.Internal
  • Show a => Show (Set a)Defined in containers-0.7 · Data.Set.Internal
  • Ord a => Semigroup (Set a)Defined in containers-0.7 · Data.Set.Internal
  • Ord a => Monoid (Set a)Defined in containers-0.7 · Data.Set.Internal
  • NFData a => NFData (Set a)Defined in containers-0.7 · Data.Set.Internal
  • Binary a => Binary (Set a)Defined in binary-0.8.9.3 · Data.Binary.Class
  • Structured k => Structured (Set k)Defined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Structured
  • ModSubst (Set ModuleName)Defined in Cabal-3.12.1.0 · Distribution.Backpack.ModSubst
  • Newtype (Set a) (Set' sep wrapper a)Defined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.Newtypes
  • type Item (Set a) = aDefined in containers-0.7 · Data.Set.Internal
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

Instances10Floating, …
datadata Maybe a
#

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

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

Constructors

Instances40Monad, Functor, MonadFix, MonadFail, Applicative, Foldable, …
valuepartitionEithers :: [Either a b] -> ([a], [b])
#

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

Examples

Basic usage:

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

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

Example2 expressions
let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]partitionEithers list == (lefts list, rights list)True
datadata Either a b
#

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

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

Examples

The type Either String Int is the type of values which can be either a String or an Int. The Left constructor can be used only on Strings, and the Right constructor can be used only on Ints:

Example6 expressions
let s = Left "foo" :: Either String IntsLeft "foo"let n = Right 3 :: Either String IntnRight 3:type ss :: Either String Int:type nn :: Either String Int

The fmap from our Functor instance will ignore Left values, but will apply the supplied function to values contained in a Right:

Example4 expressions
let s = Left "foo" :: Either String Intlet n = Right 3 :: Either String Intfmap (*2) sLeft "foo"fmap (*2) nRight 6

The Monad instance for Either allows us to chain together multiple actions which may fail, and fail overall if any of the individual steps failed. First we'll write a function that can either parse an Int from a Char, or fail.

Example3 expressions
import Data.Char ( digitToInt, isDigit ):{    let parseEither :: Char -> Either String Int        parseEither c          | isDigit c = Right (digitToInt c)          | otherwise = Left "parse error":}

The following should work, since both '1' and '2' can be parsed as Ints.

Example2 expressions
:{    let parseMultiple :: Either String Int        parseMultiple = do          x <- parseEither '1'          y <- parseEither '2'          return (x + y):}
Example1 expression
parseMultipleRight 3

But the following should fail overall, since the first operation where we attempt to parse 'm' as an Int will fail:

Example2 expressions
:{    let parseMultiple :: Either String Int        parseMultiple = do          x <- parseEither 'm'          y <- parseEither '2'          return (x + y):}
Example1 expression
parseMultipleLeft "parse error"

Constructors

Instances45Bifoldable, Bifoldable1, Bifunctor, Bitraversable, Eq2, Ord2, …
classclass Foldable (t :: Type -> Type) where
#

The Foldable class represents data structures that can be reduced to a summary value one element at a time. Strict left-associative folds are a good fit for space-efficient reduction, while lazy right-associative folds are a good fit for corecursive iteration, or for folds that short-circuit after processing an initial subsequence of the structure's elements.

Instances can be derived automatically by enabling the DeriveFoldable extension. For example, a derived instance for a binary tree might be:

{-# LANGUAGE DeriveFoldable #-}
data Tree a = Empty
            | Leaf a
            | Node (Tree a) a (Tree a)
    deriving Foldable

A more detailed description can be found in the Overview section of Data.Foldable#overview.

For the class laws see the Laws section of Data.Foldable#laws.

Methods

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

    Map each element of the structure into a monoid, and combine the results with (<>). This fold is right-associative and lazy in the accumulator. For strict left-associative folds consider foldMap' instead.

    Examples

    Basic usage:

    Example1 expression
    foldMap Sum [1, 3, 5]Sum {getSum = 9}
    Example1 expression
    foldMap Product [1, 3, 5]Product {getProduct = 15}
    Example1 expression
    foldMap (replicate 3) [1, 2, 3][1,1,1,2,2,2,3,3,3]

    When a Monoid's (<>) is lazy in its second argument, foldMap can return a result even from an unbounded structure. For example, lazy accumulation enables Data.ByteString.Builder to efficiently serialise large data structures and produce the output incrementally:

    Example5 expressions
    import qualified Data.ByteString.Lazy as Limport qualified Data.ByteString.Builder as Blet bld :: Int -> B.Builder; bld i = B.intDec i <> B.word8 0x20let lbs = B.toLazyByteString $ foldMap bld [0..]L.take 64 lbs"0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24"
  • foldr :: (a -> b -> b) -> b -> t a -> b

    Right-associative fold of a structure, lazy in the accumulator.

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

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

    Note that since the head of the resulting expression is produced by an application of the operator to the first element of the list, given an operator lazy in its right argument, foldr can produce a terminating expression from an unbounded list.

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

    foldr f z = foldr f z . toList
    Examples

    Basic usage:

    Example1 expression
    foldr (||) False [False, True, False]True
    Example1 expression
    foldr (||) False []False
    Example1 expression
    foldr (\c acc -> acc ++ [c]) "foo" ['a', 'b', 'c', 'd']"foodcba"
    Infinite structures

    ⚠️ Applying foldr to infinite structures usually doesn't terminate.

    It may still terminate under one of the following conditions:

    • the folding function is short-circuiting

    • the folding function is lazy on its second argument

    Short-circuiting

    (||) short-circuits on True values, so the following terminates because there is a True value finitely far from the left side:

    Example1 expression
    foldr (||) False (True : repeat False)True

    But the following doesn't terminate:

    Example1 expression
    foldr (||) False (repeat False ++ [True])* Hangs forever *
    Laziness in the second argument

    Applying foldr to infinite structures terminates when the operator is lazy in its second argument (the initial accumulator is never used in this case, and so could be left undefined, but [] is more clear):

    Example1 expression
    take 5 $ foldr (\i acc -> i : fmap (+3) acc) [] (repeat 1)[1,4,7,10,13]
  • foldl :: (b -> a -> b) -> b -> t a -> b

    Left-associative fold of a structure, lazy in the accumulator. This is rarely what you want, but can work well for structures with efficient right-to-left sequencing and an operator that is lazy in its left argument.

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

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

    Note that to produce the outermost application of the operator the entire input list must be traversed. Like all left-associative folds, foldl will diverge if given an infinite list.

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

    For a general Foldable structure this should be semantically identical to:

    foldl f z = foldl f z . toList
    Examples

    The first example is a strict fold, which in practice is best performed with foldl'.

    Example1 expression
    foldl (+) 42 [1,2,3,4]52

    Though the result below is lazy, the input is reversed before prepending it to the initial accumulator, so corecursion begins only after traversing the entire input string.

    Example1 expression
    foldl (\acc c -> c : acc) "abcd" "efgh""hgfeabcd"

    A left fold of a structure that is infinite on the right cannot terminate, even when for any finite input the fold just returns the initial accumulator:

    Example1 expression
    foldl (\a _ -> a) 0 $ repeat 1* Hangs forever *

    WARNING: When it comes to lists, you always want to use either foldl' or foldr instead.

  • foldl' :: (b -> a -> b) -> b -> t a -> b

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

    This ensures that each step of the fold is forced to Weak Head Normal Form before being applied, avoiding the collection of thunks that would otherwise occur. This is often what you want to strictly reduce a finite structure to a single strict result (e.g. sum).

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

    foldl' f z = foldl' f z . toList
  • toList :: t a -> [a]

    List of elements of a structure, from left to right. If the entire list is intended to be reduced via a fold, just fold the structure directly bypassing the list.

    Examples

    Basic usage:

    Example1 expression
    toList Nothing[]
    Example1 expression
    toList (Just 42)[42]
    Example1 expression
    toList (Left "foo")[]
    Example1 expression
    toList (Node (Leaf 5) 17 (Node Empty 12 (Leaf 8)))[5,17,12,8]

    For lists, toList is the identity:

    Example1 expression
    toList [1, 2, 3][1,2,3]
  • null :: t a -> Bool

    Test whether the structure is empty. The default implementation is Left-associative and lazy in both the initial element and the accumulator. Thus optimised for structures where the first element can be accessed in constant time. Structures where this is not the case should have a non-default implementation.

    Examples

    Basic usage:

    Example1 expression
    null []True
    Example1 expression
    null [1]False

    null is expected to terminate even for infinite structures. The default implementation terminates provided the structure is bounded on the left (there is a leftmost element).

    Example1 expression
    null [1..]False
  • length :: t a -> Int

    Returns the size/length of a finite structure as an Int. The default implementation just counts elements starting with the leftmost. Instances for structures that can compute the element count faster than via element-by-element counting, should provide a specialised implementation.

    Examples

    Basic usage:

    Example1 expression
    length []0
    Example2 expressions
    length ['a', 'b', 'c']3length [1..]* Hangs forever *
  • elem :: Eq a => a -> t a -> Boolinfix 4

    Does the element occur in the structure?

    Note: elem is often used in infix form.

    Examples

    Basic usage:

    Example1 expression
    3 `elem` []False
    Example1 expression
    3 `elem` [1,2]False
    Example1 expression
    3 `elem` [1,2,3,4,5]True

    For infinite structures, the default implementation of elem terminates if the sought-after value exists at a finite distance from the left side of the structure:

    Example1 expression
    3 `elem` [1..]True
    Example1 expression
    3 `elem` ([4..] ++ [3])* Hangs forever *
  • maximum :: Ord a => t a -> a

    The largest element of a non-empty structure.

    This function is non-total and will raise a runtime exception if the structure happens to be empty. A structure that supports random access and maintains its elements in order should provide a specialised implementation to return the maximum in faster than linear time.

    Examples

    Basic usage:

    Example1 expression
    maximum [1..10]10
    Example1 expression
    maximum []*** Exception: Prelude.maximum: empty list
    Example1 expression
    maximum Nothing*** Exception: maximum: empty structure

    WARNING: This function is partial for possibly-empty structures like lists.

  • minimum :: Ord a => t a -> a

    The least element of a non-empty structure.

    This function is non-total and will raise a runtime exception if the structure happens to be empty. A structure that supports random access and maintains its elements in order should provide a specialised implementation to return the minimum in faster than linear time.

    Examples

    Basic usage:

    Example1 expression
    minimum [1..10]1
    Example1 expression
    minimum []*** Exception: Prelude.minimum: empty list
    Example1 expression
    minimum Nothing*** Exception: minimum: empty structure

    WARNING: This function is partial for possibly-empty structures like lists.

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

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

    Examples

    Basic usage:

    Example1 expression
    sum []0
    Example1 expression
    sum [42]42
    Example1 expression
    sum [1..10]55
    Example1 expression
    sum [4.1, 2.0, 1.7]7.8
    Example1 expression
    sum [1..]* Hangs forever *
  • product :: Num a => t a -> a

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

    Examples

    Basic usage:

    Example1 expression
    product []1
    Example1 expression
    product [42]42
    Example1 expression
    product [1..10]3628800
    Example1 expression
    product [4.1, 2.0, 1.7]13.939999999999998
    Example1 expression
    product [1..]* Hangs forever *
Instances85Foldable, …
  • Foldable WithSourceDefined in Cabal-3.12.1.0 · Distribution.Backpack.ModuleScope
  • Foldable FlagDefined in Cabal-3.12.1.0 · Distribution.Simple.Flag
  • Foldable GraphDefined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Graph
  • Foldable NonEmptySetDefined in Cabal-syntax-3.12.1.0 · Distribution.Compat.NonEmptySet
  • Foldable PerCompilerFlavorDefined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Foldable FieldDefined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Field
  • Foldable FieldLineDefined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Field
  • Foldable NameDefined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Field
  • Foldable SectionArgDefined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Field
  • Foldable PrettyFieldDefined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Pretty
  • Foldable ConditionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Condition
  • Foldable VersionRangeFDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionRange.Internal
  • Foldable ComplexDefined in base-4.20.2.0 · Data.Complex
  • Foldable FirstDefined in base-4.20.2.0 · Data.Semigroup
  • Foldable LastDefined in base-4.20.2.0 · Data.Semigroup
  • Foldable MaxDefined in base-4.20.2.0 · Data.Semigroup
  • Foldable MinDefined in base-4.20.2.0 · Data.Semigroup
  • Foldable ComponentDepsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.ComponentDeps
  • Foldable SCCDefined in containers-0.7 · Data.Graph
  • Foldable IntMapDefined in containers-0.7 · Data.IntMap.Internal

    Folds in order of increasing key.

  • Foldable DigitDefined in containers-0.7 · Data.Sequence.Internal
  • Foldable ElemDefined in containers-0.7 · Data.Sequence.Internal
  • Foldable FingerTreeDefined in containers-0.7 · Data.Sequence.Internal
  • Foldable NodeDefined in containers-0.7 · Data.Sequence.Internal
  • Foldable SeqDefined in containers-0.7 · Data.Sequence.Internal
  • Foldable ViewLDefined in containers-0.7 · Data.Sequence.Internal
  • Foldable ViewRDefined in containers-0.7 · Data.Sequence.Internal
  • Foldable SetDefined in containers-0.7 · Data.Set.Internal

    Folds in order of increasing key.

  • Foldable TreeDefined in containers-0.7 · Data.Tree

    Folds in preorder

  • Foldable MaybeSDefined in containers-0.7 · Utils.Containers.Internal.StrictMaybe
  • Foldable NonEmptyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable IdentityDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Identity
  • Foldable FirstDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable LastDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable DownDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable DualDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable ProductDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable SumDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable ZipListDefined in ghc-internal-9.1003.0 · GHC.Internal.Functor.ZipList
  • Foldable Par1Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable MaybeDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable SoloDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable TyVarBndrDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Foldable []Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable U1Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable UAddrDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable UCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable UDoubleDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable UFloatDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable UIntDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable UWordDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable V1Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable (Arg a)Defined in base-4.20.2.0 · Data.Semigroup
  • Foldable (PSQ k)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.PSQ
  • Foldable (Map k)Defined in containers-0.7 · Data.Map.Internal

    Folds in order of increasing key.

  • Foldable (Array i)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable (Either a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable (Tuple2 a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable f => Foldable (Lift f)Defined in transformers-0.6.1.1 · Control.Applicative.Lift
  • Foldable f => Foldable (MaybeT f)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Maybe
  • Foldable m => Foldable (CatchT m)Defined in exceptions-0.10.9 · Control.Monad.Catch.Pure
  • Foldable (CondBranch v c)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.CondTree
  • Foldable (CondTree v c)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.CondTree
  • Foldable (TreeF d c)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Tree
  • Foldable (WeightedPSQ w k)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.WeightedPSQ
  • Foldable (Const m)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Const
  • Foldable (Constant a)Defined in transformers-0.6.1.1 · Data.Functor.Constant
  • Foldable f => Foldable (Ap f)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable f => Foldable (Alt f)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable f => Foldable (Rec1 f)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable f => Foldable (Backwards f)Defined in transformers-0.6.1.1 · Control.Applicative.Backwards

    Derived instance.

  • Foldable f => Foldable (ExceptT e f)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Except
  • Foldable f => Foldable (IdentityT f)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Identity
  • Foldable f => Foldable (WriterT w f)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Writer.Lazy
  • Foldable f => Foldable (WriterT w f)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Writer.Strict
  • Foldable f => Foldable (Reverse f)Defined in transformers-0.6.1.1 · Data.Functor.Reverse

    Fold from right to left.

  • Foldable (K1 i c)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • (Foldable f, Foldable g) => Foldable (Product f g)Defined in base-4.20.2.0 · Data.Functor.Product
  • (Foldable f, Foldable g) => Foldable (Sum f g)Defined in base-4.20.2.0 · Data.Functor.Sum
  • (Foldable f, Foldable g) => Foldable (f :*: g)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • (Foldable f, Foldable g) => Foldable (f :+: g)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Foldable f => Foldable (M1 i c f)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • (Foldable f, Foldable g) => Foldable (Compose f g)Defined in base-4.20.2.0 · Data.Functor.Compose
  • (Foldable f, Foldable g) => Foldable (f :.: g)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
classclass Applicative f => Alternative (f :: Type -> Type) where
#

A monoid on applicative functors.

If defined, some and many should be the least solutions of the equations:

Examples
Example1 expression
Nothing <|> Just 42Just 42
Example1 expression
[1, 2] <|> [3, 4][1,2,3,4]
Example1 expression
empty <|> print (2^15)32768

Methods

  • empty :: f a

    The identity of <|>

    empty <|> a     == a
    a     <|> empty == a
  • (<|>) :: f a -> f a -> f ainfixl 3

    An associative binary operation

  • some :: f a -> f [a]

    One or more.

    Examples
    Example1 expression
    some (putStr "la")lalalalalalalalala... * goes on forever *
    Example1 expression
    some Nothingnothing
    Example1 expression
    take 5 <$> some (Just 1)* hangs forever *

    Note that this function can be used with Parsers based on Applicatives. In that case some parser will attempt to parse parser one or more times until it fails.

  • many :: f a -> f [a]

    Zero or more.

    Examples
    Example1 expression
    many (putStr "la")lalalalalalalalala... * goes on forever *
    Example1 expression
    many NothingJust []
    Example1 expression
    take 5 <$> many (Just 1)* hangs forever *

    Note that this function can be used with Parsers based on Applicatives. In that case many parser will attempt to parse parser zero or more times until it fails.

Instances49Alternative, …
valuelookup :: Eq a => a -> [(a, b)] -> Maybe b
#

\mathcal{O}(n). lookup key assocs looks up a key in an association list. For the result to be Nothing, the list must be finite.

Examples
Example1 expression
lookup 2 []Nothing
Example1 expression
lookup 2 [(1, "first")]Nothing
Example1 expression
lookup 2 [(1, "first"), (2, "second"), (3, "third")]Just "second"
valuefilter :: (a -> Bool) -> [a] -> [a]
#

\mathcal{O}(n). filter, applied to a predicate and a list, returns the list of those elements that satisfy the predicate; i.e.,

filter p xs = [ x | x <- xs, p x]
Examples
Example1 expression
filter odd [1, 2, 3][1,3]
Example1 expression
filter (\l -> length l > 3) ["Hello", ", ", "World", "!"]["Hello","World"]
Example1 expression
filter (/= 3) [1, 2, 3, 4, 3, 2, 1][1,2,4,2,1]
valueintercalate :: [a] -> [[a]] -> [a]
#

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

Laziness

intercalate has the following properties:

Example1 expression
take 5 (intercalate undefined ("Lorem" : undefined))"Lorem"
Example1 expression
take 6 (intercalate ", " ("Lorem" : undefined))"Lorem*** Exception: Prelude.undefined
Examples
Example1 expression
intercalate ", " ["Lorem", "ipsum", "dolor"]"Lorem, ipsum, dolor"
Example1 expression
intercalate [0, 1] [[2, 3], [4, 5, 6], []][2,3,0,1,4,5,6,0,1]
Example1 expression
intercalate [1, 2, 3] [[], []][1,2,3]
valuesortBy :: (a -> a -> Ordering) -> [a] -> [a]
#

The sortBy function is the non-overloaded version of sort. The argument must be finite.

The supplied comparison relation is supposed to be reflexive and antisymmetric, otherwise, e. g., for _ _ -> GT, the ordered list simply does not exist. The relation is also expected to be transitive: if it is not then sortBy might fail to find an ordered permutation, even if it exists.

Examples
Example1 expression
sortBy (\(a,_) (b,_) -> compare a b) [(2, "world"), (4, "!"), (1, "Hello")][(1,"Hello"),(2,"world"),(4,"!")]
valueon :: (b -> b -> c) -> (a -> b) -> a -> a -> c
#

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

(op `on` f) x y = f x `op` f y
Examples
Example1 expression
sortBy (compare `on` length) [[0, 1, 2], [0, 1], [], [0]][[],[0],[0,1],[0,1,2]]
Example1 expression
((+) `on` length) [1, 2, 3] [-1]4
Example1 expression
((,) `on` (*2)) 2 3(4,6)
Algebraic properties
  • (*) `on` id = (*) -- (if (*) ∉ {⊥, const ⊥})
  • ((*) `on` f) `on` g = (*) `on` (f . g)
  • flip on f . flip on g = flip on (g . f)
valuecycle :: HasCallStack => [a] -> [a]
#

cycle ties a finite list into a circular one, or equivalently, the infinite repetition of the original list. It is the identity on infinite lists.

Examples
Example1 expression
cycle []*** Exception: Prelude.cycle: empty list
Example1 expression
take 10 (cycle [42])[42,42,42,42,42,42,42,42,42,42]
Example1 expression
take 10 (cycle [2, 5, 7])[2,5,7,2,5,7,2,5,7,2]
Example1 expression
take 1 (cycle (42 : undefined))[42]
newtypenewtype NonEmptySet a
#
Instances10Foldable, Eq, Data, Ord, Read, Show, …
classclass Binary t where
#

The Binary class provides put and get, methods to encode and decode a Haskell value to a lazy ByteString. It mirrors the Read and Show classes for textual representation of Haskell types, and is suitable for serialising Haskell values to disk, over the network.

For decoding and generating simple external binary formats (e.g. C structures), Binary may be used, but in general is not suitable for complex protocols. Instead use the Put and Get primitives directly.

Instances of Binary should satisfy the following property:

decode . encode == id

That is, the get and put methods should be the inverse of each other. A range of instances are provided for basic Haskell types.

Methods

  • put :: t -> Put

    Encode a value in the Put monad.

  • get :: Get t

    Decode a value in the Get monad

  • putList :: [t] -> Put

    Encode a list of values in the Put monad. The default implementation may be overridden to be more efficient but must still have the same encoding format.

Instances243Binary, …
classclass (Typeable e, Show e) => Exception e where
#

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

data MyException = ThisException | ThatException
    deriving Show

instance Exception MyException

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

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

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

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

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

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

instance Exception SomeCompilerException

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

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

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

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

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

instance Exception SomeFrontendException where
    toException = compilerExceptionToException
    fromException = compilerExceptionFromException

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

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

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

data MismatchedParentheses = MismatchedParentheses
    deriving Show

instance Exception MismatchedParentheses where
    toException   = frontendExceptionToException
    fromException = frontendExceptionFromException

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

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

Methods

Instances39Exception, …
classclass Applicative m => Monad (m :: Type -> Type) where
#

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

Instances of Monad should satisfy the following:

Left identity

return a >>= k = k a

Right identity

m >>= return = m

Associativity

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

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

The above laws imply:

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

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

Methods

  • (>>=) :: m a -> (a -> m b) -> m binfixl 1

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

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

    do a <- as
       bs a
    

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

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

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

  • (>>) :: m a -> m b -> m binfixl 1

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

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

    do as
       bs
    

    or in terms of (>>=) as

    as >>= const bs
  • return :: a -> m a

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

Instances92Monad, …
  • Monad InstMDefined in Cabal-3.12.1.0 · Distribution.Backpack.ReadyComponent
  • Monad MatchDefined in Cabal-3.12.1.0 · Distribution.Simple.BuildTarget
  • Monad LogProgressDefined in Cabal-3.12.1.0 · Distribution.Utils.LogProgress
  • Monad WriterDefined in Cabal-3.12.1.0 · Distribution.ZinzaPrelude
  • Monad LexDefined in Cabal-syntax-3.12.1.0 · Distribution.Fields.LexerMonad
  • Monad ParseResultDefined in Cabal-syntax-3.12.1.0 · Distribution.Fields.ParseResult
  • Monad ParsecParserDefined in Cabal-syntax-3.12.1.0 · Distribution.Parsec
  • Monad ConditionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Condition
  • Monad ComplexDefined in base-4.20.2.0 · Data.Complex
  • Monad FirstDefined in base-4.20.2.0 · Data.Semigroup
  • Monad LastDefined in base-4.20.2.0 · Data.Semigroup
  • Monad MaxDefined in base-4.20.2.0 · Data.Semigroup
  • Monad MinDefined in base-4.20.2.0 · Data.Semigroup
  • Monad GetDefined in binary-0.8.9.3 · Data.Binary.Get.Internal
  • Monad PutMDefined in binary-0.8.9.3 · Data.Binary.Put
  • Monad PutDefined in bytestring-0.12.2.0 · Data.ByteString.Builder.Internal
  • Monad UpdateStateDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Linking
  • Monad ValidateDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Validate
  • Monad SeqDefined in containers-0.7 · Data.Sequence.Internal
  • Monad TreeDefined in containers-0.7 · Data.Tree
  • Monad NonEmptyDefined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Monad STMDefined in ghc-internal-9.1003.0 · GHC.Internal.Conc.Sync
  • Monad IdentityDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Identity
  • Monad FirstDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Monoid
  • Monad LastDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Monoid
  • Monad DownDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Ord
  • Monad DualDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Monad ProductDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Monad SumDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Monad NoIODefined in ghc-internal-9.1003.0 · GHC.Internal.GHCi
  • Monad Par1Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Monad MaybeDefined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Monad PDefined in ghc-internal-9.1003.0 · GHC.Internal.Text.ParserCombinators.ReadP
  • Monad ReadPDefined in ghc-internal-9.1003.0 · GHC.Internal.Text.ParserCombinators.ReadP
  • Monad ReadPrecDefined in ghc-internal-9.1003.0 · GHC.Internal.Text.ParserCombinators.ReadPrec
  • Monad SoloDefined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Monad IODefined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Monad STMDefined in stm-2.5.3.1 · Control.Sequential.STM
  • Monad PprMDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.PprLib
  • Monad QDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Monad []Defined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Monad ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Monad U1Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Monad (UnifyM s)Defined in Cabal-3.12.1.0 · Distribution.Backpack.UnifyM
  • Monad (SetM s)Defined in containers-0.7 · Data.Graph
  • Monad (State s)Defined in containers-0.7 · Utils.Containers.Internal.State
  • Monad (ST s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Control.Monad.ST.Lazy.Imp
  • Monad (Either e)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Either
  • Monad (ST s)Defined in ghc-internal-9.1003.0 · GHC.Internal.ST
  • Monad (IParser t)Defined in text-2.1.3 · Data.Text.Internal.Read
  • Monad m => Monad (CheckM m)Defined in Cabal-3.12.1.0 · Distribution.PackageDescription.Check.Monad
  • Monad m => Monad (WrappedMonad m)Defined in base-4.20.2.0 · Control.Applicative
  • Monad m => Monad (CatchT m)Defined in exceptions-0.10.9 · Control.Monad.Catch.Pure
  • Monad m => Monad (QuoteToQuasi m)Defined in th-compat-0.1.6 · Language.Haskell.TH.Syntax.Compat
  • Monad m => Monad (MaybeT m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Maybe
  • Monoid a => Monad (Tuple2 a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • ArrowApply a => Monad (ArrowMonad a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Control.Arrow
  • Monad (Progress step fail)Defined in Cabal-3.12.1.0 · Distribution.Utils.Progress
  • Monad (Progress step fail)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Progress
  • Monad (t m) => Monad (LiftingAccum t m)Defined in mtl-2.3.1 · Control.Monad.Accum
  • Monad (t m) => Monad (LiftingSelect t m)Defined in mtl-2.3.1 · Control.Monad.Select
  • Monad f => Monad (Ap f)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Monoid
  • Monad f => Monad (Alt f)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Monad f => Monad (Rec1 f)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Monad m => Monad (Kleisli m a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Control.Arrow
  • Monad m => Monad (StateT s m)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Utils
  • Monad m => Monad (ExceptT e m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Except
  • Monad m => Monad (IdentityT m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Identity
  • Monad m => Monad (ReaderT r m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Reader
  • Monad m => Monad (SelectT r m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Select
  • Monad m => Monad (StateT s m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.State.Lazy
  • Monad m => Monad (StateT s m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.State.Strict
  • Monad m => Monad (WriterT w m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Writer.CPS
  • Monad m => Monad (Reverse m)Defined in transformers-0.6.1.1 · Data.Functor.Reverse

    Derived instance.

  • (Applicative f, Monad f) => Monad (WhenMissing f x)Defined in containers-0.7 · Data.IntMap.Internal

    Equivalent to ReaderT k (ReaderT x (MaybeT f)).

  • (Monoid a, Monoid b) => Monad (Tuple3 a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • (Monoid w, Functor m, Monad m) => Monad (AccumT w m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Accum
  • (Monoid w, Monad m) => Monad (WriterT w m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Writer.Lazy
  • (Monoid w, Monad m) => Monad (WriterT w m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Writer.Strict
  • Monad (ParsecT s u m)Defined in parsec-3.1.18.0 · Text.Parsec.Prim
  • Monad (ContT r m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Cont
  • Monad ((->) r)Defined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • (Applicative f, Monad f) => Monad (WhenMissing f k x)Defined in containers-0.7 · Data.Map.Internal

    Equivalent to ReaderT k (ReaderT x (MaybeT f)) .

  • (Monad f, Applicative f) => Monad (WhenMatched f x y)Defined in containers-0.7 · Data.IntMap.Internal

    Equivalent to ReaderT Key (ReaderT x (ReaderT y (MaybeT f)))

  • (Monad f, Monad g) => Monad (Product f g)Defined in base-4.20.2.0 · Data.Functor.Product
  • (Monad f, Monad g) => Monad (f :*: g)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Monoid a, Monoid b, Monoid c) => Monad (Tuple4 a b c)Defined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Monad f => Monad (M1 i c f)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Monad m => Monad (RWST r w s m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.RWS.CPS
  • (Monad f, Applicative f) => Monad (WhenMatched f k x y)Defined in containers-0.7 · Data.Map.Internal

    Equivalent to ReaderT k (ReaderT x (ReaderT y (MaybeT f)))

  • (Monoid w, Monad m) => Monad (RWST r w s m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.RWS.Lazy
  • (Monoid w, Monad m) => Monad (RWST r w s m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.RWS.Strict
classclass (Functor t, Foldable t) => Traversable (t :: Type -> Type) where
#

Functors representing data structures that can be transformed to structures of the same shape by performing an Applicative (or, therefore, Monad) action on each element from left to right.

A more detailed description of what same shape means, the various methods, how traversals are constructed, and example advanced use-cases can be found in the Overview section of Data.Traversable#overview.

For the class laws see the Laws section of Data.Traversable#laws.

Methods

  • traverse :: Applicative f => (a -> f b) -> t a -> f (t b)

    Map each element of a structure to an action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see traverse_.

    Examples

    Basic usage:

    In the first two examples we show each evaluated action mapping to the output structure.

    Example1 expression
    traverse Just [1,2,3,4]Just [1,2,3,4]
    Example1 expression
    traverse id [Right 1, Right 2, Right 3, Right 4]Right [1,2,3,4]

    In the next examples, we show that Nothing and Left values short circuit the created structure.

    Example1 expression
    traverse (const Nothing) [1,2,3,4]Nothing
    Example1 expression
    traverse (\x -> if odd x then Just x else Nothing)  [1,2,3,4]Nothing
    Example1 expression
    traverse id [Right 1, Right 2, Right 3, Right 4, Left 0]Left 0
  • sequenceA :: Applicative f => t (f a) -> f (t a)

    Evaluate each action in the structure from left to right, and collect the results. For a version that ignores the results see sequenceA_.

    Examples

    Basic usage:

    For the first two examples we show sequenceA fully evaluating a a structure and collecting the results.

    Example1 expression
    sequenceA [Just 1, Just 2, Just 3]Just [1,2,3]
    Example1 expression
    sequenceA [Right 1, Right 2, Right 3]Right [1,2,3]

    The next two example show Nothing and Just will short circuit the resulting structure if present in the input. For more context, check the Traversable instances for Either and Maybe.

    Example1 expression
    sequenceA [Just 1, Just 2, Just 3, Nothing]Nothing
    Example1 expression
    sequenceA [Right 1, Right 2, Right 3, Left 4]Left 4
Instances81Traversable, …
valuecatMaybes :: [Maybe a] -> [a]
#

The catMaybes function takes a list of Maybes and returns a list of all the Just values.

Examples

Basic usage:

Example1 expression
catMaybes [Just 1, Nothing, Just 3][1,3]

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

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

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

Examples

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

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

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

Example1 expression
mapMaybe Just [1,2,3][1,2,3]
valueisJust :: Maybe a -> Bool
#

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

Examples

Basic usage:

Example1 expression
isJust (Just 3)True
Example1 expression
isJust (Just ())True
Example1 expression
isJust NothingFalse

Only the outer constructor is taken into consideration:

Example1 expression
isJust (Just Nothing)True
valuecomparing :: Ord a => (b -> a) -> b -> b -> Ordering
#
comparing p x y = compare (p x) (p y)

Useful combinator for use in conjunction with the xxxBy family of functions from Data.List, for example:

  ... sortBy (comparing fst) ...
classclass Eq a => Ord a where
#

The Ord class is used for totally ordered datatypes.

Instances of Ord can be derived for any user-defined datatype whose constituent types are in Ord. The declared order of the constructors in the data declaration determines the ordering in derived Ord instances. The Ordering datatype allows a single comparison to determine the precise ordering of two objects.

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

Comparability

x <= y || y <= x

=

True

Transitivity

if

x <= y && y <= z

=

True

, then

x <= z

=

True

Reflexivity

x <= x

=

True

Antisymmetry

if

x <= y && y <= x

=

True

, then

x == y

=

True

The following operator interactions are expected to hold:

  1. x >= y = y <= x

  2. x < y = x <= y && x /= y

  3. x > y = y < x

  4. x < y = compare x y == LT

  5. x > y = compare x y == GT

  6. x == y = compare x y == EQ

  7. min x y == if x <= y then x else y = True

  8. max x y == if x >= y then x else y = True

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

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

Methods

Instances441Ord, …
  • Ord ModTimeDefined in Cabal-3.12.1.0 · Distribution.Compat.Time
  • Ord CETypeDefined in Cabal-3.12.1.0 · Distribution.PackageDescription.Check.Warning
  • Ord CheckExplanationDefined in Cabal-3.12.1.0 · Distribution.PackageDescription.Check.Warning
  • Ord CheckExplanationIDDefined in Cabal-3.12.1.0 · Distribution.PackageDescription.Check.Warning
  • Ord PackageCheckDefined in Cabal-3.12.1.0 · Distribution.PackageDescription.Check.Warning
  • Ord WarnLangDefined in Cabal-3.12.1.0 · Distribution.PackageDescription.Check.Warning
  • Ord AutogenFileDefined in Cabal-3.12.1.0 · Distribution.Simple.Build
  • Ord ComponentKindDefined in Cabal-3.12.1.0 · Distribution.Simple.BuildTarget
  • Ord UserBuildTargetDefined in Cabal-3.12.1.0 · Distribution.Simple.BuildTarget
  • Ord PackageDBDefined in Cabal-3.12.1.0 · Distribution.Simple.Compiler
  • Ord BuildWayDefined in Cabal-3.12.1.0 · Distribution.Simple.GHC.Build.Modules
  • Ord GhcEnvironmentFileEntryDefined in Cabal-3.12.1.0 · Distribution.Simple.GHC.Internal
  • Ord DirectoryDefined in Cabal-3.12.1.0 · Distribution.Simple.Haddock
  • Ord PathTemplateDefined in Cabal-3.12.1.0 · Distribution.Simple.InstallDirs
  • Ord PathComponentDefined in Cabal-3.12.1.0 · Distribution.Simple.InstallDirs.Internal
  • Ord PathTemplateVariableDefined in Cabal-3.12.1.0 · Distribution.Simple.InstallDirs.Internal
  • Ord SuffixDefined in Cabal-3.12.1.0 · Distribution.Simple.PreProcess.Types
  • Ord TestShowDetailsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Test
  • Ord DumpBuildInfoDefined in Cabal-3.12.1.0 · Distribution.Types.DumpBuildInfo
  • Ord VerbosityDefined in Cabal-3.12.1.0 · Distribution.Verbosity
  • Ord VerbosityFlagDefined in Cabal-3.12.1.0 · Distribution.Verbosity.Internal
  • Ord VerbosityLevelDefined in Cabal-3.12.1.0 · Distribution.Verbosity.Internal
  • Ord OpenModuleDefined in Cabal-syntax-3.12.1.0 · Distribution.Backpack
  • Ord OpenUnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Backpack
  • Ord CabalSpecVersionDefined in Cabal-syntax-3.12.1.0 · Distribution.CabalSpecVersion
  • Ord CompilerFlavorDefined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Ord CompilerIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Ord LexWarningTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Fields.LexerMonad
  • Ord LicenseDefined in Cabal-syntax-3.12.1.0 · Distribution.License
  • Ord ModuleNameDefined in Cabal-syntax-3.12.1.0 · Distribution.ModuleName
  • Ord PositionDefined in Cabal-syntax-3.12.1.0 · Distribution.Parsec.Position
  • Ord PWarnTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Parsec.Warning
  • Ord PWarningDefined in Cabal-syntax-3.12.1.0 · Distribution.Parsec.Warning
  • Ord LicenseDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.License
  • Ord LicenseExceptionIdDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExceptionId
  • Ord LicenseExpressionDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExpression
  • Ord SimpleLicenseExpressionDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExpression
  • Ord LicenseIdDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseId
  • Ord LicenseListVersionDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseListVersion
  • Ord LicenseRefDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseReference
  • Ord ArchDefined in Cabal-syntax-3.12.1.0 · Distribution.System
  • Ord OSDefined in Cabal-syntax-3.12.1.0 · Distribution.System
  • Ord PlatformDefined in Cabal-syntax-3.12.1.0 · Distribution.System
  • Ord BenchmarkDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Benchmark
  • Ord BenchmarkInterfaceDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BenchmarkInterface
  • Ord BenchmarkTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BenchmarkType
  • Ord BuildInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BuildInfo
  • Ord BuildTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BuildType
  • Ord ComponentIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentId
  • Ord ComponentNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentName
  • Ord NotLibComponentNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentName
  • Ord DependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Dependency
  • Ord ExeDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ExeDependency
  • Ord ExecutableDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Executable
  • Ord ExecutableScopeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ExecutableScope
  • Ord FlagAssignmentDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Flag
  • Ord FlagNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Flag
  • Ord ForeignLibDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLib
  • Ord LibVersionInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLib
  • Ord ForeignLibOptionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLibOption
  • Ord ForeignLibTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLibType
  • Ord IncludeRenamingDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.IncludeRenaming
  • Ord LegacyExeDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LegacyExeDependency
  • Ord LibraryDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Library
  • Ord LibraryNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LibraryName
  • Ord LibraryVisibilityDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LibraryVisibility
  • Ord MixinDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Mixin
  • Ord ModuleDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Module
  • Ord ModuleReexportDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ModuleReexport
  • Ord ModuleRenamingDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ModuleRenaming
  • Ord MungedPackageIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.MungedPackageId
  • Ord MungedPackageNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.MungedPackageName
  • Ord PackageDescriptionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageDescription
  • Ord PackageIdentifierDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageId
  • Ord PackageNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageName
  • Ord PkgconfigDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigDependency
  • Ord PkgconfigNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigName
  • Ord PkgconfigVersionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigVersion
  • Ord PkgconfigVersionRangeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigVersionRange
  • Ord SetupBuildInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SetupBuildInfo
  • Ord KnownRepoTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Ord RepoKindDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Ord RepoTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Ord SourceRepoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Ord TestSuiteDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.TestSuite
  • Ord TestSuiteInterfaceDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.TestSuiteInterface
  • Ord TestTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.TestType
  • Ord DefUnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnitId
  • Ord UnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnitId
  • Ord UnqualComponentNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnqualComponentName
  • Ord VersionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Version
  • Ord LowerBoundDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionInterval.Legacy

    lb1 <= lb2 holds iff interval lb1.. is contained in interval lb2...

  • Ord UpperBoundDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionInterval.Legacy

    ub1 <= ub2 holds iff interval 0..ub1 is contained in interval 0..ub2.

  • Ord VersionRangeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionRange.Internal
  • Ord ShortTextDefined in Cabal-syntax-3.12.1.0 · Distribution.Utils.ShortText
  • Ord StructureDefined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Structured
  • Ord ExtensionDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.Extension
  • Ord KnownExtensionDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.Extension
  • Ord LanguageDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.Extension
  • Ord ByteArrayDefined in base-4.20.2.0 · Data.Array.Byte

    Non-lexicographic ordering. This compares the lengths of the byte arrays first and uses a lexicographic ordering if the lengths are equal. Subject to change between major versions.

  • Ord ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.Type
  • Ord ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Lazy.Internal
  • Ord ShortByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Short.Internal

    Lexicographic order.

  • Ord ConflictDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.ConflictSet
  • Ord OrderedVersionRangeDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.ConflictSet
  • Ord ExposedComponentDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Dependency
  • Ord WeakOrTrivialDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Flag
  • Ord IDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Package
  • Ord LocDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Package
  • Ord ComponentDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.ComponentDeps
  • Ord OptionalStanzaDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.OptionalStanza
  • Ord OptionalStanzaSetDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.OptionalStanza
  • Ord NamespaceDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackagePath
  • Ord PackagePathDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackagePath
  • Ord QualifierDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackagePath
  • Ord ProjectConfigPathDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.ProjectConfigPath
  • Ord SolverIdDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.SolverId
  • Ord IntSetDefined in containers-0.7 · Data.IntSet.Internal
  • Ord FileTypeDefined in directory-1.3.8.5 · System.Directory.Internal.Common
  • Ord PermissionsDefined in directory-1.3.8.5 · System.Directory.Internal.Common
  • Ord XdgDirectoryDefined in directory-1.3.8.5 · System.Directory.Internal.Common
  • Ord XdgDirectoryListDefined in directory-1.3.8.5 · System.Directory.Internal.Common
  • Ord BigNatDefined in ghc-bignum-1.3 · GHC.Num.BigNat
  • Ord IntegerDefined in ghc-bignum-1.3 · GHC.Num.Integer
  • Ord NaturalDefined in ghc-bignum-1.3 · GHC.Num.Natural
  • Ord ExtensionDefined in ghc-boot-th-9.10.3 · GHC.LanguageExtensions.Type
  • Ord VoidDefined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Ord ByteOrderDefined in ghc-internal-9.1003.0 · GHC.Internal.ByteOrder
  • Ord ClosureTypeDefined in ghc-internal-9.1003.0 · GHC.Internal.ClosureTypes
  • Ord BlockReasonDefined in ghc-internal-9.1003.0 · GHC.Internal.Conc.Sync
  • Ord ThreadIdDefined in ghc-internal-9.1003.0 · GHC.Internal.Conc.Sync
  • Ord ThreadStatusDefined in ghc-internal-9.1003.0 · GHC.Internal.Conc.Sync
  • Ord AllDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Ord AnyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Ord SomeTypeRepDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Typeable.Internal
  • Ord UniqueDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Unique
  • Ord VersionDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Version
  • Ord TimeoutKeyDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.TimeOut
  • Ord UniqueDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.Unique
  • Ord ErrorCallDefined in ghc-internal-9.1003.0 · GHC.Internal.Exception
  • Ord ArithExceptionDefined in ghc-internal-9.1003.0 · GHC.Internal.Exception.Type
  • Ord FingerprintDefined in ghc-internal-9.1003.0 · GHC.Internal.Fingerprint.Type
  • Ord CBoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CClockDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CDoubleDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CFloatDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CIntDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CIntMaxDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CIntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CLLongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CLongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CPtrdiffDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CSCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CSUSecondsDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CShortDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CSigAtomicDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CSizeDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CTimeDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CUCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CUIntDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CUIntMaxDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CUIntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CULLongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CULongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CUSecondsDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CUShortDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord CWcharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Ord IntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Ptr
  • Ord WordPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Ptr
  • Ord AssociativityDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Ord DecidedStrictnessDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Ord FixityDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Ord SourceStrictnessDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Ord SourceUnpackednessDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Ord SeekModeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Device
  • Ord ArrayExceptionDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Exception
  • Ord AsyncExceptionDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Exception
  • Ord ExitCodeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Exception
  • Ord BufferModeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Handle.Types
  • Ord NewlineDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Handle.Types
  • Ord NewlineModeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Handle.Types
  • Ord IOModeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.IOMode
  • Ord Int16Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Ord Int32Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Ord Int64Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Ord Int8Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Ord CBlkCntDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Ord CBlkSizeDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Ord CCcDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Ord CClockIdDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Ord CDevDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Ord CFsBlkCntDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Ord CFsFilCntDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Ord CGidDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Ord CIdDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Ord CInoDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Ord CKeyDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Ord CModeDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Ord CNfdsDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Ord CNlinkDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Ord COffDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Ord CPidDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Ord CRLimDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Ord CSocklenDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Ord CSpeedDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Ord CSsizeDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Ord CTcflagDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Ord CTimerDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Ord CUidDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Ord FdDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Ord SomeCharDefined in ghc-internal-9.1003.0 · GHC.Internal.TypeLits
  • Ord SomeSymbolDefined in ghc-internal-9.1003.0 · GHC.Internal.TypeLits
  • Ord SomeNatDefined in ghc-internal-9.1003.0 · GHC.Internal.TypeNats
  • Ord GeneralCategoryDefined in ghc-internal-9.1003.0 · GHC.Internal.Unicode
  • Ord Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Ord Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Ord Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Ord Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Ord BoolDefined in ghc-prim-0.12.0 · GHC.Classes
  • Ord CharDefined in ghc-prim-0.12.0 · GHC.Classes
  • Ord DoubleDefined in ghc-prim-0.12.0 · GHC.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.

  • Ord FloatDefined in ghc-prim-0.12.0 · GHC.Classes

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

  • Ord IntDefined in ghc-prim-0.12.0 · GHC.Classes
  • Ord OrderingDefined in ghc-prim-0.12.0 · GHC.Classes
  • Ord TyConDefined in ghc-prim-0.12.0 · GHC.Classes
  • Ord WordDefined in ghc-prim-0.12.0 · GHC.Classes
  • Ord URIDefined in network-uri-2.6.4.2 · Network.URI
  • Ord URIAuthDefined in network-uri-2.6.4.2 · Network.URI
  • Ord OsCharDefined in os-string-2.0.7 · System.OsString.Internal.Types

    Byte ordering of the internal representation.

  • Ord OsStringDefined in os-string-2.0.7 · System.OsString.Internal.Types

    Byte ordering of the internal representation.

  • Ord PosixCharDefined in os-string-2.0.7 · System.OsString.Internal.Types
  • Ord PosixStringDefined in os-string-2.0.7 · System.OsString.Internal.Types
  • Ord WindowsCharDefined in os-string-2.0.7 · System.OsString.Internal.Types
  • Ord WindowsStringDefined in os-string-2.0.7 · System.OsString.Internal.Types
  • Ord MessageDefined in parsec-3.1.18.0 · Text.Parsec.Error
  • Ord SourcePosDefined in parsec-3.1.18.0 · Text.Parsec.Pos
  • Ord PrettyLevelDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJClass
  • Ord PrettyLevelDefined in pretty-1.1.3.6 · Text.PrettyPrint.HughesPJClass
  • Ord CommunicationHandleDefined in process-1.6.26.1 · System.Process.CommunicationHandle.Internal
  • Ord CardinalityDefined in random-1.2.1.3 · System.Random.GFinite
  • Ord AnnLookupDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord AnnTargetDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord BangDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord BndrVisDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord BodyDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord BytesDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord CallconvDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord ClauseDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord ConDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord DecDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord DecidedStrictnessDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord DerivClauseDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord DerivStrategyDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord DocLocDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord ExpDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord FamilyResultSigDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord FixityDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord FixityDirectionDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord ForeignDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord FunDepDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord GuardDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord InfoDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord InjectivityAnnDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord InlineDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord LitDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord LocDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord MatchDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord ModNameDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord ModuleDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord ModuleInfoDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord NameDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord NameFlavourDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord NameSpaceDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord NamespaceSpecifierDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord OccNameDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord OverlapDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord PatDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord PatSynArgsDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord PatSynDirDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord PhasesDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord PkgNameDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord PragmaDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord RangeDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord RoleDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord RuleBndrDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord RuleMatchDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord SafetyDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord SourceStrictnessDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord SourceUnpackednessDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord SpecificityDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord StmtDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord TyLitDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord TySynEqnDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord TypeDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord TypeFamilyHeadDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord I8Defined in text-2.1.3 · Data.Text.Foreign
  • Ord TextDefined in text-2.1.3 · Data.Text · orphan
  • Ord BuilderDefined in text-2.1.3 · Data.Text.Internal.Builder
  • Ord TextDefined in text-2.1.3 · Data.Text.Lazy · orphan
  • Ord DayDefined in time-1.12.2 · Data.Time.Calendar.Days
  • Ord MonthDefined in time-1.12.2 · Data.Time.Calendar.Month
  • Ord QuarterDefined in time-1.12.2 · Data.Time.Calendar.Quarter
  • Ord QuarterOfYearDefined in time-1.12.2 · Data.Time.Calendar.Quarter
  • Ord DayOfWeekDefined in time-1.12.2 · Data.Time.Calendar.Week
  • Ord AbsoluteTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.AbsoluteTime
  • Ord DiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.DiffTime
  • Ord NominalDiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.NominalDiffTime
  • Ord SystemTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.SystemTime
  • Ord UTCTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.UTCTime
  • Ord UniversalTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.UniversalTime
  • Ord TimeLocaleDefined in time-1.12.2 · Data.Time.Format.Locale
  • Ord LocalTimeDefined in time-1.12.2 · Data.Time.LocalTime.Internal.LocalTime
  • Ord TimeOfDayDefined in time-1.12.2 · Data.Time.LocalTime.Internal.TimeOfDay
  • Ord TimeZoneDefined in time-1.12.2 · Data.Time.LocalTime.Internal.TimeZone
  • Ord DirTypeDefined in unix-2.8.7.0 · System.Posix.Directory.Common
  • Ord CAttributesDefined in unix-2.8.7.0 · System.Posix.Files.Common
  • Ord StatxFlagsDefined in unix-2.8.7.0 · System.Posix.Files.Common
  • Ord StatxMaskDefined in unix-2.8.7.0 · System.Posix.Files.Common
  • Ord OpenFileFlagsDefined in unix-2.8.7.0 · System.Posix.IO.Common
  • Ord OpenModeDefined in unix-2.8.7.0 · System.Posix.IO.Common
  • Ord ProcessStatusDefined in unix-2.8.7.0 · System.Posix.Process.Internals
  • Ord BaudRateDefined in unix-2.8.7.0 · System.Posix.Terminal.Common
  • Ord ()Defined in ghc-prim-0.12.0 · GHC.Classes
  • Integral a => Ord (Ratio a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Real
  • Ord (ConstPtr a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.ConstPtr
  • Ord (ForeignPtr a)Defined in ghc-internal-9.1003.0 · GHC.Internal.ForeignPtr
  • Ord (FunPtr a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Ptr
  • Ord (Ptr a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Ptr
  • Ord (SChar c)Defined in ghc-internal-9.1003.0 · GHC.Internal.TypeLits
  • Ord (SSymbol s)Defined in ghc-internal-9.1003.0 · GHC.Internal.TypeLits
  • Ord (SNat n)Defined in ghc-internal-9.1003.0 · GHC.Internal.TypeNats
  • Ord a => Ord (TargetAnnotation a)Defined in Cabal-3.12.1.0 · Distribution.PackageDescription.Check.Monad
  • Ord a => Ord (GlobResult a)Defined in Cabal-3.12.1.0 · Distribution.Simple.Glob.Internal
  • Ord a => Ord (NonEmptySet a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.NonEmptySet
  • Ord a => Ord (First' a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Semigroup
  • Ord a => Ord (Last' a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Semigroup
  • Ord a => Ord (Option' a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Semigroup
  • Ord a => Ord (First a)Defined in base-4.20.2.0 · Data.Semigroup
  • Ord a => Ord (Last a)Defined in base-4.20.2.0 · Data.Semigroup
  • Ord a => Ord (Max a)Defined in base-4.20.2.0 · Data.Semigroup
  • Ord a => Ord (Min a)Defined in base-4.20.2.0 · Data.Semigroup
  • Ord a => Ord (ComponentDeps a)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.ComponentDeps
  • Ord a => Ord (OptionalStanzaMap a)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.OptionalStanza
  • Ord a => Ord (Qualified a)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackagePath
  • Ord a => Ord (IntMap a)Defined in containers-0.7 · Data.IntMap.Internal
  • Ord a => Ord (Seq a)Defined in containers-0.7 · Data.Sequence.Internal
  • Ord a => Ord (ViewL a)Defined in containers-0.7 · Data.Sequence.Internal
  • Ord a => Ord (ViewR a)Defined in containers-0.7 · Data.Sequence.Internal
  • Ord a => Ord (Intersection a)Defined in containers-0.7 · Data.Set.Internal
  • Ord a => Ord (Set a)Defined in containers-0.7 · Data.Set.Internal
  • Ord a => Ord (Tree a)Defined in containers-0.7 · Data.Tree
  • Ord a => Ord (NonEmpty a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Ord a => Ord (Identity a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Identity
  • Ord a => Ord (First a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Monoid
  • Ord a => Ord (Last a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Monoid
  • Ord a => Ord (Down a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Ord
  • Ord a => Ord (Dual a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Ord a => Ord (Product a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Ord a => Ord (Sum a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Ord a => Ord (ZipList a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Functor.ZipList
  • Ord a => Ord (Maybe a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Maybe
  • Ord a => Ord (Stream a)Defined in text-2.1.3 · Data.Text.Internal.Fusion.Types
  • Ord a => Ord (a)Defined in ghc-prim-0.12.0 · GHC.Classes
  • Ord a => Ord [a]Defined in ghc-prim-0.12.0 · GHC.Classes
  • Ord ann => Ord (Field ann)Defined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Field
  • Ord ann => Ord (FieldLine ann)Defined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Field
  • Ord ann => Ord (Name ann)Defined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Field
  • Ord ann => Ord (SectionArg ann)Defined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Field
  • Ord flag => Ord (TyVarBndr flag)Defined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Ord g => Ord (StateGen g)Defined in random-1.2.1.3 · System.Random.Internal
  • Ord g => Ord (AtomicGen g)Defined in random-1.2.1.3 · System.Random.Stateful
  • Ord g => Ord (IOGen g)Defined in random-1.2.1.3 · System.Random.Stateful
  • Ord g => Ord (STGen g)Defined in random-1.2.1.3 · System.Random.Stateful
  • Ord g => Ord (TGen g)Defined in random-1.2.1.3 · System.Random.Stateful
  • Ord id => Ord (AnnotatedId id)Defined in Cabal-3.12.1.0 · Distribution.Types.AnnotatedId
  • Ord m => Ord (WrappedMonoid m)Defined in base-4.20.2.0 · Data.Semigroup
  • Ord p => Ord (Par1 p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Ord qpn => Ord (PkgComponent qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Dependency
  • Ord qpn => Ord (FN qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Flag
  • Ord qpn => Ord (SN qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Flag
  • Ord qpn => Ord (SimpleFlaggedDepKey qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.IndexConversion
  • Ord qpn => Ord (PI qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Package
  • Ord qpn => Ord (Var qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Var
  • Ord v => Ord (PerCompilerFlavor v)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Ord (SymbolicPath from to)Defined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Path
  • Ord (Fixed a)Defined in base-4.20.2.0 · Data.Fixed
  • Ord (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Ord (TypeRep a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Typeable.Internal
  • Ord (U1 p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Ord (V1 p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Ord a => Ord (Arg a b)Defined in base-4.20.2.0 · Data.Semigroup
  • (Ord1 f, Ord a) => Ord (Lift f a)Defined in transformers-0.6.1.1 · Control.Applicative.Lift
  • (Ord1 m, Ord a) => Ord (MaybeT m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Maybe
  • (Ix i, Ord e) => Ord (Array i e)Defined in ghc-internal-9.1003.0 · GHC.Internal.Arr
  • (Ix ix, Ord e, IArray UArray e) => Ord (UArray ix e)Defined in array-0.5.8.0 · Data.Array.Base
  • (Ord a, Ord b) => Ord (Either a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Either
  • (Ord a, Ord b) => Ord (a, b)Defined in ghc-prim-0.12.0 · GHC.Classes
  • (Ord k, Ord v) => Ord (Map k v)Defined in containers-0.7 · Data.Map.Internal
  • Ord (Coercion a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Coercion
  • Ord (URec Char p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Ord (URec Double p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Ord (URec Float p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Ord (URec Int p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Ord (URec Word p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Ord (URec (Ptr ()) p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Ord (a :~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • Ord (f a) => Ord (Ap f a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Monoid
  • Ord (f a) => Ord (Alt f a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Ord (f p) => Ord (Rec1 f p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Ord a => Ord (Const a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Const
  • Ord a => Ord (Constant a b)Defined in transformers-0.6.1.1 · Data.Functor.Constant
  • (Ord1 f, Ord a) => Ord (Backwards f a)Defined in transformers-0.6.1.1 · Control.Applicative.Backwards
  • (Ord1 f, Ord a) => Ord (IdentityT f a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Identity
  • (Ord1 f, Ord a) => Ord (Reverse f a)Defined in transformers-0.6.1.1 · Data.Functor.Reverse
  • (Generic1 f, Ord (Rep1 f a)) => Ord (Generically1 f a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Ord a, Ord b, Ord c) => Ord (a, b, c)Defined in ghc-prim-0.12.0 · GHC.Classes
  • (Ord e, Ord1 m, Ord a) => Ord (ExceptT e m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Except
  • (Ord w, Ord1 m, Ord a) => Ord (WriterT w m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Writer.Lazy
  • (Ord w, Ord1 m, Ord a) => Ord (WriterT w m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Writer.Strict
  • Ord (a :~~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • Ord c => Ord (K1 i c p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Ord (f a), Ord (g a)) => Ord (Product f g a)Defined in base-4.20.2.0 · Data.Functor.Product
  • (Ord (f a), Ord (g a)) => Ord (Sum f g a)Defined in base-4.20.2.0 · Data.Functor.Sum
  • (Ord (f p), Ord (g p)) => Ord ((:*:) f g p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Ord (f p), Ord (g p)) => Ord ((:+:) f g p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Ord a, Ord b, Ord c, Ord d) => Ord (a, b, c, d)Defined in ghc-prim-0.12.0 · GHC.Classes
  • Ord (f (g a)) => Ord (Compose f g a)Defined in base-4.20.2.0 · Data.Functor.Compose
  • Ord (f (g p)) => Ord ((:.:) f g p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Ord (f p) => Ord (M1 i c f p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Ord a, Ord b, Ord c, Ord d, Ord e) => Ord (a, b, c, d, e)Defined in ghc-prim-0.12.0 · GHC.Classes
  • (Ord a, Ord b, Ord c, Ord d, Ord e, Ord f) => Ord (a, b, c, d, e, f)Defined in ghc-prim-0.12.0 · GHC.Classes
  • (Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g) => Ord (a, b, c, d, e, f, g)Defined in ghc-prim-0.12.0 · GHC.Classes
  • (Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h) => Ord (a, b, c, d, e, f, g, h)Defined in ghc-prim-0.12.0 · GHC.Classes
  • (Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i) => Ord (a, b, c, d, e, f, g, h, i)Defined in ghc-prim-0.12.0 · GHC.Classes
  • (Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j) => Ord (a, b, c, d, e, f, g, h, i, j)Defined in ghc-prim-0.12.0 · GHC.Classes
  • (Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k) => Ord (a, b, c, d, e, f, g, h, i, j, k)Defined in ghc-prim-0.12.0 · GHC.Classes
  • (Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l) => Ord (a, b, c, d, e, f, g, h, i, j, k, l)Defined in ghc-prim-0.12.0 · GHC.Classes
  • (Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m)Defined in ghc-prim-0.12.0 · GHC.Classes
  • (Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m, Ord n) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m, n)Defined in ghc-prim-0.12.0 · GHC.Classes
  • (Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m, Ord n, Ord o) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)Defined in ghc-prim-0.12.0 · GHC.Classes
valuemap :: (a -> b) -> [a] -> [b]
#

\mathcal{O}(n). map f xs is the list obtained by applying f to each element of xs, i.e.,

map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn]
map f [x1, x2, ...] == [f x1, f x2, ...]

this means that map id == id

Examples
Example1 expression
map (+1) [1, 2, 3][2,3,4]
Example1 expression
map id [1, 2, 3][1,2,3]
Example1 expression
map (\n -> 3 * n + 1) [1, 2, 3][4,7,10]
methodfirst :: a b c -> a (b, d) (c, d)
#

Send the first component of the input through the argument arrow, and copy the rest unchanged to the output.

classclass Monad m => MonadFail (m :: Type -> Type) where
#

When a value is bound in do-notation, the pattern on the left hand side of <- might not match. In this case, this class provides a function to recover.

A Monad without a MonadFail instance may only be used in conjunction with pattern that always match, such as newtypes, tuples, data types with only a single data constructor, and irrefutable patterns (~pat).

Instances of MonadFail should satisfy the following law: fail s should be a left zero for >>=,

fail s >>= f  =  fail s

If your Monad is also MonadPlus, a popular definition is

fail _ = mzero

fail s should be an action that runs in the monad itself, not an exception (except in instances of MonadIO). In particular, fail should not be implemented in terms of error.

Methods

Instances29MonadFail, …
valuefoldM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
#

The foldM function is analogous to foldl, except that its result is encapsulated in a monad. Note that foldM works from left-to-right over the list arguments. This could be an issue where (>>) and the `folded function' are not commutative.

foldM f a1 [x1, x2, ..., xm]

==

do
  a2 <- f a1 x1
  a3 <- f a2 x2
  ...
  f am xm

If right-to-left evaluation is required, the input list should be reversed.

Note: foldM is the same as foldlM

classclass (Alternative m, Monad m) => MonadPlus (m :: Type -> Type) where
#

Monads that also support choice and failure.

Methods

  • mzero :: m a

    The identity of mplus. It should also satisfy the equations

    mzero >>= f  =  mzero
    v >> mzero   =  mzero

    The default definition is

    mzero = empty
    
  • mplus :: m a -> m a -> m a

    An associative operation. The default definition is

    mplus = (<|>)
    
Instances39MonadPlus, …
valueliftM2 :: Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r
#

Promote a function to a monad, scanning the monadic arguments from left to right.

Examples
Example1 expression
liftM2 (+) [0,1] [0,2][0,2,1,3]
Example1 expression
liftM2 (+) (Just 1) NothingNothing
Example1 expression
liftM2 (+) (+ 3) (* 2) 518
valuezip :: [a] -> [b] -> [(a, b)]
#

\mathcal{O}(\min(m,n)). zip takes two lists and returns a list of corresponding pairs.

zip is right-lazy:

Example2 expressions
zip [] undefined[]zip undefined []*** Exception: Prelude.undefined...

zip is capable of list fusion, but it is restricted to its first list argument and its resulting list.

Examples
Example1 expression
zip [1, 2, 3] ['a', 'b', 'c'][(1,'a'),(2,'b'),(3,'c')]

If one input list is shorter than the other, excess elements of the longer list are discarded, even if one of the lists is infinite:

Example1 expression
zip [1] ['a', 'b'][(1,'a')]
Example1 expression
zip [1, 2] ['a'][(1,'a')]
Example1 expression
zip [] [1..][]
Example1 expression
zip [1..] [][]
classclass Eq a where
#

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

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

Reflexivity

x == x

=

True

Symmetry

x == y

=

y == x

Transitivity

if

x == y && y == z

=

True

, then

x == z

=

True

Extensionality

if

x == y

=

True

and

f

is a function whose return type is an instance of

Eq

, then

f x == f y

=

True

Negation

x /= y

=

not (x == y)

Methods

Instances647Eq, …
  • Eq ModuleShapeDefined in Cabal-3.12.1.0 · Distribution.Backpack.ModuleShape
  • Eq PreModuleShapeDefined in Cabal-3.12.1.0 · Distribution.Backpack.PreModuleShape
  • Eq AsyncCancelledDefined in Cabal-3.12.1.0 · Distribution.Compat.Async
  • Eq ModTimeDefined in Cabal-3.12.1.0 · Distribution.Compat.Time
  • Eq PathKindDefined in Cabal-3.12.1.0 · Distribution.PackageDescription.Check.Common
  • Eq BITargetDefined in Cabal-3.12.1.0 · Distribution.PackageDescription.Check.Target
  • Eq CETypeDefined in Cabal-3.12.1.0 · Distribution.PackageDescription.Check.Warning
  • Eq CheckExplanationDefined in Cabal-3.12.1.0 · Distribution.PackageDescription.Check.Warning
  • Eq CheckExplanationIDDefined in Cabal-3.12.1.0 · Distribution.PackageDescription.Check.Warning
  • Eq PackageCheckDefined in Cabal-3.12.1.0 · Distribution.PackageDescription.Check.Warning
  • Eq WarnLangDefined in Cabal-3.12.1.0 · Distribution.PackageDescription.Check.Warning
  • Eq AutogenFileDefined in Cabal-3.12.1.0 · Distribution.Simple.Build
  • Eq BuildTargetDefined in Cabal-3.12.1.0 · Distribution.Simple.BuildTarget
  • Eq ComponentKindDefined in Cabal-3.12.1.0 · Distribution.Simple.BuildTarget
  • Eq MatchErrorDefined in Cabal-3.12.1.0 · Distribution.Simple.BuildTarget
  • Eq UserBuildTargetDefined in Cabal-3.12.1.0 · Distribution.Simple.BuildTarget
  • Eq CDialectDefined in Cabal-3.12.1.0 · Distribution.Simple.CCompiler
  • Eq CompilerDefined in Cabal-3.12.1.0 · Distribution.Simple.Compiler
  • Eq DebugInfoLevelDefined in Cabal-3.12.1.0 · Distribution.Simple.Compiler
  • Eq OptimisationLevelDefined in Cabal-3.12.1.0 · Distribution.Simple.Compiler
  • Eq PackageDBDefined in Cabal-3.12.1.0 · Distribution.Simple.Compiler
  • Eq ProfDetailLevelDefined in Cabal-3.12.1.0 · Distribution.Simple.Compiler
  • Eq BuildWayDefined in Cabal-3.12.1.0 · Distribution.Simple.GHC.Build.Modules
  • Eq GhcEnvironmentFileEntryDefined in Cabal-3.12.1.0 · Distribution.Simple.GHC.Internal
  • Eq GlobDefined in Cabal-3.12.1.0 · Distribution.Simple.Glob.Internal
  • Eq GlobPieceDefined in Cabal-3.12.1.0 · Distribution.Simple.Glob.Internal
  • Eq GlobSyntaxErrorDefined in Cabal-3.12.1.0 · Distribution.Simple.Glob.Internal
  • Eq DirectoryDefined in Cabal-3.12.1.0 · Distribution.Simple.Haddock
  • Eq OutputDefined in Cabal-3.12.1.0 · Distribution.Simple.Haddock
  • Eq WayDefined in Cabal-3.12.1.0 · Distribution.Simple.Hpc
  • Eq CopyDestDefined in Cabal-3.12.1.0 · Distribution.Simple.InstallDirs
  • Eq PathTemplateDefined in Cabal-3.12.1.0 · Distribution.Simple.InstallDirs
  • Eq PathComponentDefined in Cabal-3.12.1.0 · Distribution.Simple.InstallDirs.Internal
  • Eq PathTemplateVariableDefined in Cabal-3.12.1.0 · Distribution.Simple.InstallDirs.Internal
  • Eq SuffixDefined in Cabal-3.12.1.0 · Distribution.Simple.PreProcess.Types
  • Eq GhcDynLinkModeDefined in Cabal-3.12.1.0 · Distribution.Simple.Program.GHC
  • Eq GhcModeDefined in Cabal-3.12.1.0 · Distribution.Simple.Program.GHC
  • Eq GhcOptimisationDefined in Cabal-3.12.1.0 · Distribution.Simple.Program.GHC
  • Eq GhcProfAutoDefined in Cabal-3.12.1.0 · Distribution.Simple.Program.GHC
  • Eq ConfiguredProgramDefined in Cabal-3.12.1.0 · Distribution.Simple.Program.Types
  • Eq ProgramLocationDefined in Cabal-3.12.1.0 · Distribution.Simple.Program.Types
  • Eq ProgramSearchPathEntryDefined in Cabal-3.12.1.0 · Distribution.Simple.Program.Types
  • Eq ConfigFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Config
  • Eq HaddockTargetDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Haddock
  • Eq VisibilityDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Haddock
  • Eq TestShowDetailsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Test
  • Eq PackageLogDefined in Cabal-3.12.1.0 · Distribution.Simple.Test.Log
  • Eq TestLogsDefined in Cabal-3.12.1.0 · Distribution.Simple.Test.Log
  • Eq TestSuiteLogDefined in Cabal-3.12.1.0 · Distribution.Simple.Test.Log
  • Eq TraceWhenDefined in Cabal-3.12.1.0 · Distribution.Simple.Utils
  • Eq OptionDescrDefined in Cabal-3.12.1.0 · Distribution.TestSuite
  • Eq OptionTypeDefined in Cabal-3.12.1.0 · Distribution.TestSuite
  • Eq ResultDefined in Cabal-3.12.1.0 · Distribution.TestSuite
  • Eq DumpBuildInfoDefined in Cabal-3.12.1.0 · Distribution.Types.DumpBuildInfo
  • Eq GivenComponentDefined in Cabal-3.12.1.0 · Distribution.Types.GivenComponent
  • Eq BuildOptionsDefined in Cabal-3.12.1.0 · Distribution.Types.LocalBuildConfig
  • Eq VerbosityDefined in Cabal-3.12.1.0 · Distribution.Verbosity
  • Eq VerbosityFlagDefined in Cabal-3.12.1.0 · Distribution.Verbosity.Internal
  • Eq VerbosityLevelDefined in Cabal-3.12.1.0 · Distribution.Verbosity.Internal
  • Eq OpenModuleDefined in Cabal-syntax-3.12.1.0 · Distribution.Backpack
  • Eq OpenUnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Backpack
  • Eq CabalSpecVersionDefined in Cabal-syntax-3.12.1.0 · Distribution.CabalSpecVersion
  • Eq HasCommonStanzasDefined in Cabal-syntax-3.12.1.0 · Distribution.CabalSpecVersion
  • Eq HasElifDefined in Cabal-syntax-3.12.1.0 · Distribution.CabalSpecVersion
  • Eq AbiTagDefined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Eq CompilerFlavorDefined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Eq CompilerIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Eq SpecLicenseDefined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.Newtypes
  • Eq SpecVersionDefined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.Newtypes
  • Eq LexWarningTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Fields.LexerMonad
  • Eq MarginDefined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Pretty
  • Eq LicenseDefined in Cabal-syntax-3.12.1.0 · Distribution.License
  • Eq ModuleNameDefined in Cabal-syntax-3.12.1.0 · Distribution.ModuleName
  • Eq SyntaxDefined in Cabal-syntax-3.12.1.0 · Distribution.PackageDescription.Parsec
  • Eq PositionDefined in Cabal-syntax-3.12.1.0 · Distribution.Parsec.Position
  • Eq PWarnTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Parsec.Warning
  • Eq PWarningDefined in Cabal-syntax-3.12.1.0 · Distribution.Parsec.Warning
  • Eq LicenseDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.License
  • Eq LicenseExceptionIdDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExceptionId
  • Eq LicenseExpressionDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExpression
  • Eq SimpleLicenseExpressionDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExpression
  • Eq LicenseIdDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseId
  • Eq LicenseListVersionDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseListVersion
  • Eq LicenseRefDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseReference
  • Eq ArchDefined in Cabal-syntax-3.12.1.0 · Distribution.System
  • Eq OSDefined in Cabal-syntax-3.12.1.0 · Distribution.System
  • Eq PlatformDefined in Cabal-syntax-3.12.1.0 · Distribution.System
  • Eq AbiDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.AbiDependency
  • Eq AbiHashDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.AbiHash
  • Eq BenchmarkDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Benchmark
  • Eq BenchmarkInterfaceDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BenchmarkInterface
  • Eq BenchmarkTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BenchmarkType
  • Eq BuildInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BuildInfo
  • Eq BuildTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BuildType
  • Eq ComponentDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Component
  • Eq ComponentIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentId
  • Eq ComponentNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentName
  • Eq NotLibComponentNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentName
  • Eq ComponentRequestedSpecDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentRequestedSpec
  • Eq ConfVarDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ConfVar
  • Eq DependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Dependency
  • Eq DependencyMapDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.DependencyMap
  • Eq ExeDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ExeDependency
  • Eq ExecutableDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Executable
  • Eq ExecutableScopeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ExecutableScope
  • Eq ExposedModuleDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ExposedModule
  • Eq FlagAssignmentDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Flag
  • Eq FlagNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Flag
  • Eq PackageFlagDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Flag
  • Eq ForeignLibDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLib
  • Eq LibVersionInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLib
  • Eq ForeignLibOptionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLibOption
  • Eq ForeignLibTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLibType
  • Eq GenericPackageDescriptionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.GenericPackageDescription
  • Eq IncludeRenamingDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.IncludeRenaming
  • Eq InstalledPackageInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.InstalledPackageInfo
  • Eq LegacyExeDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LegacyExeDependency
  • Eq LibraryDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Library
  • Eq LibraryNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LibraryName
  • Eq LibraryVisibilityDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LibraryVisibility
  • Eq MixinDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Mixin
  • Eq ModuleDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Module
  • Eq ModuleReexportDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ModuleReexport
  • Eq ModuleRenamingDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ModuleRenaming
  • Eq MungedPackageIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.MungedPackageId
  • Eq MungedPackageNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.MungedPackageName
  • Eq PackageDescriptionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageDescription
  • Eq PackageIdentifierDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageId
  • Eq PackageNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageName
  • Eq PackageVersionConstraintDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageVersionConstraint
  • Eq PkgconfigDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigDependency
  • Eq PkgconfigNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigName
  • Eq PkgconfigVersionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigVersion
  • Eq PkgconfigVersionRangeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigVersionRange
  • Eq SetupBuildInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SetupBuildInfo
  • Eq KnownRepoTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Eq RepoKindDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Eq RepoTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Eq SourceRepoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Eq TestSuiteDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.TestSuite
  • Eq TestSuiteInterfaceDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.TestSuiteInterface
  • Eq TestTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.TestType
  • Eq DefUnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnitId
  • Eq UnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnitId
  • Eq UnqualComponentNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnqualComponentName
  • Eq VersionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Version
  • Eq BoundDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionInterval
  • Eq LowerBoundDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionInterval
  • Eq UpperBoundDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionInterval
  • Eq VersionIntervalDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionInterval
  • Eq VersionIntervalsDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionInterval
  • Eq BoundDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionInterval.Legacy
  • Eq LowerBoundDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionInterval.Legacy
  • Eq UpperBoundDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionInterval.Legacy
  • Eq VersionIntervalsDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionInterval.Legacy
  • Eq VersionRangeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionRange.Internal
  • Eq ShortTextDefined in Cabal-syntax-3.12.1.0 · Distribution.Utils.ShortText
  • Eq StructureDefined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Structured
  • Eq ExtensionDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.Extension
  • Eq KnownExtensionDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.Extension
  • Eq LanguageDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.Extension
  • Eq ByteArrayDefined in base-4.20.2.0 · Data.Array.Byte
  • Eq TimeoutDefined in base-4.20.2.0 · System.Timeout
  • Eq FloatingDecimalDefined in bytestring-0.12.2.0 · Data.ByteString.Builder.RealFloat.D2S
  • Eq FloatingDecimalDefined in bytestring-0.12.2.0 · Data.ByteString.Builder.RealFloat.F2S
  • Eq ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.Type
  • Eq ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Lazy.Internal
  • Eq ShortByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Short.Internal
  • Eq AssignmentDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Assignment
  • Eq ConflictDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.ConflictSet
  • Eq ConflictSetDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.ConflictSet
  • Eq OrderedVersionRangeDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.ConflictSet
  • Eq CIDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Dependency
  • Eq ExposedComponentDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Dependency
  • Eq FInfoDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Flag
  • Eq FlagValueDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Flag
  • Eq WeakOrTrivialDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Flag
  • Eq IsBuildableDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Index
  • Eq IsVisibleDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Index
  • Eq LinkGroupDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Linking
  • Eq IDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Package
  • Eq LocDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Package
  • Eq ConflictingDepDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Tree
  • Eq FailReasonDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Tree
  • Eq POptionDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Tree
  • Eq ComponentDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.ComponentDeps
  • Eq ConstraintSourceDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.ConstraintSource
  • Eq FlagTypeDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Flag
  • Eq InstSolverPackageDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.InstSolverPackage
  • Eq OptionalStanzaDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.OptionalStanza
  • Eq OptionalStanzaSetDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.OptionalStanza
  • Eq ConstraintScopeDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackageConstraint
  • Eq PackageConstraintDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackageConstraint
  • Eq PackagePropertyDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackageConstraint
  • Eq NamespaceDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackagePath
  • Eq PackagePathDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackagePath
  • Eq QualifierDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackagePath
  • Eq ProjectConfigPathDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.ProjectConfigPath
  • Eq AllowBootLibInstallsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Eq AvoidReinstallsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Eq CountConflictsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Eq EnableBackjumpingDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Eq FineGrainedConflictsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Eq IndependentGoalsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Eq MinimizeConflictSetDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Eq OnlyConstrainedDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Eq PreferOldestDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Eq ReorderGoalsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Eq ShadowPkgsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Eq SolveExecutablesDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Eq StrongFlagsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Eq SolverIdDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.SolverId
  • Eq IntSetDefined in containers-0.7 · Data.IntSet.Internal
  • Eq FileTypeDefined in directory-1.3.8.5 · System.Directory.Internal.Common
  • Eq PermissionsDefined in directory-1.3.8.5 · System.Directory.Internal.Common
  • Eq XdgDirectoryDefined in directory-1.3.8.5 · System.Directory.Internal.Common
  • Eq XdgDirectoryListDefined in directory-1.3.8.5 · System.Directory.Internal.Common
  • Eq BigNatDefined in ghc-bignum-1.3 · GHC.Num.BigNat
  • Eq IntegerDefined in ghc-bignum-1.3 · GHC.Num.Integer
  • Eq NaturalDefined in ghc-bignum-1.3 · GHC.Num.Natural
  • Eq ForeignSrcLangDefined in ghc-boot-th-9.10.3 · GHC.ForeignSrcLang.Type
  • Eq ExtensionDefined in ghc-boot-th-9.10.3 · GHC.LanguageExtensions.Type
  • Eq VoidDefined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Eq ByteOrderDefined in ghc-internal-9.1003.0 · GHC.Internal.ByteOrder
  • Eq ClosureTypeDefined in ghc-internal-9.1003.0 · GHC.Internal.ClosureTypes
  • Eq BlockReasonDefined in ghc-internal-9.1003.0 · GHC.Internal.Conc.Sync
  • Eq ThreadIdDefined in ghc-internal-9.1003.0 · GHC.Internal.Conc.Sync
  • Eq ThreadStatusDefined in ghc-internal-9.1003.0 · GHC.Internal.Conc.Sync
  • Eq ConstrDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data

    Equality of constructors

  • Eq ConstrRepDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Eq DataRepDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Eq FixityDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Eq AllDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Eq AnyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Eq SomeTypeRepDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Typeable.Internal
  • Eq UniqueDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Unique
  • Eq VersionDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Version
  • Eq ControlMessageDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.Control
  • Eq EPollFdDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.EPoll
  • Eq EventTypeDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.EPoll
  • Eq EventDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.Internal.Types
  • Eq EventLifetimeDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.Internal.Types
  • Eq LifetimeDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.Internal.Types
  • Eq FdKeyDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.Manager
  • Eq StateDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.Manager
  • Eq EventDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.Poll
  • Eq TimeoutKeyDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.TimeOut
  • Eq StateDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.TimerManager
  • Eq UniqueDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.Unique
  • Eq ErrorCallDefined in ghc-internal-9.1003.0 · GHC.Internal.Exception
  • Eq ArithExceptionDefined in ghc-internal-9.1003.0 · GHC.Internal.Exception.Type
  • Eq SpecConstrAnnotationDefined in ghc-internal-9.1003.0 · GHC.Internal.Exts
  • Eq FingerprintDefined in ghc-internal-9.1003.0 · GHC.Internal.Fingerprint.Type
  • Eq ErrnoDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Error
  • Eq CBoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CClockDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CDoubleDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CFloatDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CIntDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CIntMaxDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CIntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CLLongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CLongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CPtrdiffDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CSCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CSUSecondsDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CShortDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CSigAtomicDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CSizeDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CTimeDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CUCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CUIntDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CUIntMaxDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CUIntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CULLongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CULongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CUSecondsDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CUShortDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq CWcharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Eq IntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Ptr
  • Eq WordPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Ptr
  • Eq AssociativityDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Eq DecidedStrictnessDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Eq FixityDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Eq SourceStrictnessDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Eq SourceUnpackednessDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Eq MaskingStateDefined in ghc-internal-9.1003.0 · GHC.Internal.IO
  • Eq BufferStateDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Buffer
  • Eq IODeviceTypeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Device
  • Eq SeekModeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Device
  • Eq CodingProgressDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Encoding.Types
  • Eq ArrayExceptionDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Exception
  • Eq AsyncExceptionDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Exception
  • Eq ExitCodeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Exception
  • Eq IOErrorTypeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Exception
  • Eq IOExceptionDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Exception
  • Eq HandlePosnDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Handle
  • Eq BufferModeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Handle.Types
  • Eq HandleDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Handle.Types
  • Eq NewlineDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Handle.Types
  • Eq NewlineModeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Handle.Types
  • Eq IOModeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.IOMode
  • Eq InfoProvDefined in ghc-internal-9.1003.0 · GHC.Internal.InfoProv.Types
  • Eq Int16Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Eq Int32Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Eq Int64Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Eq Int8Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Eq IoSubSystemDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Eq StackEntryDefined in ghc-internal-9.1003.0 · GHC.Internal.Stack.CloneStack
  • Eq SrcLocDefined in ghc-internal-9.1003.0 · GHC.Internal.Stack.Types
  • Eq CBlkCntDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Eq CBlkSizeDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Eq CCcDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Eq CClockIdDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Eq CDevDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Eq CFsBlkCntDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Eq CFsFilCntDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Eq CGidDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Eq CIdDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Eq CInoDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Eq CKeyDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Eq CModeDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Eq CNfdsDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Eq CNlinkDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Eq COffDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Eq CPidDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Eq CRLimDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Eq CSocklenDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Eq CSpeedDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Eq CSsizeDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Eq CTcflagDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Eq CTimerDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Eq CUidDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Eq FdDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Eq LexemeDefined in ghc-internal-9.1003.0 · GHC.Internal.Text.Read.Lex
  • Eq NumberDefined in ghc-internal-9.1003.0 · GHC.Internal.Text.Read.Lex
  • Eq SomeCharDefined in ghc-internal-9.1003.0 · GHC.Internal.TypeLits
  • Eq SomeSymbolDefined in ghc-internal-9.1003.0 · GHC.Internal.TypeLits
  • Eq SomeNatDefined in ghc-internal-9.1003.0 · GHC.Internal.TypeNats
  • Eq GeneralCategoryDefined in ghc-internal-9.1003.0 · GHC.Internal.Unicode
  • Eq Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Eq Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Eq Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Eq Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Eq BoolDefined in ghc-prim-0.12.0 · GHC.Classes
  • Eq CharDefined in ghc-prim-0.12.0 · GHC.Classes
  • Eq DoubleDefined in ghc-prim-0.12.0 · GHC.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
  • Eq FloatDefined in ghc-prim-0.12.0 · GHC.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
  • Eq IntDefined in ghc-prim-0.12.0 · GHC.Classes
  • Eq ModuleDefined in ghc-prim-0.12.0 · GHC.Classes
  • Eq OrderingDefined in ghc-prim-0.12.0 · GHC.Classes
  • Eq TrNameDefined in ghc-prim-0.12.0 · GHC.Classes
  • Eq TyConDefined in ghc-prim-0.12.0 · GHC.Classes
  • Eq WordDefined in ghc-prim-0.12.0 · GHC.Classes
  • Eq URIDefined in network-uri-2.6.4.2 · Network.URI
  • Eq URIAuthDefined in network-uri-2.6.4.2 · Network.URI
  • Eq EncodingExceptionDefined in os-string-2.0.7 · System.OsString.Encoding.Internal
  • Eq OsCharDefined in os-string-2.0.7 · System.OsString.Internal.Types

    Byte equality of the internal representation.

  • Eq OsStringDefined in os-string-2.0.7 · System.OsString.Internal.Types

    Byte equality of the internal representation.

  • Eq PosixCharDefined in os-string-2.0.7 · System.OsString.Internal.Types
  • Eq PosixStringDefined in os-string-2.0.7 · System.OsString.Internal.Types
  • Eq WindowsCharDefined in os-string-2.0.7 · System.OsString.Internal.Types
  • Eq WindowsStringDefined in os-string-2.0.7 · System.OsString.Internal.Types
  • Eq MessageDefined in parsec-3.1.18.0 · Text.Parsec.Error
  • Eq ParseErrorDefined in parsec-3.1.18.0 · Text.Parsec.Error
  • Eq SourcePosDefined in parsec-3.1.18.0 · Text.Parsec.Pos
  • Eq ModeDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Eq StyleDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Eq TextDetailsDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Eq PrettyLevelDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJClass
  • Eq DocDefined in pretty-1.1.3.6 · Text.PrettyPrint.HughesPJ
  • Eq PrettyLevelDefined in pretty-1.1.3.6 · Text.PrettyPrint.HughesPJClass
  • Eq CmdSpecDefined in process-1.6.26.1 · System.Process.Common
  • Eq CreateProcessDefined in process-1.6.26.1 · System.Process.Common
  • Eq StdStreamDefined in process-1.6.26.1 · System.Process.Common
  • Eq CommunicationHandleDefined in process-1.6.26.1 · System.Process.CommunicationHandle.Internal
  • Eq CardinalityDefined in random-1.2.1.3 · System.Random.GFinite
  • Eq StdGenDefined in random-1.2.1.3 · System.Random.Internal
  • Eq TSemDefined in stm-2.5.3.1 · Control.Concurrent.STM.TSem
  • Eq AnnLookupDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq AnnTargetDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq BangDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq BndrVisDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq BodyDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq BytesDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq CallconvDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq ClauseDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq ConDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq DecDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq DecidedStrictnessDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq DerivClauseDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq DerivStrategyDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq DocLocDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq ExpDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq FamilyResultSigDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq FixityDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq FixityDirectionDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq ForeignDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq FunDepDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq GuardDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq InfoDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq InjectivityAnnDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq InlineDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq LitDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq LocDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq MatchDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq ModNameDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq ModuleDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq ModuleInfoDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq NameDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq NameFlavourDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq NameSpaceDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq NamespaceSpecifierDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq OccNameDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq OverlapDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq PatDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq PatSynArgsDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq PatSynDirDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq PhasesDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq PkgNameDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq PragmaDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq RangeDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq RoleDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq RuleBndrDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq RuleMatchDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq SafetyDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq SourceStrictnessDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq SourceUnpackednessDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq SpecificityDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq StmtDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq TyLitDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq TySynEqnDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq TypeDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq TypeFamilyHeadDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq UnicodeExceptionDefined in text-2.1.3 · Data.Text.Encoding.Error
  • Eq I8Defined in text-2.1.3 · Data.Text.Foreign
  • Eq TextDefined in text-2.1.3 · Data.Text · orphan
  • Eq BuilderDefined in text-2.1.3 · Data.Text.Internal.Builder
  • Eq PartialUtf8CodePointDefined in text-2.1.3 · Data.Text.Internal.Encoding
  • Eq Utf8StateDefined in text-2.1.3 · Data.Text.Internal.Encoding
  • Eq DecoderStateDefined in text-2.1.3 · Data.Text.Internal.Encoding.Utf8
  • Eq SizeDefined in text-2.1.3 · Data.Text.Internal.Fusion.Size
  • Eq TextDefined in text-2.1.3 · Data.Text.Lazy · orphan
  • Eq CalendarDiffDaysDefined in time-1.12.2 · Data.Time.Calendar.CalendarDiffDays
  • Eq DayDefined in time-1.12.2 · Data.Time.Calendar.Days
  • Eq MonthDefined in time-1.12.2 · Data.Time.Calendar.Month
  • Eq QuarterDefined in time-1.12.2 · Data.Time.Calendar.Quarter
  • Eq QuarterOfYearDefined in time-1.12.2 · Data.Time.Calendar.Quarter
  • Eq DayOfWeekDefined in time-1.12.2 · Data.Time.Calendar.Week
  • Eq FirstWeekTypeDefined in time-1.12.2 · Data.Time.Calendar.WeekDate
  • Eq AbsoluteTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.AbsoluteTime
  • Eq DiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.DiffTime
  • Eq NominalDiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.NominalDiffTime
  • Eq SystemTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.SystemTime
  • Eq UTCTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.UTCTime
  • Eq UniversalTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.UniversalTime
  • Eq TimeLocaleDefined in time-1.12.2 · Data.Time.Format.Locale
  • Eq CalendarDiffTimeDefined in time-1.12.2 · Data.Time.LocalTime.Internal.CalendarDiffTime
  • Eq LocalTimeDefined in time-1.12.2 · Data.Time.LocalTime.Internal.LocalTime
  • Eq TimeOfDayDefined in time-1.12.2 · Data.Time.LocalTime.Internal.TimeOfDay
  • Eq TimeZoneDefined in time-1.12.2 · Data.Time.LocalTime.Internal.TimeZone
  • Eq DirTypeDefined in unix-2.8.7.0 · System.Posix.Directory.Common
  • Eq AdviceDefined in unix-2.8.7.0 · System.Posix.Fcntl
  • Eq CAttributesDefined in unix-2.8.7.0 · System.Posix.Files.Common
  • Eq StatxFlagsDefined in unix-2.8.7.0 · System.Posix.Files.Common
  • Eq StatxMaskDefined in unix-2.8.7.0 · System.Posix.Files.Common
  • Eq OpenFileFlagsDefined in unix-2.8.7.0 · System.Posix.IO.Common
  • Eq OpenModeDefined in unix-2.8.7.0 · System.Posix.IO.Common
  • Eq ProcessStatusDefined in unix-2.8.7.0 · System.Posix.Process.Internals
  • Eq ResourceDefined in unix-2.8.7.0 · System.Posix.Resource
  • Eq ResourceLimitDefined in unix-2.8.7.0 · System.Posix.Resource
  • Eq ResourceLimitsDefined in unix-2.8.7.0 · System.Posix.Resource
  • Eq BaudRateDefined in unix-2.8.7.0 · System.Posix.Terminal.Common
  • Eq GroupEntryDefined in unix-2.8.7.0 · System.Posix.User.Common
  • Eq UserEntryDefined in unix-2.8.7.0 · System.Posix.User.Common
  • Eq ()Defined in ghc-prim-0.12.0 · GHC.Classes
  • Eq (Chan a)Defined in base-4.20.2.0 · Control.Concurrent.Chan
  • Eq (MutableByteArray s)Defined in base-4.20.2.0 · Data.Array.Byte
  • Eq (TVar a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Conc.Sync
  • Eq (ConstPtr a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.ConstPtr
  • Eq (ForeignPtr a)Defined in ghc-internal-9.1003.0 · GHC.Internal.ForeignPtr
  • Eq (IOPort a)Defined in ghc-internal-9.1003.0 · GHC.Internal.IOPort
  • Eq (IORef a)Defined in ghc-internal-9.1003.0 · GHC.Internal.IORef

    Pointer equality.

  • Eq (MVar a)Defined in ghc-internal-9.1003.0 · GHC.Internal.MVar

    Compares the underlying pointers.

  • Eq (FunPtr a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Ptr
  • Eq (Ptr a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Ptr
  • Eq (StablePtr a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Stable
  • Eq (StableName a)Defined in ghc-internal-9.1003.0 · GHC.Internal.StableName
  • Eq (SChar c)Defined in ghc-internal-9.1003.0 · GHC.Internal.TypeLits
  • Eq (SSymbol s)Defined in ghc-internal-9.1003.0 · GHC.Internal.TypeLits
  • Eq (SNat n)Defined in ghc-internal-9.1003.0 · GHC.Internal.TypeNats
  • Eq (Doc a)Defined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Eq (TBQueue a)Defined in stm-2.5.3.1 · Control.Concurrent.STM.TBQueue
  • Eq (TChan a)Defined in stm-2.5.3.1 · Control.Concurrent.STM.TChan
  • Eq (TMVar a)Defined in stm-2.5.3.1 · Control.Concurrent.STM.TMVar
  • Eq (TQueue a)Defined in stm-2.5.3.1 · Control.Concurrent.STM.TQueue
  • Eq (TVar a)Defined in stm-2.5.3.1 · Control.Sequential.STM
  • Eq a => Eq (TargetAnnotation a)Defined in Cabal-3.12.1.0 · Distribution.PackageDescription.Check.Monad
  • Eq a => Eq (Flag a)Defined in Cabal-3.12.1.0 · Distribution.Simple.Flag
  • Eq a => Eq (GlobResult a)Defined in Cabal-3.12.1.0 · Distribution.Simple.Glob.Internal
  • Eq a => Eq (PackageIndex a)Defined in Cabal-3.12.1.0 · Distribution.Simple.PackageIndex
  • Eq a => Eq (NubList a)Defined in Cabal-3.12.1.0 · Distribution.Utils.NubList
  • Eq a => Eq (NubListR a)Defined in Cabal-3.12.1.0 · Distribution.Utils.NubList
  • Eq a => Eq (NonEmptySet a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.NonEmptySet
  • Eq a => Eq (First' a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Semigroup
  • Eq a => Eq (Last' a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Semigroup
  • Eq a => Eq (Option' a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Semigroup
  • Eq a => Eq (VersionRangeF a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionRange.Internal
  • Eq a => Eq (Complex a)Defined in base-4.20.2.0 · Data.Complex
  • Eq a => Eq (First a)Defined in base-4.20.2.0 · Data.Semigroup
  • Eq a => Eq (Last a)Defined in base-4.20.2.0 · Data.Semigroup
  • Eq a => Eq (Max a)Defined in base-4.20.2.0 · Data.Semigroup
  • Eq a => Eq (Min a)Defined in base-4.20.2.0 · Data.Semigroup
  • Eq a => Eq (ComponentDeps a)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.ComponentDeps
  • Eq a => Eq (OptionalStanzaMap a)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.OptionalStanza
  • Eq a => Eq (Qualified a)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackagePath
  • Eq a => Eq (IntMap a)Defined in containers-0.7 · Data.IntMap.Internal
  • Eq a => Eq (Seq a)Defined in containers-0.7 · Data.Sequence.Internal
  • Eq a => Eq (ViewL a)Defined in containers-0.7 · Data.Sequence.Internal
  • Eq a => Eq (ViewR a)Defined in containers-0.7 · Data.Sequence.Internal
  • Eq a => Eq (Intersection a)Defined in containers-0.7 · Data.Set.Internal
  • Eq a => Eq (Set a)Defined in containers-0.7 · Data.Set.Internal
  • Eq a => Eq (Tree a)Defined in containers-0.7 · Data.Tree
  • Eq a => Eq (NonEmpty a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Eq a => Eq (And a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Bits
  • Eq a => Eq (Iff a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Bits
  • Eq a => Eq (Ior a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Bits
  • Eq a => Eq (Xor a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Bits
  • Eq a => Eq (Identity a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Identity
  • Eq a => Eq (First a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Monoid
  • Eq a => Eq (Last a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Monoid
  • Eq a => Eq (Down a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Ord
  • Eq a => Eq (Dual a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Eq a => Eq (Product a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Eq a => Eq (Sum a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Eq a => Eq (ZipList a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Functor.ZipList
  • Eq a => Eq (Maybe a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Maybe
  • Eq a => Eq (Ratio a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Real
  • Eq a => Eq (AnnotDetails a)Defined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Eq a => Eq (Span a)Defined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Eq a => Eq (Stream a)Defined in text-2.1.3 · Data.Text.Internal.Fusion.Types
  • Eq a => Eq (a)Defined in ghc-prim-0.12.0 · GHC.Classes
  • Eq a => Eq [a]Defined in ghc-prim-0.12.0 · GHC.Classes
  • Eq ann => Eq (NamelessField ann)Defined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.Parsec
  • Eq ann => Eq (Section ann)Defined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.Parsec
  • Eq ann => Eq (Field ann)Defined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Field
  • Eq ann => Eq (FieldLine ann)Defined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Field
  • Eq ann => Eq (Name ann)Defined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Field
  • Eq ann => Eq (SectionArg ann)Defined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Field
  • Eq c => Eq (Condition c)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.Condition
  • Eq dir => Eq (InstallDirs dir)Defined in Cabal-3.12.1.0 · Distribution.Simple.InstallDirs
  • Eq flag => Eq (TyVarBndr flag)Defined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Eq g => Eq (StateGen g)Defined in random-1.2.1.3 · System.Random.Internal
  • Eq g => Eq (AtomicGen g)Defined in random-1.2.1.3 · System.Random.Stateful
  • Eq g => Eq (IOGen g)Defined in random-1.2.1.3 · System.Random.Stateful
  • Eq g => Eq (STGen g)Defined in random-1.2.1.3 · System.Random.Stateful
  • Eq g => Eq (TGen g)Defined in random-1.2.1.3 · System.Random.Stateful
  • Eq id => Eq (AnnotatedId id)Defined in Cabal-3.12.1.0 · Distribution.Types.AnnotatedId
  • Eq loc => Eq (ResolverPackage loc)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.ResolverPackage
  • Eq loc => Eq (SolverPackage loc)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.SolverPackage
  • Eq loc => Eq (SourcePackage loc)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.SourcePackage
  • Eq m => Eq (WrappedMonoid m)Defined in base-4.20.2.0 · Data.Semigroup
  • Eq p => Eq (Par1 p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Eq pkg => Eq (PackageIndex pkg)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackageIndex
  • Eq qpn => Eq (DependencyReason qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Dependency
  • Eq qpn => Eq (Goal qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Dependency
  • Eq qpn => Eq (GoalReason qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Dependency
  • Eq qpn => Eq (PkgComponent qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Dependency
  • Eq qpn => Eq (FN qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Flag
  • Eq qpn => Eq (SN qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Flag
  • Eq qpn => Eq (SimpleFlaggedDepKey qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.IndexConversion
  • Eq qpn => Eq (PI qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Package
  • Eq qpn => Eq (Var qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Var
  • Eq qpn => Eq (Variable qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Variable
  • Eq v => Eq (PerCompilerFlavor v)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Eq vertex => Eq (SCC vertex)Defined in containers-0.7 · Data.Graph
  • (Eq (Key a), Eq a) => Eq (Graph a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Graph
  • Eq (Point s a)Defined in Cabal-3.12.1.0 · Distribution.Utils.UnionFind
  • Eq (SymbolicPath from to)Defined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Path
  • Eq (IOUArray i e)Defined in array-0.5.8.0 · Data.Array.IO.Internals
  • Eq (Fixed a)Defined in base-4.20.2.0 · Data.Fixed
  • Eq (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Eq (TypeRep a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Typeable.Internal
  • Eq (U1 p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Eq (V1 p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Eq (IOArray i e)Defined in ghc-internal-9.1003.0 · GHC.Internal.IOArray
  • Eq (STRef s a)Defined in ghc-internal-9.1003.0 · GHC.Internal.STRef

    Pointer equality.

  • Eq a => Eq (Arg a b)Defined in base-4.20.2.0 · Data.Semigroup
  • (Eq1 f, Eq a) => Eq (Lift f a)Defined in transformers-0.6.1.1 · Control.Applicative.Lift
  • (Eq1 m, Eq a) => Eq (MaybeT m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Maybe
  • (Ix i, Eq e) => Eq (Array i e)Defined in ghc-internal-9.1003.0 · GHC.Internal.Arr
  • (Ix ix, Eq e, IArray UArray e) => Eq (UArray ix e)Defined in array-0.5.8.0 · Data.Array.Base
  • (Eq a, Eq b) => Eq (Either a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Either
  • (Eq a, Eq b) => Eq (a, b)Defined in ghc-prim-0.12.0 · GHC.Classes
  • (Eq a, Eq k) => Eq (Node k a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Graph
  • (Eq i, Eq e) => Eq (TArray i e)Defined in stm-2.5.3.1 · Control.Concurrent.STM.TArray
  • (Eq k, Eq a) => Eq (Map k a)Defined in containers-0.7 · Data.Map.Internal
  • (Eq k, Eq v) => Eq (PSQ k v)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.PSQ
  • Eq (STUArray s i e)Defined in array-0.5.8.0 · Data.Array.Base
  • Eq (STArray s i e)Defined in ghc-internal-9.1003.0 · GHC.Internal.Arr
  • Eq (Coercion a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Coercion
  • Eq (OrderingI a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Ord
  • Eq (URec Char p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Eq (URec Double p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Eq (URec Float p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Eq (URec Int p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Eq (URec Word p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Eq (URec (Ptr ()) p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Eq (a :~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • Eq (f a) => Eq (Ap f a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Monoid
  • Eq (f a) => Eq (Alt f a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Eq (f p) => Eq (Rec1 f p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Eq a => Eq (Const a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Const
  • Eq a => Eq (Constant a b)Defined in transformers-0.6.1.1 · Data.Functor.Constant
  • (Eq1 f, Eq a) => Eq (Backwards f a)Defined in transformers-0.6.1.1 · Control.Applicative.Backwards
  • (Eq1 f, Eq a) => Eq (IdentityT f a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Identity
  • (Eq1 f, Eq a) => Eq (Reverse f a)Defined in transformers-0.6.1.1 · Data.Functor.Reverse
  • (Generic1 f, Eq (Rep1 f a)) => Eq (Generically1 f a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Eq a, Eq b, Eq c) => Eq (a, b, c)Defined in ghc-prim-0.12.0 · GHC.Classes
  • (Eq a, Eq c, Eq v) => Eq (CondTree v c a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.CondTree
  • (Eq e, Eq1 m, Eq a) => Eq (ExceptT e m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Except
  • (Eq v, Eq a, Eq c) => Eq (CondBranch v c a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.CondTree
  • (Eq w, Eq1 m, Eq a) => Eq (WriterT w m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Writer.Lazy
  • (Eq w, Eq1 m, Eq a) => Eq (WriterT w m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Writer.Strict
  • (Eq w, Eq k, Eq v) => Eq (WeightedPSQ w k v)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.WeightedPSQ
  • Eq (a :~~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • Eq c => Eq (K1 i c p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Eq (f a), Eq (g a)) => Eq (Product f g a)Defined in base-4.20.2.0 · Data.Functor.Product
  • (Eq (f a), Eq (g a)) => Eq (Sum f g a)Defined in base-4.20.2.0 · Data.Functor.Sum
  • (Eq (f p), Eq (g p)) => Eq ((:*:) f g p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Eq (f p), Eq (g p)) => Eq ((:+:) f g p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Eq a, Eq b, Eq c, Eq d) => Eq (a, b, c, d)Defined in ghc-prim-0.12.0 · GHC.Classes
  • Eq (f (g a)) => Eq (Compose f g a)Defined in base-4.20.2.0 · Data.Functor.Compose
  • Eq (f (g p)) => Eq ((:.:) f g p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Eq (f p) => Eq (M1 i c f p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Eq a, Eq b, Eq c, Eq d, Eq e) => Eq (a, b, c, d, e)Defined in ghc-prim-0.12.0 · GHC.Classes
  • (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f) => Eq (a, b, c, d, e, f)Defined in ghc-prim-0.12.0 · GHC.Classes
  • (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g) => Eq (a, b, c, d, e, f, g)Defined in ghc-prim-0.12.0 · GHC.Classes
  • (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h) => Eq (a, b, c, d, e, f, g, h)Defined in ghc-prim-0.12.0 · GHC.Classes
  • (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i) => Eq (a, b, c, d, e, f, g, h, i)Defined in ghc-prim-0.12.0 · GHC.Classes
  • (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j) => Eq (a, b, c, d, e, f, g, h, i, j)Defined in ghc-prim-0.12.0 · GHC.Classes
  • (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k) => Eq (a, b, c, d, e, f, g, h, i, j, k)Defined in ghc-prim-0.12.0 · GHC.Classes
  • (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l) => Eq (a, b, c, d, e, f, g, h, i, j, k, l)Defined in ghc-prim-0.12.0 · GHC.Classes
  • (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m)Defined in ghc-prim-0.12.0 · GHC.Classes
  • (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m, n)Defined in ghc-prim-0.12.0 · GHC.Classes
  • (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n, Eq o) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)Defined in ghc-prim-0.12.0 · GHC.Classes
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.

Instances731Show, …
  • Show FullUnitIdDefined in Cabal-3.12.1.0 · Distribution.Backpack.FullUnitId
  • Show ModuleShapeDefined in Cabal-3.12.1.0 · Distribution.Backpack.ModuleShape
  • Show PreModuleShapeDefined in Cabal-3.12.1.0 · Distribution.Backpack.PreModuleShape
  • Show AsyncCancelledDefined in Cabal-3.12.1.0 · Distribution.Compat.Async
  • Show ModTimeDefined in Cabal-3.12.1.0 · Distribution.Compat.Time
  • Show BITargetDefined in Cabal-3.12.1.0 · Distribution.PackageDescription.Check.Target
  • Show CETypeDefined in Cabal-3.12.1.0 · Distribution.PackageDescription.Check.Warning
  • Show CheckExplanationDefined in Cabal-3.12.1.0 · Distribution.PackageDescription.Check.Warning
  • Show CheckExplanationIDDefined in Cabal-3.12.1.0 · Distribution.PackageDescription.Check.Warning
  • Show PackageCheckDefined in Cabal-3.12.1.0 · Distribution.PackageDescription.Check.Warning

    Broken Show instance (not bijective with Read), alas external packages depend on it.

  • Show WarnLangDefined in Cabal-3.12.1.0 · Distribution.PackageDescription.Check.Warning
  • Show AutogenFileDefined in Cabal-3.12.1.0 · Distribution.Simple.Build
  • Show BuildTargetDefined in Cabal-3.12.1.0 · Distribution.Simple.BuildTarget
  • Show BuildTargetProblemDefined in Cabal-3.12.1.0 · Distribution.Simple.BuildTarget
  • Show ComponentKindDefined in Cabal-3.12.1.0 · Distribution.Simple.BuildTarget
  • Show MatchErrorDefined in Cabal-3.12.1.0 · Distribution.Simple.BuildTarget
  • Show QualLevelDefined in Cabal-3.12.1.0 · Distribution.Simple.BuildTarget
  • Show UserBuildTargetDefined in Cabal-3.12.1.0 · Distribution.Simple.BuildTarget
  • Show UserBuildTargetProblemDefined in Cabal-3.12.1.0 · Distribution.Simple.BuildTarget
  • Show CDialectDefined in Cabal-3.12.1.0 · Distribution.Simple.CCompiler
  • Show CompilerDefined in Cabal-3.12.1.0 · Distribution.Simple.Compiler
  • Show DebugInfoLevelDefined in Cabal-3.12.1.0 · Distribution.Simple.Compiler
  • Show OptimisationLevelDefined in Cabal-3.12.1.0 · Distribution.Simple.Compiler
  • Show PackageDBDefined in Cabal-3.12.1.0 · Distribution.Simple.Compiler
  • Show ProfDetailLevelDefined in Cabal-3.12.1.0 · Distribution.Simple.Compiler
  • Show ConfigStateFileErrorDefined in Cabal-3.12.1.0 · Distribution.Simple.Configure
  • Show CabalExceptionDefined in Cabal-3.12.1.0 · Distribution.Simple.Errors
  • Show FailedDependencyDefined in Cabal-3.12.1.0 · Distribution.Simple.Errors
  • Show BuildWayDefined in Cabal-3.12.1.0 · Distribution.Simple.GHC.Build.Modules
  • Show ParseErrorExcDefined in Cabal-3.12.1.0 · Distribution.Simple.GHC.EnvironmentParser
  • Show GhcEnvironmentFileEntryDefined in Cabal-3.12.1.0 · Distribution.Simple.GHC.Internal
  • Show GlobDefined in Cabal-3.12.1.0 · Distribution.Simple.Glob.Internal
  • Show GlobPieceDefined in Cabal-3.12.1.0 · Distribution.Simple.Glob.Internal
  • Show GlobSyntaxErrorDefined in Cabal-3.12.1.0 · Distribution.Simple.Glob.Internal
  • Show DirectoryDefined in Cabal-3.12.1.0 · Distribution.Simple.Haddock
  • Show WayDefined in Cabal-3.12.1.0 · Distribution.Simple.Hpc
  • Show CopyDestDefined in Cabal-3.12.1.0 · Distribution.Simple.InstallDirs
  • Show PathTemplateDefined in Cabal-3.12.1.0 · Distribution.Simple.InstallDirs
  • Show PathComponentDefined in Cabal-3.12.1.0 · Distribution.Simple.InstallDirs.Internal
  • Show PathTemplateVariableDefined in Cabal-3.12.1.0 · Distribution.Simple.InstallDirs.Internal
  • Show SuffixDefined in Cabal-3.12.1.0 · Distribution.Simple.PreProcess.Types
  • Show ProgramDbDefined in Cabal-3.12.1.0 · Distribution.Simple.Program.Db

    Note that this instance does not preserve the known Programs. See restoreProgramDb for details.

  • Show GhcDynLinkModeDefined in Cabal-3.12.1.0 · Distribution.Simple.Program.GHC
  • Show GhcModeDefined in Cabal-3.12.1.0 · Distribution.Simple.Program.GHC
  • Show GhcOptimisationDefined in Cabal-3.12.1.0 · Distribution.Simple.Program.GHC
  • Show GhcOptionsDefined in Cabal-3.12.1.0 · Distribution.Simple.Program.GHC
  • Show GhcProfAutoDefined in Cabal-3.12.1.0 · Distribution.Simple.Program.GHC
  • Show ConfiguredProgramDefined in Cabal-3.12.1.0 · Distribution.Simple.Program.Types
  • Show ProgramDefined in Cabal-3.12.1.0 · Distribution.Simple.Program.Types
  • Show ProgramLocationDefined in Cabal-3.12.1.0 · Distribution.Simple.Program.Types
  • Show BuildingWhatDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup
  • Show BenchmarkFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Benchmark
  • Show BuildFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Build
  • Show CleanFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Clean
  • Show ConfigFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Config
  • Show CopyFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Copy
  • Show HaddockFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Haddock
  • Show HaddockProjectFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Haddock
  • Show HaddockTargetDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Haddock
  • Show VisibilityDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Haddock
  • Show HscolourFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Hscolour
  • Show InstallFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Install
  • Show RegisterFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Register
  • Show ReplFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Repl
  • Show ReplOptionsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Repl
  • Show SDistFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.SDist
  • Show TestFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Test
  • Show TestShowDetailsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Test
  • Show PackageLogDefined in Cabal-3.12.1.0 · Distribution.Simple.Test.Log
  • Show TestLogsDefined in Cabal-3.12.1.0 · Distribution.Simple.Test.Log
  • Show TestSuiteLogDefined in Cabal-3.12.1.0 · Distribution.Simple.Test.Log
  • Show OptionDescrDefined in Cabal-3.12.1.0 · Distribution.TestSuite
  • Show OptionTypeDefined in Cabal-3.12.1.0 · Distribution.TestSuite
  • Show ResultDefined in Cabal-3.12.1.0 · Distribution.TestSuite
  • Show ComponentLocalBuildInfoDefined in Cabal-3.12.1.0 · Distribution.Types.ComponentLocalBuildInfo
  • Show DumpBuildInfoDefined in Cabal-3.12.1.0 · Distribution.Types.DumpBuildInfo
  • Show GivenComponentDefined in Cabal-3.12.1.0 · Distribution.Types.GivenComponent
  • Show BuildOptionsDefined in Cabal-3.12.1.0 · Distribution.Types.LocalBuildConfig
  • Show ComponentBuildDescrDefined in Cabal-3.12.1.0 · Distribution.Types.LocalBuildConfig
  • Show LocalBuildConfigDefined in Cabal-3.12.1.0 · Distribution.Types.LocalBuildConfig
  • Show LocalBuildDescrDefined in Cabal-3.12.1.0 · Distribution.Types.LocalBuildConfig
  • Show PackageBuildDescrDefined in Cabal-3.12.1.0 · Distribution.Types.LocalBuildConfig
  • Show LocalBuildInfoDefined in Cabal-3.12.1.0 · Distribution.Types.LocalBuildInfo
  • Show TargetInfoDefined in Cabal-3.12.1.0 · Distribution.Types.TargetInfo
  • Show JsonDefined in Cabal-3.12.1.0 · Distribution.Utils.Json
  • Show VerbosityDefined in Cabal-3.12.1.0 · Distribution.Verbosity
  • Show VerbosityFlagDefined in Cabal-3.12.1.0 · Distribution.Verbosity.Internal
  • Show VerbosityLevelDefined in Cabal-3.12.1.0 · Distribution.Verbosity.Internal
  • Show OpenModuleDefined in Cabal-syntax-3.12.1.0 · Distribution.Backpack
  • Show OpenUnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Backpack
  • Show CabalSpecVersionDefined in Cabal-syntax-3.12.1.0 · Distribution.CabalSpecVersion
  • Show HasCommonStanzasDefined in Cabal-syntax-3.12.1.0 · Distribution.CabalSpecVersion
  • Show HasElifDefined in Cabal-syntax-3.12.1.0 · Distribution.CabalSpecVersion
  • Show AbiTagDefined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Show CompilerFlavorDefined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Show CompilerIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Show CompilerInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Show SpecLicenseDefined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.Newtypes
  • Show SpecVersionDefined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.Newtypes
  • Show LTokenDefined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Lexer
  • Show TokenDefined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Lexer
  • Show LexWarningDefined in Cabal-syntax-3.12.1.0 · Distribution.Fields.LexerMonad
  • Show LexWarningTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Fields.LexerMonad
  • Show LicenseDefined in Cabal-syntax-3.12.1.0 · Distribution.License
  • Show ModuleNameDefined in Cabal-syntax-3.12.1.0 · Distribution.ModuleName
  • Show PDTaggedDefined in Cabal-syntax-3.12.1.0 · Distribution.PackageDescription.Configuration
  • Show SyntaxDefined in Cabal-syntax-3.12.1.0 · Distribution.PackageDescription.Parsec
  • Show PErrorDefined in Cabal-syntax-3.12.1.0 · Distribution.Parsec.Error
  • Show FieldLineStreamDefined in Cabal-syntax-3.12.1.0 · Distribution.Parsec.FieldLineStream
  • Show PositionDefined in Cabal-syntax-3.12.1.0 · Distribution.Parsec.Position
  • Show PWarnTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Parsec.Warning
  • Show PWarningDefined in Cabal-syntax-3.12.1.0 · Distribution.Parsec.Warning
  • Show LicenseDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.License
  • Show LicenseExceptionIdDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExceptionId
  • Show LicenseExpressionDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExpression
  • Show SimpleLicenseExpressionDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExpression
  • Show LicenseIdDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseId
  • Show LicenseListVersionDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseListVersion
  • Show LicenseRefDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseReference
  • Show ArchDefined in Cabal-syntax-3.12.1.0 · Distribution.System
  • Show OSDefined in Cabal-syntax-3.12.1.0 · Distribution.System
  • Show PlatformDefined in Cabal-syntax-3.12.1.0 · Distribution.System
  • Show AbiDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.AbiDependency
  • Show AbiHashDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.AbiHash
  • Show BenchmarkDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Benchmark
  • Show BenchmarkInterfaceDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BenchmarkInterface
  • Show BenchmarkTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BenchmarkType
  • Show BuildInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BuildInfo
  • Show BuildTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BuildType
  • Show ComponentDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Component
  • Show ComponentIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentId
  • Show ComponentNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentName
  • Show NotLibComponentNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentName
  • Show ComponentRequestedSpecDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentRequestedSpec
  • Show ConfVarDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ConfVar
  • Show DependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Dependency
  • Show DependencyMapDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.DependencyMap
  • Show ExeDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ExeDependency
  • Show ExecutableDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Executable
  • Show ExecutableScopeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ExecutableScope
  • Show ExposedModuleDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ExposedModule
  • Show FlagAssignmentDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Flag
  • Show FlagNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Flag
  • Show PackageFlagDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Flag
  • Show ForeignLibDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLib
  • Show LibVersionInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLib
  • Show ForeignLibOptionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLibOption
  • Show ForeignLibTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLibType
  • Show GenericPackageDescriptionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.GenericPackageDescription
  • Show IncludeRenamingDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.IncludeRenaming
  • Show InstalledPackageInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.InstalledPackageInfo
  • Show LegacyExeDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LegacyExeDependency
  • Show LibraryDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Library
  • Show LibraryNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LibraryName
  • Show LibraryVisibilityDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LibraryVisibility
  • Show MixinDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Mixin
  • Show ModuleDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Module
  • Show ModuleReexportDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ModuleReexport
  • Show ModuleRenamingDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ModuleRenaming
  • Show MungedPackageIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.MungedPackageId
  • Show MungedPackageNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.MungedPackageName
  • Show PackageDescriptionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageDescription
  • Show PackageIdentifierDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageId
  • Show PackageNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageName
  • Show PackageVersionConstraintDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageVersionConstraint
  • Show PkgconfigDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigDependency
  • Show PkgconfigNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigName
  • Show PkgconfigVersionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigVersion
  • Show PkgconfigVersionRangeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigVersionRange
  • Show SetupBuildInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SetupBuildInfo
  • Show KnownRepoTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Show RepoKindDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Show RepoTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Show SourceRepoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Show TestSuiteDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.TestSuite
  • Show TestSuiteInterfaceDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.TestSuiteInterface
  • Show TestTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.TestType
  • Show DefUnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnitId
  • Show UnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnitId
  • Show UnqualComponentNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnqualComponentName
  • Show VersionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Version
  • Show BoundDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionInterval
  • Show LowerBoundDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionInterval
  • Show UpperBoundDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionInterval
  • Show VersionIntervalDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionInterval
  • Show VersionIntervalsDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionInterval
  • Show BoundDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionInterval.Legacy
  • Show LowerBoundDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionInterval.Legacy
  • Show UpperBoundDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionInterval.Legacy
  • Show VersionIntervalsDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionInterval.Legacy
  • Show VersionRangeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionRange.Internal
  • Show ShortTextDefined in Cabal-syntax-3.12.1.0 · Distribution.Utils.ShortText
  • Show StructureDefined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Structured
  • Show ExtensionDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.Extension
  • Show KnownExtensionDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.Extension
  • Show LanguageDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.Extension
  • Show ByteArrayDefined in base-4.20.2.0 · Data.Array.Byte
  • Show TimeoutDefined in base-4.20.2.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 AssignmentDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Assignment
  • Show ConflictDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.ConflictSet
  • Show ConflictSetDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.ConflictSet
  • Show OrderedVersionRangeDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.ConflictSet
  • Show CIDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Dependency
  • Show ExposedComponentDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Dependency
  • Show QualifyOptionsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Dependency
  • Show FInfoDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Flag
  • Show FlagValueDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Flag
  • Show WeakOrTrivialDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Flag
  • Show ComponentInfoDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Index
  • Show IsBuildableDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Index
  • Show IsVisibleDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Index
  • Show LinkGroupDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Linking
  • Show IDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Package
  • Show LocDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Package
  • Show ConflictingDepDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Tree
  • Show FailReasonDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Tree
  • Show POptionDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Tree
  • Show ComponentDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.ComponentDeps
  • Show ConstraintSourceDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.ConstraintSource
  • Show FlagTypeDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Flag
  • Show InstSolverPackageDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.InstSolverPackage
  • Show InstalledPreferenceDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.InstalledPreference
  • Show OptionalStanzaDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.OptionalStanza
  • Show OptionalStanzaSetDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.OptionalStanza
  • Show ConstraintScopeDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackageConstraint
  • Show PackageConstraintDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackageConstraint
  • Show PackagePropertyDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackageConstraint
  • Show NamespaceDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackagePath
  • Show PackagePathDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackagePath
  • Show QualifierDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackagePath
  • Show PkgConfigDbDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PkgConfigDb
  • Show ProjectConfigPathDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.ProjectConfigPath
  • Show AllowBootLibInstallsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Show AvoidReinstallsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Show CountConflictsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Show EnableBackjumpingDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Show FineGrainedConflictsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Show IndependentGoalsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Show MinimizeConflictSetDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Show OnlyConstrainedDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Show PreferOldestDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Show ReorderGoalsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Show ShadowPkgsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Show SolveExecutablesDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Show StrongFlagsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Show SolverIdDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.SolverId
  • Show IntSetDefined in containers-0.7 · Data.IntSet.Internal
  • Show BitQueueDefined in containers-0.7 · Utils.Containers.Internal.BitQueue
  • Show BitQueueBDefined in containers-0.7 · Utils.Containers.Internal.BitQueue
  • Show FileTypeDefined in directory-1.3.8.5 · System.Directory.Internal.Common
  • Show PermissionsDefined in directory-1.3.8.5 · System.Directory.Internal.Common
  • Show XdgDirectoryDefined in directory-1.3.8.5 · System.Directory.Internal.Common
  • Show XdgDirectoryListDefined in directory-1.3.8.5 · System.Directory.Internal.Common
  • Show IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show NaturalDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show ForeignSrcLangDefined in ghc-boot-th-9.10.3 · GHC.ForeignSrcLang.Type
  • Show ExtensionDefined in ghc-boot-th-9.10.3 · GHC.LanguageExtensions.Type
  • Show VoidDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show ByteOrderDefined in ghc-internal-9.1003.0 · GHC.Internal.ByteOrder
  • Show ClosureTypeDefined in ghc-internal-9.1003.0 · GHC.Internal.ClosureTypes
  • Show BlockReasonDefined in ghc-internal-9.1003.0 · GHC.Internal.Conc.Sync
  • Show ThreadIdDefined in ghc-internal-9.1003.0 · GHC.Internal.Conc.Sync
  • Show ThreadStatusDefined in ghc-internal-9.1003.0 · GHC.Internal.Conc.Sync
  • Show NestedAtomicallyDefined in ghc-internal-9.1003.0 · GHC.Internal.Control.Exception.Base
  • Show NoMatchingContinuationPromptDefined in ghc-internal-9.1003.0 · GHC.Internal.Control.Exception.Base
  • Show NoMethodErrorDefined in ghc-internal-9.1003.0 · GHC.Internal.Control.Exception.Base
  • Show NonTerminationDefined in ghc-internal-9.1003.0 · GHC.Internal.Control.Exception.Base
  • Show PatternMatchFailDefined in ghc-internal-9.1003.0 · GHC.Internal.Control.Exception.Base
  • Show RecConErrorDefined in ghc-internal-9.1003.0 · GHC.Internal.Control.Exception.Base
  • Show RecSelErrorDefined in ghc-internal-9.1003.0 · GHC.Internal.Control.Exception.Base
  • Show RecUpdErrorDefined in ghc-internal-9.1003.0 · GHC.Internal.Control.Exception.Base
  • Show TypeErrorDefined in ghc-internal-9.1003.0 · GHC.Internal.Control.Exception.Base
  • Show ConstrDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Show ConstrRepDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Show DataRepDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Show DataTypeDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Show FixityDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Show DynamicDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Dynamic
  • Show AllDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Show AnyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Show SomeTypeRepDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Typeable.Internal
  • Show VersionDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Version
  • Show ControlMessageDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.Control
  • Show EPollFdDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.EPoll
  • Show EventDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.EPoll
  • Show EventTypeDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.EPoll
  • Show EventDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.Internal.Types
  • Show EventLifetimeDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.Internal.Types
  • Show LifetimeDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.Internal.Types
  • Show TimeoutDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.Internal.Types
  • Show FdKeyDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.Manager
  • Show StateDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.Manager
  • Show EventDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.Poll
  • Show PollFdDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.Poll
  • Show StateDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.TimerManager
  • Show UniqueDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.Unique
  • Show ErrorCallDefined in ghc-internal-9.1003.0 · GHC.Internal.Exception
  • Show ArithExceptionDefined in ghc-internal-9.1003.0 · GHC.Internal.Exception.Type
  • Show SomeExceptionDefined in ghc-internal-9.1003.0 · GHC.Internal.Exception.Type
  • Show FingerprintDefined in ghc-internal-9.1003.0 · GHC.Internal.Fingerprint.Type
  • Show CBoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CClockDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CDoubleDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CFloatDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CIntDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CIntMaxDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CIntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CLLongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CLongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CPtrdiffDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CSCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CSUSecondsDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CShortDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CSigAtomicDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CSizeDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CTimeDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CUCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CUIntDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CUIntMaxDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CUIntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CULLongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CULongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CUSecondsDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CUShortDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show CWcharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Show IntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Ptr
  • Show WordPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Ptr
  • Show AssociativityDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Show DecidedStrictnessDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Show FixityDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Show SourceStrictnessDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Show SourceUnpackednessDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Show MaskingStateDefined in ghc-internal-9.1003.0 · GHC.Internal.IO
  • Show SeekModeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Device
  • Show CodingFailureModeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Encoding.Failure
  • Show CodingProgressDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Encoding.Types
  • Show TextEncodingDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Encoding.Types
  • Show AllocationLimitExceededDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Exception
  • Show ArrayExceptionDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Exception
  • Show AssertionFailedDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Exception
  • Show AsyncExceptionDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Exception
  • Show BlockedIndefinitelyOnMVarDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Exception
  • Show BlockedIndefinitelyOnSTMDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Exception
  • Show CompactionFailedDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Exception
  • Show DeadlockDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Exception
  • Show ExitCodeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Exception
  • Show FixIOExceptionDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Exception
  • Show IOErrorTypeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Exception
  • Show IOExceptionDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Exception
  • Show SomeAsyncExceptionDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Exception
  • Show FDDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.FD
  • Show HandlePosnDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Handle
  • Show FileLockingNotSupportedDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Handle.Lock.Common
  • Show BufferModeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Handle.Types
  • Show HandleDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Handle.Types
  • Show HandleTypeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Handle.Types
  • Show NewlineDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Handle.Types
  • Show NewlineModeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Handle.Types
  • Show IOModeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.IOMode
  • Show IOPortExceptionDefined in ghc-internal-9.1003.0 · GHC.Internal.IOPort
  • Show InfoProvDefined in ghc-internal-9.1003.0 · GHC.Internal.InfoProv.Types
  • Show Int16Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Show Int32Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Show Int64Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Show Int8Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Show CCFlagsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Show ConcFlagsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Show DebugFlagsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Show DoCostCentresDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Show DoHeapProfileDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Show DoTraceDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Show GCFlagsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Show GiveGCStatsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Show HpcFlagsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Show IoSubSystemDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Show MiscFlagsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Show ParFlagsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Show ProfFlagsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Show RTSFlagsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Show TickyFlagsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Show TraceFlagsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Show FractionalExponentBaseDefined in ghc-internal-9.1003.0 · GHC.Internal.Real
  • Show StackEntryDefined in ghc-internal-9.1003.0 · GHC.Internal.Stack.CloneStack
  • Show CallStackDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show SrcLocDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show StaticPtrInfoDefined in ghc-internal-9.1003.0 · GHC.Internal.StaticPtr
  • Show GCDetailsDefined in ghc-internal-9.1003.0 · GHC.Internal.Stats
  • Show RTSStatsDefined in ghc-internal-9.1003.0 · GHC.Internal.Stats
  • Show CBlkCntDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Show CBlkSizeDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Show CCcDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Show CClockIdDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Show CDevDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Show CFsBlkCntDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Show CFsFilCntDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Show CGidDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Show CIdDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Show CInoDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Show CKeyDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Show CModeDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Show CNfdsDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Show CNlinkDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Show COffDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Show CPidDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Show CRLimDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Show CSocklenDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Show CSpeedDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Show CSsizeDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Show CTcflagDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Show CTimerDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Show CUidDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Show FdDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Show LexemeDefined in ghc-internal-9.1003.0 · GHC.Internal.Text.Read.Lex
  • Show NumberDefined in ghc-internal-9.1003.0 · GHC.Internal.Text.Read.Lex
  • Show SomeCharDefined in ghc-internal-9.1003.0 · GHC.Internal.TypeLits
  • Show SomeSymbolDefined in ghc-internal-9.1003.0 · GHC.Internal.TypeLits
  • Show SomeNatDefined in ghc-internal-9.1003.0 · GHC.Internal.TypeNats
  • Show GeneralCategoryDefined in ghc-internal-9.1003.0 · GHC.Internal.Unicode
  • Show Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Show Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Show Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Show Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Show BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show CharDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show DoubleDefined in ghc-internal-9.1003.0 · GHC.Internal.Float · orphan
  • Show FloatDefined in ghc-internal-9.1003.0 · GHC.Internal.Float · orphan
  • Show IntDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show KindRepDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show LevityDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show ModuleDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show OrderingDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show RuntimeRepDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show TrNameDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show TyConDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show TypeLitSortDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show VecCountDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show VecElemDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show WordDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show URIDefined in network-uri-2.6.4.2 · Network.URI
  • Show URIAuthDefined in network-uri-2.6.4.2 · Network.URI
  • Show EncodingExceptionDefined in os-string-2.0.7 · System.OsString.Encoding.Internal
  • Show OsCharDefined in os-string-2.0.7 · System.OsString.Internal.Types
  • Show OsStringDefined in os-string-2.0.7 · 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.7 · System.OsString.Internal.Types
  • Show PosixStringDefined in os-string-2.0.7 · System.OsString.Internal.Types

    Prints the raw bytes without decoding.

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

    Decodes as UCS-2.

  • Show ParseErrorDefined in parsec-3.1.18.0 · Text.Parsec.Error
  • Show SourcePosDefined in parsec-3.1.18.0 · Text.Parsec.Pos
  • 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 CmdSpecDefined in process-1.6.26.1 · System.Process.Common
  • Show CreateProcessDefined in process-1.6.26.1 · System.Process.Common
  • Show StdStreamDefined in process-1.6.26.1 · System.Process.Common
  • Show CommunicationHandleDefined in process-1.6.26.1 · System.Process.CommunicationHandle.Internal
  • Show CardinalityDefined in random-1.2.1.3 · System.Random.GFinite
  • Show StdGenDefined in random-1.2.1.3 · System.Random.Internal
  • Show SMGenDefined in splitmix-0.1.3.1 · System.Random.SplitMix
  • Show SMGenDefined in splitmix-0.1.3.1 · System.Random.SplitMix32
  • Show ForallVisFlagDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Ppr
  • Show DocDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.PprLib
  • Show AnnLookupDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show AnnTargetDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show BangDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show BndrVisDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show BodyDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show BytesDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show CallconvDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show ClauseDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show ConDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show DecDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show DecidedStrictnessDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show DerivClauseDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show DerivStrategyDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show DocLocDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show ExpDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show FamilyResultSigDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show FixityDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show FixityDirectionDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show ForeignDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show FunDepDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show GuardDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show InfoDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show InjectivityAnnDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show InlineDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show LitDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show LocDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show MatchDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show ModNameDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show ModuleDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show ModuleInfoDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show NameDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show NameFlavourDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show NameSpaceDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show NamespaceSpecifierDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show OccNameDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show OverlapDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show PatDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show PatSynArgsDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show PatSynDirDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show PhasesDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show PkgNameDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show PragmaDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show RangeDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show RoleDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show RuleBndrDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show RuleMatchDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show SafetyDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show SourceStrictnessDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show SourceUnpackednessDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show SpecificityDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show StmtDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show TyLitDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show TySynEqnDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show TypeDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show TypeFamilyHeadDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show DecodingDefined in text-2.1.3 · Data.Text.Encoding
  • Show UnicodeExceptionDefined in text-2.1.3 · Data.Text.Encoding.Error
  • Show I8Defined in text-2.1.3 · Data.Text.Foreign
  • Show TextDefined in text-2.1.3 · Data.Text.Show · orphan
  • Show BuilderDefined in text-2.1.3 · Data.Text.Internal.Builder
  • Show PartialUtf8CodePointDefined in text-2.1.3 · Data.Text.Internal.Encoding
  • Show Utf8StateDefined in text-2.1.3 · Data.Text.Internal.Encoding
  • Show DecoderStateDefined in text-2.1.3 · Data.Text.Internal.Encoding.Utf8
  • Show SizeDefined in text-2.1.3 · Data.Text.Internal.Fusion.Size
  • Show TextDefined in text-2.1.3 · Data.Text.Lazy · orphan
  • Show FPFormatDefined in text-2.1.3 · Data.Text.Lazy.Builder.RealFloat
  • Show IterDefined in text-2.1.3 · Data.Text.Unsafe
  • Show CalendarDiffDaysDefined in time-1.12.2 · Data.Time.Calendar.CalendarDiffDays
  • Show DayDefined in time-1.12.2 · Data.Time.Calendar.Gregorian · orphan
  • Show MonthDefined in time-1.12.2 · Data.Time.Calendar.Month

    Show as yyyy-mm.

  • Show QuarterDefined in time-1.12.2 · Data.Time.Calendar.Quarter

    Show as yyyy-Qn.

  • Show QuarterOfYearDefined in time-1.12.2 · Data.Time.Calendar.Quarter
  • Show DayOfWeekDefined in time-1.12.2 · Data.Time.Calendar.Week
  • Show AbsoluteTimeDefined in time-1.12.2 · Data.Time.Clock.TAI · orphan
  • Show DiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.DiffTime
  • Show NominalDiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.NominalDiffTime
  • Show SystemTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.SystemTime
  • Show UTCTimeDefined in time-1.12.2 · Data.Time.LocalTime.Internal.ZonedTime · orphan
  • Show UniversalTimeDefined in time-1.12.2 · Data.Time.LocalTime.Internal.LocalTime · orphan
  • Show TimeLocaleDefined in time-1.12.2 · Data.Time.Format.Locale
  • Show CalendarDiffTimeDefined in time-1.12.2 · Data.Time.LocalTime.Internal.CalendarDiffTime
  • Show LocalTimeDefined in time-1.12.2 · Data.Time.LocalTime.Internal.LocalTime
  • Show TimeOfDayDefined in time-1.12.2 · Data.Time.LocalTime.Internal.TimeOfDay
  • Show TimeZoneDefined in time-1.12.2 · Data.Time.LocalTime.Internal.TimeZone

    This only shows the time zone name, or offset if the name is empty.

  • Show ZonedTimeDefined in time-1.12.2 · Data.Time.LocalTime.Internal.ZonedTime

    For the time zone, this only shows the name, or offset if the name is empty.

  • Show DirTypeDefined in unix-2.8.7.0 · System.Posix.Directory.Common
  • Show DLDefined in unix-2.8.7.0 · System.Posix.DynamicLinker.Prim
  • Show RTLDFlagsDefined in unix-2.8.7.0 · System.Posix.DynamicLinker.Prim
  • Show CAttributesDefined in unix-2.8.7.0 · System.Posix.Files.Common
  • Show StatxFlagsDefined in unix-2.8.7.0 · System.Posix.Files.Common
  • Show StatxMaskDefined in unix-2.8.7.0 · System.Posix.Files.Common
  • Show OpenFileFlagsDefined in unix-2.8.7.0 · System.Posix.IO.Common
  • Show OpenModeDefined in unix-2.8.7.0 · System.Posix.IO.Common
  • Show ProcessStatusDefined in unix-2.8.7.0 · System.Posix.Process.Internals
  • Show ResourceDefined in unix-2.8.7.0 · System.Posix.Resource
  • Show ResourceLimitDefined in unix-2.8.7.0 · System.Posix.Resource
  • Show ResourceLimitsDefined in unix-2.8.7.0 · System.Posix.Resource
  • Show BaudRateDefined in unix-2.8.7.0 · System.Posix.Terminal.Common
  • Show GroupEntryDefined in unix-2.8.7.0 · System.Posix.User.Common
  • Show UserEntryDefined in unix-2.8.7.0 · System.Posix.User.Common
  • Show ()Defined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show (ConstPtr a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.ConstPtr
  • Show (ForeignPtr a)Defined in ghc-internal-9.1003.0 · GHC.Internal.ForeignPtr
  • Show (FunPtr a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Ptr
  • Show (Ptr a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Ptr
  • Show (SChar c)Defined in ghc-internal-9.1003.0 · GHC.Internal.TypeLits
  • Show (SSymbol s)Defined in ghc-internal-9.1003.0 · GHC.Internal.TypeLits
  • Show (SNat n)Defined in ghc-internal-9.1003.0 · GHC.Internal.TypeNats
  • Show (Doc a)Defined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Show a => Show (TargetAnnotation a)Defined in Cabal-3.12.1.0 · Distribution.PackageDescription.Check.Monad
  • Show a => Show (Match a)Defined in Cabal-3.12.1.0 · Distribution.Simple.BuildTarget
  • Show a => Show (MaybeAmbiguous a)Defined in Cabal-3.12.1.0 · Distribution.Simple.BuildTarget
  • Show a => Show (Flag a)Defined in Cabal-3.12.1.0 · Distribution.Simple.Flag
  • Show a => Show (GlobResult a)Defined in Cabal-3.12.1.0 · Distribution.Simple.Glob.Internal
  • Show a => Show (PackageIndex a)Defined in Cabal-3.12.1.0 · Distribution.Simple.PackageIndex
  • Show a => Show (VerboseException a)Defined in Cabal-3.12.1.0 · Distribution.Simple.Utils
  • Show a => Show (NubList a)Defined in Cabal-3.12.1.0 · Distribution.Utils.NubList
  • Show a => Show (NubListR a)Defined in Cabal-3.12.1.0 · Distribution.Utils.NubList
  • Show a => Show (Graph a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Graph
  • Show a => Show (NonEmptySet a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.NonEmptySet
  • Show a => Show (First' a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Semigroup
  • Show a => Show (Last' a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Semigroup
  • Show a => Show (Option' a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Semigroup
  • Show a => Show (VersionRangeF a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionRange.Internal
  • Show a => Show (Complex a)Defined in base-4.20.2.0 · Data.Complex
  • Show a => Show (First a)Defined in base-4.20.2.0 · Data.Semigroup
  • Show a => Show (Last a)Defined in base-4.20.2.0 · Data.Semigroup
  • Show a => Show (Max a)Defined in base-4.20.2.0 · Data.Semigroup
  • Show a => Show (Min a)Defined in base-4.20.2.0 · Data.Semigroup
  • Show a => Show (Decoder a)Defined in binary-0.8.9.3 · Data.Binary.Get.Internal
  • Show a => Show (ComponentDeps a)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.ComponentDeps
  • Show a => Show (OptionalStanzaMap a)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.OptionalStanza
  • Show a => Show (Qualified a)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackagePath
  • Show a => Show (IntMap a)Defined in containers-0.7 · Data.IntMap.Internal
  • Show a => Show (Seq a)Defined in containers-0.7 · Data.Sequence.Internal
  • Show a => Show (ViewL a)Defined in containers-0.7 · Data.Sequence.Internal
  • Show a => Show (ViewR a)Defined in containers-0.7 · Data.Sequence.Internal
  • Show a => Show (Intersection a)Defined in containers-0.7 · Data.Set.Internal
  • Show a => Show (Set a)Defined in containers-0.7 · Data.Set.Internal
  • Show a => Show (Tree a)Defined in containers-0.7 · Data.Tree
  • Show a => Show (ExitCase a)Defined in exceptions-0.10.9 · Control.Monad.Catch
  • Show a => Show (NonEmpty a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show a => Show (And a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Bits
  • Show a => Show (Iff a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Bits
  • Show a => Show (Ior a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Bits
  • Show a => Show (Xor a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Bits
  • Show a => Show (Identity a)Defined in ghc-internal-9.1003.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-9.1003.0 · GHC.Internal.Data.Monoid
  • Show a => Show (Last a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Monoid
  • Show a => Show (Down a)Defined in ghc-internal-9.1003.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-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Show a => Show (Product a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Show a => Show (Sum a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Show a => Show (ExceptionWithContext a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Exception.Type
  • Show a => Show (ZipList a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Functor.ZipList
  • Show a => Show (Maybe a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show a => Show (Ratio a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Real
  • 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 (a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show a => Show [a]Defined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show ann => Show (NamelessField ann)Defined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.Parsec
  • Show ann => Show (Section ann)Defined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.Parsec
  • Show ann => Show (Field ann)Defined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Field
  • Show ann => Show (FieldLine ann)Defined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Field
  • Show ann => Show (Name ann)Defined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Field
  • Show ann => Show (SectionArg ann)Defined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Field
  • Show c => Show (Condition c)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.Condition
  • Show dir => Show (InstallDirs dir)Defined in Cabal-3.12.1.0 · Distribution.Simple.InstallDirs
  • Show e => Show (NoBacktrace e)Defined in ghc-internal-9.1003.0 · GHC.Internal.Exception.Type
  • Show flag => Show (TyVarBndr flag)Defined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Show g => Show (StateGen g)Defined in random-1.2.1.3 · System.Random.Internal
  • Show g => Show (AtomicGen g)Defined in random-1.2.1.3 · System.Random.Stateful
  • Show g => Show (IOGen g)Defined in random-1.2.1.3 · System.Random.Stateful
  • Show g => Show (STGen g)Defined in random-1.2.1.3 · System.Random.Stateful
  • Show g => Show (TGen g)Defined in random-1.2.1.3 · System.Random.Stateful
  • Show id => Show (AnnotatedId id)Defined in Cabal-3.12.1.0 · Distribution.Types.AnnotatedId
  • Show loc => Show (ResolverPackage loc)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.ResolverPackage
  • Show loc => Show (SolverPackage loc)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.SolverPackage
  • Show loc => Show (SourcePackage loc)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.SourcePackage
  • Show m => Show (WrappedMonoid m)Defined in base-4.20.2.0 · Data.Semigroup
  • Show p => Show (Par1 p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Show pkg => Show (PackageIndex pkg)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackageIndex
  • Show qpn => Show (DependencyReason qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Dependency
  • Show qpn => Show (Goal qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Dependency
  • Show qpn => Show (GoalReason qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Dependency
  • Show qpn => Show (PkgComponent qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Dependency
  • Show qpn => Show (FN qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Flag
  • Show qpn => Show (SN qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Flag
  • Show qpn => Show (PI qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Package
  • Show qpn => Show (Var qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Var
  • Show qpn => Show (Variable qpn)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Variable
  • Show sem => Show (ParStratX sem)Defined in Cabal-3.12.1.0 · Distribution.Types.ParStrat
  • Show v => Show (PerCompilerFlavor v)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Show vertex => Show (SCC vertex)Defined in containers-0.7 · Data.Graph
  • HasResolution a => Show (Fixed a)Defined in base-4.20.2.0 · Data.Fixed
  • Show (SymbolicPath from to)Defined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Path
  • Show (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Show (TypeRep a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Typeable.Internal
  • Show (U1 p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Show (V1 p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Show (ST s a)Defined in ghc-internal-9.1003.0 · GHC.Internal.ST
  • Show (a -> b)Defined in base-4.20.2.0 · Text.Show.Functions · orphan
  • (Show1 f, Show a) => Show (Lift f a)Defined in transformers-0.6.1.1 · Control.Applicative.Lift
  • (Show1 m, Show a) => Show (MaybeT m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Maybe
  • (Ix a, Show a, Show b) => Show (Array a b)Defined in ghc-internal-9.1003.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.20.2.0 · Data.Semigroup
  • (Show a, Show b) => Show (Either a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Either
  • (Show a, Show b) => Show (a, b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • (Show a, Show k) => Show (Node k a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Graph
  • (Show k, Show a) => Show (Map k a)Defined in containers-0.7 · Data.Map.Internal
  • (Show k, Show v) => Show (PSQ k v)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.PSQ
  • Show (Coercion a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Coercion
  • Show (OrderingI a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Ord
  • Show (URec Char p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Show (URec Double p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Show (URec Float p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Show (URec Int p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Show (URec Word p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Show (a :~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • Show (f a) => Show (Ap f a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Monoid
  • Show (f a) => Show (Alt f a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Show (f p) => Show (Rec1 f p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Show a => Show (Const a b)Defined in ghc-internal-9.1003.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.1.1 · Data.Functor.Constant
  • (Show1 f, Show a) => Show (Backwards f a)Defined in transformers-0.6.1.1 · Control.Applicative.Backwards
  • (Show1 f, Show a) => Show (IdentityT f a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Identity
  • (Show1 f, Show a) => Show (Reverse f a)Defined in transformers-0.6.1.1 · Data.Functor.Reverse
  • (Show a, Show b, Show c) => Show (a, b, c)Defined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • (Show a, Show c, Show v) => Show (CondTree v c a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.CondTree
  • (Show e, Show1 m, Show a) => Show (ExceptT e m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Except
  • (Show v, Show a, Show c) => Show (CondBranch v c a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.CondTree
  • (Show w, Show1 m, Show a) => Show (WriterT w m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Writer.Lazy
  • (Show w, Show1 m, Show a) => Show (WriterT w m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Writer.Strict
  • (Show w, Show k, Show v) => Show (WeightedPSQ w k v)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.WeightedPSQ
  • Show (a :~~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • Show c => Show (K1 i c p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Show (f a), Show (g a)) => Show (Product f g a)Defined in base-4.20.2.0 · Data.Functor.Product
  • (Show (f a), Show (g a)) => Show (Sum f g a)Defined in base-4.20.2.0 · Data.Functor.Sum
  • (Show (f p), Show (g p)) => Show ((:*:) f g p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Show (f p), Show (g p)) => Show ((:+:) f g p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Show a, Show b, Show c, Show d) => Show (a, b, c, d)Defined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Show (f (g a)) => Show (Compose f g a)Defined in base-4.20.2.0 · Data.Functor.Compose
  • Show (f (g p)) => Show ((:.:) f g p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Show (f p) => Show (M1 i c f p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Show a, Show b, Show c, Show d, Show e) => Show (a, b, c, d, e)Defined in ghc-internal-9.1003.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-9.1003.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-9.1003.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-9.1003.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-9.1003.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-9.1003.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-9.1003.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-9.1003.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-9.1003.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-9.1003.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-9.1003.0 · GHC.Internal.Show
classclass Typeable a => Structured a where
#

Class of types with a known Structure.

For regular data types Structured can be derived generically.

data Record = Record { a :: Int, b :: Bool, c :: [Char] } deriving (Generic)
instance Structured Record
Instances207Structured, …
datadata NonEmpty a
#

Non-empty (and non-strict) list type.

Constructors

  • a :| [a]infixr 5
Instances30Monad, Functor, MonadFix, Applicative, Foldable, Traversable, …
typetype FilePath = String
#

File and directory names are values of type String, whose precise meaning is operating system dependent. Files can be opened, yielding a handle which can then be used to operate on the contents of that file.

classclass Semigroup a where
#

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

Instances should satisfy the following:

Associativity

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

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

Unit

sconcat (pure x) = x

Multiplication

sconcat (join xss) = sconcat (fmap sconcat xss)

Methods

  • (<>) :: a -> a -> ainfixr 6

    An associative operation.

    Examples
    Example1 expression
    [1,2,3] <> [4,5,6][1,2,3,4,5,6]
    Example1 expression
    Just [1, 2, 3] <> Just [4, 5, 6]Just [1,2,3,4,5,6]
    Example1 expression
    putStr "Hello, " <> putStrLn "World!"Hello, World!
Instances150Semigroup, …
typetype String = [Char]
#

String is an alias for a list of characters.

String constants in Haskell are values of type String. That means if you write a string literal like "hello world", it will have the type [Char], which is the same as String.

Note: You can ask the compiler to automatically infer different types with the -XOverloadedStrings language extension, for example "hello world" :: Text. See IsString for more information.

Because String is just a list of characters, you can use normal list functions to do basic string manipulation. See Data.List for operations on lists.

Performance considerations

[Char] is a relatively memory-inefficient type. It is a linked list of boxed word-size characters, internally it looks something like:

╭─────┬───┬──╮  ╭─────┬───┬──╮  ╭─────┬───┬──╮  ╭────╮
│ (:) │   │ ─┼─>│ (:) │   │ ─┼─>│ (:) │   │ ─┼─>│ [] │
╰─────┴─┼─┴──╯  ╰─────┴─┼─┴──╯  ╰─────┴─┼─┴──╯  ╰────╯
        v               v               v
       'a'             'b'             'c'

The String "abc" will use 5*3+1 = 16 (in general 5n+1) words of space in memory.

Furthermore, operations like (++) (string concatenation) are O(n) (in the left argument).

For historical reasons, the base library uses String in a lot of places for the conceptual simplicity, but library code dealing with user-data should use the text package for Unicode text, or the the bytestring package for binary data.

Instances5Newtype
  • Newtype String FilePathNTDefined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.Newtypes
  • Newtype String TokenDefined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.Newtypes
  • Newtype String Token'Defined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.Newtypes
  • Newtype String CompatFilePathDefined in Cabal-syntax-3.12.1.0 · Distribution.PackageDescription.FieldGrammar
  • Newtype String CompatPackageKeyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.InstalledPackageInfo.FieldGrammar
classclass Functor (f :: Type -> Type) where
#

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

Identity

fmap id == id

Composition

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

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

Methods

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

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

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

    Examples

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

    Example2 expressions
    fmap show NothingNothingfmap show (Just 3)Just "3"

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

    Example2 expressions
    fmap show (Left 17)Left 17fmap show (Right 17)Right "17"

    Double each element of a list:

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

    Apply even to the second element of a pair:

    Example1 expression
    fmap even (2,2)(2,True)

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

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

    Example1 expression
    fmap even ("hello", 1.0, 4)("hello",1.0,True)
  • (<$) :: a -> f b -> f ainfixl 4

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

    Examples

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

    Example2 expressions
    'a' <$ Just 2Just 'a''a' <$ NothingNothing
Instances181Functor, …
  • Functor WithSourceDefined in Cabal-3.12.1.0 · Distribution.Backpack.ModuleScope
  • Functor InstMDefined in Cabal-3.12.1.0 · Distribution.Backpack.ReadyComponent
  • Functor ArgDescrDefined in Cabal-3.12.1.0 · Distribution.GetOpt
  • Functor OptDescrDefined in Cabal-3.12.1.0 · Distribution.GetOpt
  • Functor ReadEDefined in Cabal-3.12.1.0 · Distribution.ReadE
  • Functor MatchDefined in Cabal-3.12.1.0 · Distribution.Simple.BuildTarget
  • Functor CommandParseDefined in Cabal-3.12.1.0 · Distribution.Simple.Command
  • Functor FlagDefined in Cabal-3.12.1.0 · Distribution.Simple.Flag
  • Functor GlobResultDefined in Cabal-3.12.1.0 · Distribution.Simple.Glob.Internal
  • Functor InstallDirsDefined in Cabal-3.12.1.0 · Distribution.Simple.InstallDirs
  • Functor AnnotatedIdDefined in Cabal-3.12.1.0 · Distribution.Types.AnnotatedId
  • Functor LogProgressDefined in Cabal-3.12.1.0 · Distribution.Utils.LogProgress
  • Functor WriterDefined in Cabal-3.12.1.0 · Distribution.ZinzaPrelude
  • Functor Last'Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Semigroup
  • Functor Option'Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Semigroup
  • Functor PerCompilerFlavorDefined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Functor NamelessFieldDefined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.Parsec
  • Functor SectionDefined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.Parsec
  • Functor FieldDefined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Field
  • Functor FieldLineDefined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Field
  • Functor NameDefined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Field
  • Functor SectionArgDefined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Field
  • Functor LexDefined in Cabal-syntax-3.12.1.0 · Distribution.Fields.LexerMonad
  • Functor ParseResultDefined in Cabal-syntax-3.12.1.0 · Distribution.Fields.ParseResult
  • Functor PrettyFieldDefined in Cabal-syntax-3.12.1.0 · Distribution.Fields.Pretty
  • Functor ParsecParserDefined in Cabal-syntax-3.12.1.0 · Distribution.Parsec
  • Functor ConditionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Condition
  • Functor VersionRangeFDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionRange.Internal
  • Functor ComplexDefined in base-4.20.2.0 · Data.Complex
  • Functor FirstDefined in base-4.20.2.0 · Data.Semigroup
  • Functor LastDefined in base-4.20.2.0 · Data.Semigroup
  • Functor MaxDefined in base-4.20.2.0 · Data.Semigroup
  • Functor MinDefined in base-4.20.2.0 · Data.Semigroup
  • Functor ArgDescrDefined in base-4.20.2.0 · System.Console.GetOpt
  • Functor ArgOrderDefined in base-4.20.2.0 · System.Console.GetOpt
  • Functor OptDescrDefined in base-4.20.2.0 · System.Console.GetOpt
  • Functor DecoderDefined in binary-0.8.9.3 · Data.Binary.Get.Internal
  • Functor GetDefined in binary-0.8.9.3 · Data.Binary.Get.Internal
  • Functor PutMDefined in binary-0.8.9.3 · Data.Binary.Put
  • Functor PutDefined in bytestring-0.12.2.0 · Data.ByteString.Builder.Internal
  • Functor DepDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Dependency
  • Functor DependencyReasonDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Dependency
  • Functor GoalDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Dependency
  • Functor GoalReasonDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Dependency
  • Functor PkgComponentDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Dependency
  • Functor FNDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Flag
  • Functor SNDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Flag
  • Functor UpdateStateDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Linking
  • Functor PIDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Package
  • Functor ValidateDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Validate
  • Functor VarDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Var
  • Functor ComponentDepsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.ComponentDeps
  • Functor PackageIndexDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackageIndex
  • Functor SCCDefined in containers-0.7 · Data.Graph
  • Functor IntMapDefined in containers-0.7 · Data.IntMap.Internal
  • Functor DigitDefined in containers-0.7 · Data.Sequence.Internal
  • Functor ElemDefined in containers-0.7 · Data.Sequence.Internal
  • Functor FingerTreeDefined in containers-0.7 · Data.Sequence.Internal
  • Functor NodeDefined in containers-0.7 · Data.Sequence.Internal
  • Functor SeqDefined in containers-0.7 · Data.Sequence.Internal
  • Functor ViewLDefined in containers-0.7 · Data.Sequence.Internal
  • Functor ViewRDefined in containers-0.7 · Data.Sequence.Internal
  • Functor TreeDefined in containers-0.7 · Data.Tree
  • Functor NonEmptyDefined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Functor STMDefined in ghc-internal-9.1003.0 · GHC.Internal.Conc.Sync
  • Functor HandlerDefined in ghc-internal-9.1003.0 · GHC.Internal.Control.Exception
  • Functor IdentityDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Identity
  • Functor FirstDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Monoid
  • Functor LastDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Monoid
  • Functor DownDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Ord
  • Functor DualDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Functor ProductDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Functor SumDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Functor ZipListDefined in ghc-internal-9.1003.0 · GHC.Internal.Functor.ZipList
  • Functor NoIODefined in ghc-internal-9.1003.0 · GHC.Internal.GHCi
  • Functor Par1Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Functor MaybeDefined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Functor PDefined in ghc-internal-9.1003.0 · GHC.Internal.Text.ParserCombinators.ReadP
  • Functor ReadPDefined in ghc-internal-9.1003.0 · GHC.Internal.Text.ParserCombinators.ReadP
  • Functor ReadPrecDefined in ghc-internal-9.1003.0 · GHC.Internal.Text.ParserCombinators.ReadPrec
  • Functor SoloDefined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Functor IODefined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Functor ConsumedDefined in parsec-3.1.18.0 · Text.Parsec.Prim
  • Functor AnnotDetailsDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Functor DocDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Functor SpanDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Functor STMDefined in stm-2.5.3.1 · Control.Sequential.STM
  • Functor PprMDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.PprLib
  • Functor QDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Functor TyVarBndrDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Functor []Defined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Functor ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Functor U1Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Functor V1Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Functor (UnifyM s)Defined in Cabal-3.12.1.0 · Distribution.Backpack.UnifyM
  • Functor (Node k)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Graph
  • Functor (FieldDescrs s)Defined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.FieldDescrs
  • Functor (ParsecFieldGrammar s)Defined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.Parsec
  • Functor (PrettyFieldGrammar s)Defined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.Pretty
  • Functor (Arg a)Defined in base-4.20.2.0 · Data.Semigroup
  • Functor (PSQ k)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.PSQ
  • Functor (SetM s)Defined in containers-0.7 · Data.Graph
  • Functor (Map k)Defined in containers-0.7 · Data.Map.Internal
  • Functor (State s)Defined in containers-0.7 · Utils.Containers.Internal.State
  • Functor (Array i)Defined in ghc-internal-9.1003.0 · GHC.Internal.Arr
  • Functor (ST s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Control.Monad.ST.Lazy.Imp
  • Functor (Either a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Either
  • Functor (StateL s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Utils
  • Functor (StateR s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Utils
  • Functor (ST s)Defined in ghc-internal-9.1003.0 · GHC.Internal.ST
  • Functor (Tuple2 a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Functor (IParser t)Defined in text-2.1.3 · Data.Text.Internal.Read
  • Functor f => Functor (Lift f)Defined in transformers-0.6.1.1 · Control.Applicative.Lift
  • Functor m => Functor (CheckM m)Defined in Cabal-3.12.1.0 · Distribution.PackageDescription.Check.Monad
  • Functor m => Functor (QuoteToQuasi m)Defined in th-compat-0.1.6 · Language.Haskell.TH.Syntax.Compat
  • Functor m => Functor (MaybeT m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Maybe
  • Monad m => Functor (WrappedMonad m)Defined in base-4.20.2.0 · Control.Applicative
  • Monad m => Functor (Handler m)Defined in exceptions-0.10.9 · Control.Monad.Catch
  • Monad m => Functor (CatchT m)Defined in exceptions-0.10.9 · Control.Monad.Catch.Pure
  • Arrow a => Functor (ArrowMonad a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Control.Arrow
  • Functor (Progress step fail)Defined in Cabal-3.12.1.0 · Distribution.Utils.Progress
  • Functor (Pretext a b)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Lens
  • Functor (CondBranch v c)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.CondTree
  • Functor (CondTree v c)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.CondTree
  • Functor (TreeF d c)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Tree
  • Functor (WeightedPSQ w k)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.WeightedPSQ
  • Functor (Progress step fail)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Progress
  • Functor (Const m)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Const
  • Functor (URec Char)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Functor (URec Double)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Functor (URec Float)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Functor (URec Int)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Functor (URec Word)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Functor (URec (Ptr ()))Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Functor (Tuple3 a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Functor (Reply s u)Defined in parsec-3.1.18.0 · Text.Parsec.Prim
  • Functor (Constant a)Defined in transformers-0.6.1.1 · Data.Functor.Constant
  • Functor (t m) => Functor (LiftingAccum t m)Defined in mtl-2.3.1 · Control.Monad.Accum
  • Functor (t m) => Functor (LiftingSelect t m)Defined in mtl-2.3.1 · Control.Monad.Select
  • Functor f => Functor (Ap f)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Monoid
  • Functor f => Functor (Alt f)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Functor f => Functor (Rec1 f)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Functor f => Functor (Backwards f)Defined in transformers-0.6.1.1 · Control.Applicative.Backwards

    Derived instance.

  • Functor f => Functor (Reverse f)Defined in transformers-0.6.1.1 · Data.Functor.Reverse

    Derived instance.

  • Functor m => Functor (StateM s m)Defined in Cabal-3.12.1.0 · Distribution.Utils.MapAccum
  • Functor m => Functor (Kleisli m a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Control.Arrow
  • Functor m => Functor (AccumT w m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Accum
  • Functor m => Functor (ExceptT e m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Except
  • Functor m => Functor (IdentityT m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Identity
  • Functor m => Functor (ReaderT r m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Reader
  • Functor m => Functor (SelectT r m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Select
  • Functor m => Functor (StateT s m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.State.Lazy
  • Functor m => Functor (StateT s m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.State.Strict
  • Functor m => Functor (WriterT w m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Writer.CPS
  • Functor m => Functor (WriterT w m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Writer.Lazy
  • Functor m => Functor (WriterT w m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Writer.Strict
  • Monad m => Functor (StateT s m)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Utils
  • Arrow a => Functor (WrappedArrow a b)Defined in base-4.20.2.0 · Control.Applicative
  • (Applicative f, Monad f) => Functor (WhenMissing f x)Defined in containers-0.7 · Data.IntMap.Internal
  • (Generic1 f, Functor (Rep1 f)) => Functor (Generically1 f)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Functor (K1 i c)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Functor (Tuple4 a b c)Defined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Functor (ParsecT s u m)Defined in parsec-3.1.18.0 · Text.Parsec.Prim
  • Functor (ContT r m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Cont
  • Functor ((->) r)Defined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Functor f => Functor (WhenMatched f x y)Defined in containers-0.7 · Data.IntMap.Internal
  • (Applicative f, Monad f) => Functor (WhenMissing f k x)Defined in containers-0.7 · Data.Map.Internal
  • (Functor f, Functor g) => Functor (Product f g)Defined in base-4.20.2.0 · Data.Functor.Product
  • (Functor f, Functor g) => Functor (Sum f g)Defined in base-4.20.2.0 · Data.Functor.Sum
  • (Functor f, Functor g) => Functor (f :*: g)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Functor f, Functor g) => Functor (f :+: g)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Functor (Tuple5 a b c d)Defined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Functor f => Functor (WhenMatched f k x y)Defined in containers-0.7 · Data.Map.Internal
  • Functor f => Functor (M1 i c f)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Functor m => Functor (RWST r w s m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.RWS.CPS
  • Functor m => Functor (RWST r w s m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.RWS.Lazy
  • Functor m => Functor (RWST r w s m)Defined in transformers-0.6.1.1 · Control.Monad.Trans.RWS.Strict
  • (Functor f, Functor g) => Functor (Compose f g)Defined in base-4.20.2.0 · Data.Functor.Compose
  • (Functor f, Functor g) => Functor (f :.: g)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Functor (Tuple6 a b c d e)Defined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Functor (Tuple7 a b c d e f)Defined in ghc-internal-9.1003.0 · GHC.Internal.Base
valueunwords :: [String] -> String
#

unwords joins words with separating spaces (U+0020 SPACE).

unwords is neither left nor right inverse of words:

Example2 expressions
words (unwords [" "])[]unwords (words "foo\nbar")"foo bar"
Examples
Example1 expression
unwords ["Lorem", "ipsum", "dolor"]"Lorem ipsum dolor"
Example1 expression
unwords ["foo", "bar", "", "baz"]"foo bar  baz"
valuefst :: (a, b) -> a
#

Extract the first component of a pair.

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

An infix synonym for fmap.

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

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

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

Examples

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

Example1 expression
show <$> NothingNothing
Example1 expression
show <$> Just 3Just "3"

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

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

Double each element of a list:

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

Apply even to the second element of a pair:

Example1 expression
even <$> (2,2)(2,True)
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]
value($!) :: (a -> b) -> a -> b
#

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

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

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

as >>= f == f =<< as
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.

valueconst :: a -> b -> a
#

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

const x = \_ -> x

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

Examples
Example1 expression
const 42 "hello"42
Example1 expression
map (const 42) [0..3][42,42,42,42]
valueflip :: (a -> b -> c) -> b -> a -> c
#

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

Property
flip f x y = f y x
Property
flip . flip = id
Examples
Example1 expression
flip (++) "hello" "world""worldhello"
Example1 expression
let (.>) = flip (.) in (+1) .> show $ 5"6"
valueuntil :: (a -> Bool) -> (a -> a) -> a -> a
#

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

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

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

Examples

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

Example4 expressions
let s = Left "foo" :: Either String Intlet n = Right 3 :: Either String Inteither length (*2) s3either length (*2) n6
valueall :: Foldable t => (a -> Bool) -> t a -> Bool
#

Determines whether all elements of the structure satisfy the predicate.

Examples

Basic usage:

Example1 expression
all (> 3) []True
Example1 expression
all (> 3) [1,2]False
Example1 expression
all (> 3) [1,2,3,4,5]False
Example1 expression
all (> 3) [1..]False
Example1 expression
all (> 3) [4..]* Hangs forever *
valueand :: Foldable t => t Bool -> Bool
#

and returns the conjunction of a container of Bools. For the result to be True, the container must be finite; False, however, results from a False value finitely far from the left end.

Examples

Basic usage:

Example1 expression
and []True
Example1 expression
and [True]True
Example1 expression
and [False]False
Example1 expression
and [True, True, False]False
Example1 expression
and (False : repeat True) -- Infinite list [False,True,True,True,...False
Example1 expression
and (repeat True)* Hangs forever *
valueany :: Foldable t => (a -> Bool) -> t a -> Bool
#

Determines whether any element of the structure satisfies the predicate.

Examples

Basic usage:

Example1 expression
any (> 3) []False
Example1 expression
any (> 3) [1,2]False
Example1 expression
any (> 3) [1,2,3,4,5]True
Example1 expression
any (> 3) [1..]True
Example1 expression
any (> 3) [0, -1..]* Hangs forever *
valueconcat :: Foldable t => t [a] -> [a]
#

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

Examples

Basic usage:

Example1 expression
concat (Just [1, 2, 3])[1,2,3]
Example1 expression
concat (Left 42)[]
Example1 expression
concat [[1, 2, 3], [4, 5], [6], []][1,2,3,4,5,6]
valueconcatMap :: Foldable t => (a -> [b]) -> t a -> [b]
#

Map a function over all the elements of a container and concatenate the resulting lists.

Examples

Basic usage:

Example1 expression
concatMap (take 3) [[1..], [10..], [100..], [1000..]][1,2,3,10,11,12,100,101,102,1000,1001,1002]
Example1 expression
concatMap (take 3) (Just [1..])[1,2,3]
valuenotElem :: (Foldable t, Eq a) => a -> t a -> Bool
#

notElem is the negation of elem.

Examples

Basic usage:

Example1 expression
3 `notElem` []True
Example1 expression
3 `notElem` [1,2]True
Example1 expression
3 `notElem` [1,2,3,4,5]False

For infinite structures, notElem terminates if the value exists at a finite distance from the left side of the structure:

Example1 expression
3 `notElem` [1..]False
Example1 expression
3 `notElem` ([4..] ++ [3])* Hangs forever *
valueor :: Foldable t => t Bool -> Bool
#

or returns the disjunction of a container of Bools. For the result to be False, the container must be finite; True, however, results from a True value finitely far from the left end.

Examples

Basic usage:

Example1 expression
or []False
Example1 expression
or [True]True
Example1 expression
or [False]False
Example1 expression
or [True, True, False]True
Example1 expression
or (True : repeat False) -- Infinite list [True,False,False,False,...True
Example1 expression
or (repeat False)* Hangs forever *
valuesequence_ :: (Foldable t, Monad m) => t (m a) -> m ()
#

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

sequence_ is just like sequenceA_, but specialised to monadic actions.

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

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

Examples

Basic usage:

Example1 expression
maybe False odd (Just 3)True
Example1 expression
maybe False odd NothingFalse

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

Example3 expressions
import GHC.Internal.Text.Read ( readMaybe )maybe 0 (*2) (readMaybe "5")10maybe 0 (*2) (readMaybe "")0

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

Example2 expressions
maybe "" show (Just 5)"5"maybe "" show Nothing""
valuelines :: String -> [String]
#

Splits the argument into a list of lines stripped of their terminating \n characters. The \n terminator is optional in a final non-empty line of the argument string.

When the argument string is empty, or ends in a \n character, it can be recovered by passing the result of lines to the unlines function. Otherwise, unlines appends the missing terminating \n. This makes unlines . lines idempotent:

(unlines . lines) . (unlines . lines) = (unlines . lines)
Examples
Example1 expression
lines ""           -- empty input contains no lines[]
Example1 expression
lines "\n"         -- single empty line[""]
Example1 expression
lines "one"        -- single unterminated line["one"]
Example1 expression
lines "one\n"      -- single non-empty line["one"]
Example1 expression
lines "one\n\n"    -- second line is empty["one",""]
Example1 expression
lines "one\ntwo"   -- second line is unterminated["one","two"]
Example1 expression
lines "one\ntwo\n" -- two non-empty lines["one","two"]
valueunlines :: [String] -> String
#

Appends a \n character to each input string, then concatenates the results. Equivalent to foldMap (s -> s ++ "\n").

Examples
Example1 expression
unlines ["Hello", "World", "!"]"Hello\nWorld\n!\n"

Note that unlines . lines /= id when the input is not \n-terminated:

Example1 expression
unlines . lines $ "foo\nbar""foo\nbar\n"
valuewords :: String -> [String]
#

words breaks a string up into a list of words, which were delimited by white space (as defined by isSpace). This function trims any white spaces at the beginning and at the end.

Examples
Example1 expression
words "Lorem ipsum\ndolor"["Lorem","ipsum","dolor"]
Example1 expression
words " foo bar "["foo","bar"]
valuecurry :: ((a, b) -> c) -> a -> b -> c
#

Convert an uncurried function to a curried function.

Examples
Example1 expression
curry fst 1 21
valuesnd :: (a, b) -> b
#

Extract the second component of a pair.

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

uncurry converts a curried function to a function on pairs.

Examples
Example1 expression
uncurry (+) (1,2)3
Example1 expression
uncurry ($) (show, 1)"1"
Example1 expression
map (uncurry max) [(1,2), (3,4), (6,8)][2,4,8]
valueundefined :: HasCallStack => a
#

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

valueuserError :: String -> IOError
#

Construct an IOError value with a string describing the error. The fail method of the IO instance of the Monad class raises a userError, thus:

instance Monad IO where
  ...
  fail s = ioError (userError s)
value(!!) :: HasCallStack => [a] -> Int -> a
#

List index (subscript) operator, starting from 0. It is an instance of the more general genericIndex, which takes an index of any integral type.

WARNING: This function is partial, and should only be used if you are sure that the indexing will not fail. Otherwise, use !?.

WARNING: This function takes linear time in the index.

Examples
Example1 expression
['a', 'b', 'c'] !! 0'a'
Example1 expression
['a', 'b', 'c'] !! 2'c'
Example1 expression
['a', 'b', 'c'] !! 3*** Exception: Prelude.!!: index too large
Example1 expression
['a', 'b', 'c'] !! (-1)*** Exception: Prelude.!!: negative index
valuebreak :: (a -> Bool) -> [a] -> ([a], [a])
#

break, applied to a predicate p and a list xs, returns a tuple where first element is longest prefix (possibly empty) of xs of elements that do not satisfy p and second element is the remainder of the list:

break p is equivalent to span (not . p) and consequently to (takeWhile (not . p) xs, dropWhile (not . p) xs), even if p is _|_.

Laziness
Example1 expression
break undefined []([],[])
Example1 expression
fst (break (const True) undefined)*** Exception: Prelude.undefined
Example1 expression
fst (break (const True) (undefined : undefined))[]
Example1 expression
take 1 (fst (break (const False) (1 : undefined)))[1]

break produces the first component of the tuple lazily:

Example1 expression
take 10 (fst (break (const False) [1..]))[1,2,3,4,5,6,7,8,9,10]
Examples
Example1 expression
break (> 3) [1,2,3,4,1,2,3,4]([1,2,3],[4,1,2,3,4])
Example1 expression
break (< 9) [1,2,3]([],[1,2,3])
Example1 expression
break (> 9) [1,2,3]([1,2,3],[])
valuedrop :: Int -> [a] -> [a]
#

drop n xs returns the suffix of xs after the first n elements, or [] if n >= length xs.

It is an instance of the more general genericDrop, in which n may be of any integral type.

Examples
Example1 expression
drop 6 "Hello World!""World!"
Example1 expression
drop 3 [1,2,3,4,5][4,5]
Example1 expression
drop 3 [1,2][]
Example1 expression
drop 3 [][]
Example1 expression
drop (-1) [1,2][1,2]
Example1 expression
drop 0 [1,2][1,2]
valuedropWhile :: (a -> Bool) -> [a] -> [a]
#

dropWhile p xs returns the suffix remaining after takeWhile p xs.

Examples
Example1 expression
dropWhile (< 3) [1,2,3,4,5,1,2,3][3,4,5,1,2,3]
Example1 expression
dropWhile (< 9) [1,2,3][]
Example1 expression
dropWhile (< 0) [1,2,3][1,2,3]
valuehead :: NonEmpty a -> a
#

Extract the first element of the stream.

valueinit :: NonEmpty a -> [a]
#

Extract everything except the last element of the stream.

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

iterate f x returns an infinite list of repeated applications of f to x:

iterate f x == [x, f x, f (f x), ...]
Laziness

Note that iterate is lazy, potentially leading to thunk build-up if the consumer doesn't force each iterate. See iterate' for a strict variant of this function.

Example1 expression
take 1 $ iterate undefined 42[42]
Examples
Example1 expression
take 10 $ iterate not True[True,False,True,False,True,False,True,False,True,False]
Example1 expression
take 10 $ iterate (+3) 42[42,45,48,51,54,57,60,63,66,69]

iterate id == repeat:

Example1 expression
take 10 $ iterate id 1[1,1,1,1,1,1,1,1,1,1]
valuelast :: NonEmpty a -> a
#

Extract the last element of the stream.

valuerepeat :: a -> [a]
#

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

Examples
Example1 expression
take 10 $ repeat 17[17,17,17,17,17,17,17,17,17, 17]
Example1 expression
repeat undefined[*** Exception: Prelude.undefined
valuereplicate :: Int -> a -> [a]
#

replicate n x is a list of length n with x the value of every element. It is an instance of the more general genericReplicate, in which n may be of any integral type.

Examples
Example1 expression
replicate 0 True[]
Example1 expression
replicate (-1) True[]
Example1 expression
replicate 4 True[True,True,True,True]
valuereverse :: [a] -> [a]
#

\mathcal{O}(n). reverse xs returns the elements of xs in reverse order. xs must be finite.

Laziness

reverse is lazy in its elements.

Example1 expression
head (reverse [undefined, 1])1
Example1 expression
reverse (1 : 2 : undefined)*** Exception: Prelude.undefined
Examples
Example1 expression
reverse [][]
Example1 expression
reverse [42][42]
Example1 expression
reverse [2,5,7][7,5,2]
Example1 expression
reverse [1..]* Hangs forever *
valuescanl :: (b -> a -> b) -> b -> [a] -> [b]
#

\mathcal{O}(n). scanl is similar to foldl, but returns a list of successive reduced values from the left:

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

Note that

last (scanl f z xs) == foldl f z xs
Examples
Example1 expression
scanl (+) 0 [1..4][0,1,3,6,10]
Example1 expression
scanl (+) 42 [][42]
Example1 expression
scanl (-) 100 [1..4][100,99,97,94,90]
Example1 expression
scanl (\reversedString nextChar -> nextChar : reversedString) "foo" ['a', 'b', 'c', 'd']["foo","afoo","bafoo","cbafoo","dcbafoo"]
Example1 expression
take 10 (scanl (+) 0 [1..])[0,1,3,6,10,15,21,28,36,45]
Example1 expression
take 1 (scanl undefined 'a' undefined)"a"
valuescanl1 :: (a -> a -> a) -> [a] -> [a]
#

\mathcal{O}(n). scanl1 is a variant of scanl that has no starting value argument:

scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...]
Examples
Example1 expression
scanl1 (+) [1..4][1,3,6,10]
Example1 expression
scanl1 (+) [][]
Example1 expression
scanl1 (-) [1..4][1,-1,-4,-8]
Example1 expression
scanl1 (&&) [True, False, True, True][True,False,False,False]
Example1 expression
scanl1 (||) [False, False, True, True][False,False,True,True]
Example1 expression
take 10 (scanl1 (+) [1..])[1,3,6,10,15,21,28,36,45,55]
Example1 expression
take 1 (scanl1 undefined ('a' : undefined))"a"
valuescanr :: (a -> b -> b) -> b -> [a] -> [b]
#

\mathcal{O}(n). scanr is the right-to-left dual of scanl. Note that the order of parameters on the accumulating function are reversed compared to scanl. Also note that

head (scanr f z xs) == foldr f z xs.
Examples
Example1 expression
scanr (+) 0 [1..4][10,9,7,4,0]
Example1 expression
scanr (+) 42 [][42]
Example1 expression
scanr (-) 100 [1..4][98,-97,99,-96,100]
Example1 expression
scanr (\nextChar reversedString -> nextChar : reversedString) "foo" ['a', 'b', 'c', 'd']["abcdfoo","bcdfoo","cdfoo","dfoo","foo"]
Example1 expression
force $ scanr (+) 0 [1..]*** Exception: stack overflow
valuescanr1 :: (a -> a -> a) -> [a] -> [a]
#

\mathcal{O}(n). scanr1 is a variant of scanr that has no starting value argument.

Examples
Example1 expression
scanr1 (+) [1..4][10,9,7,4]
Example1 expression
scanr1 (+) [][]
Example1 expression
scanr1 (-) [1..4][-2,3,-1,4]
Example1 expression
scanr1 (&&) [True, False, True, True][False,False,True,True]
Example1 expression
scanr1 (||) [True, True, False, False][True,True,False,False]
Example1 expression
force $ scanr1 (+) [1..]*** Exception: stack overflow
valuespan :: (a -> Bool) -> [a] -> ([a], [a])
#

span, applied to a predicate p and a list xs, returns a tuple where first element is the longest prefix (possibly empty) of xs of elements that satisfy p and second element is the remainder of the list:

span p xs is equivalent to (takeWhile p xs, dropWhile p xs), even if p is _|_.

Laziness
Example4 expressions
span undefined []([],[])fst (span (const False) undefined)*** Exception: Prelude.undefinedfst (span (const False) (undefined : undefined))[]take 1 (fst (span (const True) (1 : undefined)))[1]

span produces the first component of the tuple lazily:

Example1 expression
take 10 (fst (span (const True) [1..]))[1,2,3,4,5,6,7,8,9,10]
Examples
Example1 expression
span (< 3) [1,2,3,4,1,2,3,4]([1,2],[3,4,1,2,3,4])
Example1 expression
span (< 9) [1,2,3]([1,2,3],[])
Example1 expression
span (< 0) [1,2,3]([],[1,2,3])
valuesplitAt :: Int -> [a] -> ([a], [a])
#

splitAt n xs returns a tuple where first element is xs prefix of length n and second element is the remainder of the list:

splitAt is an instance of the more general genericSplitAt, in which n may be of any integral type.

Laziness

It is equivalent to (take n xs, drop n xs) unless n is _|_: splitAt _|_ xs = _|_, not (_|_, _|_)).

The first component of the tuple is produced lazily:

Example1 expression
fst (splitAt 0 undefined)[]
Example1 expression
take 1 (fst (splitAt 10 (1 : undefined)))[1]
Examples
Example1 expression
splitAt 6 "Hello World!"("Hello ","World!")
Example1 expression
splitAt 3 [1,2,3,4,5]([1,2,3],[4,5])
Example1 expression
splitAt 1 [1,2,3]([1],[2,3])
Example1 expression
splitAt 3 [1,2,3]([1,2,3],[])
Example1 expression
splitAt 4 [1,2,3]([1,2,3],[])
Example1 expression
splitAt 0 [1,2,3]([],[1,2,3])
Example1 expression
splitAt (-1) [1,2,3]([],[1,2,3])
valuetail :: NonEmpty a -> [a]
#

Extract the possibly-empty tail of the stream.

valuetake :: Int -> [a] -> [a]
#

take n, applied to a list xs, returns the prefix of xs of length n, or xs itself if n >= length xs.

It is an instance of the more general genericTake, in which n may be of any integral type.

Laziness
Example2 expressions
take 0 undefined[]take 2 (1 : 2 : undefined)[1,2]
Examples
Example1 expression
take 5 "Hello World!""Hello"
Example1 expression
take 3 [1,2,3,4,5][1,2,3]
Example1 expression
take 3 [1,2][1,2]
Example1 expression
take 3 [][]
Example1 expression
take (-1) [1,2][]
Example1 expression
take 0 [1,2][]
valuetakeWhile :: (a -> Bool) -> [a] -> [a]
#

takeWhile, applied to a predicate p and a list xs, returns the longest prefix (possibly empty) of xs of elements that satisfy p.

Laziness
Example1 expression
takeWhile (const False) undefined*** Exception: Prelude.undefined
Example1 expression
takeWhile (const False) (undefined : undefined)[]
Example1 expression
take 1 (takeWhile (const True) (1 : undefined))[1]
Examples
Example1 expression
takeWhile (< 3) [1,2,3,4,1,2,3,4][1,2]
Example1 expression
takeWhile (< 9) [1,2,3][1,2,3]
Example1 expression
takeWhile (< 0) [1,2,3][]
valueunzip :: [(a, b)] -> ([a], [b])
#

unzip transforms a list of pairs into a list of first components and a list of second components.

Examples
Example1 expression
unzip []([],[])
Example1 expression
unzip [(1, 'a'), (2, 'b')]([1,2],"ab")
valueunzip3 :: [(a, b, c)] -> ([a], [b], [c])
#

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

Examples
Example1 expression
unzip3 []([],[],[])
Example1 expression
unzip3 [(1, 'a', True), (2, 'b', False)]([1,2],"ab",[True,False])
valuezip3 :: [a] -> [b] -> [c] -> [(a, b, c)]
#

zip3 takes three lists and returns a list of triples, analogous to zip. It is capable of list fusion, but it is restricted to its first list argument and its resulting list.

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.

Instances41Bounded, Enum, Integral, Data, Num, Read, …
valuezipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
#

\mathcal{O}(\min(m,n)). zipWith generalises zip by zipping with the function given as the first argument, instead of a tupling function.

zipWith (,) xs ys == zip xs ys
zipWith f [x1,x2,x3..] [y1,y2,y3..] == [f x1 y1, f x2 y2, f x3 y3..]

zipWith is right-lazy:

Example2 expressions
let f = undefinedzipWith f [] undefined[]

zipWith is capable of list fusion, but it is restricted to its first list argument and its resulting list.

Examples

zipWith (+) can be applied to two lists to produce the list of corresponding sums:

Example1 expression
zipWith (+) [1, 2, 3] [4, 5, 6][5,7,9]
Example1 expression
zipWith (++) ["hello ", "foo"] ["world!", "bar"]["hello world!","foobar"]
valuezipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
#

\mathcal{O}(\min(l,m,n)). The zipWith3 function takes a function which combines three elements, as well as three lists and returns a list of the function applied to corresponding elements, analogous to zipWith. It is capable of list fusion, but it is restricted to its first list argument and its resulting list.

zipWith3 (,,) xs ys zs == zip3 xs ys zs
zipWith3 f [x1,x2,x3..] [y1,y2,y3..] [z1,z2,z3..] == [f x1 y1 z1, f x2 y2 z2, f x3 y3 z3..]
Examples
Example1 expression
zipWith3 (\x y z -> [x, y, z]) "123" "abc" "xyz"["1ax","2by","3cz"]
Example1 expression
zipWith3 (\x y z -> (x * y) + z) [1, 2, 3] [4, 5, 6] [7, 8, 9][11,18,27]
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.

valuelex :: ReadS String
#

The lex function reads a single lexeme from the input, discarding initial white space, and returning the characters that constitute the lexeme. If the input string contains only white space, lex returns a single successful `lexeme' consisting of the empty string. (Thus lex "" = [("","")].) If there is no legal lexeme at the beginning of the input string, lex fails (i.e. returns []).

This lexer is not completely faithful to the Haskell lexical syntax in the following respects:

  • Qualified names are not handled properly

  • Octal and hexadecimal numerics are not recognized as a single token

  • Comments are not treated properly

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

raise a number to a non-negative integral power

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.

valueshowChar :: Char -> ShowS
#

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

valueappendFile :: FilePath -> String -> IO ()
#

The computation appendFile file str function appends the string str, to the file file.

Note that writeFile and appendFile write a literal string to a file. To write a value of any printable type, as with print, use the show function to convert the value to a string first.

main = appendFile "squares" (show [(x,x*x) | x <- [0,0.1..2]])
valueinteract :: (String -> String) -> IO ()
#

The interact function takes a function of type String->String as its argument. The entire input from the standard input device is passed to this function as its argument, and the resulting string is output on the standard output device.

valuereadIO :: Read a => String -> IO a
#

The readIO function is similar to read except that it signals parse failure to the IO monad instead of terminating the program.

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

Boolean "and", lazy in the second argument

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

Boolean "or", lazy in the second argument

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

A functor with application, providing operations to

  • embed pure expressions (pure), and

  • sequence computations and combine their results (<*> and liftA2).

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

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

Further, any definition must satisfy the following:

Identity
pure id <*> v = v
Composition
pure (.) <*> u <*> v <*> w = u <*> (v <*> w)
Homomorphism
pure f <*> pure x = pure (f x)
Interchange
u <*> pure y = pure ($ y) <*> u

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

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

It may be useful to note that supposing

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

it follows from the above that

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

If f is also a Monad, it should satisfy

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

Methods

  • pure :: a -> f a

    Lift a value into the Structure.

    Examples
    Example1 expression
    pure 1 :: Maybe IntJust 1
    Example1 expression
    pure 'z' :: [Char]"z"
    Example1 expression
    pure (pure ":D") :: Maybe [String]Just [":D"]
  • (<*>) :: f (a -> b) -> f a -> f binfixl 4

    Sequential application.

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

    Example

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

    Example1 expression
    data MyState = MyState {arg1 :: Foo, arg2 :: Bar, arg3 :: Baz}
    Example3 expressions
    produceFoo :: Applicative f => f FooproduceBar :: Applicative f => f BarproduceBaz :: Applicative f => f Baz
    Example2 expressions
    mkState :: Applicative f => f MyStatemkState = MyState <$> produceFoo <*> produceBar <*> produceBaz
  • liftA2 :: (a -> b -> c) -> f a -> f b -> f c

    Lift a binary function to actions.

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

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

    Example
    Example1 expression
    liftA2 (,) (Just 3) (Just 5)Just (3,5)
    Example1 expression
    liftA2 (+) [1, 2, 3] [4, 5, 6][5,6,7,6,7,8,7,8,9]
  • (*>) :: f a -> f b -> f binfixl 4

    Sequence actions, discarding the value of the first argument.

    Examples

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

    Example1 expression
    Just 2 *> Just 3Just 3
    Example1 expression
    Nothing *> Just 3Nothing

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

    Example4 expressions
    import Data.Charimport GHC.Internal.Text.ParserCombinators.ReadPlet p = string "my name is " *> munch1 isAlpha <* eofreadP_to_S p "my name is Simon"[("Simon","")]
  • (<*) :: f a -> f b -> f ainfixl 4

    Sequence actions, discarding the value of the second argument.

Instances109Applicative, …
value($) :: (a -> b) -> a -> b
#

($) is the function application operator.

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

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

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

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

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

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

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

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

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

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

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

we can deploy the function application operator:

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

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

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

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

fastMod :: Int -> Int -> Int
fastMod (I# x) (I# m) = I# $ remInt# x m
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

Instances131Bounded, …
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] = []
Instances147Enum, …
  • Enum CheckExplanationIDDefined in Cabal-3.12.1.0 · Distribution.PackageDescription.Check.Warning
  • Enum ComponentKindDefined in Cabal-3.12.1.0 · Distribution.Simple.BuildTarget
  • Enum QualLevelDefined in Cabal-3.12.1.0 · Distribution.Simple.BuildTarget
  • Enum DebugInfoLevelDefined in Cabal-3.12.1.0 · Distribution.Simple.Compiler
  • Enum OptimisationLevelDefined in Cabal-3.12.1.0 · Distribution.Simple.Compiler
  • Enum BuildWayDefined in Cabal-3.12.1.0 · Distribution.Simple.GHC.Build.Modules
  • Enum WayDefined in Cabal-3.12.1.0 · Distribution.Simple.Hpc
  • Enum TestShowDetailsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Test
  • Enum DumpBuildInfoDefined in Cabal-3.12.1.0 · Distribution.Types.DumpBuildInfo
  • Enum VerbosityDefined in Cabal-3.12.1.0 · Distribution.Verbosity
  • Enum VerbosityFlagDefined in Cabal-3.12.1.0 · Distribution.Verbosity.Internal
  • Enum VerbosityLevelDefined in Cabal-3.12.1.0 · Distribution.Verbosity.Internal
  • Enum CabalSpecVersionDefined in Cabal-syntax-3.12.1.0 · Distribution.CabalSpecVersion
  • Enum PWarnTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Parsec.Warning
  • Enum LicenseExceptionIdDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExceptionId
  • Enum LicenseIdDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseId
  • Enum LicenseListVersionDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseListVersion
  • Enum KnownRepoTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Enum KnownExtensionDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.Extension
  • Enum OptionalStanzaDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.OptionalStanza
  • Enum FileTypeDefined in directory-1.3.8.5 · System.Directory.Internal.Common
  • Enum XdgDirectoryDefined in directory-1.3.8.5 · System.Directory.Internal.Common
  • Enum XdgDirectoryListDefined in directory-1.3.8.5 · System.Directory.Internal.Common
  • Enum IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.Enum
  • Enum NaturalDefined in ghc-internal-9.1003.0 · GHC.Internal.Enum
  • Enum ExtensionDefined in ghc-boot-th-9.10.3 · GHC.LanguageExtensions.Type
  • Enum ByteOrderDefined in ghc-internal-9.1003.0 · GHC.Internal.ByteOrder
  • Enum ClosureTypeDefined in ghc-internal-9.1003.0 · GHC.Internal.ClosureTypes
  • Enum CBoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CClockDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CDoubleDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CFloatDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CIntDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CIntMaxDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CIntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CLLongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CLongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CPtrdiffDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CSCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CSUSecondsDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CShortDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CSigAtomicDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CSizeDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CTimeDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CUCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CUIntDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CUIntMaxDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CUIntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CULLongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CULongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CUSecondsDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CUShortDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum CWcharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Enum IntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Ptr
  • Enum WordPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Ptr
  • Enum AssociativityDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Enum DecidedStrictnessDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Enum SourceStrictnessDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Enum SourceUnpackednessDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Enum SeekModeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Device
  • Enum IOModeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.IOMode
  • Enum Int16Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Enum Int32Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Enum Int64Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Enum Int8Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Enum DoCostCentresDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Enum DoHeapProfileDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Enum DoTraceDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Enum GiveGCStatsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Enum IoSubSystemDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Enum CBlkCntDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Enum CBlkSizeDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Enum CCcDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Enum CClockIdDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Enum CDevDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Enum CFsBlkCntDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Enum CFsFilCntDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Enum CGidDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Enum CIdDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Enum CInoDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Enum CKeyDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Enum CModeDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Enum CNfdsDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Enum CNlinkDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Enum COffDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Enum CPidDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Enum CRLimDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Enum CSocklenDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Enum CSpeedDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Enum CSsizeDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Enum CTcflagDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Enum CUidDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Enum FdDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Enum GeneralCategoryDefined in ghc-internal-9.1003.0 · GHC.Internal.Unicode
  • Enum Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Enum Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Enum Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Enum Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Enum BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Enum
  • Enum CharDefined in ghc-internal-9.1003.0 · GHC.Internal.Enum
  • Enum DoubleDefined in ghc-internal-9.1003.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-9.1003.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-9.1003.0 · GHC.Internal.Enum
  • Enum LevityDefined in ghc-internal-9.1003.0 · GHC.Internal.Enum
  • Enum OrderingDefined in ghc-internal-9.1003.0 · GHC.Internal.Enum
  • Enum VecCountDefined in ghc-internal-9.1003.0 · GHC.Internal.Enum
  • Enum VecElemDefined in ghc-internal-9.1003.0 · GHC.Internal.Enum
  • Enum WordDefined in ghc-internal-9.1003.0 · GHC.Internal.Enum
  • Enum MessageDefined in parsec-3.1.18.0 · Text.Parsec.Error
  • Enum CardinalityDefined in random-1.2.1.3 · System.Random.GFinite

    This is needed only as a superclass of Integral.

  • Enum I8Defined in text-2.1.3 · Data.Text.Foreign
  • Enum FPFormatDefined in text-2.1.3 · Data.Text.Lazy.Builder.RealFloat
  • Enum DayDefined in time-1.12.2 · Data.Time.Calendar.Days
  • Enum MonthDefined in time-1.12.2 · Data.Time.Calendar.Month
  • Enum QuarterDefined in time-1.12.2 · Data.Time.Calendar.Quarter
  • Enum QuarterOfYearDefined in time-1.12.2 · Data.Time.Calendar.Quarter

    maps Q1..Q4 to 1..4

  • Enum DayOfWeekDefined in time-1.12.2 · Data.Time.Calendar.Week

    "Circular", so for example [Tuesday ..] gives an endless sequence. Also: fromEnum gives [1 .. 7] for [Monday .. Sunday], and toEnum performs mod 7 to give a cycle of days.

  • Enum DiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.DiffTime
  • Enum NominalDiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.NominalDiffTime
  • Enum StatxFlagsDefined in unix-2.8.7.0 · System.Posix.Files.Common
  • Enum StatxMaskDefined in unix-2.8.7.0 · System.Posix.Files.Common
  • Enum BaudRateDefined in unix-2.8.7.0 · System.Posix.Terminal.Common
  • Enum ()Defined in ghc-internal-9.1003.0 · GHC.Internal.Enum
  • Enum a => Enum (Flag a)Defined in Cabal-3.12.1.0 · Distribution.Simple.Flag
  • Enum a => Enum (First a)Defined in base-4.20.2.0 · Data.Semigroup
  • Enum a => Enum (Last a)Defined in base-4.20.2.0 · Data.Semigroup
  • Enum a => Enum (Max a)Defined in base-4.20.2.0 · Data.Semigroup
  • Enum a => Enum (Min a)Defined in base-4.20.2.0 · Data.Semigroup
  • Enum a => Enum (WrappedMonoid a)Defined in base-4.20.2.0 · Data.Semigroup
  • Enum a => Enum (And a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Bits
  • Enum a => Enum (Iff a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Bits
  • Enum a => Enum (Ior a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Bits
  • Enum a => Enum (Xor a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Bits
  • Enum a => Enum (Identity a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Identity
  • Enum a => Enum (a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Enum
  • Integral a => Enum (Ratio a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Real
  • (Enum a, Bounded a, Eq a) => Enum (Down a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Ord

    Swaps succ and pred of the underlying type.

  • Enum (Fixed a)Defined in base-4.20.2.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-9.1003.0 · GHC.Internal.Data.Proxy
  • Enum (f a) => Enum (Ap f a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Monoid
  • Enum (f a) => Enum (Alt f a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Enum a => Enum (Const a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Const
  • Coercible a b => Enum (Coercion a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Coercion
  • a ~ b => Enum (a :~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • a ~~ b => Enum (a :~~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • Enum (f (g a)) => Enum (Compose f g a)Defined in base-4.20.2.0 · Data.Functor.Compose
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 the exponent may assume

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

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

  • encodeFloat :: Integer -> Int -> a

    encodeFloat performs the inverse of decodeFloat in the sense that for finite x with the exception of -0.0, 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, …
typetype IOError = IOException
#

The Haskell 2010 type for exceptions in the IO monad. Any I/O operation may raise an IOError instead of returning a result. For a more general type of exception, including also those that arise in pure code, see Exception.

In Haskell 2010, this is an opaque type.

classclass Read a where
#

Parsing of Strings, producing values.

Derived instances of Read make the following assumptions, which derived instances of Text.Show.Show obey:

  • If the constructor is defined to be an infix operator, then the derived Read instance will parse only infix applications of the constructor (not the prefix form).

  • Associativity is not used to reduce the occurrence of parentheses, although precedence may be.

  • If the constructor is defined using record syntax, the derived Read will parse only the record-syntax form, and furthermore, the fields must be given in the same order as the original declaration.

  • The derived Read instance allows arbitrary Haskell whitespace between tokens of the input string. Extra parentheses are also allowed.

For example, given the declarations

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

the derived instance of Read in Haskell 2010 is equivalent to

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

        readsPrec d r =  readParen (d > app_prec)
                         (\r -> [(Leaf m,t) |
                                 ("Leaf",s) <- lex r,
                                 (m,t) <- readsPrec (app_prec+1) s]) r

                      ++ readParen (d > up_prec)
                         (\r -> [(u:^:v,w) |
                                 (u,s) <- readsPrec (up_prec+1) r,
                                 (":^:",t) <- lex s,
                                 (v,w) <- readsPrec (up_prec+1) t]) r

          where app_prec = 10
                up_prec = 5

Note that right-associativity of :^: is unused.

The derived instance in GHC is equivalent to

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

        readPrec = parens $ (prec app_prec $ do
                                 Ident "Leaf" <- lexP
                                 m <- step readPrec
                                 return (Leaf m))

                     +++ (prec up_prec $ do
                                 u <- step readPrec
                                 Symbol ":^:" <- lexP
                                 v <- step readPrec
                                 return (u :^: v))

          where app_prec = 10
                up_prec = 5

        readListPrec = readListPrecDefault

Why do both readsPrec and readPrec exist, and why does GHC opt to implement readPrec in derived Read instances instead of readsPrec? The reason is that readsPrec is based on the ReadS type, and although ReadS is mentioned in the Haskell 2010 Report, it is not a very efficient parser data structure.

readPrec, on the other hand, is based on a much more efficient ReadPrec datatype (a.k.a "new-style parsers"), but its definition relies on the use of the RankNTypes language extension. Therefore, readPrec (and its cousin, readListPrec) are marked as GHC-only. Nevertheless, it is recommended to use readPrec instead of readsPrec whenever possible for the efficiency improvements it brings.

As mentioned above, derived Read instances in GHC will implement readPrec instead of readsPrec. The default implementations of readsPrec (and its cousin, readList) will simply use readPrec under the hood. If you are writing a Read instance by hand, it is recommended to write it like so:

instance Read T where
  readPrec     = ...
  readListPrec = readListPrecDefault

Methods

  • readsPrec :: Int -> ReadS a

    attempts to parse a value from the front of the string, returning a list of (parsed value, remaining string) pairs. If there is no successful parse, the returned list is empty.

    Derived instances of Read and Text.Show.Show satisfy the following:

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

  • readList :: ReadS [a]

    The method readList is provided to allow the programmer to give a specialised way of parsing lists of values. For example, this is used by the predefined Read instance of the Char type, where values of type String are expected to use double quotes, rather than square brackets.

Instances332Read, …
  • Read ModTimeDefined in Cabal-3.12.1.0 · Distribution.Compat.Time
  • Read CompilerDefined in Cabal-3.12.1.0 · Distribution.Simple.Compiler
  • Read DebugInfoLevelDefined in Cabal-3.12.1.0 · Distribution.Simple.Compiler
  • Read OptimisationLevelDefined in Cabal-3.12.1.0 · Distribution.Simple.Compiler
  • Read PackageDBDefined in Cabal-3.12.1.0 · Distribution.Simple.Compiler
  • Read ProfDetailLevelDefined in Cabal-3.12.1.0 · Distribution.Simple.Compiler
  • Read DirectoryDefined in Cabal-3.12.1.0 · Distribution.Simple.Haddock
  • Read WayDefined in Cabal-3.12.1.0 · Distribution.Simple.Hpc
  • Read PathTemplateDefined in Cabal-3.12.1.0 · Distribution.Simple.InstallDirs
  • Read PathComponentDefined in Cabal-3.12.1.0 · Distribution.Simple.InstallDirs.Internal
  • Read PathTemplateVariableDefined in Cabal-3.12.1.0 · Distribution.Simple.InstallDirs.Internal
  • Read ProgramDbDefined in Cabal-3.12.1.0 · Distribution.Simple.Program.Db

    Note that this instance does not preserve the known Programs. See restoreProgramDb for details.

  • Read ConfiguredProgramDefined in Cabal-3.12.1.0 · Distribution.Simple.Program.Types
  • Read ProgramLocationDefined in Cabal-3.12.1.0 · Distribution.Simple.Program.Types
  • Read BuildFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Build
  • Read ConfigFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Config
  • Read PackageLogDefined in Cabal-3.12.1.0 · Distribution.Simple.Test.Log
  • Read TestLogsDefined in Cabal-3.12.1.0 · Distribution.Simple.Test.Log
  • Read TestSuiteLogDefined in Cabal-3.12.1.0 · Distribution.Simple.Test.Log
  • Read OptionDescrDefined in Cabal-3.12.1.0 · Distribution.TestSuite
  • Read OptionTypeDefined in Cabal-3.12.1.0 · Distribution.TestSuite
  • Read ResultDefined in Cabal-3.12.1.0 · Distribution.TestSuite
  • Read ComponentLocalBuildInfoDefined in Cabal-3.12.1.0 · Distribution.Types.ComponentLocalBuildInfo
  • Read DumpBuildInfoDefined in Cabal-3.12.1.0 · Distribution.Types.DumpBuildInfo
  • Read GivenComponentDefined in Cabal-3.12.1.0 · Distribution.Types.GivenComponent
  • Read BuildOptionsDefined in Cabal-3.12.1.0 · Distribution.Types.LocalBuildConfig
  • Read ComponentBuildDescrDefined in Cabal-3.12.1.0 · Distribution.Types.LocalBuildConfig
  • Read LocalBuildConfigDefined in Cabal-3.12.1.0 · Distribution.Types.LocalBuildConfig
  • Read LocalBuildDescrDefined in Cabal-3.12.1.0 · Distribution.Types.LocalBuildConfig
  • Read PackageBuildDescrDefined in Cabal-3.12.1.0 · Distribution.Types.LocalBuildConfig
  • Read LocalBuildInfoDefined in Cabal-3.12.1.0 · Distribution.Types.LocalBuildInfo
  • Read VerbosityDefined in Cabal-3.12.1.0 · Distribution.Verbosity
  • Read VerbosityFlagDefined in Cabal-3.12.1.0 · Distribution.Verbosity.Internal
  • Read VerbosityLevelDefined in Cabal-3.12.1.0 · Distribution.Verbosity.Internal
  • Read OpenModuleDefined in Cabal-syntax-3.12.1.0 · Distribution.Backpack
  • Read OpenUnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Backpack
  • Read CabalSpecVersionDefined in Cabal-syntax-3.12.1.0 · Distribution.CabalSpecVersion
  • Read AbiTagDefined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Read CompilerFlavorDefined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Read CompilerIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Read CompilerInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Read LicenseDefined in Cabal-syntax-3.12.1.0 · Distribution.License
  • Read ModuleNameDefined in Cabal-syntax-3.12.1.0 · Distribution.ModuleName
  • Read LicenseDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.License
  • Read LicenseExceptionIdDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExceptionId
  • Read LicenseExpressionDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExpression
  • Read SimpleLicenseExpressionDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExpression
  • Read LicenseIdDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseId
  • Read LicenseRefDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseReference
  • Read ArchDefined in Cabal-syntax-3.12.1.0 · Distribution.System
  • Read OSDefined in Cabal-syntax-3.12.1.0 · Distribution.System
  • Read PlatformDefined in Cabal-syntax-3.12.1.0 · Distribution.System
  • Read AbiDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.AbiDependency
  • Read AbiHashDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.AbiHash
  • Read BenchmarkDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Benchmark
  • Read BenchmarkInterfaceDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BenchmarkInterface
  • Read BenchmarkTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BenchmarkType
  • Read BuildInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BuildInfo
  • Read BuildTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BuildType
  • Read ComponentDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Component
  • Read ComponentIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentId
  • Read ComponentNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentName
  • Read NotLibComponentNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentName
  • Read ComponentRequestedSpecDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentRequestedSpec
  • Read DependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Dependency
  • Read DependencyMapDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.DependencyMap
  • Read ExeDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ExeDependency
  • Read ExecutableDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Executable
  • Read ExecutableScopeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ExecutableScope
  • Read ExposedModuleDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ExposedModule
  • Read FlagAssignmentDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Flag
  • Read FlagNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Flag
  • Read ForeignLibDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLib
  • Read LibVersionInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLib
  • Read ForeignLibOptionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLibOption
  • Read ForeignLibTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLibType
  • Read IncludeRenamingDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.IncludeRenaming
  • Read InstalledPackageInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.InstalledPackageInfo
  • Read LegacyExeDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LegacyExeDependency
  • Read LibraryDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Library
  • Read LibraryNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LibraryName
  • Read LibraryVisibilityDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LibraryVisibility
  • Read MixinDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Mixin
  • Read ModuleDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Module
  • Read ModuleReexportDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ModuleReexport
  • Read ModuleRenamingDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ModuleRenaming
  • Read MungedPackageIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.MungedPackageId
  • Read MungedPackageNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.MungedPackageName
  • Read PackageDescriptionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageDescription
  • Read PackageIdentifierDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageId
  • Read PackageNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageName
  • Read PackageVersionConstraintDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageVersionConstraint
  • Read PkgconfigDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigDependency
  • Read PkgconfigNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigName
  • Read PkgconfigVersionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigVersion
  • Read PkgconfigVersionRangeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigVersionRange
  • Read SetupBuildInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SetupBuildInfo
  • Read KnownRepoTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Read RepoKindDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Read RepoTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Read SourceRepoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Read TestSuiteDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.TestSuite
  • Read TestSuiteInterfaceDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.TestSuiteInterface
  • Read TestTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.TestType
  • Read DefUnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnitId
  • Read UnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnitId
  • Read UnqualComponentNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnqualComponentName
  • Read VersionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Version
  • Read VersionRangeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionRange.Internal
  • Read ShortTextDefined in Cabal-syntax-3.12.1.0 · Distribution.Utils.ShortText
  • Read ExtensionDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.Extension
  • Read KnownExtensionDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.Extension
  • Read LanguageDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.Extension
  • Read ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.Type
  • Read ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Lazy.Internal
  • Read ShortByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Short.Internal
  • Read IntSetDefined in containers-0.7 · Data.IntSet.Internal
  • Read FileTypeDefined in directory-1.3.8.5 · System.Directory.Internal.Common
  • Read PermissionsDefined in directory-1.3.8.5 · System.Directory.Internal.Common
  • Read XdgDirectoryDefined in directory-1.3.8.5 · System.Directory.Internal.Common
  • Read XdgDirectoryListDefined in directory-1.3.8.5 · System.Directory.Internal.Common
  • Read IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Read NaturalDefined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Read VoidDefined in ghc-internal-9.1003.0 · GHC.Internal.Read

    Reading a Void value is always a parse error, considering Void as a data type with no constructors.

  • Read ByteOrderDefined in ghc-internal-9.1003.0 · GHC.Internal.ByteOrder
  • Read AllDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Read AnyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Read VersionDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Version
  • Read CBoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CClockDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CDoubleDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CFloatDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CIntDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CIntMaxDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CIntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CLLongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CLongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CPtrdiffDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CSCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CSUSecondsDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CShortDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CSigAtomicDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CSizeDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CTimeDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CUCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CUIntDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CUIntMaxDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CUIntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CULLongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CULongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CUSecondsDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CUShortDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read CWcharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Read IntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Ptr
  • Read WordPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Ptr
  • Read AssociativityDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Read DecidedStrictnessDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Read FixityDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Read SourceStrictnessDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Read SourceUnpackednessDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Read SeekModeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Device
  • Read ExitCodeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Exception
  • Read BufferModeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Handle.Types
  • Read NewlineDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Handle.Types
  • Read NewlineModeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Handle.Types
  • Read IOModeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.IOMode
  • Read Int16Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Read Int32Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Read Int64Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Read Int8Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Read GCDetailsDefined in ghc-internal-9.1003.0 · GHC.Internal.Stats
  • Read RTSStatsDefined in ghc-internal-9.1003.0 · GHC.Internal.Stats
  • Read CBlkCntDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Read CBlkSizeDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Read CCcDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Read CClockIdDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Read CDevDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Read CFsBlkCntDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Read CFsFilCntDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Read CGidDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Read CIdDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Read CInoDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Read CKeyDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Read CModeDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Read CNfdsDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Read CNlinkDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Read COffDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Read CPidDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Read CRLimDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Read CSocklenDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Read CSpeedDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Read CSsizeDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Read CTcflagDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Read CUidDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Read FdDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Read LexemeDefined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Read SomeCharDefined in ghc-internal-9.1003.0 · GHC.Internal.TypeLits
  • Read SomeSymbolDefined in ghc-internal-9.1003.0 · GHC.Internal.TypeLits
  • Read SomeNatDefined in ghc-internal-9.1003.0 · GHC.Internal.TypeNats
  • Read GeneralCategoryDefined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Read Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Read Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Read Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Read Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Read BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Read CharDefined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Read DoubleDefined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Read FloatDefined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Read IntDefined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Read OrderingDefined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Read WordDefined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Read CommunicationHandleDefined in process-1.6.26.1 · System.Process.CommunicationHandle.Internal
  • Read SMGenDefined in splitmix-0.1.3.1 · System.Random.SplitMix
    Example1 expression
    readMaybe "SMGen 1 1" :: Maybe SMGenJust (SMGen 1 1)
    Example1 expression
    readMaybe "SMGen 1 2" :: Maybe SMGenNothing
    Example1 expression
    readMaybe (show (mkSMGen 42)) :: Maybe SMGenJust (SMGen 9297814886316923340 13679457532755275413)
  • Read SMGenDefined in splitmix-0.1.3.1 · System.Random.SplitMix32
    Example1 expression
    readMaybe "SMGen 1 1" :: Maybe SMGenJust (SMGen 1 1)
    Example1 expression
    readMaybe "SMGen 1 2" :: Maybe SMGenNothing
    Example1 expression
    readMaybe (show (mkSMGen 42)) :: Maybe SMGenJust (SMGen 142593372 1604540297)
  • Read I8Defined in text-2.1.3 · Data.Text.Foreign
  • Read TextDefined in text-2.1.3 · Data.Text · orphan
  • Read TextDefined in text-2.1.3 · Data.Text.Lazy · orphan
  • Read FPFormatDefined in text-2.1.3 · Data.Text.Lazy.Builder.RealFloat
  • Read DayDefined in time-1.12.2 · Data.Time.Format.Parse · orphan
  • Read MonthDefined in time-1.12.2 · Data.Time.Calendar.Month

    Read as yyyy-mm.

  • Read QuarterDefined in time-1.12.2 · Data.Time.Calendar.Quarter

    Read as yyyy-Qn.

  • Read QuarterOfYearDefined in time-1.12.2 · Data.Time.Calendar.Quarter
  • Read DayOfWeekDefined in time-1.12.2 · Data.Time.Calendar.Week
  • Read DiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.DiffTime
  • Read NominalDiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.NominalDiffTime
  • Read UTCTimeDefined in time-1.12.2 · Data.Time.Format.Parse · orphan
  • Read UniversalTimeDefined in time-1.12.2 · Data.Time.Format.Parse · orphan
  • Read LocalTimeDefined in time-1.12.2 · Data.Time.Format.Parse · orphan
  • Read TimeOfDayDefined in time-1.12.2 · Data.Time.Format.Parse · orphan
  • Read TimeZoneDefined in time-1.12.2 · Data.Time.Format.Parse · orphan

    This only works for ±HHMM format, single-letter military time-zones, and these time-zones: "UTC", "UT", "GMT", "EST", "EDT", "CST", "CDT", "MST", "MDT", "PST", "PDT", per RFC 822 section 5.

  • Read ZonedTimeDefined in time-1.12.2 · Data.Time.Format.Parse · orphan

    This only works for a zonedTimeZone in ±HHMM format, single-letter military time-zones, and these time-zones: "UTC", "UT", "GMT", "EST", "EDT", "CST", "CDT", "MST", "MDT", "PST", "PDT", per RFC 822 section 5.

  • Read RTLDFlagsDefined in unix-2.8.7.0 · System.Posix.DynamicLinker.Prim
  • Read CAttributesDefined in unix-2.8.7.0 · System.Posix.Files.Common
  • Read StatxFlagsDefined in unix-2.8.7.0 · System.Posix.Files.Common
  • Read StatxMaskDefined in unix-2.8.7.0 · System.Posix.Files.Common
  • Read OpenFileFlagsDefined in unix-2.8.7.0 · System.Posix.IO.Common
  • Read OpenModeDefined in unix-2.8.7.0 · System.Posix.IO.Common
  • Read GroupEntryDefined in unix-2.8.7.0 · System.Posix.User.Common
  • Read UserEntryDefined in unix-2.8.7.0 · System.Posix.User.Common
  • Read ()Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Read a => Read (Flag a)Defined in Cabal-3.12.1.0 · Distribution.Simple.Flag
  • Read a => Read (PackageIndex a)Defined in Cabal-3.12.1.0 · Distribution.Simple.PackageIndex
  • Read a => Read (Last' a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Semigroup
  • Read a => Read (Option' a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Semigroup
  • Read a => Read (VersionRangeF a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionRange.Internal
  • Read a => Read (Complex a)Defined in base-4.20.2.0 · Data.Complex
  • Read a => Read (First a)Defined in base-4.20.2.0 · Data.Semigroup
  • Read a => Read (Last a)Defined in base-4.20.2.0 · Data.Semigroup
  • Read a => Read (Max a)Defined in base-4.20.2.0 · Data.Semigroup
  • Read a => Read (Min a)Defined in base-4.20.2.0 · Data.Semigroup
  • Read a => Read (Seq a)Defined in containers-0.7 · Data.Sequence.Internal
  • Read a => Read (ViewL a)Defined in containers-0.7 · Data.Sequence.Internal
  • Read a => Read (ViewR a)Defined in containers-0.7 · Data.Sequence.Internal
  • Read a => Read (Tree a)Defined in containers-0.7 · Data.Tree
  • Read a => Read (NonEmpty a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Read a => Read (And a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Bits
  • Read a => Read (Iff a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Bits
  • Read a => Read (Ior a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Bits
  • Read a => Read (Xor a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Bits
  • Read a => Read (Identity a)Defined in ghc-internal-9.1003.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

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

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

  • Read a => Read (Dual a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Read a => Read (Product a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Read a => Read (Sum a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Read a => Read (ZipList a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Functor.ZipList
  • Read a => Read (Maybe a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Read a => Read (a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Read a => Read [a]Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Read dir => Read (InstallDirs dir)Defined in Cabal-3.12.1.0 · Distribution.Simple.InstallDirs
  • Read e => Read (IntMap e)Defined in containers-0.7 · Data.IntMap.Internal
  • Read m => Read (WrappedMonoid m)Defined in base-4.20.2.0 · Data.Semigroup
  • Read p => Read (Par1 p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Read pkg => Read (PackageIndex pkg)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackageIndex
  • Read v => Read (PerCompilerFlavor v)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Read vertex => Read (SCC vertex)Defined in containers-0.7 · Data.Graph
  • (IsNode a, Read a, Show (Key a)) => Read (Graph a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Graph
  • (Read a, Ord a) => Read (NonEmptySet a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.NonEmptySet
  • (Read a, Ord a) => Read (Set a)Defined in containers-0.7 · Data.Set.Internal
  • (Integral a, Read a) => Read (Ratio a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • (Ord a, Read a) => Read (NubList a)Defined in Cabal-3.12.1.0 · Distribution.Utils.NubList
  • (Ord a, Read a) => Read (NubListR a)Defined in Cabal-3.12.1.0 · Distribution.Utils.NubList
  • HasResolution a => Read (Fixed a)Defined in base-4.20.2.0 · Data.Fixed
  • Read (SymbolicPath from to)Defined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Path
  • Read (Proxy t)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Read (U1 p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Read (V1 p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Read1 f, Read a) => Read (Lift f a)Defined in transformers-0.6.1.1 · Control.Applicative.Lift
  • (Read1 m, Read a) => Read (MaybeT m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Maybe
  • (Ix a, Read a, Read b) => Read (Array a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • (Ix ix, Read ix, Read e, IArray UArray e) => Read (UArray ix e)Defined in array-0.5.8.0 · Data.Array.Base
  • (Read a, Read b) => Read (Arg a b)Defined in base-4.20.2.0 · Data.Semigroup
  • (Read a, Read b) => Read (Either a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Either
  • (Read a, Read b) => Read (a, b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • (Ord k, Read k, Read e) => Read (Map k e)Defined in containers-0.7 · Data.Map.Internal
  • Read (f a) => Read (Ap f a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Monoid
  • Read (f a) => Read (Alt f a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Read (f p) => Read (Rec1 f p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Read a => Read (Const a b)Defined in ghc-internal-9.1003.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

  • Read a => Read (Constant a b)Defined in transformers-0.6.1.1 · Data.Functor.Constant
  • Coercible a b => Read (Coercion a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Coercion
  • (Read1 f, Read a) => Read (Backwards f a)Defined in transformers-0.6.1.1 · Control.Applicative.Backwards
  • (Read1 f, Read a) => Read (IdentityT f a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Identity
  • (Read1 f, Read a) => Read (Reverse f a)Defined in transformers-0.6.1.1 · Data.Functor.Reverse
  • (Read a, Read b, Read c) => Read (a, b, c)Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • (Read e, Read1 m, Read a) => Read (ExceptT e m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Except
  • (Read w, Read1 m, Read a) => Read (WriterT w m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Writer.Lazy
  • (Read w, Read1 m, Read a) => Read (WriterT w m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Writer.Strict
  • a ~ b => Read (a :~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • Read c => Read (K1 i c p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Read (f a), Read (g a)) => Read (Product f g a)Defined in base-4.20.2.0 · Data.Functor.Product
  • (Read (f a), Read (g a)) => Read (Sum f g a)Defined in base-4.20.2.0 · Data.Functor.Sum
  • (Read (f p), Read (g p)) => Read ((:*:) f g p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Read (f p), Read (g p)) => Read ((:+:) f g p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Read a, Read b, Read c, Read d) => Read (a, b, c, d)Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • a ~~ b => Read (a :~~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • Read (f (g a)) => Read (Compose f g a)Defined in base-4.20.2.0 · Data.Functor.Compose
  • Read (f (g p)) => Read ((:.:) f g p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Read (f p) => Read (M1 i c f p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Read a, Read b, Read c, Read d, Read e) => Read (a, b, c, d, e)Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • (Read a, Read b, Read c, Read d, Read e, Read f) => Read (a, b, c, d, e, f)Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • (Read a, Read b, Read c, Read d, Read e, Read f, Read g) => Read (a, b, c, d, e, f, g)Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • (Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h) => Read (a, b, c, d, e, f, g, h)Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • (Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i) => Read (a, b, c, d, e, f, g, h, i)Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • (Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j) => Read (a, b, c, d, e, f, g, h, i, j)Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • (Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k) => Read (a, b, c, d, e, f, g, h, i, j, k)Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • (Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k, Read l) => Read (a, b, c, d, e, f, g, h, i, j, k, l)Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • (Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k, Read l, Read m) => Read (a, b, c, d, e, f, g, h, i, j, k, l, m)Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • (Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k, Read l, Read m, Read n) => Read (a, b, c, d, e, f, g, h, i, j, k, l, m, n)Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • (Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k, Read l, Read m, Read n, Read o) => Read (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
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

Instances14Fractional, …
  • Fractional CDoubleDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Fractional CFloatDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Fractional DoubleDefined in ghc-internal-9.1003.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-9.1003.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]
  • Fractional DiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.DiffTime
  • Fractional NominalDiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.NominalDiffTime
  • RealFloat a => Fractional (Complex a)Defined in base-4.20.2.0 · Data.Complex
  • Fractional a => Fractional (Identity a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Identity
  • Fractional a => Fractional (Down a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Ord
  • Integral a => Fractional (Ratio a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Real
  • HasResolution a => Fractional (Fixed a)Defined in base-4.20.2.0 · Data.Fixed
  • Fractional a => Fractional (Op a b)Defined in base-4.20.2.0 · Data.Functor.Contravariant
  • Fractional a => Fractional (Const a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Const
  • Fractional (f (g a)) => Fractional (Compose f g a)Defined in base-4.20.2.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.

Instances62Integral, …
  • Integral IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.Real
  • Integral NaturalDefined in ghc-internal-9.1003.0 · GHC.Internal.Real
  • Integral CBoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Integral CCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Integral CIntDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Integral CIntMaxDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Integral CIntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Integral CLLongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Integral CLongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Integral CPtrdiffDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Integral CSCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Integral CShortDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Integral CSigAtomicDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Integral CSizeDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Integral CUCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Integral CUIntDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Integral CUIntMaxDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Integral CUIntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Integral CULLongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Integral CULongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Integral CUShortDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Integral CWcharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Integral IntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Ptr
  • Integral WordPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Ptr
  • Integral Int16Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Integral Int32Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Integral Int64Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Integral Int8Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Integral CBlkCntDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Integral CBlkSizeDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Integral CClockIdDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Integral CDevDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Integral CFsBlkCntDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Integral CFsFilCntDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Integral CGidDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Integral CIdDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Integral CInoDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Integral CKeyDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Integral CModeDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Integral CNfdsDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Integral CNlinkDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Integral COffDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Integral CPidDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Integral CRLimDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Integral CSocklenDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Integral CSsizeDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Integral CTcflagDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Integral CUidDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Integral FdDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Integral Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Integral Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Integral Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Integral Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Integral IntDefined in ghc-internal-9.1003.0 · GHC.Internal.Real
  • Integral WordDefined in ghc-internal-9.1003.0 · GHC.Internal.Real
  • Integral CardinalityDefined in random-1.2.1.3 · System.Random.GFinite
  • Integral I8Defined in text-2.1.3 · Data.Text.Foreign
  • Integral StatxFlagsDefined in unix-2.8.7.0 · System.Posix.Files.Common
  • Integral StatxMaskDefined in unix-2.8.7.0 · System.Posix.Files.Common
  • Integral a => Integral (Identity a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Identity
  • Integral a => Integral (Const a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Const
  • Integral (f (g a)) => Integral (Compose f g a)Defined in base-4.20.2.0 · Data.Functor.Compose
classclass (Real a, Fractional a) => RealFrac a where
#

Extracting components of fractions.

Methods

Instances12RealFrac, …
  • RealFrac CDoubleDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • RealFrac CFloatDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • RealFrac DoubleDefined in ghc-internal-9.1003.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-9.1003.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.

  • RealFrac DiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.DiffTime
  • RealFrac NominalDiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.NominalDiffTime
  • Integral a => RealFrac (Ratio a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Real
  • RealFrac a => RealFrac (Identity a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Identity
  • RealFrac a => RealFrac (Down a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Ord
  • HasResolution a => RealFrac (Fixed a)Defined in base-4.20.2.0 · Data.Fixed
  • RealFrac a => RealFrac (Const a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Const
  • RealFrac (f (g a)) => RealFrac (Compose f g a)Defined in base-4.20.2.0 · Data.Functor.Compose
typetype ShowS = String -> String
#

The shows functions return a function that prepends the output String to an existing String. This allows constant-time concatenation of results using function composition.

typetype ReadS a = String -> [(a, String)]
#

A parser for a type a, represented as a function that takes a String and returns a list of possible parses as (a,String) pairs.

Note that this kind of backtracking parser is very inefficient; reading a large structure may be quite slow (cf ReadP).

valueotherwise :: Bool
#

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

 f x | x < 0     = ...
     | otherwise = ...
datadata Ordering
#
Instances18Bounded, Enum, Eq, Data, Ord, Read, …
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.

Instances43Bounded, Enum, Data, Read, Ix, Storable, …
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.

Instances36Enum, Floating, Fractional, Data, Num, Read, …
  • Enum DoubleDefined in ghc-internal-9.1003.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-prim-0.12.0 · GHC.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-9.1003.0 · GHC.Internal.Float
  • Fractional DoubleDefined in ghc-internal-9.1003.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-9.1003.0 · GHC.Internal.Data.Data
  • Num DoubleDefined in ghc-internal-9.1003.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-prim-0.12.0 · GHC.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-9.1003.0 · GHC.Internal.Read
  • Real DoubleDefined in ghc-internal-9.1003.0 · GHC.Internal.Float · orphan

    Beware that toRational generates garbage for non-finite arguments:

    Example2 expressions
    toRational (1/0)179769313 (and 300 more digits...) % 1toRational (0/0)269653970 (and 300 more digits...) % 1
  • RealFloat DoubleDefined in ghc-internal-9.1003.0 · GHC.Internal.Float
  • RealFrac DoubleDefined in ghc-internal-9.1003.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-9.1003.0 · GHC.Internal.Float · orphan
  • Storable DoubleDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Storable
  • PrintfArg DoubleDefined in base-4.20.2.0 · Text.Printf
  • NFData DoubleDefined in deepseq-1.5.0.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
  • Random DoubleDefined in random-1.2.1.3 · System.Random

    Note - random produces values in the closed range [0,1].

  • UniformRange DoubleDefined in random-1.2.1.3 · System.Random.Internal
  • Binary DoubleDefined in binary-0.8.9.3 · Data.Binary.Class

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

  • Structured DoubleDefined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Structured
  • Lift DoubleDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • 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-9.1003.0 · GHC.Internal.Generics
  • Foldable UDoubleDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Traversable UDoubleDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Traversable
  • MArray (STUArray s) Double (ST s)Defined in array-0.5.8.0 · Data.Array.Base
  • Functor (URec Double)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Eq (URec Double p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Ord (URec Double p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Show (URec Double p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (URec Double p)Defined in ghc-internal-9.1003.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-9.1003.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-9.1003.0 · GHC.Internal.Generics
  • data URec DoubleDefined in ghc-internal-9.1003.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.

Instances36Enum, Floating, Fractional, Data, Num, Read, …
  • Enum FloatDefined in ghc-internal-9.1003.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-prim-0.12.0 · GHC.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-9.1003.0 · GHC.Internal.Float
  • Fractional FloatDefined in ghc-internal-9.1003.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-9.1003.0 · GHC.Internal.Data.Data
  • Num FloatDefined in ghc-internal-9.1003.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-prim-0.12.0 · GHC.Classes

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

  • Read FloatDefined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Real FloatDefined in ghc-internal-9.1003.0 · GHC.Internal.Float · orphan

    Beware that toRational generates garbage for non-finite arguments:

    Example2 expressions
    toRational (1/0 :: Float)340282366920938463463374607431768211456 % 1toRational (0/0 :: Float)510423550381407695195061911147652317184 % 1
  • RealFloat FloatDefined in ghc-internal-9.1003.0 · GHC.Internal.Float
  • RealFrac FloatDefined in ghc-internal-9.1003.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-9.1003.0 · GHC.Internal.Float · orphan
  • Storable FloatDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Storable
  • PrintfArg FloatDefined in base-4.20.2.0 · Text.Printf
  • NFData FloatDefined in deepseq-1.5.0.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
  • Random FloatDefined in random-1.2.1.3 · System.Random

    Note - random produces values in the closed range [0,1].

  • UniformRange FloatDefined in random-1.2.1.3 · System.Random.Internal
  • Binary FloatDefined in binary-0.8.9.3 · Data.Binary.Class

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

  • Structured FloatDefined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Structured
  • Lift FloatDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • 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-9.1003.0 · GHC.Internal.Generics
  • Foldable UFloatDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Traversable UFloatDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Traversable
  • MArray (STUArray s) Float (ST s)Defined in array-0.5.8.0 · Data.Array.Base
  • Functor (URec Float)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Eq (URec Float p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Ord (URec Float p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Show (URec Float p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (URec Float p)Defined in ghc-internal-9.1003.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-9.1003.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-9.1003.0 · GHC.Internal.Generics
  • data URec FloatDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics

    Used for marking occurrences of Float#

datadata Word
#

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

Instances37Bounded, Enum, Integral, Data, Num, Read, …
classclass a ~ b => (~) (a :: k) (b :: k)
#

Lifted, homogeneous equality. By lifted, we mean that it can be bogus (deferred type error). By homogeneous, the two types a and b must have the same kinds.

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.

Instances22Enum, Eq, Integral, Data, Num, Ord, …
  • Enum IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.Enum
  • Eq IntegerDefined in ghc-bignum-1.3 · GHC.Num.Integer
  • Integral IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.Real
  • Data IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Num IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.Num
  • Ord IntegerDefined in ghc-bignum-1.3 · GHC.Num.Integer
  • Read IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Real IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.Real
  • Show IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Ix IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.Ix
  • Bits IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.Bits
  • PrintfArg IntegerDefined in base-4.20.2.0 · Text.Printf
  • NFData IntegerDefined in deepseq-1.5.0.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
  • Random IntegerDefined in random-1.2.1.3 · System.Random

    Note - random generates values in the Int range

  • UniformRange IntegerDefined in random-1.2.1.3 · System.Random.Internal
  • Binary IntegerDefined in binary-0.8.9.3 · Data.Binary.Class
  • DayPeriod YearDefined in time-1.12.2 · Data.Time.Calendar.Gregorian · orphan
  • ShowPadded IntegerDefined in time-1.12.2 · Data.Time.Calendar.Private
  • Structured IntegerDefined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Structured
  • Lift IntegerDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
datadata Void
#

Uninhabited data type

Instances14Eq, Data, Ord, Read, Show, Ix, …
  • Eq VoidDefined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Data VoidDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Ord VoidDefined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Read VoidDefined in ghc-internal-9.1003.0 · GHC.Internal.Read

    Reading a Void value is always a parse error, considering Void as a data type with no constructors.

  • Show VoidDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Ix VoidDefined in ghc-internal-9.1003.0 · GHC.Internal.Ix
  • Generic VoidDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Semigroup VoidDefined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Exception VoidDefined in ghc-internal-9.1003.0 · GHC.Internal.Exception.Type
  • NFData VoidDefined in deepseq-1.5.0.0 · Control.DeepSeq

    Defined as rnf = absurd.

  • Finite VoidDefined in random-1.2.1.3 · System.Random.GFinite
  • Binary VoidDefined in binary-0.8.9.3 · Data.Binary.Class
  • Lift VoidDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • type Rep Void = D1 ('MetaData "Void" "GHC.Internal.Base" "ghc-internal" 'False) V1Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
valuejoin :: Monad m => m (m a) -> m a
#

The join function is the conventional monad join operator. It is used to remove one level of monadic structure, projecting its bound argument into the outer level.

'join bss' can be understood as the do expression

do bs <- bss
   bs
Examples
Example1 expression
join [[1, 2, 3], [4, 5, 6], [7, 8, 9]][1,2,3,4,5,6,7,8,9]
Example1 expression
join (Just (Just 3))Just 3

A common use of join is to run an IO computation returned from an GHC.Conc.STM transaction, since GHC.Conc.STM transactions can't perform IO directly. Recall that

GHC.Internal.Conc.atomically :: STM a -> IO a

is used to run GHC.Conc.STM transactions atomically. So, by specializing the types of GHC.Internal.Conc.atomically and join to

GHC.Internal.Conc.atomically :: STM (IO b) -> IO (IO b)
join       :: IO (IO b)  -> IO b

we can compose them as

join . GHC.Internal.Conc.atomically :: STM (IO b) -> IO b

to run an GHC.Conc.STM transaction and the IO action it returns.

classclass Semigroup a => Monoid a where
#

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

Right identity

x <> mempty = x

Left identity

mempty <> x = x

Associativity

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

(

Semigroup

law)

Concatenation

mconcat = foldr (<>) mempty

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

Unit

mconcat (pure x) = x

Multiplication

mconcat (join xss) = mconcat (fmap mconcat xss)

Subclass

mconcat (toList xs) = sconcat xs

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

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

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

Methods

  • mempty :: a

    Identity of mappend

    Examples
    Example1 expression
    "Hello world" <> mempty"Hello world"
    Example1 expression
    mempty <> [1, 2, 3][1,2,3]
  • mappend :: a -> a -> a

    An associative operation

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

  • mconcat :: [a] -> a

    Fold a list using the monoid.

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

    Example1 expression
    mconcat ["Hello", " ", "Haskell", "!"]"Hello Haskell!"
Instances134Monoid, …
  • Monoid CDialectDefined in Cabal-3.12.1.0 · Distribution.Simple.CCompiler
  • Monoid DirectoryDefined in Cabal-3.12.1.0 · Distribution.Simple.Haddock
  • Monoid HaddockArgsDefined in Cabal-3.12.1.0 · Distribution.Simple.Haddock
  • Monoid GhcOptionsDefined in Cabal-3.12.1.0 · Distribution.Simple.Program.GHC
  • Monoid BenchmarkFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Benchmark
  • Monoid BuildFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Build
  • Monoid CleanFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Clean
  • Monoid ConfigFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Config
  • Monoid CopyFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Copy
  • Monoid GlobalFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Global
  • Monoid HaddockFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Haddock
  • Monoid HaddockProjectFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Haddock
  • Monoid HscolourFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Hscolour
  • Monoid InstallFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Install
  • Monoid RegisterFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Register
  • Monoid ReplFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Repl
  • Monoid ReplOptionsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Repl
  • Monoid SDistFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.SDist
  • Monoid TestFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Test
  • Monoid TestShowDetailsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Test
  • Monoid PDTaggedDefined in Cabal-syntax-3.12.1.0 · Distribution.PackageDescription.Configuration
  • Monoid BenchmarkDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Benchmark
  • Monoid BenchmarkInterfaceDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BenchmarkInterface
  • Monoid BuildInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BuildInfo
  • Monoid DependencyMapDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.DependencyMap
  • Monoid ExecutableDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Executable
  • Monoid ExecutableScopeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ExecutableScope
  • Monoid FlagAssignmentDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Flag
  • Monoid ForeignLibDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLib
  • Monoid ForeignLibTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLibType
  • Monoid LibraryDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Library

    This instance is not good.

    We need it for PackageDescription.Configuration.addBuildableCondition. More correct method would be some kind of "create empty clone".

    More concretely, addBuildableCondition will make `libVisibility = False` libraries when `buildable: false`. This may cause problems.

  • Monoid LibraryVisibilityDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LibraryVisibility
  • Monoid SetupBuildInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SetupBuildInfo
  • Monoid TestSuiteDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.TestSuite
  • Monoid TestSuiteInterfaceDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.TestSuiteInterface
  • Monoid UnqualComponentNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnqualComponentName
  • Monoid ShortTextDefined in Cabal-syntax-3.12.1.0 · Distribution.Utils.ShortText
  • Monoid ByteArrayDefined in base-4.20.2.0 · Data.Array.Byte
  • Monoid BuilderDefined in bytestring-0.12.2.0 · Data.ByteString.Builder.Internal
  • Monoid ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.Type
  • Monoid ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Lazy.Internal
  • Monoid ShortByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Short.Internal
  • Monoid OptionalStanzaSetDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.OptionalStanza
  • Monoid IntSetDefined in containers-0.7 · Data.IntSet.Internal
  • Monoid AllDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Monoid AnyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Monoid EventDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.Internal.Types
  • Monoid EventLifetimeDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.Internal.Types
  • Monoid LifetimeDefined in ghc-internal-9.1003.0 · GHC.Internal.Event.Internal.Types

    mappend takes the longer of two lifetimes.

  • Monoid ExceptionContextDefined in ghc-internal-9.1003.0 · GHC.Internal.Exception.Context
  • Monoid OrderingDefined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Monoid OsStringDefined in os-string-2.0.7 · System.OsString.Internal.Types

    "String-Concatenation" for OsString. This is not the same as (</>).

  • Monoid PosixStringDefined in os-string-2.0.7 · System.OsString.Internal.Types
  • Monoid WindowsStringDefined in os-string-2.0.7 · System.OsString.Internal.Types
  • Monoid DocDefined in pretty-1.1.3.6 · Text.PrettyPrint.HughesPJ
  • Monoid TextDefined in text-2.1.3 · Data.Text · orphan
  • Monoid BuilderDefined in text-2.1.3 · Data.Text.Internal.Builder
  • Monoid TextDefined in text-2.1.3 · Data.Text.Lazy · orphan
  • Monoid StrictTextBuilderDefined in text-2.1.3 · Data.Text.Internal.StrictBuilder
  • Monoid CalendarDiffDaysDefined in time-1.12.2 · Data.Time.Calendar.CalendarDiffDays

    Additive

  • Monoid CalendarDiffTimeDefined in time-1.12.2 · Data.Time.LocalTime.Internal.CalendarDiffTime

    Additive

  • Monoid StatxFlagsDefined in unix-2.8.7.0 · System.Posix.Files.Common
  • Monoid StatxMaskDefined in unix-2.8.7.0 · System.Posix.Files.Common
  • Monoid ()Defined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Package pkg => Monoid (PackageIndex pkg)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackageIndex
  • Monoid (SnocList a)Defined in Cabal-3.12.1.0 · Distribution.Compat.SnocList
  • Monoid (Flag a)Defined in Cabal-3.12.1.0 · Distribution.Simple.Flag
  • Monoid (PackageIndex InstalledPackageInfo)Defined in Cabal-3.12.1.0 · Distribution.Simple.PackageIndex
  • Monoid (DList a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.DList
  • Monoid (Condition a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.Condition
  • Monoid (Comparison a)Defined in base-4.20.2.0 · Data.Functor.Contravariant

    mempty on comparisons always returns EQ. Without newtypes this equals pure (pure EQ).

    mempty :: Comparison a
    mempty = Comparison _ _ -> EQ
    
  • Monoid (Equivalence a)Defined in base-4.20.2.0 · Data.Functor.Contravariant

    mempty on equivalences always returns True. Without newtypes this equals pure (pure True).

    mempty :: Equivalence a
    mempty = Equivalence _ _ -> True
    
  • Monoid (Predicate a)Defined in base-4.20.2.0 · Data.Functor.Contravariant

    mempty on predicates always returns True. Without newtypes this equals pure True.

    mempty :: Predicate a
    mempty = _ -> True
    
  • Monoid (PutM ())Defined in binary-0.8.9.3 · Data.Binary.Put
  • Monoid (IntMap a)Defined in containers-0.7 · Data.IntMap.Internal
  • Monoid (Seq a)Defined in containers-0.7 · Data.Sequence.Internal
  • Monoid (MergeSet a)Defined in containers-0.7 · Data.Set.Internal
  • Monoid (First a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Monoid
  • Monoid (Last a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Monoid
  • Monoid (Endo a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Monoid (Doc a)Defined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Monoid [a]Defined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Monoid a => Monoid (STM a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Conc.Sync
  • Monoid a => Monoid (Identity a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Identity
  • Monoid a => Monoid (Down a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Ord
  • Monoid a => Monoid (Dual a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Monoid a => Monoid (IO a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Monoid a => Monoid (Q a)Defined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Monoid a => Monoid (a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Monoid m => Monoid (WrappedMonoid m)Defined in base-4.20.2.0 · Data.Semigroup
  • Monoid p => Monoid (Par1 p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Semigroup a => Monoid (Option' a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Semigroup
  • Semigroup a => Monoid (ComponentDeps a)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.ComponentDeps
  • Semigroup a => Monoid (Maybe a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Base

    Lift a semigroup into Maybe forming a Monoid according to http://en.wikipedia.org/wiki/Monoid: "Any semigroup S may be turned into a monoid simply by adjoining an element e not in S and defining e*e = e and e*s = s = s*e for all s ∈ S."

    Since 4.11.0: constraint on inner a value generalised from Monoid to Semigroup.

  • Semigroup d => Monoid (DepTestRslt d)Defined in Cabal-syntax-3.12.1.0 · Distribution.PackageDescription.Configuration
  • Bits a => Monoid (Ior a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Bits
  • Bits a => Monoid (Xor a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Bits
  • FiniteBits a => Monoid (And a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Bits

    This constraint is arguably too strong. However, as some types (such as Natural) have undefined complement, this is the only safe choice.

  • FiniteBits a => Monoid (Iff a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Bits

    This constraint is arguably too strong. However, as some types (such as Natural) have undefined complement, this is the only safe choice.

  • Num a => Monoid (Product a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Num a => Monoid (Sum a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Ord a => Monoid (NubList a)Defined in Cabal-3.12.1.0 · Distribution.Utils.NubList

    Monoid operations on NubLists. For a valid Monoid instance we need to satisfy the required monoid laws; identity, associativity and closure.

    Identity : by inspection: mempty mappend NubList xs == NubList xs mappend mempty

    Associativity : by inspection: (NubList xs mappend NubList ys) mappend NubList zs == NubList xs mappend (NubList ys mappend NubList zs)

    Closure : appending two lists of type a and removing duplicates obviously does not change the type.

  • Ord a => Monoid (NubListR a)Defined in Cabal-3.12.1.0 · Distribution.Utils.NubList
  • Ord a => Monoid (Set a)Defined in containers-0.7 · Data.Set.Internal
  • Ord a => Monoid (Max a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Utils
  • Ord a => Monoid (Min a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Utils
  • (Semigroup a, Monoid a) => Monoid (PerCompilerFlavor a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • (Semigroup dir, Monoid dir) => Monoid (InstallDirs dir)Defined in Cabal-3.12.1.0 · Distribution.Simple.InstallDirs
  • (Generic a, Monoid (Rep a ())) => Monoid (Generically a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Ord a, Bounded a) => Monoid (Max a)Defined in base-4.20.2.0 · Data.Semigroup
  • (Ord a, Bounded a) => Monoid (Min a)Defined in base-4.20.2.0 · Data.Semigroup
  • Monoid (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Monoid (U1 p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Monoid a => Monoid (Op a b)Defined in base-4.20.2.0 · Data.Functor.Contravariant

    mempty @(Op a b) without newtypes is mempty @(b->a) = _ -> mempty.

    mempty :: Op a b
    mempty = Op _ -> mempty
    
  • Monoid a => Monoid (ST s a)Defined in ghc-internal-9.1003.0 · GHC.Internal.ST
  • Monoid b => Monoid (a -> b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Ord k => Monoid (Map k v)Defined in containers-0.7 · Data.Map.Internal
  • (Monoid a, Monoid b) => Monoid (a, b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • Alternative f => Monoid (Alt f a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Monoid (f p) => Monoid (Rec1 f p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Monoid a => Monoid (Const a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Const
  • Monoid a => Monoid (Constant a b)Defined in transformers-0.6.1.1 · Data.Functor.Constant
  • (Applicative f, Monoid a) => Monoid (Ap f a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Monoid
  • (Monoid a, Monoid b, Monoid c) => Monoid (a, b, c)Defined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • (Semigroup a, Semigroup c, Monoid a, Monoid c) => Monoid (CondTree v c a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.CondTree
  • Monoid c => Monoid (K1 i c p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Monoid (f a), Monoid (g a)) => Monoid (Product f g a)Defined in base-4.20.2.0 · Data.Functor.Product
  • (Monoid (f p), Monoid (g p)) => Monoid ((:*:) f g p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Monoid a, Monoid b, Monoid c, Monoid d) => Monoid (a, b, c, d)Defined in ghc-internal-9.1003.0 · GHC.Internal.Base
  • (Monoid a, Semigroup (ParsecT s u m a)) => Monoid (ParsecT s u m a)Defined in parsec-3.1.18.0 · Text.Parsec.Prim

    The Monoid instance for ParsecT is used for the same purposes as the Semigroup instance.

  • Monoid (f (g a)) => Monoid (Compose f g a)Defined in base-4.20.2.0 · Data.Functor.Compose
  • Monoid (f (g p)) => Monoid ((:.:) f g p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Monoid (f p) => Monoid (M1 i c f p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • (Monoid a, Monoid b, Monoid c, Monoid d, Monoid e) => Monoid (a, b, c, d, e)Defined in ghc-internal-9.1003.0 · GHC.Internal.Base
valuerealToFrac :: (Real a, Fractional b) => a -> b
#

General coercion to Fractional types.

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

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

Prelude> realToFrac nan -- With -O0
-Infinity
Prelude> realToFrac nan
NaN
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.

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

Instances78Real, …
  • Real IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.Real
  • Real NaturalDefined in ghc-internal-9.1003.0 · GHC.Internal.Real
  • Real CBoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CClockDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CDoubleDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CFloatDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CIntDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CIntMaxDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CIntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CLLongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CLongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CPtrdiffDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CSCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CSUSecondsDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CShortDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CSigAtomicDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CSizeDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CTimeDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CUCharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CUIntDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CUIntMaxDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CUIntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CULLongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CULongDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CUSecondsDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CUShortDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real CWcharDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.Types
  • Real IntPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Ptr
  • Real WordPtrDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Ptr
  • Real Int16Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Real Int32Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Real Int64Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Real Int8Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Real CBlkCntDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Real CBlkSizeDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Real CCcDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Real CClockIdDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Real CDevDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Real CFsBlkCntDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Real CFsFilCntDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Real CGidDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Real CIdDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Real CInoDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Real CKeyDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Real CModeDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Real CNfdsDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Real CNlinkDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Real COffDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Real CPidDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Real CRLimDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Real CSocklenDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Real CSpeedDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Real CSsizeDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Real CTcflagDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Real CUidDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Real FdDefined in ghc-internal-9.1003.0 · GHC.Internal.System.Posix.Types
  • Real Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Real Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Real Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Real Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Real DoubleDefined in ghc-internal-9.1003.0 · GHC.Internal.Float · orphan

    Beware that toRational generates garbage for non-finite arguments:

    Example2 expressions
    toRational (1/0)179769313 (and 300 more digits...) % 1toRational (0/0)269653970 (and 300 more digits...) % 1
  • Real FloatDefined in ghc-internal-9.1003.0 · GHC.Internal.Float · orphan

    Beware that toRational generates garbage for non-finite arguments:

    Example2 expressions
    toRational (1/0 :: Float)340282366920938463463374607431768211456 % 1toRational (0/0 :: Float)510423550381407695195061911147652317184 % 1
  • Real IntDefined in ghc-internal-9.1003.0 · GHC.Internal.Real
  • Real WordDefined in ghc-internal-9.1003.0 · GHC.Internal.Real
  • Real CardinalityDefined in random-1.2.1.3 · System.Random.GFinite

    This is needed only as a superclass of Integral.

  • Real I8Defined in text-2.1.3 · Data.Text.Foreign
  • Real DiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.DiffTime
  • Real NominalDiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.NominalDiffTime
  • Real StatxFlagsDefined in unix-2.8.7.0 · System.Posix.Files.Common
  • Real StatxMaskDefined in unix-2.8.7.0 · System.Posix.Files.Common
  • Real BaudRateDefined in unix-2.8.7.0 · System.Posix.Terminal.Common
  • Integral a => Real (Ratio a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Real
  • Real a => Real (Identity a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Identity
  • Real a => Real (Down a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Ord
  • HasResolution a => Real (Fixed a)Defined in base-4.20.2.0 · Data.Fixed
  • Real a => Real (Const a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Const
  • Real (f (g a)) => Real (Compose f g a)Defined in base-4.20.2.0 · Data.Functor.Compose
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.

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.

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

main = print ([(n, 2^n) | n <- [0..19]])
valuefind :: Foldable t => (a -> Bool) -> t a -> Maybe a
#

The find function takes a predicate and a structure and returns the leftmost element of the structure matching the predicate, or Nothing if there is no such element.

Examples

Basic usage:

Example1 expression
find (> 42) [0, 5..]Just 45
Example1 expression
find (> 12) [1..7]Nothing
valuetraverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f ()
#

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

traverse_ is just like mapM_, but generalised to Applicative actions.

Examples

Basic usage:

Example1 expression
traverse_ print ["Hello", "world", "!"]"Hello""world""!"
value(<+>) :: Doc -> Doc -> Doc
#

Beside, separated by space, unless one of the arguments is empty. <+> is associative, with identity empty.

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.

valuedropWhileEnd :: (a -> Bool) -> [a] -> [a]
#

The dropWhileEnd function drops the largest suffix of a list in which the given predicate holds for all elements.

Laziness

This function is lazy in spine, but strict in elements, which makes it different from reverse . dropWhile p . reverse, which is strict in spine, but lazy in elements. For instance:

Example1 expression
take 1 (dropWhileEnd (< 0) (1 : undefined))[1]
Example1 expression
take 1 (reverse $ dropWhile (< 0) $ reverse (1 : undefined))*** Exception: Prelude.undefined

but on the other hand

Example1 expression
last (dropWhileEnd (< 0) [undefined, 1])*** Exception: Prelude.undefined
Example1 expression
last (reverse $ dropWhile (< 0) $ reverse [undefined, 1])1
Examples
Example1 expression
dropWhileEnd isSpace "foo\n""foo"
Example2 expressions
dropWhileEnd isSpace "foo bar""foo bar"dropWhileEnd (> 10) [1..20][1,2,3,4,5,6,7,8,9,10]
valueintersperse :: a -> [a] -> [a]
#

\mathcal{O}(n). The intersperse function takes an element and a list and `intersperses' that element between the elements of the list.

Laziness

intersperse has the following properties

Example1 expression
take 1 (intersperse undefined ('a' : undefined))"a"
Example1 expression
take 2 (intersperse ',' ('a' : undefined))"a*** Exception: Prelude.undefined
Examples
Example1 expression
intersperse ',' "abcde""a,b,c,d,e"
Example1 expression
intersperse 1 [3, 4, 5][3,1,4,1,5]
valueisPrefixOf :: Eq a => [a] -> [a] -> Bool
#

\mathcal{O}(\min(m,n)). The isPrefixOf function takes two lists and returns True iff the first list is a prefix of the second.

Examples
Example1 expression
"Hello" `isPrefixOf` "Hello World!"True
Example1 expression
"Hello" `isPrefixOf` "Wello Horld!"False

For the result to be True, the first list must be finite; False, however, results from any mismatch:

Example1 expression
[0..] `isPrefixOf` [1..]False
Example1 expression
[0..] `isPrefixOf` [0..99]False
Example1 expression
[0..99] `isPrefixOf` [0..]True
Example1 expression
[0..] `isPrefixOf` [0..]* Hangs forever *

isPrefixOf shortcuts when the first argument is empty:

Example1 expression
isPrefixOf [] undefinedTrue
valueisSuffixOf :: Eq a => [a] -> [a] -> Bool
#

The isSuffixOf function takes two lists and returns True iff the first list is a suffix of the second.

Examples
Example1 expression
"ld!" `isSuffixOf` "Hello World!"True
Example1 expression
"World" `isSuffixOf` "Hello World!"False

The second list must be finite; however the first list may be infinite:

Example1 expression
[0..] `isSuffixOf` [0..99]False
Example1 expression
[0..99] `isSuffixOf` [0..]* Hangs forever *
valuenub :: Eq a => [a] -> [a]
#

\mathcal{O}(n^2). The nub function removes duplicate elements from a list. In particular, it keeps only the first occurrence of each element. (The name nub means `essence'.) It is a special case of nubBy, which allows the programmer to supply their own equality test.

If there exists instance Ord a, it's faster to use nubOrd from the containers package (link to the latest online documentation), which takes only \mathcal{O}(n \log d) time where d is the number of distinct elements in the list.

Another approach to speed up nub is to use map Data.List.NonEmpty.head . Data.List.NonEmpty.group . sort, which takes \mathcal{O}(n \log n) time, requires instance Ord a and doesn't preserve the order.

Examples
Example1 expression
nub [1,2,3,4,3,2,1,2,4,3,5][1,2,3,4,5]
Example1 expression
nub "hello, world!""helo, wrd!"
valuenubBy :: (a -> a -> Bool) -> [a] -> [a]
#

The nubBy function behaves just like nub, except it uses a user-supplied equality predicate instead of the overloaded (==) function.

Examples
Example1 expression
nubBy (\x y -> mod x 3 == mod y 3) [1,2,4,5,6][1,2,6]
Example1 expression
nubBy (/=) [2, 7, 1, 8, 2, 8, 1, 8, 2, 8][2,2,2]
Example1 expression
nubBy (>) [1, 2, 3, 2, 1, 5, 4, 5, 3, 2][1,2,3,5,5]
valuepartition :: (a -> Bool) -> [a] -> ([a], [a])
#

The partition function takes a predicate and a list, and returns the pair of lists of elements which do and do not satisfy the predicate, respectively; i.e.,

partition p xs == (filter p xs, filter (not . p) xs)
Examples
Example1 expression
partition (`elem` "aeiou") "Hello World!"("eoo","Hll Wrld!")
Example1 expression
partition even [1..10]([2,4,6,8,10],[1,3,5,7,9])
Example1 expression
partition (< 5) [1..10]([1,2,3,4],[5,6,7,8,9,10])
valuesort :: Ord a => [a] -> [a]
#

The sort function implements a stable sorting algorithm. It is a special case of sortBy, which allows the programmer to supply their own comparison function.

Elements are arranged from lowest to highest, keeping duplicates in the order they appeared in the input.

The argument must be finite.

Examples
Example1 expression
sort [1,6,4,3,2,5][1,2,3,4,5,6]
Example1 expression
sort "haskell""aehklls"
Example2 expressions
import Data.Semigroup(Arg(..))sort [Arg ":)" 0, Arg ":D" 0, Arg ":)" 1, Arg ":3" 0, Arg ":D" 1][Arg ":)" 0,Arg ":)" 1,Arg ":3" 0,Arg ":D" 0,Arg ":D" 1]
valueunfoldr :: (b -> Maybe (a, b)) -> b -> [a]
#

The unfoldr function is a `dual' to foldr: while foldr reduces a list to a summary value, unfoldr builds a list from a seed value. The function takes the element and returns Nothing if it is done producing the list or returns Just (a,b), in which case, a is a prepended to the list and b is used as the next element in a recursive call. For example,

iterate f == unfoldr (\x -> Just (x, f x))

In some cases, unfoldr can undo a foldr operation:

unfoldr f' (foldr f z xs) == xs

if the following holds:

f' (f x y) = Just (x,y)
f' z       = Nothing
Laziness
Example1 expression
take 1 (unfoldr (\x -> Just (x, undefined)) 'a')"a"
Examples
Example1 expression
unfoldr (\b -> if b == 0 then Nothing else Just (b, b-1)) 10[10,9,8,7,6,5,4,3,2,1]
Example1 expression
take 10 $ unfoldr (\(x, y) -> Just (x, (y, x + y))) (0, 1)[0,1,1,2,3,5,8,13,21,54]
valueap :: Monad m => m (a -> b) -> m a -> m b
#

In many situations, the liftM operations can be replaced by uses of ap, which promotes function application.

return f `ap` x1 `ap` ... `ap` xn

is equivalent to

liftM<n> f x1 x2 ... xn
Examples
Example1 expression
pure (\x y z -> x + y * z) `ap` Just 1 `ap` Just 5 `ap` Just 10Just 51
valueliftM :: Monad m => (a1 -> r) -> m a1 -> m r
#

Promote a function to a monad. This is equivalent to fmap but specialised to Monads.

valuewhen :: Applicative f => Bool -> f () -> f ()
#

Conditional execution of Applicative expressions. For example,

Examples
when debug (putStrLn "Debugging")

will output the string Debugging if the Boolean value debug is True, and otherwise do nothing.

Example1 expression
putStr "pi:" >> when False (print 3.14159)pi:
valueabsurd :: Void -> a
#

Since Void values logically don't exist, this witnesses the logical reasoning tool of "ex falso quodlibet".

Example2 expressions
let x :: Either Void Int; x = Right 5:{case x of    Right r -> r    Left l  -> absurd l:}5
valueord :: Char -> Int
#

The Prelude.fromEnum method restricted to the type Char.

valuevacuous :: Functor f => f Void -> f a
#

If Void is uninhabited then any Functor that holds only values of type Void is holding no values. It is implemented in terms of fmap absurd.

datadata Word32
#

32-bit unsigned integer type

Instances27Bounded, Enum, Eq, Integral, Data, Num, …
  • Bounded Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Enum Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Eq Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Integral Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Data Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Num Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Ord Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Read Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Real Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Show Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Ix Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Bits Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • FiniteBits Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Storable Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Storable
  • PrintfArg Word32Defined in base-4.20.2.0 · Text.Printf
  • NFData Word32Defined in deepseq-1.5.0.0 · Control.DeepSeq
  • Mantissa Word32Defined in bytestring-0.12.2.0 · Data.ByteString.Builder.RealFloat.Internal
  • Random Word32Defined in random-1.2.1.3 · System.Random
  • Finite Word32Defined in random-1.2.1.3 · System.Random.GFinite
  • Uniform Word32Defined in random-1.2.1.3 · System.Random.Internal
  • UniformRange Word32Defined in random-1.2.1.3 · System.Random.Internal
  • Binary Word32Defined in binary-0.8.9.3 · Data.Binary.Class
  • Structured Word32Defined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Structured
  • Lift Word32Defined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • IArray UArray Word32Defined in array-0.5.8.0 · Data.Array.Base
  • MArray IOUArray Word32 IODefined in array-0.5.8.0 · Data.Array.IO.Internals
  • MArray (STUArray s) Word32 (ST s)Defined in array-0.5.8.0 · Data.Array.Base
datadata Word64
#

64-bit unsigned integer type

Instances27Bounded, Enum, Eq, Integral, Data, Num, …
  • Bounded Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Enum Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Eq Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Integral Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Data Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Num Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Ord Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Read Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Real Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Show Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Ix Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Bits Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • FiniteBits Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Storable Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Storable
  • PrintfArg Word64Defined in base-4.20.2.0 · Text.Printf
  • NFData Word64Defined in deepseq-1.5.0.0 · Control.DeepSeq
  • Mantissa Word64Defined in bytestring-0.12.2.0 · Data.ByteString.Builder.RealFloat.Internal
  • Random Word64Defined in random-1.2.1.3 · System.Random
  • Finite Word64Defined in random-1.2.1.3 · System.Random.GFinite
  • Uniform Word64Defined in random-1.2.1.3 · System.Random.Internal
  • UniformRange Word64Defined in random-1.2.1.3 · System.Random.Internal
  • Binary Word64Defined in binary-0.8.9.3 · Data.Binary.Class
  • Structured Word64Defined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Structured
  • Lift Word64Defined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • IArray UArray Word64Defined in array-0.5.8.0 · Data.Array.Base
  • MArray IOUArray Word64 IODefined in array-0.5.8.0 · Data.Array.IO.Internals
  • MArray (STUArray s) Word64 (ST s)Defined in array-0.5.8.0 · Data.Array.Base
datadata Word16
#

16-bit unsigned integer type

Instances26Bounded, Enum, Eq, Integral, Data, Num, …
  • Bounded Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Enum Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Eq Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Integral Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Data Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Num Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Ord Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Read Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Real Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Show Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Ix Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Bits Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • FiniteBits Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Storable Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Storable
  • PrintfArg Word16Defined in base-4.20.2.0 · Text.Printf
  • NFData Word16Defined in deepseq-1.5.0.0 · Control.DeepSeq
  • Random Word16Defined in random-1.2.1.3 · System.Random
  • Finite Word16Defined in random-1.2.1.3 · System.Random.GFinite
  • Uniform Word16Defined in random-1.2.1.3 · System.Random.Internal
  • UniformRange Word16Defined in random-1.2.1.3 · System.Random.Internal
  • Binary Word16Defined in binary-0.8.9.3 · Data.Binary.Class
  • Structured Word16Defined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Structured
  • Lift Word16Defined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • IArray UArray Word16Defined in array-0.5.8.0 · Data.Array.Base
  • MArray IOUArray Word16 IODefined in array-0.5.8.0 · Data.Array.IO.Internals
  • MArray (STUArray s) Word16 (ST s)Defined in array-0.5.8.0 · Data.Array.Base
datadata Word8
#

8-bit unsigned integer type

Instances26Bounded, Enum, Eq, Integral, Data, Num, …
  • Bounded Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Enum Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Eq Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Integral Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Data Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Num Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Ord Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Read Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Real Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Show Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Ix Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Bits Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • FiniteBits Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Storable Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Storable
  • PrintfArg Word8Defined in base-4.20.2.0 · Text.Printf
  • NFData Word8Defined in deepseq-1.5.0.0 · Control.DeepSeq
  • Random Word8Defined in random-1.2.1.3 · System.Random
  • Finite Word8Defined in random-1.2.1.3 · System.Random.GFinite
  • Uniform Word8Defined in random-1.2.1.3 · System.Random.Internal
  • UniformRange Word8Defined in random-1.2.1.3 · System.Random.Internal
  • Binary Word8Defined in binary-0.8.9.3 · Data.Binary.Class
  • Structured Word8Defined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Structured
  • Lift Word8Defined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • IArray UArray Word8Defined in array-0.5.8.0 · Data.Array.Base
  • MArray IOUArray Word8 IODefined in array-0.5.8.0 · Data.Array.IO.Internals
  • MArray (STUArray s) Word8 (ST s)Defined in array-0.5.8.0 · Data.Array.Base
valuegenericRnf :: (Generic a, GNFData (Rep a)) => a -> ()
#

GHC.Generics-based rnf implementation

This is needed in order to support deepseq < 1.4 which didn't have a Generic-based default rnf implementation yet.

In order to define instances, use e.g.

instance NFData MyType where rnf = genericRnf

The implementation has been taken from deepseq-1.4.2's default rnf implementation.

valuetrace :: String -> a -> a
#

Deprecated. Don't leave me in the code

valuetraceShow :: Show a => a -> b -> b
#

Deprecated. Don't leave me in the code

valuetraceShowId :: Show a => a -> a
#

Deprecated. Don't leave me in the code

valueforce :: NFData a => a -> a
#

a variant of deepseq that is useful in some circumstances:

force x = x `deepseq` x

force x fully evaluates x, and then returns it. Note that force x only performs evaluation when the value of force x itself is demanded, so essentially it turns shallow evaluation into deep evaluation.

force can be conveniently used in combination with ViewPatterns:

{-# LANGUAGE BangPatterns, ViewPatterns #-}
import Control.DeepSeq

someFun :: ComplexData -> SomeResult
someFun (force -> !arg) = {- 'arg' will be fully evaluated -}

Another useful application is to combine force with evaluate in order to force deep evaluation relative to other IO operations:

import Control.Exception (evaluate)
import Control.DeepSeq

main = do
  result <- evaluate $ force $ pureComputation
  {- 'result' will be fully evaluated at this point -}
  return ()

Finally, here's an exception safe variant of the readFile' example:

readFile' :: FilePath -> IO String
readFile' fn = bracket (openFile fn ReadMode) hClose $ \h ->
                       evaluate . force =<< hGetContents h
valuechr :: Int -> Char
#

The Prelude.toEnum method restricted to the type Char.

valuefilterM :: Applicative m => (a -> m Bool) -> [a] -> m [a]
#

This generalizes the list-based filter function.

runIdentity (filterM (Identity . p) xs) == filter p xs
Examples
Example1 expression
filterM (\x -> do      putStrLn ("Keep: " ++ show x ++ "?")      answer <- getLine      pure (answer == "y"))    [1, 2, 3]Keep: 1?yKeep: 2?nKeep: 3?y[1,3]
Example1 expression
filterM (\x -> do      putStr (show x)      x' <- readLn      pure (x == x'))    [1, 2, 3]122233[2,3]
newtypenewtype Identity a
#

Identity functor and monad. (a non-strict monad)

Examples
Example1 expression
fmap (+1) (Identity 0)Identity 1
Example1 expression
Identity [1, 2, 3] <> Identity [4, 5, 6]Identity [1,2,3,4,5,6]
>>> do
      x <- Identity 10
      y <- Identity (x + 5)
      pure (x + y)
Identity 25

Constructors

Instances46Monad, Functor, MonadFix, Applicative, Foldable, Traversable, …
valueunless :: Applicative f => Bool -> f () -> f ()
#

The reverse of when.

Examples
Example1 expression
do x <- getLine       unless (x == "hi") (putStrLn "hi!")comingupwithexamplesisdifficulthi!
Example1 expression
unless (pi > exp 1) NothingJust ()
valuevoid :: Functor f => f a -> f ()
#

void value discards or ignores the result of evaluation, such as the return value of an System.IO.IO action.

Examples

Replace the contents of a Maybe Int with unit:

Example1 expression
void NothingNothing
Example1 expression
void (Just 3)Just ()

Replace the contents of an Either Int Int with unit, resulting in an Either Int ():

Example1 expression
void (Left 8675309)Left 8675309
Example1 expression
void (Right 8675309)Right ()

Replace every element of a list with unit:

Example1 expression
void [1,2,3][(),(),()]

Replace the second element of a pair with unit:

Example1 expression
void (1,2)(1,())

Discard the result of an System.IO.IO action:

Example1 expression
mapM print [1,2]12[(),()]
Example1 expression
void $ mapM print [1,2]12
valuefromMaybe :: a -> Maybe a -> a
#

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

Examples

Basic usage:

Example1 expression
fromMaybe "" (Just "Hello, World!")"Hello, World!"
Example1 expression
fromMaybe "" Nothing""

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

Example3 expressions
import GHC.Internal.Text.Read ( readMaybe )fromMaybe 0 (readMaybe "5")5fromMaybe 0 (readMaybe "")0
valueisNothing :: Maybe a -> Bool
#

The isNothing function returns True iff its argument is Nothing.

Examples

Basic usage:

Example1 expression
isNothing (Just 3)False
Example1 expression
isNothing (Just ())False
Example1 expression
isNothing NothingTrue

Only the outer constructor is taken into consideration:

Example1 expression
isNothing (Just Nothing)False
valuelistToMaybe :: [a] -> Maybe a
#

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

Examples

Basic usage:

Example1 expression
listToMaybe []Nothing
Example1 expression
listToMaybe [9]Just 9
Example1 expression
listToMaybe [1,2,3]Just 1

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

Example2 expressions
maybeToList $ listToMaybe [5][5]maybeToList $ listToMaybe [][]

But not on lists with more than one element:

Example1 expression
maybeToList $ listToMaybe [1,2,3][1]
valuemaybeToList :: Maybe a -> [a]
#

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

Examples

Basic usage:

Example1 expression
maybeToList (Just 7)[7]
Example1 expression
maybeToList Nothing[]

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

Example3 expressions
import GHC.Internal.Text.Read ( readMaybe )sum $ maybeToList (readMaybe "3")3sum $ maybeToList (readMaybe "")0
valuetypeRep :: Typeable a => proxy a -> TypeRep
#

Takes a value of type a and returns a concrete representation of that type.

valuecatch
  1. :: Exception e
  2. => IO a

    The computation to run

  3. -> (e -> IO a)

    Handler to invoke if an exception is raised

  4. -> IO a
#

This is the simplest of the exception-catching functions. It takes a single argument, runs it, and if an exception is raised the "handler" is executed, with the value of the exception passed as an argument. Otherwise, the result is returned as normal. For example:

  catch (readFile f)
        (\e -> do let err = show (e :: IOException)
                  hPutStr stderr ("Warning: Couldn't open " ++ f ++ ": " ++ err)
                  return "")

Note that we have to give a type signature to e, or the program will not typecheck as the type is ambiguous. While it is possible to catch exceptions of any type, see the section "Catching all exceptions" (in Control.Exception) for an explanation of the problems with doing so.

For catching exceptions in pure (non-IO) expressions, see the function evaluate.

Note that due to Haskell's unspecified evaluation order, an expression may throw one of several possible exceptions: consider the expression (error "urk") + (1 `div` 0). Does the expression throw ErrorCall "urk", or DivideByZero?

The answer is "it might throw either"; the choice is non-deterministic. If you are catching any type of exception then you might catch either. If you are calling catch with type IO Int -> (ArithException -> IO Int) -> IO Int then the handler may get run with DivideByZero as an argument, or an ErrorCall "urk" exception may be propagated further up. If you call it again, you might get the opposite behaviour. This is ok, because catch is an IO computation.

valueevaluate :: a -> IO a
#

Evaluate the argument to weak head normal form.

evaluate is typically used to uncover any exceptions that a lazy value may contain, and possibly handle them.

evaluate only evaluates to weak head normal form. If deeper evaluation is needed, the force function from Control.DeepSeq may be handy:

evaluate $ force x

There is a subtle difference between evaluate x and return $! x, analogous to the difference between throwIO and throw. If the lazy value x throws an exception, return $! x will fail to return an IO action and will throw an exception instead. evaluate x, on the other hand, always produces an IO action; that action will throw an exception upon execution iff x throws an exception upon evaluation.

The practical implication of this difference is that due to the imprecise exceptions semantics,

(return $! error "foo") >> error "bar"

may throw either "foo" or "bar", depending on the optimizations performed by the compiler. On the other hand,

evaluate (error "foo") >> error "bar"

is guaranteed to throw "foo".

The rule of thumb is to use evaluate to force or handle exceptions in lazy values. If, on the other hand, you are forcing a lazy value for efficiency reasons only and do not care about exceptions, you may use return $! x.

valuethrowIO :: (HasCallStack, Exception e) => e -> IO a
#

A variant of throw that can only be used within the IO monad.

Although throwIO has a type that is an instance of the type of throw, the two functions are subtly different:

throw e   `seq` ()  ===> throw e
throwIO e `seq` ()  ===> ()

The first example will cause the exception e to be raised, whereas the second one won't. In fact, throwIO will only cause an exception to be raised when it is used within the IO monad.

The throwIO variant should be used in preference to throw to raise an exception within the IO monad because it guarantees ordering with respect to other operations, whereas throw does not. We say that throwIO throws *precise* exceptions and throw, error, etc. all throw *imprecise* exceptions. For example

throw e + error "boom" ===> error "boom"
throw e + error "boom" ===> throw e

are both valid reductions and the compiler may pick any (loop, even), whereas

throwIO e >> error "boom" ===> throwIO e

will always throw e when executed.

See also the GHC wiki page on precise exceptions for a more technical introduction to how GHC optimises around precise vs. imprecise exceptions.

valueexitWith :: ExitCode -> IO a
#

Computation exitWith code throws ExitCode code. Normally this terminates the program, returning code to the program's caller.

On program termination, the standard Handles stdout and stderr are flushed automatically; any other buffered Handles need to be flushed manually, otherwise the buffered data will be discarded.

A program that fails in any other way is treated as if it had called exitFailure. A program that terminates successfully without calling exitWith explicitly is treated as if it had called exitWith ExitSuccess.

As an ExitCode is an Exception, it can be caught using the functions of Control.Exception. This means that cleanup computations added with bracket (from Control.Exception) are also executed properly on exitWith.

Note: in GHC, exitWith should be called from the main program thread in order to exit the process. When called from another thread, exitWith will throw an ExitCode as normal, but the exception will not cause the process itself to exit.

valuereadMaybe :: Read a => String -> Maybe a
#

Parse a string using the Read instance. Succeeds if there is exactly one valid result.

Example1 expression
readMaybe "123" :: Maybe IntJust 123
Example1 expression
readMaybe "hello" :: Maybe IntNothing
valueisAlpha :: Char -> Bool
#

Selects alphabetic Unicode characters (lower-case, upper-case and title-case letters, plus letters of caseless scripts and modifiers letters). This function is equivalent to isLetter.

This function returns True if its argument has one of the following GeneralCategorys, or False otherwise:

These classes are defined in the Unicode Character Database, part of the Unicode standard. The same document defines what is and is not a "Letter".

valueisAlphaNum :: Char -> Bool
#

Selects alphabetic or numeric Unicode characters.

Note that numeric digits outside the ASCII range, as well as numeric characters which aren't digits, are selected by this function but not by isDigit. Such characters may be part of identifiers but are not used by the printer and reader to represent numbers, e.g., Roman numerals like V, full-width digits like '1' (aka '65297').

This function returns True if its argument has one of the following GeneralCategorys, or False otherwise:

valueisSpace :: Char -> Bool
#

Returns True for any Unicode space character, and the control characters \t, \n, \r, \f, \v.

valueisUpper :: Char -> Bool
#

Selects upper-case or title-case alphabetic Unicode characters (letters). Title case is used by a small number of letter ligatures like the single-character form of Lj.

Note: this predicate does not work for letter-like characters such as: 'Ⓐ' (U+24B6 circled Latin capital letter A) and 'Ⅳ' (U+2163 Roman numeral four). This is due to selecting only characters with the GeneralCategory UppercaseLetter or TitlecaseLetter.

See isUpperCase for a more intuitive predicate. Note that unlike isUpperCase, isUpper does select title-case characters such as 'Dž' (U+01C5 Latin capital letter d with small letter z with caron) or 'ᾯ' (U+1FAF Greek capital letter omega with dasia and perispomeni and prosgegrammeni).

valuetoLower :: Char -> Char
#

Convert a letter to the corresponding lower-case letter, if any. Any other character is returned unchanged.

valuetoUpper :: Char -> Char
#

Convert a letter to the corresponding upper-case letter, if any. Any other character is returned unchanged.

classclass NFData a where
#

A class of types that can be fully evaluated.

Methods

  • rnf :: a -> ()

    rnf should reduce its argument to normal form (that is, fully evaluate all sub-components), and then return ().

    Generic NFData deriving

    Starting with GHC 7.2, you can automatically derive instances for types possessing a Generic instance.

    Note: Generic1 can be auto-derived starting with GHC 7.4

    {-# LANGUAGE DeriveGeneric #-}
    
    import GHC.Generics (Generic, Generic1)
    import Control.DeepSeq
    
    data Foo a = Foo a String
                 deriving (Eq, Generic, Generic1)
    
    instance NFData a => NFData (Foo a)
    instance NFData1 Foo
    
    data Colour = Red | Green | Blue
                  deriving Generic
    
    instance NFData Colour

    Starting with GHC 7.10, the example above can be written more concisely by enabling the new DeriveAnyClass extension:

    {-# LANGUAGE DeriveGeneric, DeriveAnyClass #-}
    
    import GHC.Generics (Generic)
    import Control.DeepSeq
    
    data Foo a = Foo a String
                 deriving (Eq, Generic, Generic1, NFData, NFData1)
    
    data Colour = Red | Green | Blue
                  deriving (Generic, NFData)
    
    Compatibility with previous deepseq versions

    Prior to version 1.4.0.0, the default implementation of the rnf method was defined as

    rnf a = seq a ()

    However, starting with deepseq-1.4.0.0, the default implementation is based on DefaultSignatures allowing for more accurate auto-derived NFData instances. If you need the previously used exact default rnf method implementation semantics, use

    instance NFData Colour where rnf x = seq x ()

    or alternatively

    instance NFData Colour where rnf = rwhnf

    or

    {-# LANGUAGE BangPatterns #-}
    instance NFData Colour where rnf !_ = ()
Instances253NFData, …
newtypenewtype Const a (b :: k)
#

The Const functor.

Examples
Example1 expression
fmap (++ "World") (Const "Hello")Const "Hello"

Because we ignore the second type parameter to Const, the Applicative instance, which has (<*>) :: Monoid m => Const m (a -> b) -> Const m a -> Const m b essentially turns into Monoid m => m -> m -> m, which is (<>)

Example1 expression
Const [1, 2, 3] <*> Const [4, 5, 6]Const [1,2,3,4,5,6]

Constructors

Instances45Generic1, Bifoldable, Bifoldable1, Bifunctor, Bitraversable, Eq2, …
datadata Proxy (t :: k)
#

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

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

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

Proxy can even hold types of higher kinds,

Example1 expression
Proxy :: Proxy EitherProxy
Example1 expression
Proxy :: Proxy FunctorProxy
Example1 expression
Proxy :: Proxy complicatedStructureProxy
Instances29Generic1, Monad, Functor, Applicative, Foldable, Traversable, …
  • Generic1 ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Monad ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Functor ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Applicative ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Foldable ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Traversable ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Traversable
  • Alternative ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • MonadPlus ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • MonadZip ProxyDefined in base-4.20.2.0 · Control.Monad.Zip
  • Eq1 ProxyDefined in base-4.20.2.0 · Data.Functor.Classes
  • Ord1 ProxyDefined in base-4.20.2.0 · Data.Functor.Classes
  • Read1 ProxyDefined in base-4.20.2.0 · Data.Functor.Classes
  • Show1 ProxyDefined in base-4.20.2.0 · Data.Functor.Classes
  • Contravariant ProxyDefined in base-4.20.2.0 · Data.Functor.Contravariant
  • NFData1 ProxyDefined in deepseq-1.5.0.0 · Control.DeepSeq
  • Bounded (Proxy t)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Enum (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Eq (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Data t => Data (Proxy t)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Ord (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Read (Proxy t)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Show (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Ix (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Generic (Proxy t)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Semigroup (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Monoid (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • NFData (Proxy a)Defined in deepseq-1.5.0.0 · Control.DeepSeq
  • type Rep (Proxy t) = D1 ('MetaData "Proxy" "GHC.Internal.Data.Proxy" "ghc-internal" 'False) (C1 ('MetaCons "Proxy" 'PrefixI 'False) U1)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • type Rep1 Proxy = D1 ('MetaData "Proxy" "GHC.Internal.Data.Proxy" "ghc-internal" 'False) (C1 ('MetaCons "Proxy" 'PrefixI 'False) U1)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
typetype TypeRep = SomeTypeRep
#

A quantified type representation.

Instances1NFData
  • NFData TypeRepDefined in deepseq-1.5.0.0 · Control.DeepSeq

    NOTE: Prior to deepseq-1.4.4.0 this instance was only defined for base-4.8.0.0 and later.

datadata ExitCode
#

Defines the exit codes that a program can return.

Constructors

  • ExitSuccess

    indicates successful termination;

  • ExitFailure Int

    indicates program failure with an exit code. The exact interpretation of the code is operating-system dependent. In particular, some values may be prohibited (e.g. 0 on a POSIX-compliant system).

Instances8Eq, Ord, Read, Show, Generic, Exception, …
datadata IOException
#

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

Instances4Eq, Show, Exception, MonadError
classclass Generic a where
#

Representable types of kind *. This class is derivable in GHC with the DeriveGeneric flag on.

A Generic instance must satisfy the following laws:

from . to ≡ Prelude.id
to . from ≡ Prelude.id
Instances376Generic, …
  • Generic FullUnitIdDefined in Cabal-3.12.1.0 · Distribution.Backpack.FullUnitId
  • Generic ModuleShapeDefined in Cabal-3.12.1.0 · Distribution.Backpack.ModuleShape
  • Generic PreModuleShapeDefined in Cabal-3.12.1.0 · Distribution.Backpack.PreModuleShape
  • Generic ModTimeDefined in Cabal-3.12.1.0 · Distribution.Compat.Time
  • Generic ZDefined in Cabal-3.12.1.0 · Distribution.Simple.Build.Macros.Z
  • Generic ZPackageDefined in Cabal-3.12.1.0 · Distribution.Simple.Build.Macros.Z
  • Generic ZToolDefined in Cabal-3.12.1.0 · Distribution.Simple.Build.Macros.Z
  • Generic ZDefined in Cabal-3.12.1.0 · Distribution.Simple.Build.PackageInfoModule.Z
  • Generic ZDefined in Cabal-3.12.1.0 · Distribution.Simple.Build.PathsModule.Z
  • Generic BuildTargetDefined in Cabal-3.12.1.0 · Distribution.Simple.BuildTarget
  • Generic CompilerDefined in Cabal-3.12.1.0 · Distribution.Simple.Compiler
  • Generic DebugInfoLevelDefined in Cabal-3.12.1.0 · Distribution.Simple.Compiler
  • Generic OptimisationLevelDefined in Cabal-3.12.1.0 · Distribution.Simple.Compiler
  • Generic PackageDBDefined in Cabal-3.12.1.0 · Distribution.Simple.Compiler
  • Generic ProfDetailLevelDefined in Cabal-3.12.1.0 · Distribution.Simple.Compiler
  • Generic GlobDefined in Cabal-3.12.1.0 · Distribution.Simple.Glob.Internal
  • Generic GlobPieceDefined in Cabal-3.12.1.0 · Distribution.Simple.Glob.Internal
  • Generic HaddockArgsDefined in Cabal-3.12.1.0 · Distribution.Simple.Haddock
  • Generic CopyDestDefined in Cabal-3.12.1.0 · Distribution.Simple.InstallDirs
  • Generic PathTemplateDefined in Cabal-3.12.1.0 · Distribution.Simple.InstallDirs
  • Generic PathComponentDefined in Cabal-3.12.1.0 · Distribution.Simple.InstallDirs.Internal
  • Generic PathTemplateVariableDefined in Cabal-3.12.1.0 · Distribution.Simple.InstallDirs.Internal
  • Generic SuffixDefined in Cabal-3.12.1.0 · Distribution.Simple.PreProcess.Types
  • Generic GhcOptionsDefined in Cabal-3.12.1.0 · Distribution.Simple.Program.GHC
  • Generic ConfiguredProgramDefined in Cabal-3.12.1.0 · Distribution.Simple.Program.Types
  • Generic ProgramLocationDefined in Cabal-3.12.1.0 · Distribution.Simple.Program.Types
  • Generic ProgramSearchPathEntryDefined in Cabal-3.12.1.0 · Distribution.Simple.Program.Types
  • Generic BuildingWhatDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup
  • Generic BenchmarkFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Benchmark
  • Generic BuildFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Build
  • Generic CleanFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Clean
  • Generic ConfigFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Config
  • Generic CopyFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Copy
  • Generic GlobalFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Global
  • Generic HaddockFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Haddock
  • Generic HaddockProjectFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Haddock
  • Generic HaddockTargetDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Haddock
  • Generic HscolourFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Hscolour
  • Generic InstallFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Install
  • Generic RegisterFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Register
  • Generic ReplFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Repl
  • Generic ReplOptionsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Repl
  • Generic SDistFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.SDist
  • Generic TestFlagsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Test
  • Generic TestShowDetailsDefined in Cabal-3.12.1.0 · Distribution.Simple.Setup.Test
  • Generic ComponentLocalBuildInfoDefined in Cabal-3.12.1.0 · Distribution.Types.ComponentLocalBuildInfo
  • Generic DumpBuildInfoDefined in Cabal-3.12.1.0 · Distribution.Types.DumpBuildInfo
  • Generic GivenComponentDefined in Cabal-3.12.1.0 · Distribution.Types.GivenComponent
  • Generic BuildOptionsDefined in Cabal-3.12.1.0 · Distribution.Types.LocalBuildConfig
  • Generic ComponentBuildDescrDefined in Cabal-3.12.1.0 · Distribution.Types.LocalBuildConfig
  • Generic LocalBuildConfigDefined in Cabal-3.12.1.0 · Distribution.Types.LocalBuildConfig
  • Generic LocalBuildDescrDefined in Cabal-3.12.1.0 · Distribution.Types.LocalBuildConfig
  • Generic PackageBuildDescrDefined in Cabal-3.12.1.0 · Distribution.Types.LocalBuildConfig
  • Generic LocalBuildInfoDefined in Cabal-3.12.1.0 · Distribution.Types.LocalBuildInfo
  • Generic TargetInfoDefined in Cabal-3.12.1.0 · Distribution.Types.TargetInfo
  • Generic VerbosityDefined in Cabal-3.12.1.0 · Distribution.Verbosity
  • Generic VerbosityFlagDefined in Cabal-3.12.1.0 · Distribution.Verbosity.Internal
  • Generic VerbosityLevelDefined in Cabal-3.12.1.0 · Distribution.Verbosity.Internal
  • Generic OpenModuleDefined in Cabal-syntax-3.12.1.0 · Distribution.Backpack
  • Generic OpenUnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Backpack
  • Generic CabalSpecVersionDefined in Cabal-syntax-3.12.1.0 · Distribution.CabalSpecVersion
  • Generic AbiTagDefined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Generic CompilerFlavorDefined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Generic CompilerIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Generic CompilerInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Generic LicenseDefined in Cabal-syntax-3.12.1.0 · Distribution.License
  • Generic ModuleNameDefined in Cabal-syntax-3.12.1.0 · Distribution.ModuleName
  • Generic PErrorDefined in Cabal-syntax-3.12.1.0 · Distribution.Parsec.Error
  • Generic PositionDefined in Cabal-syntax-3.12.1.0 · Distribution.Parsec.Position
  • Generic PWarnTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Parsec.Warning
  • Generic PWarningDefined in Cabal-syntax-3.12.1.0 · Distribution.Parsec.Warning
  • Generic LicenseDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.License
  • Generic LicenseExceptionIdDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExceptionId
  • Generic LicenseExpressionDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExpression
  • Generic SimpleLicenseExpressionDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExpression
  • Generic LicenseRefDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseReference
  • Generic ArchDefined in Cabal-syntax-3.12.1.0 · Distribution.System
  • Generic OSDefined in Cabal-syntax-3.12.1.0 · Distribution.System
  • Generic PlatformDefined in Cabal-syntax-3.12.1.0 · Distribution.System
  • Generic AbiDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.AbiDependency
  • Generic AbiHashDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.AbiHash
  • Generic BenchmarkDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Benchmark
  • Generic BenchmarkInterfaceDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BenchmarkInterface
  • Generic BenchmarkTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BenchmarkType
  • Generic BuildInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BuildInfo
  • Generic BuildTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BuildType
  • Generic ComponentDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Component
  • Generic ComponentIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentId
  • Generic ComponentNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentName
  • Generic NotLibComponentNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentName
  • Generic ComponentRequestedSpecDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentRequestedSpec
  • Generic ConfVarDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ConfVar
  • Generic DependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Dependency
  • Generic ExeDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ExeDependency
  • Generic ExecutableDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Executable
  • Generic ExecutableScopeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ExecutableScope
  • Generic ExposedModuleDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ExposedModule
  • Generic FlagAssignmentDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Flag
  • Generic FlagNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Flag
  • Generic PackageFlagDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Flag
  • Generic ForeignLibDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLib
  • Generic LibVersionInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLib
  • Generic ForeignLibOptionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLibOption
  • Generic ForeignLibTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLibType
  • Generic GenericPackageDescriptionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.GenericPackageDescription
  • Generic IncludeRenamingDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.IncludeRenaming
  • Generic InstalledPackageInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.InstalledPackageInfo
  • Generic LegacyExeDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LegacyExeDependency
  • Generic LibraryDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Library
  • Generic LibraryNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LibraryName
  • Generic LibraryVisibilityDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LibraryVisibility
  • Generic MixinDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Mixin
  • Generic ModuleDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Module
  • Generic ModuleReexportDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ModuleReexport
  • Generic ModuleRenamingDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ModuleRenaming
  • Generic MungedPackageIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.MungedPackageId
  • Generic MungedPackageNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.MungedPackageName
  • Generic PackageDescriptionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageDescription
  • Generic PackageIdentifierDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageId
  • Generic PackageNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageName
  • Generic PackageVersionConstraintDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageVersionConstraint
  • Generic PkgconfigDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigDependency
  • Generic PkgconfigNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigName
  • Generic PkgconfigVersionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigVersion
  • Generic PkgconfigVersionRangeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigVersionRange
  • Generic SetupBuildInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SetupBuildInfo
  • Generic KnownRepoTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Generic RepoKindDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Generic RepoTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Generic SourceRepoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepo
  • Generic TestSuiteDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.TestSuite
  • Generic TestSuiteInterfaceDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.TestSuiteInterface
  • Generic TestTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.TestType
  • Generic DefUnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnitId
  • Generic UnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnitId
  • Generic UnqualComponentNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnqualComponentName
  • Generic VersionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Version
  • Generic VersionRangeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionRange.Internal
  • Generic ShortTextDefined in Cabal-syntax-3.12.1.0 · Distribution.Utils.ShortText
  • Generic StructureDefined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Structured
  • Generic ExtensionDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.Extension
  • Generic KnownExtensionDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.Extension
  • Generic LanguageDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.Extension
  • Generic ShortByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Short.Internal
  • Generic ComponentDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.ComponentDeps
  • Generic ConstraintSourceDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.ConstraintSource
  • Generic InstSolverPackageDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.InstSolverPackage
  • Generic OptionalStanzaDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.OptionalStanza
  • Generic PackagePropertyDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackageConstraint
  • Generic PkgConfigDbDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PkgConfigDb
  • Generic ProjectConfigPathDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.ProjectConfigPath
  • Generic AllowBootLibInstallsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Generic AvoidReinstallsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Generic CountConflictsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Generic EnableBackjumpingDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Generic FineGrainedConflictsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Generic IndependentGoalsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Generic MinimizeConflictSetDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Generic OnlyConstrainedDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Generic PreferOldestDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Generic ReorderGoalsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Generic ShadowPkgsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Generic SolveExecutablesDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Generic StrongFlagsDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Settings
  • Generic SolverIdDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.SolverId
  • Generic ForeignSrcLangDefined in ghc-boot-th-9.10.3 · GHC.ForeignSrcLang.Type
  • Generic ExtensionDefined in ghc-boot-th-9.10.3 · GHC.LanguageExtensions.Type
  • Generic VoidDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic ByteOrderDefined in ghc-internal-9.1003.0 · GHC.Internal.ByteOrder
  • Generic ClosureTypeDefined in ghc-internal-9.1003.0 · GHC.Internal.ClosureTypes
  • Generic AllDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Generic AnyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Generic VersionDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Version
  • Generic FingerprintDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic AssociativityDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic DecidedStrictnessDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic FixityDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic SourceStrictnessDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic SourceUnpackednessDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic ExitCodeDefined in ghc-internal-9.1003.0 · GHC.Internal.IO.Exception
  • Generic CCFlagsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Generic ConcFlagsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Generic DebugFlagsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Generic DoCostCentresDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Generic DoHeapProfileDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Generic DoTraceDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Generic GCFlagsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Generic GiveGCStatsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Generic HpcFlagsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Generic MiscFlagsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Generic ParFlagsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Generic ProfFlagsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Generic RTSFlagsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Generic TickyFlagsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Generic TraceFlagsDefined in ghc-internal-9.1003.0 · GHC.Internal.RTS.Flags
  • Generic SrcLocDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic GCDetailsDefined in ghc-internal-9.1003.0 · GHC.Internal.Stats
  • Generic RTSStatsDefined in ghc-internal-9.1003.0 · GHC.Internal.Stats
  • Generic GeneralCategoryDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic OrderingDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic URIDefined in network-uri-2.6.4.2 · Network.URI
  • Generic URIAuthDefined in network-uri-2.6.4.2 · Network.URI
  • Generic OsCharDefined in os-string-2.0.7 · System.OsString.Internal.Types
  • Generic OsStringDefined in os-string-2.0.7 · System.OsString.Internal.Types
  • Generic PosixCharDefined in os-string-2.0.7 · System.OsString.Internal.Types
  • Generic PosixStringDefined in os-string-2.0.7 · System.OsString.Internal.Types
  • Generic WindowsCharDefined in os-string-2.0.7 · System.OsString.Internal.Types
  • Generic WindowsStringDefined in os-string-2.0.7 · System.OsString.Internal.Types
  • Generic ModeDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Generic StyleDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Generic TextDetailsDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Generic DocDefined in pretty-1.1.3.6 · Text.PrettyPrint.HughesPJ
  • Generic AnnLookupDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic AnnTargetDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic BangDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic BndrVisDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic BodyDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic BytesDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic CallconvDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic ClauseDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic ConDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic DecDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic DecidedStrictnessDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic DerivClauseDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic DerivStrategyDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic DocLocDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic ExpDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic FamilyResultSigDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic FixityDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic FixityDirectionDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic ForeignDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic FunDepDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic GuardDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic InfoDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic InjectivityAnnDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic InlineDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic LitDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic LocDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic MatchDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic ModNameDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic ModuleDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic ModuleInfoDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic NameDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic NameFlavourDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic NameSpaceDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic NamespaceSpecifierDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic OccNameDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic OverlapDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic PatDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic PatSynArgsDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic PatSynDirDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic PhasesDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic PkgNameDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic PragmaDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic RangeDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic RoleDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic RuleBndrDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic RuleMatchDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic SafetyDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic SourceStrictnessDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic SourceUnpackednessDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic SpecificityDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic StmtDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic TyLitDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic TySynEqnDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic TypeDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic TypeFamilyHeadDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic ()Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (Flag a)Defined in Cabal-3.12.1.0 · Distribution.Simple.Flag
  • Generic (InstallDirs dir)Defined in Cabal-3.12.1.0 · Distribution.Simple.InstallDirs
  • Generic (PackageIndex a)Defined in Cabal-3.12.1.0 · Distribution.Simple.PackageIndex
  • Generic (NubList a)Defined in Cabal-3.12.1.0 · Distribution.Utils.NubList
  • Generic (Last' a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Semigroup
  • Generic (Option' a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Semigroup
  • Generic (PerCompilerFlavor v)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compiler
  • Generic (Condition c)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.Condition
  • Generic (VersionRangeF a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionRange.Internal
  • Generic (Complex a)Defined in base-4.20.2.0 · Data.Complex
  • Generic (First a)Defined in base-4.20.2.0 · Data.Semigroup
  • Generic (Last a)Defined in base-4.20.2.0 · Data.Semigroup
  • Generic (Max a)Defined in base-4.20.2.0 · Data.Semigroup
  • Generic (Min a)Defined in base-4.20.2.0 · Data.Semigroup
  • Generic (WrappedMonoid m)Defined in base-4.20.2.0 · Data.Semigroup
  • Generic (ComponentDeps a)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.ComponentDeps
  • Generic (OptionalStanzaMap a)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.OptionalStanza
  • Generic (PackageIndex pkg)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.PackageIndex
  • Generic (ResolverPackage loc)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.ResolverPackage
  • Generic (SolverPackage loc)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.SolverPackage
  • Generic (SourcePackage loc)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.SourcePackage
  • Generic (SCC vertex)Defined in containers-0.7 · Data.Graph
  • Generic (Digit a)Defined in containers-0.7 · Data.Sequence.Internal
  • Generic (Elem a)Defined in containers-0.7 · Data.Sequence.Internal
  • Generic (FingerTree a)Defined in containers-0.7 · Data.Sequence.Internal
  • Generic (Node a)Defined in containers-0.7 · Data.Sequence.Internal
  • Generic (ViewL a)Defined in containers-0.7 · Data.Sequence.Internal
  • Generic (ViewR a)Defined in containers-0.7 · Data.Sequence.Internal
  • Generic (Tree a)Defined in containers-0.7 · Data.Tree
  • Generic (NonEmpty a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (Identity a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Identity
  • Generic (First a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Monoid
  • Generic (Last a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Monoid
  • Generic (Down a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (Dual a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Generic (Endo a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Generic (Product a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Generic (Sum a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Generic (ZipList a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Functor.ZipList
  • Generic (Par1 p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (Maybe a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (Doc a)Defined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Generic (TyVarBndr flag)Defined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • Generic (a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic [a]Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (SymbolicPath from to)Defined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Path
  • Generic (WrappedMonad m a)Defined in base-4.20.2.0 · Control.Applicative
  • Generic (Arg a b)Defined in base-4.20.2.0 · Data.Semigroup
  • Generic (Either a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (Proxy t)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (U1 p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (V1 p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (Lift f a)Defined in transformers-0.6.1.1 · Control.Applicative.Lift
  • Generic (MaybeT m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Maybe
  • Generic (a, b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (CondBranch v c a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.CondTree
  • Generic (CondTree v c a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.CondTree
  • Generic (WrappedArrow a b c)Defined in base-4.20.2.0 · Control.Applicative
  • Generic (Kleisli m a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Control.Arrow
  • Generic (Const a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Functor.Const
  • Generic (Ap f a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Monoid
  • Generic (Alt f a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Semigroup.Internal
  • Generic (Rec1 f p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (URec Char p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (URec Double p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (URec Float p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (URec Int p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (URec Word p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (URec (Ptr ()) p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (Backwards f a)Defined in transformers-0.6.1.1 · Control.Applicative.Backwards
  • Generic (AccumT w m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Accum
  • Generic (ExceptT e m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Except
  • Generic (IdentityT f a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Identity
  • Generic (ReaderT r m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Reader
  • Generic (SelectT r m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Select
  • Generic (StateT s m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.State.Lazy
  • Generic (StateT s m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.State.Strict
  • Generic (WriterT w m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Writer.CPS
  • Generic (WriterT w m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Writer.Lazy
  • Generic (WriterT w m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Writer.Strict
  • Generic (Constant a b)Defined in transformers-0.6.1.1 · Data.Functor.Constant
  • Generic (Reverse f a)Defined in transformers-0.6.1.1 · Data.Functor.Reverse
  • Generic (a, b, c)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (Product f g a)Defined in base-4.20.2.0 · Data.Functor.Product
  • Generic (Sum f g a)Defined in base-4.20.2.0 · Data.Functor.Sum
  • Generic (K1 i c p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (ContT r m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.Cont
  • Generic ((:*:) f g p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic ((:+:) f g p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (a, b, c, d)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (Compose f g a)Defined in base-4.20.2.0 · Data.Functor.Compose
  • Generic (M1 i c f p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (RWST r w s m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.RWS.CPS
  • Generic (RWST r w s m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.RWS.Lazy
  • Generic (RWST r w s m a)Defined in transformers-0.6.1.1 · Control.Monad.Trans.RWS.Strict
  • Generic ((:.:) f g p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (a, b, c, d, e)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (a, b, c, d, e, f)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (a, b, c, d, e, f, g)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (a, b, c, d, e, f, g, h)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (a, b, c, d, e, f, g, h, i)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (a, b, c, d, e, f, g, h, i, j)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (a, b, c, d, e, f, g, h, i, j, k)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (a, b, c, d, e, f, g, h, i, j, k, l)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (a, b, c, d, e, f, g, h, i, j, k, l, m)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
valueguard :: Alternative f => Bool -> f ()
#

Conditional failure of Alternative computations. Defined by

guard True  = pure ()
guard False = empty
Examples

Common uses of guard include conditionally signalling an error in an error monad and conditionally rejecting the current choice in an Alternative-based parser.

As an example of signalling an error in the error monad Maybe, consider a safe division function safeDiv x y that returns Nothing when the denominator y is zero and Just (x `div` y) otherwise. For example:

Example1 expression
safeDiv 4 0Nothing
Example1 expression
safeDiv 4 2Just 2

A definition of safeDiv using guards, but not guard:

safeDiv :: Int -> Int -> Maybe Int
safeDiv x y | y /= 0    = Just (x `div` y)
            | otherwise = Nothing

A definition of safeDiv using guard and Monad do-notation:

safeDiv :: Int -> Int -> Maybe Int
safeDiv x y = do
  guard (y /= 0)
  return (x `div` y)
classclass IsString a where
#

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

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

{-# LANGUAGE OverloadedStrings  #-}

myText = "hello world" :: Text

Internally, the extension will convert this to the equivalent of

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

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

Methods

Instances24IsString, …
  • IsString SuffixDefined in Cabal-3.12.1.0 · Distribution.Simple.PreProcess.Types
  • IsString ModuleNameDefined in Cabal-syntax-3.12.1.0 · Distribution.ModuleName

    Construct a ModuleName from a valid module name String.

    This is just a convenience function intended for valid module strings. It is an error if it is used with a string that is not a valid module name. If you are parsing user input then use simpleParse instead.

  • IsString AbiHashDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.AbiHash
  • IsString ComponentIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentId
  • IsString FlagNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.Flag
  • IsString PackageNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageName
  • IsString PkgconfigNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigName
  • IsString UnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnitId
  • IsString UnqualComponentNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnqualComponentName
  • IsString ShortTextDefined in Cabal-syntax-3.12.1.0 · Distribution.Utils.ShortText
  • IsString BuilderDefined in bytestring-0.12.2.0 · Data.ByteString.Builder · orphan
  • IsString ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.Type

    Beware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�

  • IsString ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Lazy.Internal

    Beware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�

  • IsString ShortByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Short.Internal

    Beware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�

  • IsString DocDefined in pretty-1.1.3.6 · Text.PrettyPrint.HughesPJ
  • IsString CmdSpecDefined in process-1.6.26.1 · System.Process.Common

    construct a ShellCommand from a string literal

  • IsString TextDefined in text-2.1.3 · Data.Text · orphan

    Performs replacement on invalid scalar values:

    Example2 expressions
    :set -XOverloadedStrings"\55555" :: Text"\65533"
  • IsString BuilderDefined in text-2.1.3 · Data.Text.Internal.Builder

    Performs replacement on invalid scalar values:

    Example2 expressions
    :set -XOverloadedStrings"\55555" :: Builder"\65533"
  • IsString TextDefined in text-2.1.3 · Data.Text.Lazy · orphan

    Performs replacement on invalid scalar values:

    Example2 expressions
    :set -XOverloadedStrings"\55555" :: Data.Text.Lazy.Text"\65533"
  • IsString (Doc a)Defined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • IsString a => IsString (Identity a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.String
  • a ~ Char => IsString (Seq a)Defined in containers-0.7 · Data.Sequence.Internal
  • a ~ Char => IsString [a]Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.String

    (a ~ Char) context was introduced in 4.9.0.0

  • IsString a => IsString (Const a b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.String
classclass Typeable (a :: k) where
#

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

datadata Int16
#

16-bit signed integer type

Instances26Bounded, Enum, Eq, Integral, Data, Num, …
  • Bounded Int16Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Enum Int16Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Eq Int16Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Integral Int16Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Data Int16Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Num Int16Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Ord Int16Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Read Int16Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Real Int16Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Show Int16Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Ix Int16Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Bits Int16Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • FiniteBits Int16Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Storable Int16Defined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Storable
  • PrintfArg Int16Defined in base-4.20.2.0 · Text.Printf
  • NFData Int16Defined in deepseq-1.5.0.0 · Control.DeepSeq
  • Random Int16Defined in random-1.2.1.3 · System.Random
  • Finite Int16Defined in random-1.2.1.3 · System.Random.GFinite
  • Uniform Int16Defined in random-1.2.1.3 · System.Random.Internal
  • UniformRange Int16Defined in random-1.2.1.3 · System.Random.Internal
  • Binary Int16Defined in binary-0.8.9.3 · Data.Binary.Class
  • Structured Int16Defined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Structured
  • Lift Int16Defined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • IArray UArray Int16Defined in array-0.5.8.0 · Data.Array.Base
  • MArray IOUArray Int16 IODefined in array-0.5.8.0 · Data.Array.IO.Internals
  • MArray (STUArray s) Int16 (ST s)Defined in array-0.5.8.0 · Data.Array.Base
datadata Int32
#

32-bit signed integer type

Instances26Bounded, Enum, Eq, Integral, Data, Num, …
  • Bounded Int32Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Enum Int32Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Eq Int32Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Integral Int32Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Data Int32Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Num Int32Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Ord Int32Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Read Int32Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Real Int32Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Show Int32Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Ix Int32Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Bits Int32Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • FiniteBits Int32Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Storable Int32Defined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Storable
  • PrintfArg Int32Defined in base-4.20.2.0 · Text.Printf
  • NFData Int32Defined in deepseq-1.5.0.0 · Control.DeepSeq
  • Random Int32Defined in random-1.2.1.3 · System.Random
  • Finite Int32Defined in random-1.2.1.3 · System.Random.GFinite
  • Uniform Int32Defined in random-1.2.1.3 · System.Random.Internal
  • UniformRange Int32Defined in random-1.2.1.3 · System.Random.Internal
  • Binary Int32Defined in binary-0.8.9.3 · Data.Binary.Class
  • Structured Int32Defined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Structured
  • Lift Int32Defined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • IArray UArray Int32Defined in array-0.5.8.0 · Data.Array.Base
  • MArray IOUArray Int32 IODefined in array-0.5.8.0 · Data.Array.IO.Internals
  • MArray (STUArray s) Int32 (ST s)Defined in array-0.5.8.0 · Data.Array.Base
datadata Int64
#

64-bit signed integer type

Instances26Bounded, Enum, Eq, Integral, Data, Num, …
  • Bounded Int64Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Enum Int64Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Eq Int64Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Integral Int64Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Data Int64Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Num Int64Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Ord Int64Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Read Int64Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Real Int64Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Show Int64Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Ix Int64Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Bits Int64Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • FiniteBits Int64Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Storable Int64Defined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Storable
  • PrintfArg Int64Defined in base-4.20.2.0 · Text.Printf
  • NFData Int64Defined in deepseq-1.5.0.0 · Control.DeepSeq
  • Random Int64Defined in random-1.2.1.3 · System.Random
  • Finite Int64Defined in random-1.2.1.3 · System.Random.GFinite
  • Uniform Int64Defined in random-1.2.1.3 · System.Random.Internal
  • UniformRange Int64Defined in random-1.2.1.3 · System.Random.Internal
  • Binary Int64Defined in binary-0.8.9.3 · Data.Binary.Class
  • Structured Int64Defined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Structured
  • Lift Int64Defined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • IArray UArray Int64Defined in array-0.5.8.0 · Data.Array.Base
  • MArray IOUArray Int64 IODefined in array-0.5.8.0 · Data.Array.IO.Internals
  • MArray (STUArray s) Int64 (ST s)Defined in array-0.5.8.0 · Data.Array.Base
datadata Int8
#

8-bit signed integer type

Instances26Bounded, Enum, Eq, Integral, Data, Num, …
  • Bounded Int8Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Enum Int8Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Eq Int8Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Integral Int8Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Data Int8Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Num Int8Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Ord Int8Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Read Int8Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Real Int8Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Show Int8Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Ix Int8Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Bits Int8Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • FiniteBits Int8Defined in ghc-internal-9.1003.0 · GHC.Internal.Int
  • Storable Int8Defined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Storable
  • PrintfArg Int8Defined in base-4.20.2.0 · Text.Printf
  • NFData Int8Defined in deepseq-1.5.0.0 · Control.DeepSeq
  • Random Int8Defined in random-1.2.1.3 · System.Random
  • Finite Int8Defined in random-1.2.1.3 · System.Random.GFinite
  • Uniform Int8Defined in random-1.2.1.3 · System.Random.Internal
  • UniformRange Int8Defined in random-1.2.1.3 · System.Random.Internal
  • Binary Int8Defined in binary-0.8.9.3 · Data.Binary.Class
  • Structured Int8Defined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Structured
  • Lift Int8Defined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • IArray UArray Int8Defined in array-0.5.8.0 · Data.Array.Base
  • MArray IOUArray Int8 IODefined in array-0.5.8.0 · Data.Array.IO.Internals
  • MArray (STUArray s) Int8 (ST s)Defined in array-0.5.8.0 · Data.Array.Base
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, …