ghc-7.0.3: The GHC API

Demand

# Documentation

data Demand Source

Constructors

Top |
Abs |
Call Demand |
Eval Demands |
Defer Demands |
Box Demand |
Bot |

Instances

Eq Demand |
Outputable Demand |
Binary Demand |

topDmd :: Demand Source

lazyDmd :: Demand Source

seqDmd :: Demand Source

evalDmd :: Demand Source

errDmd :: Demand Source

isStrictDmd :: Demand -> Bool Source

isTop :: Demand -> Bool Source

isAbsent :: Demand -> Bool Source

seqDemand :: Demand -> ()Source

data DmdType Source

Constructors

DmdType DmdEnv [Demand] DmdResult |

Instances

Eq DmdType |
Outputable DmdType |
Binary DmdType |

topDmdType :: DmdType Source

botDmdType :: DmdType Source

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

mkTopDmdType :: [Demand] -> DmdResult -> DmdType Source

dmdTypeDepth :: DmdType -> Arity Source

seqDmdType :: DmdType -> ()Source

type DmdEnv = VarEnv Demand Source

emptyDmdEnv :: VarEnv Demand Source

data DmdResult Source

Constructors

TopRes |
RetCPR |
BotRes |

Instances

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

retCPR :: DmdResult Source

isBotRes :: DmdResult -> Bool Source

returnsCPR :: DmdResult -> Bool Source

resTypeArgDmd :: DmdResult -> Demand Source

data Demands Source

Constructors

Poly Demand |
Prod [Demand] |

Instances

Eq Demands |
Outputable Demands |
Binary Demands |

mapDmds :: (Demand -> Demand) -> Demands -> Demands Source

zipWithDmds :: (Demand -> Demand -> Demand) -> Demands -> Demands -> Demands Source

allTop :: Demands -> Bool Source

seqDemands :: Demands -> ()Source

newtype StrictSig Source

Constructors

StrictSig DmdType |

Instances

Eq StrictSig |
Show StrictSig |
Outputable StrictSig |
Binary StrictSig |

mkStrictSig :: DmdType -> StrictSig Source

topSig :: StrictSig Source

botSig :: StrictSig Source

cprSig :: StrictSig Source

isTopSig :: StrictSig -> Bool Source

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

increaseStrictSigArity :: Int -> StrictSig -> StrictSig Source

pprIfaceStrictSig :: StrictSig -> SDoc Source

appIsBottom :: StrictSig -> Int -> Bool Source

isBottomingSig :: StrictSig -> Bool Source

seqStrictSig :: StrictSig -> ()Source