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

PlutusCore.Examples.Builtins

Synopsis

Documentation

size ∷ ∀ a. (Bounded a, Enum a) ⇒ Int Source #

data ExtensionFun Source #

Instances

Instances details
Bounded ExtensionFun Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Enum ExtensionFun Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Generic ExtensionFun Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Associated Types

type Rep ExtensionFunTypeType Source #

Ix ExtensionFun Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Show ExtensionFun Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Eq ExtensionFun Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Ord ExtensionFun Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Hashable ExtensionFun Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Pretty ExtensionFun Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Methods

prettyExtensionFunDoc ann Source #

prettyList ∷ [ExtensionFun] → Doc ann Source #

uni ~ DefaultUniToBuiltinMeaning uni ExtensionFun Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Bounded (BuiltinSemanticsVariant ExtensionFun) Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Enum (BuiltinSemanticsVariant ExtensionFun) Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Show (BuiltinSemanticsVariant ExtensionFun) Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Default (BuiltinSemanticsVariant ExtensionFun) Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Eq (BuiltinSemanticsVariant ExtensionFun) Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Ord (BuiltinSemanticsVariant ExtensionFun) Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

type Rep ExtensionFun Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

type Rep ExtensionFun = D1 ('MetaData "ExtensionFun" "PlutusCore.Examples.Builtins" "plutus-core-1.39.0.0-inplace" 'False) ((((C1 ('MetaCons "Factorial" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "ForallFortyTwo" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "SumInteger" 'PrefixI 'False) (U1TypeType))) :+: ((C1 ('MetaCons "Const" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "Id" 'PrefixI 'False) (U1TypeType)) :+: (C1 ('MetaCons "IdAssumeBool" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "IdAssumeCheckBool" 'PrefixI 'False) (U1TypeType)))) :+: (((C1 ('MetaCons "IdSomeConstantBool" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "IdIntegerAsBool" 'PrefixI 'False) (U1TypeType)) :+: (C1 ('MetaCons "IdFInteger" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "IdList" 'PrefixI 'False) (U1TypeType))) :+: ((C1 ('MetaCons "IdRank2" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "ScottToMetaUnit" 'PrefixI 'False) (U1TypeType)) :+: (C1 ('MetaCons "FailingSucc" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "ExpensiveSucc" 'PrefixI 'False) (U1TypeType))))) :+: (((C1 ('MetaCons "FailingPlus" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "ExpensivePlus" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "IsConstant" 'PrefixI 'False) (U1TypeType))) :+: ((C1 ('MetaCons "UnsafeCoerce" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "UnsafeCoerceEl" 'PrefixI 'False) (U1TypeType)) :+: (C1 ('MetaCons "Undefined" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "Absurd" 'PrefixI 'False) (U1TypeType)))) :+: (((C1 ('MetaCons "ErrorPrime" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "Comma" 'PrefixI 'False) (U1TypeType)) :+: (C1 ('MetaCons "BiconstPair" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "Swap" 'PrefixI 'False) (U1TypeType))) :+: ((C1 ('MetaCons "SwapEls" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "ExtensionVersion" 'PrefixI 'False) (U1TypeType)) :+: (C1 ('MetaCons "TrackCosts" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "IntNoIntegerNoWord" 'PrefixI 'False) (U1TypeType))))))
data BuiltinSemanticsVariant ExtensionFun Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

type CostingPart uni ExtensionFun Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

newtype MetaForall name a Source #

Normally forall in the type of a Haskell function gets detected and instantiated automatically, however there's no way of doing that for a forall that binds a never referenced type variable. Which is OK, because that would be a pretty weird builtin, however it's definable and for the purpose of testing we do introduce such a builtin, hence this definition allowing us to create an all that binds a never referenced type variable in Plutus while still using makeBuiltinMeaning.

Constructors

MetaForall a 

Instances

