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

PlutusCore.Default.Builtins

Synopsis

Documentation

data DefaultFun Source #

Default built-in functions.

When updating these, make sure to add them to the protocol version listing! See Note [New builtins/language versions and protocol versions]

Instances

Instances details
Bounded DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Enum DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Generic DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Associated Types

type Rep DefaultFunTypeType Source #

Ix DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Show DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

NFData DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Methods

rnfDefaultFun → () Source #

Flat DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Eq DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Ord DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Hashable DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

ExMemoryUsage DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Pretty DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Methods

prettyDefaultFunDoc ann Source #

prettyList ∷ [DefaultFun] → Doc ann Source #

uni ~ DefaultUniToBuiltinMeaning uni DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

PrettyBy PrettyConfigPlc DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Bounded (BuiltinSemanticsVariant DefaultFun) Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Enum (BuiltinSemanticsVariant DefaultFun) Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Generic (BuiltinSemanticsVariant DefaultFun) Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Associated Types

type Rep (BuiltinSemanticsVariant DefaultFun) ∷ TypeType Source #

Show (BuiltinSemanticsVariant DefaultFun) Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Default (BuiltinSemanticsVariant DefaultFun) Source # 
Instance details

Defined in PlutusCore.Default.Builtins

NFData (BuiltinSemanticsVariant DefaultFun) Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Eq (BuiltinSemanticsVariant DefaultFun) Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Ord (BuiltinSemanticsVariant DefaultFun) Source # 
Instance details

Defined in PlutusCore.Default.Builtins

NoThunks (BuiltinSemanticsVariant DefaultFun) Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Pretty (BuiltinSemanticsVariant DefaultFun) Source # 
Instance details

Defined in PlutusCore.Default.Builtins

type Rep DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

