ghc-lib-parser-9.12.2.20250421: 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 Source #

Per-module state for tracking cost centre indices.

See documentation of `cc_flavour` for more details.

newCostCentreState :: CostCentreState Source #

Initialize cost centre state.

data CostCentreIndex Source #

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

#### Instances

Instances details

Data CostCentreIndex Source # |

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 Source #

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

toConstr :: CostCentreIndex -> Constr Source #

dataTypeOf :: CostCentreIndex -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Binary CostCentreIndex Source # |
Instance details Defined in GHC.Types.CostCentre.State Methods put_ :: WriteBinHandle -> CostCentreIndex -> IO () Source # put :: WriteBinHandle -> CostCentreIndex -> IO (Bin CostCentreIndex) Source # get :: ReadBinHandle -> IO CostCentreIndex Source #
Eq CostCentreIndex Source # |
Instance details Defined in GHC.Types.CostCentre.State Methods (==) :: CostCentreIndex -> CostCentreIndex -> Bool Source # (/=) :: CostCentreIndex -> CostCentreIndex -> Bool Source #
Ord CostCentreIndex Source # |

Instance details

Defined in GHC.Types.CostCentre.State

Methods

compare :: CostCentreIndex -> CostCentreIndex -> Ordering Source #

(<) :: CostCentreIndex -> CostCentreIndex -> Bool Source #

(<=) :: CostCentreIndex -> CostCentreIndex -> Bool Source #

(>) :: CostCentreIndex -> CostCentreIndex -> Bool Source #

(>=) :: CostCentreIndex -> CostCentreIndex -> Bool Source #

max :: CostCentreIndex -> CostCentreIndex -> CostCentreIndex Source #

min :: CostCentreIndex -> CostCentreIndex -> CostCentreIndex Source #

unCostCentreIndex :: CostCentreIndex -> Int Source #

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

Get a new index for a given cost centre name.