ghc-7.0.3: The GHC API

SimplEnv

# Documentation

type InId = Id Source

type InBind = CoreBind Source

type InExpr = CoreExpr Source

type InAlt = CoreAlt Source

type InArg = CoreArg Source

type InType = Type Source

type InBndr = CoreBndr Source

type InVar = Var Source

type OutId = Id Source

type OutTyVar = TyVar Source

type OutBind = CoreBind Source

type OutExpr = CoreExpr Source

type OutAlt = CoreAlt Source

type OutArg = CoreArg Source

type OutType = Type Source

type OutBndr = CoreBndr Source

type OutVar = Var Source

type InCoercion = Coercion Source

type OutCoercion = Coercion Source

setMode :: SimplifierMode -> SimplEnv -> SimplEnv Source

getMode :: SimplEnv -> SimplifierMode Source

updMode :: (SimplifierMode -> SimplifierMode) -> SimplEnv -> SimplEnv Source

setEnclosingCC :: SimplEnv -> CostCentreStack -> SimplEnv Source

getEnclosingCC :: SimplEnv -> CostCentreStack Source

data SimplEnv Source

Constructors

SimplEnv |

Fields

seMode :: SimplifierMode
seCC :: CostCentreStack
seTvSubst :: TvSubstEnv
seIdSubst :: SimplIdSubst
seInScope :: InScopeSet
seFloats :: Floats

type StaticEnv = SimplEnv Source

pprSimplEnv :: SimplEnv -> SDoc Source

mkSimplEnv :: SimplifierMode -> SimplEnv Source

extendIdSubst :: SimplEnv -> Id -> SimplSR -> SimplEnv Source

extendTvSubst :: SimplEnv -> TyVar -> Type -> SimplEnv Source

zapSubstEnv :: SimplEnv -> SimplEnv Source

setSubstEnv :: SimplEnv -> TvSubstEnv -> SimplIdSubst -> SimplEnv Source

getInScope :: SimplEnv -> InScopeSet Source

setInScope :: SimplEnv -> SimplEnv -> SimplEnv Source

setInScopeSet :: SimplEnv -> InScopeSet -> SimplEnv Source

modifyInScope :: SimplEnv -> CoreBndr -> SimplEnv Source

addNewInScopeIds :: SimplEnv -> [CoreBndr] -> SimplEnv Source

getSimplRules :: SimplM RuleBase Source

data SimplSR Source

Constructors

DoneEx OutExpr |
DoneId OutId |
ContEx TvSubstEnv SimplIdSubst InExpr |

Instances

Outputable SimplSR |

mkContEx :: SimplEnv -> InExpr -> SimplSR Source

substId :: SimplEnv -> InId -> SimplSR Source

lookupRecBndr :: SimplEnv -> InId -> OutId Source

simplNonRecBndr :: SimplEnv -> InBndr -> SimplM (SimplEnv, OutBndr)Source

simplRecBndrs :: SimplEnv -> [InBndr] -> SimplM SimplEnv Source

simplLamBndr :: SimplEnv -> Var -> SimplM (SimplEnv, Var)Source

simplLamBndrs :: SimplEnv -> [InBndr] -> SimplM (SimplEnv, [OutBndr])Source

simplBinder :: SimplEnv -> InBndr -> SimplM (SimplEnv, OutBndr)Source

simplBinders :: SimplEnv -> [InBndr] -> SimplM (SimplEnv, [OutBndr])Source

addBndrRules :: SimplEnv -> InBndr -> OutBndr -> (SimplEnv, OutBndr)Source

substExpr :: SDoc -> SimplEnv -> CoreExpr -> CoreExpr Source

substTy :: SimplEnv -> Type -> Type Source

substTyVar :: SimplEnv -> TyVar -> Type Source

getTvSubst :: SimplEnv -> TvSubst Source

mkCoreSubst :: SDoc -> SimplEnv -> Subst Source

data Floats Source

Instances

Outputable Floats |

emptyFloats :: Floats Source

isEmptyFloats :: SimplEnv -> Bool Source

addNonRec :: SimplEnv -> OutId -> OutExpr -> SimplEnv Source

addFloats :: SimplEnv -> SimplEnv -> SimplEnv Source

extendFloats :: SimplEnv -> OutBind -> SimplEnv Source

wrapFloats :: SimplEnv -> OutExpr -> OutExpr Source

floatBinds :: Floats -> [OutBind]Source

setFloats :: SimplEnv -> SimplEnv -> SimplEnv Source

zapFloats :: SimplEnv -> SimplEnv Source

addRecFloats :: SimplEnv -> SimplEnv -> SimplEnv Source

doFloatFromRhs :: TopLevelFlag -> RecFlag -> Bool -> OutExpr -> SimplEnv -> Bool Source

getFloats :: SimplEnv -> [CoreBind]Source