SimplUtils

ghc-7.0.4: The GHC API

SimplUtils

# Documentation

mkLam :: SimplEnv -> [OutBndr] -> OutExpr -> SimplM OutExpr

mkCase :: DynFlags -> OutExpr -> OutId -> [OutAlt] -> SimplM OutExpr

prepareAlts :: OutExpr -> OutId -> [InAlt] -> SimplM ([AltCon], [InAlt])

tryEtaExpand :: SimplEnv -> OutId -> OutExpr -> SimplM (Arity, OutExpr)

preInlineUnconditionally :: SimplEnv -> TopLevelFlag -> InId -> InExpr -> Bool

postInlineUnconditionally :: SimplEnv -> TopLevelFlag -> OutId -> OccInfo -> OutExpr -> Unfolding -> Bool

activeUnfolding :: SimplEnv -> Id -> Bool

activeRule :: DynFlags -> SimplEnv -> Maybe (Activation -> Bool)

getUnfoldingInRuleMatch :: SimplEnv -> IdUnfoldingFun

simplEnvForGHCi :: SimplEnv

updModeForInlineRules :: Activation -> SimplifierMode -> SimplifierMode

data SimplCont

Constructors

Stop CallCtxt |
CoerceIt OutCoercion SimplCont |
ApplyTo DupFlag InExpr StaticEnv SimplCont |
Select DupFlag InId [InAlt] StaticEnv SimplCont |
StrictBind InId [InBndr] InExpr StaticEnv SimplCont |
StrictArg ArgInfo CallCtxt SimplCont |

Instances

Outputable SimplCont |

data DupFlag

Constructors

NoDup |
Simplified |
OkToDup |

Instances

Outputable DupFlag |

data ArgInfo

Constructors

ArgInfo |
Fields ai_fun :: Id ai_args :: [OutExpr] ai_rules :: [CoreRule] ai_encl :: Bool ai_strs :: [Bool] ai_discs :: [Int]

isSimplified :: DupFlag -> Bool

contIsDupable :: SimplCont -> Bool

contResultType :: SimplEnv -> OutType -> SimplCont -> OutType

contIsTrivial :: SimplCont -> Bool

contArgs :: SimplCont -> (Bool, [ArgSummary], SimplCont)

dropArgs :: Int -> SimplCont -> SimplCont

pushSimplifiedArgs :: SimplEnv -> [CoreExpr] -> SimplCont -> SimplCont

countValArgs :: SimplCont -> Int

countArgs :: SimplCont -> Int

addArgTo :: ArgInfo -> OutExpr -> ArgInfo

mkBoringStop :: SimplCont

mkRhsStop :: SimplCont

mkLazyArgStop :: CallCtxt -> SimplCont

contIsRhsOrArg :: SimplCont -> Bool

interestingCallContext :: SimplCont -> CallCtxt

interestingArg :: CoreExpr -> ArgSummary

mkArgInfo :: Id -> [CoreRule] -> Int -> SimplCont -> ArgInfo

abstractFloats :: [OutTyVar] -> SimplEnv -> OutExpr -> SimplM ([OutBind], OutExpr)