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

GHC 10.0.0.20260917 · lts/ghc-10.0.x · aa25b89 · 2026-10-10

Moduleghc-10.0.0.20260917GHC2024

GHC.Types.Basic

  • 45 types
  • 81 values
typetype ConTag = Int
#

A *one-index* constructor tag

Type of the tags associated with each constructor possibility or superclass selector

typetype ConTagZ = Int
#

A *zero-indexed* constructor tag

valuefIRST_TAG :: ConTag
#

Tags are allocated from here for real constructors or for superclass selectors

typetype Arity = Int
#

The number of value arguments that can be applied to a value before it does "real work". So: fib 100 has arity 0 x -> fib x has arity 1 See also Note [Definition of arity] in GHC.Core.Opt.Arity

typetype VisArity = Int
#

Syntactic (visibility) arity, i.e. the number of visible arguments. See Note [Visibility and arity]

typetype RepArity = Int
#

Representation Arity

The number of represented arguments that can be applied to a value before it does "real work". So: fib 100 has representation arity 0 x -> fib x has representation arity 1 (# x, y #) -> fib (x + y) has representation arity 2

typetype JoinArity = Int
#

The number of arguments that a join point takes. Unlike the arity of a function, this is a purely syntactic property and is fixed when the join point is created (or converted from a value). Both type and value arguments are counted.

typetype FullArgCount = Int
#

FullArgCount is the number of type or value arguments in an application, or the number of type or value binders in a lambda. Note: it includes both type and value arguments!

newtypenewtype Alignment
#

A power-of-two alignment

Instances4Eq, Ord, Outputable, OutputableP
datadata PromotionFlag
#

Is a TyCon a promoted data constructor or just a normal type constructor?

Instances6Eq, Data, Ord, NFData, Outputable, Binary
datadata FunctionOrData
#
Instances6Eq, Data, Ord, NFData, Outputable, Binary
datadata Origin
#

Was this piece of code user-written or generated by the compiler?

See Note [Generated code and pattern-match checking].

Instances3Eq, Data, Outputable
  • Eq OriginDefined in ghc-10.0.0.20260917 · GHC.Types.Basic
  • Data OriginDefined in ghc-10.0.0.20260917 · GHC.Types.Basic
  • Outputable OriginDefined in ghc-10.0.0.20260917 · GHC.Types.Basic
datadata DoPmc
#

Whether to run pattern-match checks in generated code.

See Note [Generated code and pattern-match checking].

Instances3Eq, Data, Outputable
  • Eq DoPmcDefined in ghc-10.0.0.20260917 · GHC.Types.Basic
  • Data DoPmcDefined in ghc-10.0.0.20260917 · GHC.Types.Basic
  • Outputable DoPmcDefined in ghc-10.0.0.20260917 · GHC.Types.Basic
valuerequiresPMC :: Origin -> Bool
#

Does this Origin require us to run pattern-match checking, or should we skip these checks?

See Note [Generated code and pattern-match checking].

datadata GenReason
#

This metadata stores the information as to why was the piece of code generated It is useful for generating the right error context See Part 3 in Note [Expanding HsDo with XXExprGhcRn] in GHC.Tc.Gen.Do

Instances3Eq, Data, Outputable
datadata Boxity
#
Instances4Eq, Data, Outputable, Binary
  • Eq BoxityDefined in ghc-10.0.0.20260917 · Language.Haskell.Syntax.Basic
  • Data BoxityDefined in ghc-10.0.0.20260917 · Language.Haskell.Syntax.Basic
  • Outputable BoxityDefined in ghc-10.0.0.20260917 · GHC.Utils.Outputable
  • Binary BoxityDefined in ghc-10.0.0.20260917 · GHC.Utils.Binary
newtypenewtype PprPrec
#

A general-purpose pretty-printing precedence type.

Constructors

Instances3Eq, Ord, Show
  • Eq PprPrecDefined in ghc-10.0.0.20260917 · GHC.Types.Basic
  • Ord PprPrecDefined in ghc-10.0.0.20260917 · GHC.Types.Basic
  • Show PprPrecDefined in ghc-10.0.0.20260917 · GHC.Types.Basic
valuepprAlternative
  1. :: (a -> SDoc)

    The pretty printing function to use

  2. -> a

    The things to be pretty printed

  3. -> ConTag

    Alternative (one-based)

  4. -> Arity

    Arity

  5. -> SDoc

    SDoc where the alternative havs been pretty printed and finally packed into a paragraph.

#

Pretty print an alternative in an unboxed sum e.g. "| a | |".

The OneShotInfo type

69 declarations
datadata OneShotInfo
#

If the Id is a lambda-bound variable then it may have lambda-bound variable info. Sometimes we know whether the lambda binding this variable is a "one-shot" lambda; that is, whether it is applied at most once.

This information may be useful in optimisation, as computations may safely be floated inside such a lambda without risk of duplicating work.

See also Note [OneShotInfo overview] above.

Constructors

Instances2Eq, Outputable
datadata OccInfo
#

identifier Occurrence Information

Constructors

Instances2Eq, Outputable

Keep only the most robust occurrence info: deadness, loop-breaker-hood.

In particular, it zaps TailCallInfo: see Note [JoinId vs TailCallInfo] in GHC.Core.Opt.Simplify.Env.

datadata InsideLam
#

Inside Lambda

Constructors

  • IsInsideLam

    Occurs inside a non-linear lambda Substituting a redex for this occurrence is dangerous because it might duplicate work.

  • NotInsideLam
Instances3Eq, Semigroup, Monoid
  • Eq InsideLamDefined in ghc-10.0.0.20260917 · GHC.Types.Basic
  • Semigroup InsideLamDefined in ghc-10.0.0.20260917 · GHC.Types.Basic

    If any occurrence of an identifier is inside a lambda, then the occurrence info of that identifier marks it as occurring inside a lambda

  • Monoid InsideLamDefined in ghc-10.0.0.20260917 · GHC.Types.Basic
datadata InterestingCxt
#

Interesting Context

Constructors

Instances3Eq, Semigroup, Monoid
  • Eq InterestingCxtDefined in ghc-10.0.0.20260917 · GHC.Types.Basic
  • Semigroup InterestingCxtDefined in ghc-10.0.0.20260917 · GHC.Types.Basic

    If there is any interesting identifier occurrence, then the aggregated occurrence info of that identifier is considered interesting.

  • Monoid InterestingCxtDefined in ghc-10.0.0.20260917 · GHC.Types.Basic
datadata EP a
#

Embedding Projection pair

Constructors

datadata Levity
#
Instances6Eq, Data, Ord, Show, Outputable, Binary
  • Eq LevityDefined in ghc-10.0.0.20260917 · GHC.Types.Basic
  • Data LevityDefined in ghc-10.0.0.20260917 · GHC.Types.Basic
  • Ord LevityDefined in ghc-10.0.0.20260917 · GHC.Types.Basic
  • Show LevityDefined in ghc-10.0.0.20260917 · GHC.Types.Basic
  • Outputable LevityDefined in ghc-10.0.0.20260917 · GHC.Types.Basic
  • Binary LevityDefined in ghc-10.0.0.20260917 · GHC.Types.Basic
datadata TyConFlavour tc
#

Paints a picture of what a TyCon represents, in broad strokes. This is used towards more informative error messages.

Instances4Functor, Eq, Data, Outputable
datadata NewOrData
#

When we only care whether a data-type declaration is data or newtype, but not what constructors it has.

Constructors

Instances3Eq, Data, Outputable

Specify whether to default type variables of kind RuntimeRepLevityMultiplicity.

Constructors

  • DefaultNonStandardTyVars

    Default type variables of the given kinds:

    • default RuntimeRep variables to LiftedRep

    • default Levity variables to Lifted

    • default Multiplicity variables to Many

  • TryNotToDefaultNonStandardTyVars

    Try not to default type variables of the kinds RuntimeRepLevityMultiplicity.

    Note that these might get defaulted anyway, if they are kind variables and `-XNoPolyKinds` is enabled.

Instances1Outputable
datadata DefaultingStrategy
#

Specify whether to default kind variables, and type variables of kind RuntimeRepLevityMultiplicity.

Constructors

  • DefaultKindVars

    Default kind variables:

    • default kind variables of kind Type to Type,

    • default RuntimeRepLevityMultiplicity kind variables to LiftedRepLiftedMany, respectively.

    When this strategy is used, it means that we have determined that the variables we are considering defaulting are all kind variables.

    Usually, we pass this option when -XNoPolyKinds is enabled.

  • NonStandardDefaulting NonStandardDefaultingStrategy

    Default (or don't default) non-standard variables, of kinds RuntimeRep, Levity and Multiplicity.

Instances1Outputable
datadata ForeignSrcLang
#

Foreign formats supported by GHC via TH

Constructors

Instances6Eq, Show, Generic, Binary, Lift, Rep
datadata ImportLevel
#
Instances8Bounded, Enum, Eq, Data, Ord, Show, …

Orphan instances

2 instances