GHC.Core.Unfold.Make

ghc-9.2.1: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Core.Unfold.Make

Description

Unfolding creation

Synopsis

- noUnfolding :: Unfolding
- mkUnfolding :: UnfoldingOpts -> UnfoldingSource -> Bool -> Bool -> CoreExpr -> Unfolding
- mkCoreUnfolding :: UnfoldingSource -> Bool -> CoreExpr -> UnfoldingGuidance -> Unfolding
- mkFinalUnfolding :: UnfoldingOpts -> UnfoldingSource -> StrictSig -> 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
- mkWwInlineRule :: SimpleOpts -> CoreExpr -> Arity -> Unfolding
- mkCompulsoryUnfolding :: SimpleOpts -> CoreExpr -> Unfolding
- mkCompulsoryUnfolding' :: CoreExpr -> Unfolding
- mkDFunUnfolding :: [Var] -> DataCon -> [CoreExpr] -> Unfolding
- specUnfolding :: SimpleOpts -> [Var] -> (CoreExpr -> CoreExpr) -> [CoreArg] -> Unfolding -> 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 -> StrictSig -> 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 #

mkWwInlineRule :: 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.

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

specUnfolding :: SimpleOpts -> [Var] -> (CoreExpr -> CoreExpr) -> [CoreArg] -> Unfolding -> Unfolding Source #