ghc-lib-0.20190204: The GHC API, decoupled from GHC versions

Safe HaskellNone
LanguageHaskell2010

CoreUnfold

Synopsis

Documentation

data Unfolding Source #

Records the unfolding of an identifier, which is approximately the form the identifier would have if we substituted its definition in for the identifier. This type should be treated as abstract everywhere except in CoreUnfold

Instances
Instance details

Defined in PprCore

data UnfoldingGuidance Source #

UnfoldingGuidance says when unfolding should take place

Instances
Instance details

Defined in CoreSyn

Instance details

Defined in PprCore

noUnfolding :: Unfolding Source #

There is no known Unfolding

mkImplicitUnfolding :: DynFlags -> CoreExpr -> Unfolding Source #

mkUnfolding :: DynFlags -> UnfoldingSource -> Bool -> Bool -> CoreExpr -> Unfolding Source #

mkCoreUnfolding :: UnfoldingSource -> Bool -> CoreExpr -> UnfoldingGuidance -> Unfolding Source #

mkTopUnfolding :: DynFlags -> Bool -> CoreExpr -> Unfolding Source #

mkSimpleUnfolding :: DynFlags -> CoreExpr -> Unfolding Source #

mkWorkerUnfolding :: DynFlags -> (CoreExpr -> CoreExpr) -> Unfolding -> Unfolding Source #

mkInlineUnfolding :: CoreExpr -> Unfolding Source #

Make an unfolding that may be used unsaturated (ug_unsat_ok = unSaturatedOk) and that is reported as having its manifest arity (the number of outer lambdas applications will resolve before doing any work).

mkInlineUnfoldingWithArity :: Arity -> CoreExpr -> Unfolding Source #

Make an unfolding that will be used once the RHS has been saturated to the given arity.

mkInlinableUnfolding :: DynFlags -> CoreExpr -> Unfolding Source #

mkWwInlineRule :: DynFlags -> CoreExpr -> Arity -> Unfolding Source #

mkCompulsoryUnfolding :: CoreExpr -> Unfolding Source #

mkDFunUnfolding :: [Var] -> DataCon -> [CoreExpr] -> Unfolding Source #

specUnfolding :: DynFlags -> [Var] -> (CoreExpr -> CoreExpr) -> Arity -> Unfolding -> Unfolding Source #

data ArgSummary Source #

Constructors

Instances
Instance details

Defined in CoreUnfold

couldBeSmallEnoughToInline :: DynFlags -> Int -> CoreExpr -> Bool Source #

inlineBoringOk :: CoreExpr -> Bool Source #

certainlyWillInline :: DynFlags -> IdInfo -> Maybe Unfolding Source #

smallEnoughToInline :: DynFlags -> Unfolding -> Bool Source #

callSiteInline :: DynFlags -> Id -> Bool -> Bool -> [ArgSummary] -> CallCtxt -> Maybe CoreExpr Source #

data CallCtxt Source #

Constructors

Instances
Instance details

Defined in CoreUnfold

exprIsConApp_maybe :: InScopeEnv -> CoreExpr -> Maybe (DataCon, [Type], [CoreExpr]) Source #

Returns Just (dc, [t1..tk], [x1..xn]) if the argument expression is a *saturated* constructor application of the form dc t1..tk x1 .. xn, where t1..tk are the *universally-quantified* type args of dc

exprIsLiteral_maybe :: InScopeEnv -> CoreExpr -> Maybe Literal Source #

AltStyle によって変換されたページ (->オリジナル) /