Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Unfolding creation
Synopsis
- noUnfolding :: Unfolding
- mkUnfolding :: UnfoldingOpts -> UnfoldingSource -> Bool -> Bool -> CoreExpr -> Unfolding
- mkCoreUnfolding :: UnfoldingSource -> Bool -> CoreExpr -> UnfoldingGuidance -> Unfolding
- mkFinalUnfolding :: UnfoldingOpts -> UnfoldingSource -> DmdSig -> CoreExpr -> Unfolding
- mkSimpleUnfolding :: UnfoldingOpts -> CoreExpr -> Unfolding
- mkWorkerUnfolding :: SimpleOpts -> (CoreExpr -> CoreExpr) -> Unfolding -> Unfolding
- mkInlineUnfolding :: SimpleOpts -> CoreExpr -> Unfolding
- mkInlineUnfoldingWithArity :: Arity -> SimpleOpts -> CoreExpr -> Unfolding
- mkInlinableUnfolding :: SimpleOpts -> CoreExpr -> Unfolding
- mkWrapperUnfolding :: SimpleOpts -> CoreExpr -> Arity -> Unfolding
- mkCompulsoryUnfolding :: SimpleOpts -> CoreExpr -> Unfolding
- mkCompulsoryUnfolding' :: CoreExpr -> Unfolding
- mkDFunUnfolding :: [Var] -> DataCon -> [CoreExpr] -> Unfolding
- specUnfolding :: SimpleOpts -> [Var] -> (CoreExpr -> CoreExpr) -> [CoreArg] -> Unfolding -> Unfolding
- certainlyWillInline :: UnfoldingOpts -> IdInfo -> CoreExpr -> Maybe Unfolding
Documentation
noUnfolding :: Unfolding Source #
There is no known Unfolding
mkUnfolding :: UnfoldingOpts -> UnfoldingSource -> Bool -> Bool -> CoreExpr -> Unfolding Source #
mkCoreUnfolding :: UnfoldingSource -> Bool -> CoreExpr -> UnfoldingGuidance -> Unfolding Source #
mkFinalUnfolding :: UnfoldingOpts -> UnfoldingSource -> DmdSig -> CoreExpr -> Unfolding Source #
mkSimpleUnfolding :: UnfoldingOpts -> CoreExpr -> Unfolding Source #
mkWorkerUnfolding :: SimpleOpts -> (CoreExpr -> CoreExpr) -> Unfolding -> Unfolding Source #
mkInlineUnfolding :: SimpleOpts -> 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 -> SimpleOpts -> CoreExpr -> Unfolding Source #
Make an unfolding that will be used once the RHS has been saturated to the given arity.
mkInlinableUnfolding :: SimpleOpts -> CoreExpr -> Unfolding Source #
mkWrapperUnfolding :: SimpleOpts -> CoreExpr -> Arity -> Unfolding Source #
mkCompulsoryUnfolding :: SimpleOpts -> CoreExpr -> Unfolding Source #
Used for things that absolutely must be unfolded
mkCompulsoryUnfolding' :: CoreExpr -> Unfolding Source #
Same as mkCompulsoryUnfolding
but no simple optimiser pass is performed
on the unfolding.
specUnfolding :: SimpleOpts -> [Var] -> (CoreExpr -> CoreExpr) -> [CoreArg] -> Unfolding -> Unfolding Source #
certainlyWillInline :: UnfoldingOpts -> IdInfo -> CoreExpr -> Maybe Unfolding Source #
Sees if the unfolding is pretty certain to inline. If so, return a *stable* unfolding for it, that will always inline. The CoreExpr is the WW'd and simplified RHS. In contrast, the unfolding template might not have been WW'd yet.