SimplEnv

ghc-7.10.3: The GHC API

Safe Haskell | None
Language | Haskell2010

SimplEnv

# Documentation

type InId = Id

type InBind = CoreBind

type InExpr = CoreExpr

type InAlt = CoreAlt

type InArg = CoreArg

type InType = Type

type InBndr = CoreBndr

type InVar = Var

type OutId = Id

type OutTyVar = TyVar

type OutBind = CoreBind

type OutExpr = CoreExpr

type OutAlt = CoreAlt

type OutArg = CoreArg

type OutType = Type

type OutBndr = CoreBndr

type OutVar = Var

type InCoercion = Coercion

type OutCoercion = Coercion

setMode :: SimplifierMode -> SimplEnv -> SimplEnv

getMode :: SimplEnv -> SimplifierMode

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

data SimplEnv

Constructors

SimplEnv |
Fields seMode :: SimplifierMode seTvSubst :: TvSubstEnv seCvSubst :: CvSubstEnv seIdSubst :: SimplIdSubst seInScope :: InScopeSet seFloats :: Floats

type StaticEnv = SimplEnv

pprSimplEnv :: SimplEnv -> SDoc

mkSimplEnv :: SimplifierMode -> SimplEnv

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

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

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

zapSubstEnv :: SimplEnv -> SimplEnv

setSubstEnv :: SimplEnv -> TvSubstEnv -> CvSubstEnv -> SimplIdSubst -> SimplEnv

getInScope :: SimplEnv -> InScopeSet

setInScope :: SimplEnv -> SimplEnv -> SimplEnv

setInScopeSet :: SimplEnv -> InScopeSet -> SimplEnv

modifyInScope :: SimplEnv -> CoreBndr -> SimplEnv

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

getSimplRules :: SimplM RuleBase

data SimplSR

Constructors

DoneEx OutExpr |
DoneId OutId |
ContEx TvSubstEnv CvSubstEnv SimplIdSubst InExpr |

Instances

Outputable SimplSR |

mkContEx :: SimplEnv -> InExpr -> SimplSR

substId :: SimplEnv -> InId -> SimplSR

lookupRecBndr :: SimplEnv -> InId -> OutId

refineFromInScope :: InScopeSet -> Var -> Var

substExpr :: SimplEnv -> CoreExpr -> CoreExpr

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

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

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

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

substTy :: SimplEnv -> Type -> Type

substTyVar :: SimplEnv -> TyVar -> Type

getTvSubst :: SimplEnv -> TvSubst

getCvSubst :: SimplEnv -> CvSubst

substCo :: SimplEnv -> Coercion -> Coercion

substCoVar :: SimplEnv -> CoVar -> Coercion

data Floats

Instances

Outputable Floats |

emptyFloats :: Floats

isEmptyFloats :: SimplEnv -> Bool

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

addFloats :: SimplEnv -> SimplEnv -> SimplEnv

extendFloats :: SimplEnv -> OutBind -> SimplEnv

wrapFloats :: SimplEnv -> OutExpr -> OutExpr

setFloats :: SimplEnv -> SimplEnv -> SimplEnv

zapFloats :: SimplEnv -> SimplEnv

addRecFloats :: SimplEnv -> SimplEnv -> SimplEnv

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

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

getFloatBinds :: SimplEnv -> [CoreBind]