SimplEnv

ghc-7.8.2: The GHC API

Safe Haskell | None
Language | Haskell98

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

data SimplEnv Source

Constructors

SimplEnv |
Fields seMode :: SimplifierMode seTvSubst :: TvSubstEnv seCvSubst :: CvSubstEnv 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

extendCvSubst :: SimplEnv -> CoVar -> Coercion -> SimplEnv Source

zapSubstEnv :: SimplEnv -> SimplEnv Source

setSubstEnv :: SimplEnv -> TvSubstEnv -> CvSubstEnv -> 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 CvSubstEnv 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

getCvSubst :: SimplEnv -> CvSubst Source

substCo :: SimplEnv -> Coercion -> Coercion Source

substCoVar :: SimplEnv -> CoVar -> Coercion 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

getFloatBinds :: SimplEnv -> [CoreBind] Source

getFloats :: SimplEnv -> Floats Source

mapFloats :: SimplEnv -> ((Id, CoreExpr) -> (Id, CoreExpr)) -> SimplEnv Source