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

  • 10 types
  • 45 values

Inline Pragma Encoding

0 declarations

InlinePragma

Data-type

datadata InlinePragma pass
#
Instances7Eq, Data, NFData, Outputable, Binary, …

Inline Pragma Information

Tells when the inlining is active. When it is active the thing may be inlined, depending on how big it is.

If there was an INLINE pragma, then as a separate matter, the RHS will have been made to look small with a Core inline Note

The default InlinePragInfo is AlwaysActive, so the info serves entirely as a way to inhibit inlining until we want it

Constants

Field accessors

Outputs string for pragma name for any of INLINEINLINABLENOINLINE. This differs from the Outputable instance for the InlineSpec type where the pragma name string as well as the accompanying SourceText (if any) is printed.

Queries

Mutators

GHC pass conversions

Pretty-printing

Extensible record type for GhcRn & GhcTc

datadata XInlinePragmaGhc
#

Constructors

  • XInlinePragmaGhc
    • xinl_src :: SourceText

      See Note [Pragma source text]

    • xinl_sat :: InlineSaturation

      Inline only when applied to n explicit (non-type, non-dictionary) arguments.

      That is, xinl_sat describes the number of *source-code* arguments the thing must be applied to. We add on the number of implicit, dictionary arguments when making the Unfolding, and don't look at inl_sat further

Instances4Eq, Data, NFData, Binary
datadata InlineSaturation
#

The arity at which to inline a function. This may differ from the function's syntactic arity.

Constructors

  • AppliedToAtLeast !Arity

    Inline only when applied to n explicit (non-type, non-dictionary) arguments.

    That is, AppliedToAtLeast describes the number of *source-code* arguments the thing must be applied to.

  • AnySaturation

    There does not exist an explicit number of arguments that the inlining process should be applied to.

Instances4Eq, Data, NFData, Binary

InlineSpec

Data-type

datadata InlineSpec
#
Instances6Eq, Data, Show, NFData, Outputable, Binary
  • Eq InlineSpecDefined in ghc-10.0.0.20260917 · Language.Haskell.Syntax.Binds.InlinePragma
  • Data InlineSpecDefined in ghc-10.0.0.20260917 · Language.Haskell.Syntax.Binds.InlinePragma
  • Show InlineSpecDefined in ghc-10.0.0.20260917 · Language.Haskell.Syntax.Binds.InlinePragma
  • NFData InlineSpecDefined in ghc-10.0.0.20260917 · Language.Haskell.Syntax.Binds.InlinePragma
  • Outputable InlineSpecDefined in ghc-10.0.0.20260917 · GHC.Utils.Outputable
  • Binary InlineSpecDefined in ghc-10.0.0.20260917 · GHC.Utils.Binary

Queries

RuleMatchInfo

Data-type

datadata RuleMatchInfo
#

Rule Match Information

Instances6Eq, Data, Show, NFData, Outputable, Binary

Queries

Phase Activation

0 declarations

Activation

Data-type

datadata ActivationX e
#

An activation is a range of phases throughout which something is active (like an INLINE pragma, SPECIALISE pragma, or RULE).

Constructors

Instances5Data, Binary, Eq, NFData, Outputable
typetype PhaseNum = Int
#

Compilation phase number, as can be written by users in INLINE pragmas, SPECIALISE pragmas, and RULES.

  • phases decrease towards zero

  • zero is the last phase

Does not include GHC internal "initial" and "final" phases; see CompilerPhase.

Construction

Constants

Queries

act1 competesWith act2 returns whether act1 is active in the phase when act2 becomes active.

This answers the question: might act1 fire first?

NB: this is not the same as computing whether act1 and act2 are ever active at the same time.

See Note [Competing activations]

CompilerPhase

Data-type

datadata CompilerPhase
#

Compilation phase number, including the user-specifiable PhaseNum and the GHC internal "initial" and "final" phases.

Constructors

Instances5Eq, Data, NFData, Outputable, Binary

Constructors

Queries

Tells you the next phase after this one

Currently we have just phases [2,1,0,FinalPhase,FinalPhase,...], where FinalPhase means GHC's internal simplification steps after all rules have run

Orphan instances

2 instances