| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
PlutusIR.Transform.Inline.CallSiteInline
Description
Call site inlining machinery. We inline if the size of the inlined result is not larger. See Note [Inlining and beta reduction of functions].
Synopsis
- applyAndBetaReduce :: forall tyname name uni fun ann. InliningConstraints tyname name uni fun => Term tyname name uni fun ann -> AppContext tyname name uni fun ann -> InlineM tyname name uni fun ann (Maybe (Term tyname name uni fun ann))
- callSiteInline :: forall tyname name uni fun ann. InliningConstraints tyname name uni fun => AstSize -> InlineVarInfo tyname name uni fun ann -> AppContext tyname name uni fun ann -> InlineM tyname name uni fun ann (Maybe (Term tyname name uni fun ann))
Documentation
Arguments
| :: forall tyname name uni fun ann. InliningConstraints tyname name uni fun | |
| => Term tyname name uni fun ann | The rhs of the variable, should have been renamed already |
| -> AppContext tyname name uni fun ann | The arguments, already processed |
| -> InlineM tyname name uni fun ann (Maybe (Term tyname name uni fun ann)) |
Apply the RHS of the given variable to the given arguments, and beta-reduce the application, if possible.
Arguments
| :: forall tyname name uni fun ann. InliningConstraints tyname name uni fun | |
| => AstSize | The term size if it were not inlined. |
| -> InlineVarInfo tyname name uni fun ann | The |
| -> AppContext tyname name uni fun ann | The application context of the term, already processed. |
| -> InlineM tyname name uni fun ann (Maybe (Term tyname name uni fun ann)) |
Consider inlining a variable. For applications, consider whether to apply and beta reduce.