ghc-7.8.2: The GHC API

Safe Haskell | None
Language | Haskell98

Demand

# Documentation

data StrDmd

Instances

Eq StrDmd |
Show StrDmd |
Outputable StrDmd |
Binary StrDmd |

data UseDmd

Constructors

UCall Count UseDmd |
UProd [MaybeUsed] |
UHead |
Used |

Instances

Eq UseDmd |
Show UseDmd |
Outputable UseDmd |
Binary UseDmd |

data Count

Constructors

One |
Many |

Instances

Eq Count |
Show Count |
Outputable Count |
Binary Count |

countOnce :: Count

countMany :: Count

type Demand = JointDmd

data CleanDemand

Instances

Eq CleanDemand |
Show CleanDemand |
Outputable CleanDemand |

mkProdDmd :: [JointDmd] -> CleanDemand

mkOnceUsedDmd :: CleanDemand -> JointDmd

mkManyUsedDmd :: CleanDemand -> JointDmd

mkHeadStrict :: CleanDemand -> CleanDemand

oneifyDmd :: JointDmd -> JointDmd

getUsage :: CleanDemand -> UseDmd

toCleanDmd :: Demand -> (CleanDemand, DeferAndUseM)

absDmd :: JointDmd

topDmd :: JointDmd

botDmd :: JointDmd

seqDmd :: JointDmd

lubDmd :: JointDmd -> JointDmd -> JointDmd

bothDmd :: JointDmd -> JointDmd -> JointDmd

apply1Dmd :: Demand

apply2Dmd :: Demand

isTopDmd :: JointDmd -> Bool

isBotDmd :: JointDmd -> Bool

isAbsDmd :: JointDmd -> Bool

isSeqDmd :: JointDmd -> Bool

peelUseCall :: UseDmd -> Maybe (Count, UseDmd)

cleanUseDmd_maybe :: JointDmd -> Maybe UseDmd

strictenDmd :: JointDmd -> CleanDemand

bothCleanDmd :: CleanDemand -> CleanDemand -> CleanDemand

data DmdType

Constructors

DmdType DmdEnv [Demand] DmdResult |

Instances

Eq DmdType |
Outputable DmdType |
Binary DmdType |

dmdTypeDepth :: DmdType -> Arity

lubDmdType :: DmdType -> DmdType -> DmdType

bothDmdType :: DmdType -> BothDmdArg -> DmdType

nopDmdType :: DmdType

botDmdType :: DmdType

mkDmdType :: DmdEnv -> [Demand] -> DmdResult -> DmdType

addDemand :: Demand -> DmdType -> DmdType

removeDmdTyArgs :: DmdType -> DmdType

type BothDmdArg = (DmdEnv, Termination ())

mkBothDmdArg :: DmdEnv -> BothDmdArg

toBothDmdArg :: DmdType -> BothDmdArg

type DmdEnv = VarEnv Demand

emptyDmdEnv :: VarEnv Demand

peelFV :: DmdType -> Var -> (DmdType, Demand)

type DmdResult = Termination CPRResult

data CPRResult

Instances

Eq CPRResult |
Show CPRResult |
Outputable CPRResult |
Outputable DmdResult |
Binary CPRResult |
Binary DmdResult |

isBotRes :: DmdResult -> Bool

isTopRes :: DmdResult -> Bool

topRes :: DmdResult

botRes :: DmdResult

cprProdRes :: [DmdType] -> DmdResult

vanillaCprProdRes :: Arity -> DmdResult

cprSumRes :: ConTag -> DmdResult

appIsBottom :: StrictSig -> Int -> Bool

isBottomingSig :: StrictSig -> Bool

pprIfaceStrictSig :: StrictSig -> SDoc

trimCPRInfo :: Bool -> Bool -> DmdResult -> DmdResult

returnsCPR_maybe :: DmdResult -> Maybe ConTag

newtype StrictSig

Constructors

StrictSig DmdType |

Instances

Eq StrictSig |
Outputable StrictSig |
Binary StrictSig |

mkStrictSig :: DmdType -> StrictSig

mkClosedStrictSig :: [Demand] -> DmdResult -> StrictSig

nopSig :: StrictSig

botSig :: StrictSig

cprProdSig :: Arity -> StrictSig

isNopSig :: StrictSig -> Bool

splitStrictSig :: StrictSig -> ([Demand], DmdResult)

increaseStrictSigArity :: Int -> StrictSig -> StrictSig

seqDemand :: JointDmd -> ()

seqDemandList :: [JointDmd] -> ()

seqDmdType :: DmdType -> ()

seqStrictSig :: StrictSig -> ()

evalDmd :: JointDmd

cleanEvalDmd :: CleanDemand

cleanEvalProdDmd :: Arity -> CleanDemand

isStrictDmd :: Demand -> Bool

splitDmdTy :: DmdType -> (Demand, DmdType)

splitFVs :: Bool -> DmdEnv -> (DmdEnv, DmdEnv)

deferAfterIO :: DmdType -> DmdType

postProcessUnsat :: DeferAndUse -> DmdType -> DmdType

postProcessDmdTypeM :: DeferAndUseM -> DmdType -> BothDmdArg

splitProdDmd :: Arity -> JointDmd -> [JointDmd]

splitProdDmd_maybe :: JointDmd -> Maybe [JointDmd]

peelCallDmd :: CleanDemand -> (CleanDemand, DeferAndUse)

mkCallDmd :: CleanDemand -> CleanDemand

dmdTransformSig :: StrictSig -> CleanDemand -> DmdType

dmdTransformDataConSig :: Arity -> StrictSig -> CleanDemand -> DmdType

dmdTransformDictSelSig :: StrictSig -> CleanDemand -> DmdType

argOneShots :: OneShotInfo -> JointDmd -> [OneShotInfo]

argsOneShots :: StrictSig -> Arity -> [[OneShotInfo]]

isSingleUsed :: JointDmd -> Bool

reuseEnv :: DmdEnv -> DmdEnv

zapDemand :: DynFlags -> Demand -> Demand

zapStrictSig :: DynFlags -> StrictSig -> StrictSig

strictifyDictDmd :: Type -> Demand -> Demand