Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
An inlining pass.
This pass is essentially a copy of the PIR inliner, and should be KEPT IN SYNC with it. It's hard to do this with true abstraction, so we just have to keep two copies reasonably similar.
However, there are some differences. In the interests of making it easier to keep things in sync, these are explicitly listed in Note [Differences from PIR inliner]. If you add another difference, please note it there! Obviously fewer differences is better.
See Note [The problem of inlining destructors] for why this pass exists.
Synopsis
- inline ∷ ∀ name uni fun m a. ExternalConstraints name uni fun m ⇒ Bool → InlineHints name a → BuiltinSemanticsVariant fun → Term name uni fun a → m (Term name uni fun a)
- newtype InlineHints name a = InlineHints {
- shouldInline ∷ a → name → Bool
Documentation
∷ ∀ name uni fun m a. ExternalConstraints name uni fun m | |
⇒ Bool | inline constants |
→ InlineHints name a | |
→ BuiltinSemanticsVariant fun | |
→ Term name uni fun a | |
→ m (Term name uni fun a) |
Inline simple bindings. Relies on global uniqueness, and preserves it. See Note [Inlining and global uniqueness]
newtype InlineHints name a Source #
InlineHints | |
|
Instances
Monoid (InlineHints name a) Source # | |
Defined in PlutusCore.Annotation mempty ∷ InlineHints name a Source # mappend ∷ InlineHints name a → InlineHints name a → InlineHints name a Source # mconcat ∷ [InlineHints name a] → InlineHints name a Source # | |
Semigroup (InlineHints name a) Source # | |
Defined in PlutusCore.Annotation (<>) ∷ InlineHints name a → InlineHints name a → InlineHints name a Source # sconcat ∷ NonEmpty (InlineHints name a) → InlineHints name a Source # stimes ∷ Integral b ⇒ b → InlineHints name a → InlineHints name a Source # | |
Show (InlineHints name a) Source # | |
Defined in PlutusCore.Annotation |