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

UntypedPlutusCore.Subst

Synopsis

Documentation

substVarAApplicative f ⇒ (name → f (Maybe (Term name uni fun ann))) → Term name uni fun ann → f (Term name uni fun ann) Source #

Applicatively replace a variable using the given function.

substVar ∷ (name → Maybe (Term name uni fun ann)) → Term name uni fun ann → Term name uni fun ann Source #

Replace a variable using the given function.

termSubstNamesMMonad m ⇒ (name → m (Maybe (Term name uni fun ann))) → Term name uni fun ann → m (Term name uni fun ann) Source #

Naively monadically substitute names using the given function (i.e. do not substitute binders).

termSubstNames ∷ (name → Maybe (Term name uni fun ann)) → Term name uni fun ann → Term name uni fun ann Source #

Naively substitute names using the given function (i.e. do not substitute binders).

termMapNames ∷ ∀ name name' uni fun ann. (name → name') → Term name uni fun ann → Term name' uni fun ann Source #

Completely replace the names with a new name type.

programMapNames ∷ ∀ name name' uni fun ann. (name → name') → Program name uni fun ann → Program name' uni fun ann Source #

vTerm ∷ Fold (Term name uni fun ann) name Source #

Get all the term variables in a term.