ghc-8.4.4: The GHC API

Safe HaskellNone
LanguageHaskell2010

CostCentre

Synopsis

Documentation

data CostCentre Source #

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

Constructors

NormalCC 

Fields

  • cc_key :: !Int

    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 a Unique that is distinct from every other CostCentre in the same module.

    XXX: should really be using Unique here, but we need to derive Data below and there's no Data instance for Unique.

  • cc_name :: CcName

    Name of the cost centre itself

  • cc_mod :: Module

    Name of module defining this CC.

  • cc_loc :: SrcSpan
     
  • cc_is_caf :: IsCafCC
     
AllCafsCC 

Fields

Instances
Eq CostCentre Source # 
Instance details

Defined in CostCentre

Data CostCentre Source # 
Instance details

Defined in CostCentre

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CostCentre -> c CostCentre #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CostCentre #

toConstr :: CostCentre -> Constr #

dataTypeOf :: CostCentre -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CostCentre) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CostCentre) #

gmapT :: (forall b. Data b => b -> b) -> CostCentre -> CostCentre #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CostCentre -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CostCentre -> r #

gmapQ :: (forall d. Data d => d -> u) -> CostCentre -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CostCentre -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CostCentre -> m CostCentre #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CostCentre -> m CostCentre #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CostCentre -> m CostCentre #

Ord CostCentre Source # 
Instance details

Defined in CostCentre

Outputable CostCentre Source # 
Instance details

Defined in CostCentre

Binary CostCentre Source # 
Instance details

Defined in CostCentre

data IsCafCC Source #

Constructors

NotCafCC 
CafCC 
Instances
Eq IsCafCC Source # 
Instance details

Defined in CostCentre

Methods

(==) :: IsCafCC -> IsCafCC -> Bool #

(/=) :: IsCafCC -> IsCafCC -> Bool #

Data IsCafCC Source # 
Instance details

Defined in CostCentre

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IsCafCC -> c IsCafCC #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IsCafCC #

toConstr :: IsCafCC -> Constr #

dataTypeOf :: IsCafCC -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IsCafCC) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IsCafCC) #

gmapT :: (forall b. Data b => b -> b) -> IsCafCC -> IsCafCC #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IsCafCC -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IsCafCC -> r #

gmapQ :: (forall d. Data d => d -> u) -> IsCafCC -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IsCafCC -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IsCafCC -> m IsCafCC #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IsCafCC -> m IsCafCC #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IsCafCC -> m IsCafCC #

Ord IsCafCC Source # 
Instance details

Defined in CostCentre

Binary IsCafCC Source # 
Instance details

Defined in CostCentre

data CostCentreStack Source #

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

isSccCountCC :: CostCentre -> Bool Source #

Is this a cost-centre which records scc counts

sccAbleCC :: CostCentre -> Bool Source #

Is this a cost-centre which can be sccd ?