ghc-lib-0.20210228: The GHC API, decoupled from GHC versions
Safe HaskellNone
LanguageHaskell2010

GHC.Core.Opt.Simplify.Env

Synopsis

The simplifier mode

setMode :: SimplMode -> SimplEnv -> SimplEnv Source #

getMode :: SimplEnv -> SimplMode Source #

updMode :: (SimplMode -> SimplMode) -> SimplEnv -> SimplEnv Source #

seUnfoldingOpts :: SimplEnv -> UnfoldingOpts Source #

Environments

data SimplEnv Source #

Constructors

SimplEnv 

Fields

mkSimplEnv :: SimplMode -> SimplEnv Source #

Substitution results

data SimplSR Source #

A substitution result.

Constructors

DoneEx OutExpr (Maybe JoinArity) 
DoneId OutId 
ContEx TvSubstEnv CvSubstEnv SimplIdSubst InExpr 

Instances

Instances details
Outputable SimplSR Source # 
Instance details

Defined in GHC.Core.Opt.Simplify.Env

Methods

ppr :: SimplSR -> SDoc

mkContEx :: SimplEnv -> InExpr -> SimplSR Source #

Simplifying Id binders

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

simplNonRecJoinBndr :: SimplEnv -> InBndr -> Mult -> OutType -> SimplM (SimplEnv, OutBndr) Source #

simplRecJoinBndrs :: SimplEnv -> [InBndr] -> Mult -> OutType -> SimplM SimplEnv Source #

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

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

Floats

data SimplFloats Source #

Instances

Instances details
Outputable SimplFloats Source # 
Instance details

Defined in GHC.Core.Opt.Simplify.Env

Methods

ppr :: SimplFloats -> SDoc

wrapFloats :: SimplFloats -> OutExpr -> OutExpr Source #

doFloatFromRhs :: TopLevelFlag -> RecFlag -> Bool -> SimplFloats -> OutExpr -> Bool Source #

LetFloats

data LetFloats Source #

Instances

Instances details
Outputable LetFloats Source # 
Instance details

Defined in GHC.Core.Opt.Simplify.Env

Methods

ppr :: LetFloats -> SDoc

letFloatBinds :: LetFloats -> [CoreBind] Source #

mapLetFloats :: LetFloats -> ((Id, CoreExpr) -> (Id, CoreExpr)) -> LetFloats Source #

JoinFloats

type JoinFloat = OutBind Source #

type JoinFloats = OrdList JoinFloat Source #

wrapJoinFloats :: JoinFloats -> OutExpr -> OutExpr Source #

wrapJoinFloatsX :: SimplFloats -> OutExpr -> (SimplFloats, OutExpr) Source #