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

PlutusIR.Transform.RewriteRules.Common

Synopsis

Documentation

seqA ∷ (MonadQuote m, Monoid a, ToBuiltinMeaning uni fun) ⇒ BuiltinsInfo uni fun → VarsInfo tyname Name uni a → (Type tyname uni a, Term tyname Name uni fun a) → m (Term tyname Name uni fun a) → m (Term tyname Name uni fun a) Source #

A wrapper that can be more easily turned into an infix operator.

e.g. `infixr 5 (***) = seqA binfo vInfo`

seqP ∷ (MonadQuote m, Monoid a, ToBuiltinMeaning uni fun) ⇒ BuiltinsInfo uni fun → VarsInfo tyname Name uni a → (Type tyname uni a, Term tyname Name uni fun a) → Term tyname Name uni fun a → m (Term tyname Name uni fun a) Source #

Another "infix" wrapper where second operand is a Haskell pure value.

e.g. `infixr 5 (***) = seqP binfo vInfo`

mkFreshTermLet Source #

Arguments

∷ ∀ m t tyname (uni ∷ TypeType) fun a. (MonadQuote m, TermLike t tyname Name uni fun, Monoid a) 
Type tyname uni a

the type of binding

→ t a

the term bound to the fresh variable

→ m (t a, t a → t a)

the fresh Var and a function that takes an "in" term to construct the Let

A helper to create a single, fresh strict binding; It returns the fresh bound Variable and a function `Term -> Term`, expecting an "in-Term" to form a let-expression.

pattern ATerm tyname name uni fun a → Term tyname name uni fun a → Term tyname name uni fun a Source #

pattern B ∷ fun → Term tyname name uni fun a Source #

pattern ITerm tyname name uni fun a → Type tyname uni a → Term tyname name uni fun a Source #