Instances details
(name ~ ('TyNameRep text uniq ∷ TyNameRep kind), KnownSymbol text, KnownNat uniq, KnownKind kind, KnownTypeAst tyname uni a) ⇒ KnownTypeAst tyname uni (MetaForall name a ∷ Type) Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Associated Types

type IsBuiltin uni (MetaForall name a) ∷ Bool Source #

type ToHoles uni hole (MetaForall name a) ∷ [Hole] Source #

type ToBinds uni acc (MetaForall name a) ∷ [Some TyNameRep] Source #

Methods

typeAstType0 tyname uni () Source #

MakeKnownIn DefaultUni term a ⇒ MakeKnownIn DefaultUni term (MetaForall name a) Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Methods

makeKnownMetaForall name a → BuiltinResult (HeadSpine term) Source #

type ToBinds uni acc (MetaForall name a ∷ Type) Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

type ToBinds uni acc (MetaForall name a ∷ Type) = ToBinds uni (Insert ('Some name) acc) a
type ToHoles uni _1 (MetaForall name a ∷ Type) Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

type ToHoles uni _1 (MetaForall name a ∷ Type) = '[TypeHole a ∷ Hole]
type IsBuiltin uni (MetaForall name a ∷ Type) Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

type IsBuiltin uni (MetaForall name a ∷ Type) = 'False

data PlcListRep (a ∷ Type) Source #

Instances

Instances details
(tyname ~ TyName, KnownTypeAst tyname uni a) ⇒ KnownTypeAst tyname uni (PlcListRep a ∷ Type) Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Associated Types

type IsBuiltin uni (PlcListRep a) ∷ Bool Source #

type ToHoles uni hole (PlcListRep a) ∷ [Hole] Source #

type ToBinds uni acc (PlcListRep a) ∷ [Some TyNameRep] Source #

Methods

typeAstType0 tyname uni () Source #

type ToBinds uni acc (PlcListRep a ∷ Type) Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

type ToBinds uni acc (PlcListRep a ∷ Type) = ToBinds uni acc a
type ToHoles uni _1 (PlcListRep a ∷ Type) Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

type ToHoles uni _1 (PlcListRep a ∷ Type) = '[RepHole a ∷ Hole]
type IsBuiltin uni (PlcListRep a ∷ Type) Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

type IsBuiltin uni (PlcListRep a ∷ Type) = 'False

class Whatever a where Source #

For the most part we don't care about costing functions of example builtins, hence this class for being explicit about not caring.

Methods

whatever ∷ a Source #

The costing function of a builtin whose costing function doesn't matter.

Instances

Instances details
Whatever ExBudgetStream Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Whatever b ⇒ Whatever (a → b) Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Methods

whatever ∷ a → b Source #

Orphan instances

UniOf term ~ DefaultUniMakeKnownIn DefaultUni term Void Source # 
Instance details

UniOf term ~ DefaultUniReadKnownIn DefaultUni term Void Source # 
Instance details

Methods

readKnown ∷ term → ReadKnownM Void Source #

tyname ~ TyNameKnownTypeAst tyname DefaultUni Void Source # 
Instance details

Associated Types

type IsBuiltin DefaultUni VoidBool Source #

type ToHoles DefaultUni hole Void ∷ [Hole] Source #

type ToBinds DefaultUni acc Void ∷ [Some TyNameRep] Source #

Methods

typeAstType tyname DefaultUni () Source #

(ToBuiltinMeaning uni fun1, ToBuiltinMeaning uni fun2, Default (BuiltinSemanticsVariant fun1), Default (BuiltinSemanticsVariant fun2)) ⇒ ToBuiltinMeaning uni (Either fun1 fun2) Source # 
Instance details

Associated Types

type CostingPart uni (Either fun1 fun2) Source #

data BuiltinSemanticsVariant (Either fun1 fun2) Source #

Methods

toBuiltinMeaningHasMeaningIn uni val ⇒ BuiltinSemanticsVariant (Either fun1 fun2) → Either fun1 fun2 → BuiltinMeaning val (CostingPart uni (Either fun1 fun2)) Source #

(Default (BuiltinSemanticsVariant fun1), Default (BuiltinSemanticsVariant fun2)) ⇒ Default (BuiltinSemanticsVariant (Either fun1 fun2)) Source # 
Instance details

Methods

defBuiltinSemanticsVariant (Either fun1 fun2) Source #

(Bounded a, Bounded b) ⇒ Bounded (Either a b) Source # 
Instance details

Methods

minBoundEither a b Source #

maxBoundEither a b Source #

(Eq a, Eq b, Bounded a, Bounded b, Enum a, Enum b) ⇒ Enum (Either a b) Source # 
Instance details

Methods

succEither a b → Either a b Source #

predEither a b → Either a b Source #

toEnumIntEither a b Source #

fromEnumEither a b → Int Source #

enumFromEither a b → [Either a b] Source #

enumFromThenEither a b → Either a b → [Either a b] Source #

enumFromToEither a b → Either a b → [Either a b] Source #

enumFromThenToEither a b → Either a b → Either a b → [Either a b] Source #

(Bounded a, Bounded b, Ix a, Ix b) ⇒ Ix (Either a b) Source # 
Instance details

Methods

range ∷ (Either a b, Either a b) → [Either a b] Source #

index ∷ (Either a b, Either a b) → Either a b → Int Source #

unsafeIndex ∷ (Either a b, Either a b) → Either a b → Int Source #

inRange ∷ (Either a b, Either a b) → Either a b → Bool Source #

rangeSize ∷ (Either a b, Either a b) → Int Source #

unsafeRangeSize ∷ (Either a b, Either a b) → Int Source #