GHC.Types.CostCentre.State

ghc-lib-parser-9.14.1.20251220: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Types.CostCentre.State

Synopsis

- data CostCentreState
- newCostCentreState :: CostCentreState
- data CostCentreIndex
- unCostCentreIndex :: CostCentreIndex -> Int
- getCCIndex :: FastString -> CostCentreState -> (CostCentreIndex, CostCentreState)

# Documentation

data CostCentreState #

Per-module state for tracking cost centre indices.

See documentation of `cc_flavour` for more details.

newCostCentreState :: CostCentreState #

Initialize cost centre state.

data CostCentreIndex #

An index into a given cost centre module,name,flavour set

#### Instances

Instances details

NFData CostCentreIndex # |
Instance details Defined in GHC.Types.CostCentre.State Methods rnf :: CostCentreIndex -> () #
Data CostCentreIndex # |
Instance details Defined in GHC.Types.CostCentre.State Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CostCentreIndex -> c CostCentreIndex # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CostCentreIndex # toConstr :: CostCentreIndex -> Constr # dataTypeOf :: CostCentreIndex -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CostCentreIndex) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CostCentreIndex) # gmapT :: (forall b. Data b => b -> b) -> CostCentreIndex -> CostCentreIndex # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CostCentreIndex -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CostCentreIndex -> r # gmapQ :: (forall d. Data d => d -> u) -> CostCentreIndex -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> CostCentreIndex -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CostCentreIndex -> m CostCentreIndex # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CostCentreIndex -> m CostCentreIndex # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CostCentreIndex -> m CostCentreIndex #
Binary CostCentreIndex # |
Instance details Defined in GHC.Types.CostCentre.State Methods put_ :: WriteBinHandle -> CostCentreIndex -> IO () # put :: WriteBinHandle -> CostCentreIndex -> IO (Bin CostCentreIndex) # get :: ReadBinHandle -> IO CostCentreIndex #
Eq CostCentreIndex # |
Instance details Defined in GHC.Types.CostCentre.State Methods (==) :: CostCentreIndex -> CostCentreIndex -> Bool # (/=) :: CostCentreIndex -> CostCentreIndex -> Bool #
Ord CostCentreIndex # |
Instance details Defined in GHC.Types.CostCentre.State Methods compare :: CostCentreIndex -> CostCentreIndex -> Ordering # (<) :: CostCentreIndex -> CostCentreIndex -> Bool # (<=) :: CostCentreIndex -> CostCentreIndex -> Bool # (>) :: CostCentreIndex -> CostCentreIndex -> Bool # (>=) :: CostCentreIndex -> CostCentreIndex -> Bool # max :: CostCentreIndex -> CostCentreIndex -> CostCentreIndex # min :: CostCentreIndex -> CostCentreIndex -> CostCentreIndex #

unCostCentreIndex :: CostCentreIndex -> Int #

getCCIndex :: FastString -> CostCentreState -> (CostCentreIndex, CostCentreState) #

Get a new index for a given cost centre name.