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

PlutusIR.Core.Plated

Synopsis

Documentation

termSubterms ∷ Traversal' (Term tyname name uni fun a) (Term tyname name uni fun a) Source #

Get all the direct child Terms of the given Term, including those within Bindings.

termSubtermsDeep ∷ Fold (Term tyname name uni fun ann) (Term tyname name uni fun ann) Source #

Get all the transitive child Terms of the given Term.

termSubtypes ∷ Traversal' (Term tyname name uni fun a) (Type tyname uni a) Source #

Get all the direct child Kinds of the given Term, including those within Bindings.

termSubtypesDeep ∷ Fold (Term tyname name uni fun ann) (Type tyname uni ann) Source #

Get all the transitive child Kinds of the given Term.

termSubkinds ∷ Traversal' (Term tyname name uni fun ann) (Kind ann) Source #

Get all the direct child Kinds of the given Term.

termBindings ∷ Traversal' (Term tyname name uni fun a) (Binding tyname name uni fun a) Source #

Get all the direct child Bindings of the given Term.

termVars ∷ Traversal' (Term tyname name uni fun ann) name Source #

Get all the direct child 'name a's of the given Term from Vars.

termConstants ∷ Traversal' (Term tyname name uni fun ann) (Some (ValueOf uni)) Source #

Get all the direct constants of the given Term from Constants.

termConstantsDeep ∷ Fold (Term tyname name uni fun ann) (Some (ValueOf uni)) Source #

Get all the transitive child Constants of the given Term.

typeSubtypes ∷ ∀ tyname (uni ∷ TypeType) ann f. Applicative f ⇒ (Type tyname uni ann → f (Type tyname uni ann)) → Type tyname uni ann → f (Type tyname uni ann) Source #

Get all the direct child Kinds of the given Kind.

typeSubtypesDeep ∷ ∀ tyname (uni ∷ TypeType) ann f. (Contravariant f, Applicative f) ⇒ (Type tyname uni ann → f (Type tyname uni ann)) → Type tyname uni ann → f (Type tyname uni ann) Source #

Get all the transitive child Kinds of the given Kind.

typeSubkinds ∷ ∀ tyname (uni ∷ TypeType) ann f. Applicative f ⇒ (Kind ann → f (Kind ann)) → Type tyname uni ann → f (Type tyname uni ann) Source #

Get all the direct child Kinds of the given Kind.

typeUniques ∷ ∀ tyname (uni ∷ TypeType) ann. HasUniques (Type tyname uni ann) ⇒ Traversal' (Type tyname uni ann) Unique Source #

Get all the direct child Uniques of the given Kind from binders TyVars.

typeUniquesDeep ∷ ∀ tyname (uni ∷ TypeType) ann. HasUniques (Type tyname uni ann) ⇒ Fold (Type tyname uni ann) Unique Source #

Get all the transitive child Uniques of the given Kind.

datatypeSubtypes ∷ Traversal' (Datatype tyname name uni a) (Type tyname uni a) Source #

Get all the direct child Kinds of the given Datatype.

datatypeSubkinds ∷ Traversal' (Datatype tyname name uni a) (Kind a) Source #

Get all the direct child Kinds of the given Datatype.

datatypeTyNames ∷ Traversal' (Datatype tyname name uni a) tyname Source #

Get all the type-names introduces by a datatype

bindingSubterms ∷ Traversal' (Binding tyname name uni fun a) (Term tyname name uni fun a) Source #

Get all the direct child Terms of the given Binding.

bindingSubtypes ∷ Traversal' (Binding tyname name uni fun a) (Type tyname uni a) Source #

Get all the direct child Kinds of the given Binding.

bindingSubkinds ∷ Traversal' (Binding tyname name uni fun a) (Kind a) Source #

Get all the direct child Kinds of the given Binding.

bindingNames ∷ Traversal' (Binding tyname name uni fun a) name Source #

Get all the names introduces by a binding

bindingTyNames ∷ Traversal' (Binding tyname name uni fun a) tyname Source #

Get all the type-names introduces by a binding

bindingIds ∷ (HasUnique tyname TypeUnique, HasUnique name TermUnique) ⇒ Traversal1' (Binding tyname name uni fun a) Unique Source #

All the identifiers/names introduced by this binding In case of a datatype-binding it has multiple identifiers: the type, constructors, match function

termUniquesHasUniques (Term tyname name uni fun ann) ⇒ Traversal' (Term tyname name uni fun ann) Unique Source #

Get all the direct child Uniques of the given Term (including the type-level ones).

termUniquesDeepHasUniques (Term tyname name uni fun ann) ⇒ Fold (Term tyname name uni fun ann) Unique Source #

Get all the transitive child Uniques of the given Term (including the type-level ones).

varDeclSubtypes ∷ ∀ tyname name (uni ∷ TypeType) a f. Applicative f ⇒ (Type tyname uni a → f (Type tyname uni a)) → VarDecl tyname name uni a → f (VarDecl tyname name uni a) Source #

Get all the direct child Kinds of the given VarDecl.

underBindersArity → Traversal' (Term tyname name uni fun a) (Term tyname name uni fun a) Source #

Focus on the term under the binders corresponding to the given arity. e.g. for arity [TermParam, TermParam] and term x y -> t it focusses on t.

_Constant ∷ Prism' (Term tyname name uni fun a) (a, Some (ValueOf uni)) Source #

View a term as a constant.