plutus-core-1.0.0.1: Language library for Plutus Core
Safe HaskellNone
LanguageHaskell2010

PlutusCore.Default

Synopsis

Documentation

data DefaultUni a where Source #

The universe used by default.

Instances

Instances details
HasUniApply DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

matchUniApply :: DefaultUni tb -> r -> (forall k l (f :: k -> l) (a :: k). tb ~ Esc (f a) => DefaultUni (Esc f) -> DefaultUni (Esc a) -> r) -> r Source #

Closed DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type Everywhere DefaultUni constr Source #

Methods

encodeUni :: DefaultUni a -> [Int] Source #

withDecodedUni :: (forall k (a :: k). Typeable k => DefaultUni (Esc a) -> DecodeUniM r) -> DecodeUniM r Source #

bring :: Everywhere DefaultUni constr => proxy constr -> DefaultUni (Esc a) -> (constr a => r) -> r Source #

ToKind DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

toSingKind :: forall k (a :: k). DefaultUni (Esc a) -> SingKind k Source #

TestTypesFromTheUniverseAreAllKnown DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

GCompare DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

gcompare :: forall (a :: k) (b :: k). DefaultUni a -> DefaultUni b -> GOrdering a b

GEq DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

geq :: forall (a :: k) (b :: k). DefaultUni a -> DefaultUni b -> Maybe (a :~: b) #

GShow DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

gshowsPrec :: forall (a :: k). Int -> DefaultUni a -> ShowS #

HasConstantIn DefaultUni term => ReadKnownIn DefaultUni term Int Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown :: Maybe cause -> term -> ReadKnownM cause Int Source #

HasConstantIn DefaultUni term => ReadKnownIn DefaultUni term Int64 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown :: Maybe cause -> term -> ReadKnownM cause Int64 Source #

HasConstantIn DefaultUni term => ReadKnownIn DefaultUni term Data Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown :: Maybe cause -> term -> ReadKnownM cause Data Source #

HasConstantIn DefaultUni term => ReadKnownIn DefaultUni term Bool Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown :: Maybe cause -> term -> ReadKnownM cause Bool Source #

HasConstantIn DefaultUni term => ReadKnownIn DefaultUni term () Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown :: Maybe cause -> term -> ReadKnownM cause () Source #

HasConstantIn DefaultUni term => ReadKnownIn DefaultUni term Text Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown :: Maybe cause -> term -> ReadKnownM cause Text Source #

HasConstantIn DefaultUni term => ReadKnownIn DefaultUni term ByteString Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown :: Maybe cause -> term -> ReadKnownM cause ByteString Source #

HasConstantIn DefaultUni term => ReadKnownIn DefaultUni term Integer Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown :: Maybe cause -> term -> ReadKnownM cause Integer Source #

UniOf term ~ DefaultUni => ReadKnownIn DefaultUni term Void Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Methods

readKnown :: Maybe cause -> term -> ReadKnownM cause Void Source #

HasConstantIn DefaultUni term => MakeKnownIn DefaultUni term Int Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown :: Maybe cause -> Int -> MakeKnownM cause term Source #

HasConstantIn DefaultUni term => MakeKnownIn DefaultUni term Int64 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown :: Maybe cause -> Int64 -> MakeKnownM cause term Source #

HasConstantIn DefaultUni term => MakeKnownIn DefaultUni term Data Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown :: Maybe cause -> Data -> MakeKnownM cause term Source #

HasConstantIn DefaultUni term => MakeKnownIn DefaultUni term Bool Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown :: Maybe cause -> Bool -> MakeKnownM cause term Source #

HasConstantIn DefaultUni term => MakeKnownIn DefaultUni term () Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown :: Maybe cause -> () -> MakeKnownM cause term Source #

HasConstantIn DefaultUni term => MakeKnownIn DefaultUni term Text Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown :: Maybe cause -> Text -> MakeKnownM cause term Source #

HasConstantIn DefaultUni term => MakeKnownIn DefaultUni term ByteString Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown :: Maybe cause -> ByteString -> MakeKnownM cause term Source #

HasConstantIn DefaultUni term => MakeKnownIn DefaultUni term Integer Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown :: Maybe cause -> Integer -> MakeKnownM cause term Source #

