plutus-core-1.30.0.0: Language library for Plutus Core
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

Documentation

applyAndBetaReduce Source #

Arguments

∷ ∀ 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.

callSiteInline Source #

Arguments

∷ ∀ tyname name uni fun ann. InliningConstraints tyname name uni fun 
Size

The term size if it were not inlined.

InlineVarInfo tyname name uni fun ann

The VarInfo of the variable (the head of the term).

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.