type Rep DefaultFun = D1 ('MetaData "DefaultFun" "PlutusCore.Default.Builtins" "plutus-core-1.39.0.0-inplace" 'False) ((((((C1 ('MetaCons "AddInteger" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "SubtractInteger" 'PrefixI 'False) (U1TypeType)) :+: (C1 ('MetaCons "MultiplyInteger" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "DivideInteger" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "QuotientInteger" 'PrefixI 'False) (U1TypeType)))) :+: ((C1 ('MetaCons "RemainderInteger" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "ModInteger" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "EqualsInteger" 'PrefixI 'False) (U1TypeType))) :+: (C1 ('MetaCons "LessThanInteger" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "LessThanEqualsInteger" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "AppendByteString" 'PrefixI 'False) (U1TypeType))))) :+: (((C1 ('MetaCons "ConsByteString" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "SliceByteString" 'PrefixI 'False) (U1TypeType)) :+: (C1 ('MetaCons "LengthOfByteString" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "IndexByteString" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "EqualsByteString" 'PrefixI 'False) (U1TypeType)))) :+: ((C1 ('MetaCons "LessThanByteString" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "LessThanEqualsByteString" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "Sha2_256" 'PrefixI 'False) (U1TypeType))) :+: (C1 ('MetaCons "Sha3_256" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "Blake2b_256" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "VerifyEd25519Signature" 'PrefixI 'False) (U1TypeType)))))) :+: ((((C1 ('MetaCons "VerifyEcdsaSecp256k1Signature" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "VerifySchnorrSecp256k1Signature" 'PrefixI 'False) (U1TypeType)) :+: (C1 ('MetaCons "AppendString" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "EqualsString" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "EncodeUtf8" 'PrefixI 'False) (U1TypeType)))) :+: ((C1 ('MetaCons "DecodeUtf8" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "IfThenElse" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "ChooseUnit" 'PrefixI 'False) (U1TypeType))) :+: (C1 ('MetaCons "Trace" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "FstPair" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "SndPair" 'PrefixI 'False) (U1TypeType))))) :+: (((C1 ('MetaCons "ChooseList" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "CaseList" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "MkCons" 'PrefixI 'False) (U1TypeType))) :+: (C1 ('MetaCons "HeadList" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "TailList" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "NullList" 'PrefixI 'False) (U1TypeType)))) :+: ((C1 ('MetaCons "ChooseData" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "CaseData" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "ConstrData" 'PrefixI 'False) (U1TypeType))) :+: (C1 ('MetaCons "MapData" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "ListData" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "IData" 'PrefixI 'False) (U1TypeType))))))) :+: (((((C1 ('MetaCons "BData" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "UnConstrData" 'PrefixI 'False) (U1TypeType)) :+: (C1 ('MetaCons "UnMapData" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "UnListData" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "UnIData" 'PrefixI 'False) (U1TypeType)))) :+: ((C1 ('MetaCons "UnBData" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "EqualsData" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "SerialiseData" 'PrefixI 'False) (U1TypeType))) :+: (C1 ('MetaCons "MkPairData" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "MkNilData" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "MkNilPairData" 'PrefixI 'False) (U1TypeType))))) :+: (((C1 ('MetaCons "Bls12_381_G1_add" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "Bls12_381_G1_neg" 'PrefixI 'False) (U1TypeType)) :+: (C1 ('MetaCons "Bls12_381_G1_scalarMul" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "Bls12_381_G1_equal" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "Bls12_381_G1_hashToGroup" 'PrefixI 'False) (U1TypeType)))) :+: ((C1 ('MetaCons "Bls12_381_G1_compress" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "Bls12_381_G1_uncompress" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "Bls12_381_G2_add" 'PrefixI 'False) (U1TypeType))) :+: (C1 ('MetaCons "Bls12_381_G2_neg" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "Bls12_381_G2_scalarMul" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "Bls12_381_G2_equal" 'PrefixI 'False) (U1TypeType)))))) :+: ((((C1 ('MetaCons "Bls12_381_G2_hashToGroup" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "Bls12_381_G2_compress" 'PrefixI 'False) (U1TypeType)) :+: (C1 ('MetaCons "Bls12_381_G2_uncompress" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "Bls12_381_millerLoop" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "Bls12_381_mulMlResult" 'PrefixI 'False) (U1TypeType)))) :+: ((C1 ('MetaCons "Bls12_381_finalVerify" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "Keccak_256" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "Blake2b_224" 'PrefixI 'False) (U1TypeType))) :+: (C1 ('MetaCons "IntegerToByteString" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "ByteStringToInteger" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "AndByteString" 'PrefixI 'False) (U1TypeType))))) :+: (((C1 ('MetaCons "OrByteString" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "XorByteString" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "ComplementByteString" 'PrefixI 'False) (U1TypeType))) :+: (C1 ('MetaCons "ReadBit" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "WriteBits" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "ReplicateByte" 'PrefixI 'False) (U1TypeType)))) :+: ((C1 ('MetaCons "ShiftByteString" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "RotateByteString" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "CountSetBits" 'PrefixI 'False) (U1TypeType))) :+: (C1 ('MetaCons "FindFirstSetBit" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "Ripemd_160" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "ExpModInteger" 'PrefixI 'False) (U1TypeType))))))))
data BuiltinSemanticsVariant DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

type CostingPart uni DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

type Rep (BuiltinSemanticsVariant DefaultFun) Source # 
Instance details

Defined in PlutusCore.Default.Builtins

type Rep (BuiltinSemanticsVariant DefaultFun) = D1 ('MetaData "BuiltinSemanticsVariant" "PlutusCore.Default.Builtins" "plutus-core-1.39.0.0-inplace" 'False) (C1 ('MetaCons "DefaultFunSemanticsVariantA" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "DefaultFunSemanticsVariantB" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "DefaultFunSemanticsVariantC" 'PrefixI 'False) (U1TypeType)))

nonZeroSecondArg ∷ (IntegerIntegerInteger) → IntegerIntegerBuiltinResult Integer Source #

Turn a function into another function that fails when its second argument is 0 or calls the original function otherwise and wraps the result in pure. Useful for correctly handling div, mod, etc.

eitherToBuiltinResultShow e ⇒ Either e r → BuiltinResult r Source #

Turn a function returning Either into another function that fails in the Left case and wraps the result in pure in the Right case.

headSpineOpaque val asToB → [val] → Opaque (HeadSpine val) b Source #

Take a function and a list of arguments and apply the former to the latter.

builtinTagWidthNumBits Source #

Using 7 bits to encode builtin tags.