UniOf term ~ DefaultUni => MakeKnownIn DefaultUni term Void Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Methods

makeKnown :: Maybe cause -> Void -> MakeKnownM cause term Source #

(Contains DefaultUni f, Contains DefaultUni a) => Contains DefaultUni (f a :: k2) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

knownUni :: DefaultUni (Esc (f a)) Source #

(HasConstantIn DefaultUni term, Contains DefaultUni [a]) => ReadKnownIn DefaultUni term [a] Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown :: Maybe cause -> term -> ReadKnownM cause [a] Source #

(HasConstantIn DefaultUni term, Contains DefaultUni [a]) => MakeKnownIn DefaultUni term [a] Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown :: Maybe cause -> [a] -> MakeKnownM cause term Source #

(HasConstantIn DefaultUni term, Contains DefaultUni (a, b)) => ReadKnownIn DefaultUni term (a, b) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown :: Maybe cause -> term -> ReadKnownM cause (a, b) Source #

(HasConstantIn DefaultUni term, Contains DefaultUni (a, b)) => MakeKnownIn DefaultUni term (a, b) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown :: Maybe cause -> (a, b) -> MakeKnownM cause term Source #

Show (DefaultUni a) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni Bool Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni Integer Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni () Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

knownUni :: DefaultUni (Esc ()) Source #

Contains DefaultUni ByteString Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

knownUni :: DefaultUni (Esc ByteString) Source #

Contains DefaultUni Text Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

knownUni :: DefaultUni (Esc Text) Source #

Contains DefaultUni Data Source # 
Instance details

Defined in PlutusCore.Default.Universe

KnownBuiltinTypeAst DefaultUni Bool => KnownTypeAst DefaultUni Bool Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type ToHoles Bool :: [Hole] Source #

type ToBinds Bool :: [Some TyNameRep] Source #

Methods

toTypeAst :: proxy Bool -> Type TyName DefaultUni () Source #

KnownTypeAst DefaultUni Int Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type ToHoles Int :: [Hole] Source #

type ToBinds Int :: [Some TyNameRep] Source #

Methods

toTypeAst :: proxy Int -> Type TyName DefaultUni () Source #

KnownTypeAst DefaultUni Int64 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type ToHoles Int64 :: [Hole] Source #

type ToBinds Int64 :: [Some TyNameRep] Source #

Methods

toTypeAst :: proxy Int64 -> Type TyName DefaultUni () Source #

KnownBuiltinTypeAst DefaultUni Integer => KnownTypeAst DefaultUni Integer Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type ToHoles Integer :: [Hole] Source #

type ToBinds Integer :: [Some TyNameRep] Source #

KnownBuiltinTypeAst DefaultUni () => KnownTypeAst DefaultUni () Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type ToHoles () :: [Hole] Source #

type ToBinds () :: [Some TyNameRep] Source #

Methods

toTypeAst :: proxy () -> Type TyName DefaultUni () Source #

KnownTypeAst DefaultUni Void Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Associated Types

type ToHoles Void :: [Hole] Source #

type ToBinds Void :: [Some TyNameRep] Source #

Methods

toTypeAst :: proxy Void -> Type TyName DefaultUni () Source #

KnownBuiltinTypeAst DefaultUni ByteString => KnownTypeAst DefaultUni ByteString Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type ToHoles ByteString :: [Hole] Source #

type ToBinds ByteString :: [Some TyNameRep] Source #

Methods

toTypeAst :: proxy ByteString -> Type TyName DefaultUni () Source #

KnownBuiltinTypeAst DefaultUni Text => KnownTypeAst DefaultUni Text Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type ToHoles Text :: [Hole] Source #

type ToBinds Text :: [Some TyNameRep] Source #

Methods

toTypeAst :: proxy Text -> Type TyName DefaultUni () Source #

KnownBuiltinTypeAst DefaultUni Data => KnownTypeAst DefaultUni Data Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type ToHoles Data :: [Hole] Source #

type ToBinds Data :: [Some TyNameRep] Source #

Methods

toTypeAst :: proxy Data -> Type TyName DefaultUni () Source #

KnownBuiltinTypeAst DefaultUni [a] => KnownTypeAst DefaultUni ([a] :: Type) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type ToHoles [a] :: [Hole] Source #

