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

PlutusIR.Subst

Synopsis

Documentation

substVarA :: Applicative f => (name -> f (Maybe (Term tyname name uni fun ann))) -> Term tyname name uni fun ann -> f (Term tyname name uni fun ann) #

Applicatively replace a variable using the given function.

substTyVarA :: Applicative f => (tyname -> f (Maybe (Type tyname uni ann))) -> Type tyname uni ann -> f (Type tyname uni ann) #

Applicatively replace a type variable using the given function.

typeSubstTyNames :: forall tyname (uni :: Type -> Type) ann. (tyname -> Maybe (Type tyname uni ann)) -> Type tyname uni ann -> Type tyname uni ann #

Naively substitute type names (i.e. do not substitute binders).

termSubstNames :: (name -> Maybe (Term tyname name uni fun a)) -> Term tyname name uni fun a -> Term tyname name uni fun a #

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

termSubstNamesM :: Monad m => (name -> m (Maybe (Term tyname name uni fun ann))) -> Term tyname name uni fun ann -> m (Term tyname name uni fun ann) #

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

termSubstTyNames :: (tyname -> Maybe (Type tyname uni a)) -> Term tyname name uni fun a -> Term tyname name uni fun a #

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

termSubstTyNamesM :: Monad m => (tyname -> m (Maybe (Type tyname uni ann))) -> Term tyname name uni fun ann -> m (Term tyname name uni fun ann) #

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

bindingSubstNames :: (name -> ValueOf uni) -> Maybe (Term tyname name uni fun ann)) -> Term tyname name uni fun ann -> Term tyname name uni fun ann #

Substitute constants using the given function.