HORIZON HASKELLDocslts/ghc-9.14.xb2f3bfd2026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · b2f3bfd · 2026-10-11

Moduleghc-9.14.1GHC2021

GHC.Iface.Tidy

Tidying up Core

This module's purpose is to prepare the Core program for two distinct purposes: * To be serialised into the module's interface file * To feed to the code generator

The most important tasks are: * Determine which Names should ultimately be Internal and External (which may differ to whether they were originally Internal or External). See `Note [About the NameSorts]` in GHC.Types.Name. For example, in: module M where f x = x + y where y = factorial 4 could be optimized during the Core pass to: module M where y = factorial 4 f x = x + y in which case y would be changed from Internal to External.

  • Rename local identifiers to avoid name clashes, so that unfoldings etc can be serialialised using the OccName, without Uniques.

For example (x_5 means x with a Unique of `5`): f x_12 x_23 = x_12 would be changed to: f x_12 x1_23 = x_12

  • 2 types
  • 2 values
  • Packageghc-9.14.1
  • Exports4
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceTidy.hs
datadata TidyOpts
#

Constructors

datadata UnfoldingExposure
#

Constructors

  • ExposeNone

    Don't expose unfoldings

  • ExposeSome

    Expose mandatory unfoldings and those meeting inlining thresholds.

  • ExposeOverloaded

    Expose unfoldings useful for inlinings and those which which might be specialised. See Note [Exposing overloaded functions]

  • ExposeAll

    Expose all unfoldings

Instances3Eq, Ord, Show