type ToBinds [a] :: [Some TyNameRep] Source #

Methods

toTypeAst :: proxy [a] -> Type0 TyName DefaultUni () Source #

KnownBuiltinTypeAst DefaultUni (a, b) => KnownTypeAst DefaultUni ((a, b) :: Type) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type ToHoles (a, b) :: [Hole] Source #

type ToBinds (a, b) :: [Some TyNameRep] Source #

Methods

toTypeAst :: proxy (a, b) -> Type0 TyName DefaultUni () Source #

Contains DefaultUni (,) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni [] Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

knownUni :: DefaultUni (Esc []) Source #

type Everywhere DefaultUni constr Source # 
Instance details

Defined in PlutusCore.Default.Universe

type Everywhere DefaultUni constr = (Permits constr Integer, Permits constr ByteString, Permits constr Text, Permits constr (), Permits constr Bool, Permits constr [], Permits constr (,), Permits constr Data)

pattern DefaultUniList :: forall a k1 k2 (f :: k1 -> k2) (a1 :: k1). () => forall. (a ~ Esc (f a1), Esc f ~ Esc []) => DefaultUni (Esc a1) -> DefaultUni a Source #

pattern DefaultUniPair :: forall a k1 k2 (f1 :: k1 -> k2) (a1 :: k1) k3 k4 (f2 :: k3 -> k4) (a2 :: k3). () => forall. (a ~ Esc (f1 a1), Esc f1 ~ Esc (f2 a2), Esc f2 ~ Esc (,)) => DefaultUni (Esc a2) -> DefaultUni (Esc a1) -> DefaultUni a Source #

module Universe

data DefaultFun Source #

Default built-in functions.

When updating these, make sure to add them to the protocol version listing! See Note [New builtins 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

Eq DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Ord DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Show DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Ix DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Generic DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Associated Types

type Rep DefaultFun :: Type -> Type Source #

NFData DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Methods

rnf :: DefaultFun -> () Source #

Hashable DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Pretty DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Methods

pretty :: DefaultFun -> Doc ann #

prettyList :: [DefaultFun] -> Doc ann #

ExMemoryUsage DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Flat DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Methods

encode :: DefaultFun -> Encoding

decode :: Get DefaultFun

size :: DefaultFun -> NumBits -> NumBits

PrettyBy PrettyConfigPlc DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

uni ~ DefaultUni => ToBuiltinMeaning uni DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Associated Types

type CostingPart uni DefaultFun Source #

type Rep DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

type Rep DefaultFun = D1 ('MetaData "DefaultFun" "PlutusCore.Default.Builtins" "plutus-core-1.0.0.1-6wMiyL0yerXJu56t8zBoKx" 'False) (((((C1 ('MetaCons "AddInteger" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SubtractInteger" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MultiplyInteger" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "DivideInteger" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "QuotientInteger" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RemainderInteger" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ModInteger" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "EqualsInteger" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LessThanInteger" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "LessThanEqualsInteger" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AppendByteString" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ConsByteString" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SliceByteString" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "LengthOfByteString" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "IndexByteString" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EqualsByteString" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "LessThanByteString" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LessThanEqualsByteString" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Sha2_256" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Sha3_256" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "Blake2b_256" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "VerifyEd25519Signature" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "VerifyEcdsaSecp256k1Signature" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "VerifySchnorrSecp256k1Signature" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AppendString" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "EqualsString" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EncodeUtf8" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "DecodeUtf8" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "IfThenElse" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ChooseUnit" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "Trace" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "FstPair" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SndPair" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ChooseList" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MkCons" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "HeadList" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "TailList" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NullList" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ChooseData" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ConstrData" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "MapData" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ListData" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IData" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "BData" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UnConstrData" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "UnMapData" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UnListData" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "UnIData" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "UnBData" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EqualsData" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "SerialiseData" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MkPairData" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MkNilData" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MkNilPairData" 'PrefixI 'False) (U1 :: Type -> Type)))))))
type CostingPart uni DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

nonZeroArg :: (Integer -> Integer -> Integer) -> Integer -> Integer -> EvaluationResult Integer Source #

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

builtinTagWidth :: NumBits Source #

Using 7 bits to encode builtin tags.

encodeBuiltin :: Word8 -> Encoding Source #