ghc-7.10.2: The GHC API

Safe Haskell | None
Language | Haskell2010

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

refineFromInScope :: InScopeSet -> Var -> Var Source

substExpr :: SimplEnv -> CoreExpr -> CoreExpr Source

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

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

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

simplBinders :: SimplEnv -> [InBndr] -> SimplM (SimplEnv, [OutBndr]) 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

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

setFloats :: SimplEnv -> SimplEnv -> SimplEnv Source

zapFloats :: SimplEnv -> SimplEnv Source

addRecFloats :: SimplEnv -> SimplEnv -> SimplEnv Source

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

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

getFloatBinds :: SimplEnv -> [CoreBind] Source