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

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

Moduleghc-lib-parser-9.14.1.20251220GHC2021

GHC.Types.CostCentre

  • 5 types
  • 29 values
datadata CostCentre
#

A Cost Centre is a single {-# SCC #-} annotation.

Constructors

  • NormalCC
    • cc_flavour :: CCFlavour

      Two cost centres may have the same name and module but different SrcSpans, so we need a way to distinguish them easily and give them different object-code labels. So every CostCentre has an associated flavour that indicates how it was generated, and flavours that allow multiple instances of the same name and module have a deterministic 0-based index.

    • cc_name :: CcName

      Name of the cost centre itself

    • cc_mod :: Module

      Name of module defining this CC.

    • cc_loc :: SrcSpan
  • AllCafsCC
Instances6Eq, Data, Ord, NFData, Outputable, Binary
  • Eq CostCentreDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.CostCentre
  • Data CostCentreDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.CostCentre
  • Ord CostCentreDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.CostCentre
  • NFData CostCentreDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.CostCentre
  • Outputable CostCentreDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.CostCentre
  • Binary CostCentreDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.CostCentre
datadata CCFlavour
#

The flavour of a cost centre.

Index fields represent 0-based indices giving source-code ordering of centres with the same module, name, and flavour.

Instances5Eq, Data, Ord, NFData, Binary
  • Eq CCFlavourDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.CostCentre
  • Data CCFlavourDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.CostCentre
  • Ord CCFlavourDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.CostCentre
  • NFData CCFlavourDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.CostCentre
  • Binary CCFlavourDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.CostCentre
datadata CostCentreStack
#

A Cost Centre Stack is something that can be attached to a closure. This is either:

  • the current cost centre stack (CCCS)

  • a pre-defined cost centre stack (there are several pre-defined CCSs, see below).

Instances3Eq, Ord, Outputable