plutus-tx-plugin-1.70.0.0: The Plutus Tx compiler and GHC plugin
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusTx.Compiler.Binders

Description

Convenient functions for compiling binders.

Synopsis

Documentation

withVarScoped ∷ CompilingDefault uni fun m ann ⇒ Var → Ann → Maybe (PIRTerm uni fun) → (VarDecl TyName Name uni Ann → m a) → m a Source #

withVarTyScoped ∷ CompilingDefault uni fun m ann ⇒ Var → PIRType uni → (VarDecl TyName Name uni Ann → m a) → m a Source #

Like withVarScoped, but takes a PIRType, and uses it for the type of the compiled Expr.

withVarsScoped ∷ CompilingDefault uni fun m ann ⇒ [(Var, Maybe (PIRTerm uni fun))] → ([VarDecl TyName Name uni Ann] → m a) → m a Source #

withTyVarScoped ∷ Compiling uni fun m ann ⇒ Var → (TyVarDecl TyName Ann → m a) → m a Source #

withTyVarsScoped ∷ Compiling uni fun m ann ⇒ [Var] → ([TyVarDecl TyName Ann] → m a) → m a Source #

mkLamAbsScoped ∷ CompilingDefault uni fun m ann ⇒ Ann → Var → m (PIRTerm uni fun) → m (PIRTerm uni fun) Source #

Builds a lambda, binding the given variable to a name that will be in scope when running the second argument.

mkTyAbsScoped ∷ Compiling uni fun m ann ⇒ Var → m (PIRTerm uni fun) → m (PIRTerm uni fun) Source #

Builds a type abstraction, binding the given variable to a name that will be in scope when running the second argument.

mkIterTyAbsScoped ∷ Compiling uni fun m ann ⇒ [Var] → m (PIRTerm uni fun) → m (PIRTerm uni fun) Source #

mkTyForallScoped ∷ Compiling uni fun m ann ⇒ Var → m (PIRType uni) → m (PIRType uni) Source #

Builds a forall, binding the given variable to a name that will be in scope when running the second argument.

mkIterTyForallScoped ∷ Compiling uni fun m ann ⇒ [Var] → m (PIRType uni) → m (PIRType uni) Source #

mkTyLamScoped ∷ Compiling uni fun m ann ⇒ Var → m (PIRType uni) → m (PIRType uni) Source #

Builds a type lambda, binding the given variable to a name that will be in scope when running the second argument.

mkIterTyLamScoped ∷ Compiling uni fun m ann ⇒ [Var] → m (PIRType uni) → m (PIRType uni) Source #