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

PlutusCore.Examples.Builtins

Synopsis

Documentation

size :: forall a. (Bounded a, Enum a) => Int #

data ExtensionFun #

Instances

Instances details
Bounded ExtensionFun # 
Instance details

Defined in PlutusCore.Examples.Builtins

Enum ExtensionFun # 
Instance details

Defined in PlutusCore.Examples.Builtins

Generic ExtensionFun # 
Instance details

Defined in PlutusCore.Examples.Builtins

Associated Types

type Rep ExtensionFun :: Type -> Type #

Ix ExtensionFun # 
Instance details

Defined in PlutusCore.Examples.Builtins

Show ExtensionFun # 
Instance details

Defined in PlutusCore.Examples.Builtins

Eq ExtensionFun # 
Instance details

Defined in PlutusCore.Examples.Builtins

Ord ExtensionFun # 
Instance details

Defined in PlutusCore.Examples.Builtins

Hashable ExtensionFun # 
Instance details

Defined in PlutusCore.Examples.Builtins

Pretty ExtensionFun # 
Instance details

Defined in PlutusCore.Examples.Builtins

Methods

pretty :: ExtensionFun -> Doc ann #

prettyList :: [ExtensionFun] -> Doc ann #

uni ~ DefaultUni => ToBuiltinMeaning uni ExtensionFun # 
Instance details

Defined in PlutusCore.Examples.Builtins

Bounded (BuiltinSemanticsVariant ExtensionFun) # 
Instance details

Defined in PlutusCore.Examples.Builtins

Enum (BuiltinSemanticsVariant ExtensionFun) # 
Instance details

Defined in PlutusCore.Examples.Builtins

Show (BuiltinSemanticsVariant ExtensionFun) # 
Instance details

Defined in PlutusCore.Examples.Builtins

Default (BuiltinSemanticsVariant ExtensionFun) # 
Instance details

Defined in PlutusCore.Examples.Builtins

Eq (BuiltinSemanticsVariant ExtensionFun) # 
Instance details

Defined in PlutusCore.Examples.Builtins

Ord (BuiltinSemanticsVariant ExtensionFun) # 
Instance details

Defined in PlutusCore.Examples.Builtins

type Rep ExtensionFun # 
Instance details

Defined in PlutusCore.Examples.Builtins

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

Defined in PlutusCore.Examples.Builtins

type CostingPart uni ExtensionFun # 
Instance details

Defined in PlutusCore.Examples.Builtins

newtype MetaForall name a #

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 Some TyNameRep] #

Methods

typeAst :: Type0 tyname uni () #

type ToBinds uni acc (PlcListRep a :: Type) # 
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) # 
Instance details

Defined in PlutusCore.Examples.Builtins

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

Defined in PlutusCore.Examples.Builtins

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

class Whatever a where #

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 #

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

Instances

Instances details
Whatever ExBudgetStream # 
Instance details

Defined in PlutusCore.Examples.Builtins

Whatever b => Whatever (a -> b) # 
Instance details

Defined in PlutusCore.Examples.Builtins

Methods

whatever :: a -> b #

Orphan instances

UniOf term Some TyNameRep] #

Methods

typeAst :: Type tyname DefaultUni () #

(ToBuiltinMeaning uni fun1, ToBuiltinMeaning uni fun2, Default (BuiltinSemanticsVariant fun1), Default (BuiltinSemanticsVariant fun2)) => ToBuiltinMeaning uni (Either fun1 fun2) # 
Instance details

Associated Types

type CostingPart uni (Either fun1 fun2) #

data BuiltinSemanticsVariant (Either fun1 fun2) #

Methods

toBuiltinMeaning :: HasMeaningIn uni val => BuiltinSemanticsVariant (Either fun1 fun2) -> Either fun1 fun2 -> BuiltinMeaning val (CostingPart uni (Either fun1 fun2)) #

(Default (BuiltinSemanticsVariant fun1), Default (BuiltinSemanticsVariant fun2)) => Default (BuiltinSemanticsVariant (Either fun1 fun2)) # 
Instance details

Methods

def :: BuiltinSemanticsVariant (Either fun1 fun2) #

(Bounded a, Bounded b) => Bounded (Either a b) # 
Instance details

Methods

minBound :: Either a b #

maxBound :: Either a b #

(Eq a, Eq b, Bounded a, Bounded b, Enum a, Enum b) => Enum (Either a b) # 
Instance details

Methods

succ :: Either a b -> Either a b #

pred :: Either a b -> Either a b #

toEnum :: Int -> Either a b #

fromEnum :: Either a b -> Int #

enumFrom :: Either a b -> [Either a b] #

enumFromThen :: Either a b -> Either a b -> [Either a b] #

enumFromTo :: Either a b -> Either a b -> [Either a b] #

enumFromThenTo :: Either a b -> Either a b -> Either a b -> [Either a b] #

(Bounded a, Bounded b, Ix a, Ix b) => Ix (Either a b) # 
Instance details

Methods

range :: (Either a b, Either a b) -> [Either a b] #

index :: (Either a b, Either a b) -> Either a b -> Int #

unsafeIndex :: (Either a b, Either a b) -> Either a b -> Int #

inRange :: (Either a b, Either a b) -> Either a b -> Bool #

rangeSize :: (Either a b, Either a b) -> Int #

unsafeRangeSize :: (Either a b, Either a b) -> Int #