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

PlutusIR.Analysis.Builtins

Synopsis

Documentation

data BuiltinMatcherLike uni fun Source #

The information we need to work with a builtin that is like a datatype matcher.

Constructors

BuiltinMatcherLike 

Fields

bmlSplitMatchContext ∷ ∀ uni fun p tyname name a f. (Choice p, Applicative f) ⇒ Getter (BuiltinMatcherLike uni fun) (p (SplitMatchContext tyname name uni fun a) (f (SplitMatchContext tyname name uni fun a)) → p (AppContext tyname name uni fun a) (f (AppContext tyname name uni fun a))) Source #

bmlBranchArities ∷ ∀ uni fun. Lens' (BuiltinMatcherLike uni fun) [Arity] Source #

data BuiltinsInfo (uni ∷ TypeType) fun Source #

All non-static information about builtins that the compiler might want.

Instances

Instances details
Default (BuiltinsInfo DefaultUni DefaultFun) Source # 
Instance details

Defined in PlutusIR.Analysis.Builtins

biMatcherLike ∷ ∀ uni fun. Lens' (BuiltinsInfo uni fun) (Map fun (BuiltinMatcherLike uni fun)) Source #

biUnserializableConstants ∷ ∀ uni fun. Lens' (BuiltinsInfo uni fun) (Some (ValueOf uni) → Bool) Source #

builtinArityInfo ∷ ∀ uni fun. ToBuiltinMeaning uni fun ⇒ BuiltinsInfo uni fun → fun → Arity Source #

Get the arity of a builtin function from the BuiltinInfo.

constantIsSerializable ∷ ∀ uni fun. BuiltinsInfo uni fun → Some (ValueOf uni) → Bool Source #

termIsSerializableBuiltinsInfo uni fun → Term tyname name uni fun a → Bool Source #

asBuiltinDatatypeMatchOrd fun ⇒ BuiltinsInfo uni fun → fun → Maybe (APrism' (AppContext tyname name uni fun a) (SplitMatchContext tyname name uni fun a)) Source #

Split a builtin match.

builtinDatatypeMatchBranchAritiesOrd fun ⇒ BuiltinsInfo uni fun → fun → Maybe [Arity] Source #

Get the branch arities for a builtin match.