Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
GHC.Types.CostCentre
Synopsis
- data CostCentre
- type CcName = FastString
- data CCFlavour
- mkCafFlavour :: CCFlavour
- mkExprCCFlavour :: CostCentreIndex -> CCFlavour
- mkDeclCCFlavour :: CostCentreIndex -> CCFlavour
- mkHpcCCFlavour :: CostCentreIndex -> CCFlavour
- mkLateCCFlavour :: CostCentreIndex -> CCFlavour
- mkCallerCCFlavour :: CostCentreIndex -> CCFlavour
- pprCostCentre :: IsLine doc => CostCentre -> doc
- data CostCentreStack
- pprCostCentreStack :: IsLine doc => CostCentreStack -> doc
- type CollectedCCs = ([CostCentre], [CostCentreStack])
- emptyCollectedCCs :: CollectedCCs
- collectCC :: CostCentre -> CostCentreStack -> CollectedCCs -> CollectedCCs
- currentCCS :: CostCentreStack
- dontCareCCS :: CostCentreStack
- isCurrentCCS :: CostCentreStack -> Bool
- maybeSingletonCCS :: CostCentreStack -> Maybe CostCentre
- mkUserCC :: FastString -> Module -> SrcSpan -> CCFlavour -> CostCentre
- mkAutoCC :: Id -> Module -> CostCentre
- mkAllCafsCC :: Module -> SrcSpan -> CostCentre
- mkSingletonCCS :: CostCentre -> CostCentreStack
- isCafCCS :: CostCentreStack -> Bool
- isCafCC :: CostCentre -> Bool
- isSccCountCC :: CostCentre -> Bool
- sccAbleCC :: CostCentre -> Bool
- ccFromThisModule :: CostCentre -> Module -> Bool
- pprCostCentreCore :: CostCentre -> SDoc
- costCentreUserName :: CostCentre -> String
- costCentreUserNameFS :: CostCentre -> FastString
- costCentreSrcSpan :: CostCentre -> SrcSpan
- cmpCostCentre :: CostCentre -> CostCentre -> Ordering
Documentation
data CostCentre #
A Cost Centre is a single {-# SCC #-}
annotation.
Constructors
NormalCC | |
Fields
| |
AllCafsCC | |
Instances
Data CostCentre # | |
Defined in GHC.Types.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 :: forall r r'. (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 | |
Binary CostCentre # | |
Defined in GHC.Types.CostCentre Methods put_ :: BinHandle -> CostCentre -> IO () # put :: BinHandle -> CostCentre -> IO (Bin CostCentre) # get :: BinHandle -> IO CostCentre # | |
Outputable CostCentre # | |
Defined in GHC.Types.CostCentre Methods ppr :: CostCentre -> SDoc # | |
Eq CostCentre # | |
Defined in GHC.Types.CostCentre | |
Ord CostCentre # | |
Defined in GHC.Types.CostCentre Methods compare :: CostCentre -> CostCentre -> Ordering # (<) :: CostCentre -> CostCentre -> Bool # (<=) :: CostCentre -> CostCentre -> Bool # (>) :: CostCentre -> CostCentre -> Bool # (>=) :: CostCentre -> CostCentre -> Bool # max :: CostCentre -> CostCentre -> CostCentre # min :: CostCentre -> CostCentre -> CostCentre # |
type CcName = FastString #
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.
Instances
Data CCFlavour # | |
Defined in GHC.Types.CostCentre Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CCFlavour -> c CCFlavour gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CCFlavour toConstr :: CCFlavour -> Constr dataTypeOf :: CCFlavour -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CCFlavour) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CCFlavour) gmapT :: (forall b. Data b => b -> b) -> CCFlavour -> CCFlavour gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CCFlavour -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CCFlavour -> r gmapQ :: (forall d. Data d => d -> u) -> CCFlavour -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> CCFlavour -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> CCFlavour -> m CCFlavour gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CCFlavour -> m CCFlavour gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CCFlavour -> m CCFlavour | |
Binary CCFlavour # | |
Eq CCFlavour # | |
Ord CCFlavour # | |
pprCostCentre :: IsLine doc => CostCentre -> doc #
data 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).
Instances
Outputable CostCentreStack # | |
Defined in GHC.Types.CostCentre Methods ppr :: CostCentreStack -> SDoc # | |
Eq CostCentreStack # | |
Defined in GHC.Types.CostCentre Methods (==) :: CostCentreStack -> CostCentreStack -> Bool # (/=) :: CostCentreStack -> CostCentreStack -> Bool # | |
Ord CostCentreStack # | |
Defined in GHC.Types.CostCentre Methods compare :: CostCentreStack -> CostCentreStack -> Ordering # (<) :: CostCentreStack -> CostCentreStack -> Bool # (<=) :: CostCentreStack -> CostCentreStack -> Bool # (>) :: CostCentreStack -> CostCentreStack -> Bool # (>=) :: CostCentreStack -> CostCentreStack -> Bool # max :: CostCentreStack -> CostCentreStack -> CostCentreStack # min :: CostCentreStack -> CostCentreStack -> CostCentreStack # |
pprCostCentreStack :: IsLine doc => CostCentreStack -> doc #
type CollectedCCs = ([CostCentre], [CostCentreStack]) #
collectCC :: CostCentre -> CostCentreStack -> CollectedCCs -> CollectedCCs #
isCurrentCCS :: CostCentreStack -> Bool #
mkUserCC :: FastString -> Module -> SrcSpan -> CCFlavour -> CostCentre #
mkAutoCC :: Id -> Module -> CostCentre #
mkAllCafsCC :: Module -> SrcSpan -> CostCentre #
isCafCCS :: CostCentreStack -> Bool #
isCafCC :: CostCentre -> Bool #
isSccCountCC :: CostCentre -> Bool #
Is this a cost-centre which records scc counts
sccAbleCC :: CostCentre -> Bool #
Is this a cost-centre which can be sccd ?
ccFromThisModule :: CostCentre -> Module -> Bool #
pprCostCentreCore :: CostCentre -> SDoc #
Print a flavour in Core
costCentreUserName :: CostCentre -> String #
costCentreSrcSpan :: CostCentre -> SrcSpan #
cmpCostCentre :: CostCentre -> CostCentre -> Ordering #