Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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 ∷ ∀ 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 ∷ ∀ tyname name uni fun ann. InliningConstraints tyname name uni fun ⇒ Size → 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
∷ ∀ 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.
∷ ∀ 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 |
→ 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.