| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
PlutusCore.Examples.Builtins
Contents
Synopsis
- size :: (Bounded a, Enum a) => Int
- data ExtensionFun
- = Factorial
- | ForallFortyTwo
- | SumInteger
- | Const
- | Id
- | IdAssumeBool
- | IdAssumeCheckBool
- | IdSomeConstantBool
- | IdIntegerAsBool
- | IdFInteger
- | IdList
- | IdRank2
- | ScottToMetaUnit
- | FailingSucc
- | ExpensiveSucc
- | FailingPlus
- | ExpensivePlus
- | IsConstant
- | UnsafeCoerce
- | UnsafeCoerceEl
- | Undefined
- | Absurd
- | ErrorPrime
- | Comma
- | BiconstPair
- | Swap
- | SwapEls
- | ExtensionVersion
- | TrackCosts
- | IntNoIntegerNoWord
- newtype MetaForall (name :: k) a = MetaForall a
- data PlcListRep a
- data BuiltinErrorCall = BuiltinErrorCall
- class Whatever a where
- whatever :: a
Documentation
data ExtensionFun Source #
Constructors
Instances
newtype MetaForall (name :: k) 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
| (name ~ ('TyNameRep text uniq :: TyNameRep kind), KnownSymbol text, KnownNat uniq, KnownKind kind, KnownTypeAst tyname uni a) => KnownTypeAst tyname uni (MetaForall name a :: Type) Source # | |||||
Defined in PlutusCore.Examples.Builtins Associated Types
| |||||
| MakeKnownIn DefaultUni term a => MakeKnownIn DefaultUni term (MetaForall name a) Source # | |||||
Defined in PlutusCore.Examples.Builtins Methods makeKnown :: MetaForall name a -> BuiltinResult term Source # | |||||
| type ToBinds uni acc (MetaForall name a :: Type) Source # | |||||
Defined in PlutusCore.Examples.Builtins | |||||
| type ToHoles uni _1 (MetaForall name a :: Type) Source # | |||||
Defined in PlutusCore.Examples.Builtins | |||||
| type IsBuiltin uni (MetaForall name a :: Type) Source # | |||||
Defined in PlutusCore.Examples.Builtins | |||||
data PlcListRep a Source #
Instances
| (tyname ~ TyName, KnownTypeAst tyname uni a) => KnownTypeAst tyname uni (PlcListRep a :: Type) Source # | |||||
Defined in PlutusCore.Examples.Builtins Associated Types
| |||||
| type ToBinds uni acc (PlcListRep a :: Type) Source # | |||||
Defined in PlutusCore.Examples.Builtins | |||||
| type ToHoles uni _1 (PlcListRep a :: Type) Source # | |||||
Defined in PlutusCore.Examples.Builtins | |||||
| type IsBuiltin uni (PlcListRep a :: Type) Source # | |||||
Defined in PlutusCore.Examples.Builtins | |||||
data BuiltinErrorCall Source #
Constructors
| BuiltinErrorCall |
Instances
| Exception BuiltinErrorCall Source # | |
Defined in PlutusCore.Examples.Builtins Methods toException :: BuiltinErrorCall -> SomeException Source # fromException :: SomeException -> Maybe BuiltinErrorCall Source # | |
| Show BuiltinErrorCall Source # | |
Defined in PlutusCore.Examples.Builtins | |
| Eq BuiltinErrorCall Source # | |
Defined in PlutusCore.Examples.Builtins Methods (==) :: BuiltinErrorCall -> BuiltinErrorCall -> Bool Source # (/=) :: BuiltinErrorCall -> BuiltinErrorCall -> Bool Source # | |
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
The costing function of a builtin whose costing function doesn't matter.
Instances
| Whatever ExBudgetStream Source # | |
Defined in PlutusCore.Examples.Builtins Methods | |
| Whatever b => Whatever (a -> b) Source # | |
Defined in PlutusCore.Examples.Builtins | |
Orphan instances
| UniOf term ~ DefaultUni => MakeKnownIn DefaultUni term Void Source # | |||||||||||||
Methods makeKnown :: Void -> BuiltinResult term Source # | |||||||||||||
| UniOf term ~ DefaultUni => ReadKnownIn DefaultUni term Void Source # | |||||||||||||
Methods readKnown :: term -> ReadKnownM Void Source # | |||||||||||||
| tyname ~ TyName => KnownTypeAst tyname DefaultUni Void Source # | |||||||||||||
Associated Types
Methods typeAst :: Type tyname DefaultUni () Source # | |||||||||||||
| (ToBuiltinMeaning uni fun1, ToBuiltinMeaning uni fun2, Default (BuiltinSemanticsVariant fun1), Default (BuiltinSemanticsVariant fun2)) => ToBuiltinMeaning uni (Either fun1 fun2) Source # | |||||||||||||
Associated Types
Methods toBuiltinMeaning :: HasMeaningIn 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 # | |||||||||||||
Methods def :: BuiltinSemanticsVariant (Either fun1 fun2) # | |||||||||||||
| (Bounded a, Bounded b) => Bounded (Either a b) Source # | |||||||||||||
| (Eq a, Eq b, Bounded a, Bounded b, Enum a, Enum b) => Enum (Either a b) Source # | |||||||||||||
Methods succ :: Either a b -> Either a b Source # pred :: Either a b -> Either a b Source # toEnum :: Int -> Either a b Source # fromEnum :: Either a b -> Int Source # enumFrom :: Either a b -> [Either a b] Source # enumFromThen :: Either a b -> Either a b -> [Either a b] Source # enumFromTo :: Either a b -> Either a b -> [Either a b] Source # enumFromThenTo :: Either 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 # | |||||||||||||
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 # | |||||||||||||