plutus-ledger-api-1.36.0.0: Interface to the Plutus ledger for the Cardano ledger.
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusLedgerApi.Common

Description

The types and functions that are common among all ledger Plutus versions.

Synopsis

Script (de)serialization

type SerialisedScript = ShortByteString Source #

Scripts to the ledger are serialised bytestrings.

data ScriptForEvaluation Source #

A Plutus script ready to be evaluated on-chain, via evaluateScriptRestricting.

Instances

Instances details
Generic ScriptForEvaluation Source # 
Instance details

Defined in PlutusLedgerApi.Common.SerialisedScript

Associated Types

type Rep ScriptForEvaluation :: Type -> Type Source #

Show ScriptForEvaluation Source # 
Instance details

Defined in PlutusLedgerApi.Common.SerialisedScript

NFData ScriptForEvaluation Source # 
Instance details

Defined in PlutusLedgerApi.Common.SerialisedScript

Eq ScriptForEvaluation Source # 
Instance details

Defined in PlutusLedgerApi.Common.SerialisedScript

NoThunks ScriptForEvaluation Source # 
Instance details

Defined in PlutusLedgerApi.Common.SerialisedScript

Methods

noThunks :: Context -> ScriptForEvaluation -> IO (Maybe ThunkInfo)

wNoThunks :: Context -> ScriptForEvaluation -> IO (Maybe ThunkInfo)

showTypeOf :: Proxy ScriptForEvaluation -> String

type Rep ScriptForEvaluation Source # 
Instance details

Defined in PlutusLedgerApi.Common.SerialisedScript

type Rep ScriptForEvaluation = D1 ('MetaData "ScriptForEvaluation" "PlutusLedgerApi.Common.SerialisedScript" "plutus-ledger-api-1.36.0.0-5YP34Z4WNIC2QzLmhyGjha" 'False) (C1 ('MetaCons "UnsafeScriptForEvaluation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SerialisedScript) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ScriptNamedDeBruijn)))

serialiseCompiledCode :: forall a. CompiledCode a -> SerialisedScript Source #

Turns a program which was compiled using the 'PlutusTx' toolchain into a binary format that is understood by the network and can be stored on-chain.

serialiseUPLC :: Program DeBruijn DefaultUni DefaultFun () -> SerialisedScript Source #

Turns a program's AST (most likely manually constructed) into a binary format that is understood by the network and can be stored on-chain.

deserialiseScript Source #

Arguments

:: forall m. MonadError ScriptDecodeError m 
=> PlutusLedgerLanguage

the Plutus ledger language of the script.

-> MajorProtocolVersion

which major protocol version the script was submitted in.

-> SerialisedScript

the script to deserialise.

-> m ScriptForEvaluation 

The deserialization from a serialised script into a ScriptForEvaluation, ready to be evaluated on-chain. Called inside phase-1 validation (i.e., deserialisation error is a phase-1 error).

uncheckedDeserialiseUPLC :: SerialisedScript -> Program DeBruijn DefaultUni DefaultFun () Source #

Deserialises a SerialisedScript back into an AST. Does *not* do ledger-language-version-specific checks like for allowable builtins.

data ScriptDecodeError Source #

An error that occurred during script deserialization.

Constructors

CBORDeserialiseError !DeserialiseFailureInfo

an error from the underlying CBOR/serialise library

RemainderError !ByteString

Script was successfully parsed, but more (runaway) bytes encountered after script's position

LedgerLanguageNotAvailableError

the plutus version of the given script is not enabled yet

Fields

PlutusCoreLanguageNotAvailableError 

Fields

newtype ScriptNamedDeBruijn Source #

A script with named de-bruijn indices.

Constructors

ScriptNamedDeBruijn (Program NamedDeBruijn DefaultUni DefaultFun ()) 

Instances

Instances details
Generic ScriptNamedDeBruijn Source # 
Instance details

Defined in PlutusLedgerApi.Common.SerialisedScript

Associated Types

type Rep ScriptNamedDeBruijn :: Type -> Type Source #

Show ScriptNamedDeBruijn Source # 
Instance details

Defined in PlutusLedgerApi.Common.SerialisedScript

NFData ScriptNamedDeBruijn Source # 
Instance details

Defined in PlutusLedgerApi.Common.SerialisedScript

Eq ScriptNamedDeBruijn Source # 
Instance details

Defined in PlutusLedgerApi.Common.SerialisedScript

type Rep ScriptNamedDeBruijn Source # 
Instance details

Defined in PlutusLedgerApi.Common.SerialisedScript

type Rep ScriptNamedDeBruijn = D1 ('MetaData "ScriptNamedDeBruijn" "PlutusLedgerApi.Common.SerialisedScript" "plutus-ledger-api-1.36.0.0-5YP34Z4WNIC2QzLmhyGjha" 'True) (C1 ('MetaCons "ScriptNamedDeBruijn" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Program NamedDeBruijn DefaultUni DefaultFun ()))))

Script evaluation

evaluateScriptCounting Source #

Arguments

:: PlutusLedgerLanguage

The Plutus ledger language of the script under execution.

-> MajorProtocolVersion

Which major protocol version to run the operation in

-> VerboseMode

Whether to produce log output

-> EvaluationContext

Includes the cost model to use for tallying up the execution costs

-> ScriptForEvaluation

The script to evaluate

-> [Data]

The arguments to the script

-> (LogOutput, Either EvaluationError ExBudget) 

Evaluates a script, returning the minimum budget that the script would need to evaluate successfully. This will take as long as the script takes, if you need to limit the execution time of the script also, you can use evaluateScriptRestricting, which also returns the used budget.

Note: Parameterized over the ledger-plutus-version since the builtins allowed (during decoding) differs.

evaluateScriptRestricting Source #

Arguments

:: PlutusLedgerLanguage

The Plutus ledger language of the script under execution.

-> MajorProtocolVersion

Which major protocol version to run the operation in

-> VerboseMode

Whether to produce log output

-> EvaluationContext

Includes the cost model to use for tallying up the execution costs

-> ExBudget

The resource budget which must not be exceeded during evaluation

-> ScriptForEvaluation

The script to evaluate

-> [Data]

The arguments to the script

-> (LogOutput, Either EvaluationError ExBudget) 

Evaluates a script, with a cost model and a budget that restricts how many resources it can use according to the cost model. Also returns the budget that was actually used.

Can be used to calculate budgets for scripts, but even in this case you must give a limit to guard against scripts that run for a long time or loop.

Note: Parameterized over the LedgerPlutusVersion since 1. The builtins allowed (during decoding) differ, and 2. The Plutus language versions allowed differ.

evaluateTerm :: ExBudgetMode cost DefaultUni DefaultFun -> MajorProtocolVersion -> VerboseMode -> EvaluationContext -> Term NamedDeBruijn DefaultUni DefaultFun () -> (Either (CekEvaluationException NamedDeBruijn DefaultUni DefaultFun) (Term NamedDeBruijn DefaultUni DefaultFun ()), cost, [Text]) Source #

Evaluate a fully-applied term using the CEK machine. Useful for mimicking the behaviour of the on-chain evaluator.

data VerboseMode Source #

A simple toggle indicating whether or not we should accumulate logs during script execution.

Constructors

Verbose

accumulate all traces

Quiet

don't accumulate anything

Instances

Instances details
Eq VerboseMode Source # 
Instance details

Defined in PlutusLedgerApi.Common.Eval

type LogOutput = [Text] Source #

The type of the executed script's accumulated log output: a list of Text.

It will be an empty list if the VerboseMode is set to Quiet.

data EvaluationError Source #

Errors that can be thrown when evaluating a Plutus script.

Constructors

CekError !(CekEvaluationException NamedDeBruijn DefaultUni DefaultFun)

An error from the evaluator itself

DeBruijnError !FreeVariableError

An error in the pre-evaluation step of converting from de-Bruijn indices

CodecError !ScriptDecodeError

A deserialisation error TODO: make this error more informative when we have more information about what went wrong

CostModelParameterMismatch

An error indicating that the cost model parameters didn't match what we expected

InvalidReturnValue

The script evaluated to a value that is not a valid return value.

Network's versioning

The network's behaviour (and plutus's by extension) can change via hard forks, which directly correspond to major-number protocol version bumps.

newtype MajorProtocolVersion Source #

This represents the major component of the Cardano protocol version. The ledger can only supply the major component of the protocol version, not the minor component, and Plutus should only need to care about the major component anyway. This relies on careful understanding between us and the ledger as to what this means.

Instances

Instances details
Generic MajorProtocolVersion Source # 
Instance details

Defined in PlutusLedgerApi.Common.ProtocolVersions

Associated Types

type Rep MajorProtocolVersion :: Type -> Type Source #

Show MajorProtocolVersion Source # 
Instance details

Defined in PlutusLedgerApi.Common.ProtocolVersions

Eq MajorProtocolVersion Source # 
Instance details

Defined in PlutusLedgerApi.Common.ProtocolVersions

Ord MajorProtocolVersion Source # 
Instance details

Defined in PlutusLedgerApi.Common.ProtocolVersions

Pretty MajorProtocolVersion Source # 
Instance details

Defined in PlutusLedgerApi.Common.ProtocolVersions

Methods

pretty :: MajorProtocolVersion -> Doc ann

prettyList :: [MajorProtocolVersion] -> Doc ann

Serialise MajorProtocolVersion Source # 
Instance details

Defined in PlutusLedgerApi.Common.ProtocolVersions

type Rep MajorProtocolVersion Source # 
Instance details

Defined in PlutusLedgerApi.Common.ProtocolVersions

type Rep MajorProtocolVersion = D1 ('MetaData "MajorProtocolVersion" "PlutusLedgerApi.Common.ProtocolVersions" "plutus-ledger-api-1.36.0.0-5YP34Z4WNIC2QzLmhyGjha" 'True) (C1 ('MetaCons "MajorProtocolVersion" 'PrefixI 'True) (S1 ('MetaSel ('Just "getMajorProtocolVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

data PlutusLedgerLanguage Source #

The Plutus ledger language. These are entirely different script languages from the ledger's perspective, which on our side are interpreted in very similar ways.

It is a simple enumerated datatype (there is no major and minor components as in protocol version) and the ordering of constructors is essential for deriving Enum,Ord,Bounded.

IMPORTANT: this is different from the Plutus Core language version, Version

Constructors

PlutusV1

introduced in shelley era

PlutusV2

introduced in vasil era

PlutusV3

not yet enabled

Instances

Instances details
Bounded PlutusLedgerLanguage Source # 
Instance details

Defined in PlutusLedgerApi.Common.Versions

Enum PlutusLedgerLanguage Source # 
Instance details

Defined in PlutusLedgerApi.Common.Versions

Generic PlutusLedgerLanguage Source # 
Instance details

Defined in PlutusLedgerApi.Common.Versions

Associated Types

type Rep PlutusLedgerLanguage :: Type -> Type Source #

Show PlutusLedgerLanguage Source # 
Instance details

Defined in PlutusLedgerApi.Common.Versions

NFData PlutusLedgerLanguage Source # 
Instance details

Defined in PlutusLedgerApi.Common.Versions

Eq PlutusLedgerLanguage Source # 
Instance details

Defined in PlutusLedgerApi.Common.Versions

Ord PlutusLedgerLanguage Source # 
Instance details

Defined in PlutusLedgerApi.Common.Versions

NoThunks PlutusLedgerLanguage Source # 
Instance details

Defined in PlutusLedgerApi.Common.Versions

Methods

noThunks :: Context -> PlutusLedgerLanguage -> IO (Maybe ThunkInfo)

wNoThunks :: Context -> PlutusLedgerLanguage -> IO (Maybe ThunkInfo)

showTypeOf :: Proxy PlutusLedgerLanguage -> String

Pretty PlutusLedgerLanguage Source # 
Instance details

Defined in PlutusLedgerApi.Common.Versions

Methods

pretty :: PlutusLedgerLanguage -> Doc ann

prettyList :: [PlutusLedgerLanguage] -> Doc ann

Serialise PlutusLedgerLanguage Source # 
Instance details

Defined in PlutusLedgerApi.Common.Versions

type Rep PlutusLedgerLanguage Source # 
Instance details

Defined in PlutusLedgerApi.Common.Versions

type Rep PlutusLedgerLanguage = D1 ('MetaData "PlutusLedgerLanguage" "PlutusLedgerApi.Common.Versions" "plutus-ledger-api-1.36.0.0-5YP34Z4WNIC2QzLmhyGjha" 'False) (C1 ('MetaCons "PlutusV1" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PlutusV2" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PlutusV3" 'PrefixI 'False) (U1 :: Type -> Type)))

data Version #

Instances

Instances details
Generic Version 
Instance details

Defined in PlutusCore.Version

Associated Types

type Rep Version :: Type -> Type Source #

Show Version 
Instance details

Defined in PlutusCore.Version

NFData Version 
Instance details

Defined in PlutusCore.Version

Methods

rnf :: Version -> () Source #

Eq Version 
Instance details

Defined in PlutusCore.Version

Ord Version 
Instance details

Defined in PlutusCore.Version

Hashable Version 
Instance details

Defined in PlutusCore.Version

Methods

hashWithSalt :: Int -> Version -> Int

hash :: Version -> Int

Pretty Version 
Instance details

Defined in PlutusCore.Version

Methods

pretty :: Version -> Doc ann

prettyList :: [Version] -> Doc ann

type Rep Version 
Instance details

Defined in PlutusCore.Version

type Rep Version = D1 ('MetaData "Version" "PlutusCore.Version" "plutus-core-1.36.0.0-7ehJj5tIPqoJIiiivXkX9N" 'False) (C1 ('MetaCons "Version" 'PrefixI 'True) (S1 ('MetaSel ('Just "_versionMajor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural) :*: (S1 ('MetaSel ('Just "_versionMinor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural) :*: S1 ('MetaSel ('Just "_versionPatch") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural))))

builtinsIntroducedIn :: Map (PlutusLedgerLanguage, MajorProtocolVersion) (Set DefaultFun) Source #

A map indicating which builtin functions were introduced in which MajorProtocolVersion.

This must be updated when new builtins are added. See Note [New builtins/language versions and protocol versions]

builtinsAvailableIn :: PlutusLedgerLanguage -> MajorProtocolVersion -> Set DefaultFun Source #

Which builtin functions are available in the given given PlutusLedgerLanguage and MajorProtocolVersion?

See Note [New builtins/language versions and protocol versions]

ledgerLanguageIntroducedIn :: PlutusLedgerLanguage -> MajorProtocolVersion Source #

Query the protocol version that a specific Plutus ledger language was first introduced in.

ledgerLanguagesAvailableIn :: MajorProtocolVersion -> Set PlutusLedgerLanguage Source #

Which Plutus language versions are available in the given MajorProtocolVersion?

See Note [New builtins/language versions and protocol versions]

Costing-related types

data ExBudget #

Constructors

ExBudget 

Instances

Instances details
FromJSON ExBudget 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Methods

parseJSON :: Value -> Parser ExBudget

parseJSONList :: Value -> Parser [ExBudget]

omittedField :: Maybe ExBudget

ToJSON ExBudget 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Methods

toJSON :: ExBudget -> Value

toEncoding :: ExBudget -> Encoding

toJSONList :: [ExBudget] -> Value

toEncodingList :: [ExBudget] -> Encoding

omitField :: ExBudget -> Bool

Monoid ExBudget 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Semigroup ExBudget 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Generic ExBudget 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Associated Types

type Rep ExBudget :: Type -> Type Source #

Show ExBudget 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

NFData ExBudget 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Methods

rnf :: ExBudget -> () Source #

Eq ExBudget 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

NoThunks ExBudget 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Methods

noThunks :: Context -> ExBudget -> IO (Maybe ThunkInfo)

wNoThunks :: Context -> ExBudget -> IO (Maybe ThunkInfo)

showTypeOf :: Proxy ExBudget -> String

Pretty ExBudget 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Methods

pretty :: ExBudget -> Doc ann

prettyList :: [ExBudget] -> Doc ann

Serialise ExBudget 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Methods

encode :: ExBudget -> Encoding

decode :: Decoder s ExBudget

encodeList :: [ExBudget] -> Encoding

decodeList :: Decoder s [ExBudget]

PrettyBy config ExBudget 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Methods

prettyBy :: config -> ExBudget -> Doc ann

prettyListBy :: config -> [ExBudget] -> Doc ann

Lift ExBudget 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Methods

lift :: Quote m => ExBudget -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => ExBudget -> Code m ExBudget Source #

type Rep ExBudget 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

type Rep ExBudget = D1 ('MetaData "ExBudget" "PlutusCore.Evaluation.Machine.ExBudget" "plutus-core-1.36.0.0-7ehJj5tIPqoJIiiivXkX9N" 'False) (C1 ('MetaCons "ExBudget" 'PrefixI 'True) (S1 ('MetaSel ('Just "exBudgetCPU") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedUnpack) (Rec0 ExCPU) :*: S1 ('MetaSel ('Just "exBudgetMemory") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedUnpack) (Rec0 ExMemory)))

newtype ExCPU #

Constructors

ExCPU CostingInteger 

Instances

Instances details
FromJSON ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

parseJSON :: Value -> Parser ExCPU

parseJSONList :: Value -> Parser [ExCPU]

omittedField :: Maybe ExCPU

ToJSON ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

toJSON :: ExCPU -> Value

toEncoding :: ExCPU -> Encoding

toJSONList :: [ExCPU] -> Value

toEncodingList :: [ExCPU] -> Encoding

omitField :: ExCPU -> Bool

Monoid ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Semigroup ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Bounded ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Generic ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Associated Types

type Rep ExCPU :: Type -> Type Source #

Methods

from :: ExCPU -> Rep ExCPU x Source #

to :: Rep ExCPU x -> ExCPU Source #

Num ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Read ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Show ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

NFData ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

rnf :: ExCPU -> () Source #

Eq ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

(==) :: ExCPU -> ExCPU -> Bool Source #

(/=) :: ExCPU -> ExCPU -> Bool Source #

Ord ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

NoThunks ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

noThunks :: Context -> ExCPU -> IO (Maybe ThunkInfo)

wNoThunks :: Context -> ExCPU -> IO (Maybe ThunkInfo)

showTypeOf :: Proxy ExCPU -> String

Pretty ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

pretty :: ExCPU -> Doc ann

prettyList :: [ExCPU] -> Doc ann

Serialise ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

encode :: ExCPU -> Encoding

decode :: Decoder s ExCPU

encodeList :: [ExCPU] -> Encoding

decodeList :: Decoder s [ExCPU]

PrettyBy config ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

prettyBy :: config -> ExCPU -> Doc ann

prettyListBy :: config -> [ExCPU] -> Doc ann

Lift ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

lift :: Quote m => ExCPU -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => ExCPU -> Code m ExCPU Source #

type Rep ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

type Rep ExCPU = D1 ('MetaData "ExCPU" "PlutusCore.Evaluation.Machine.ExMemory" "plutus-core-1.36.0.0-7ehJj5tIPqoJIiiivXkX9N" 'True) (C1 ('MetaCons "ExCPU" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CostingInteger)))

newtype ExMemory #

Constructors

ExMemory CostingInteger 

Instances

Instances details
FromJSON ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

parseJSON :: Value -> Parser ExMemory

parseJSONList :: Value -> Parser [ExMemory]

omittedField :: Maybe ExMemory

ToJSON ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

toJSON :: ExMemory -> Value

toEncoding :: ExMemory -> Encoding

toJSONList :: [ExMemory] -> Value

toEncodingList :: [ExMemory] -> Encoding

omitField :: ExMemory -> Bool

Monoid ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Semigroup ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Bounded ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Generic ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Associated Types

type Rep ExMemory :: Type -> Type Source #

Num ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Read ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Show ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

NFData ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

rnf :: ExMemory -> () Source #

Eq ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Ord ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

NoThunks ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

noThunks :: Context -> ExMemory -> IO (Maybe ThunkInfo)

wNoThunks :: Context -> ExMemory -> IO (Maybe ThunkInfo)

showTypeOf :: Proxy ExMemory -> String

Pretty ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

pretty :: ExMemory -> Doc ann

prettyList :: [ExMemory] -> Doc ann

Serialise ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

encode :: ExMemory -> Encoding

decode :: Decoder s ExMemory

encodeList :: [ExMemory] -> Encoding

decodeList :: Decoder s [ExMemory]

PrettyBy config ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

prettyBy :: config -> ExMemory -> Doc ann

prettyListBy :: config -> [ExMemory] -> Doc ann

Lift ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

lift :: Quote m => ExMemory -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => ExMemory -> Code m ExMemory Source #

type Rep ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

type Rep ExMemory = D1 ('MetaData "ExMemory" "PlutusCore.Evaluation.Machine.ExMemory" "plutus-core-1.36.0.0-7ehJj5tIPqoJIiiivXkX9N" 'True) (C1 ('MetaCons "ExMemory" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CostingInteger)))

data SatInt #

Instances

Instances details
FromJSON SatInt 
Instance details

Defined in Data.SatInt

Methods

parseJSON :: Value -> Parser SatInt

parseJSONList :: Value -> Parser [SatInt]

omittedField :: Maybe SatInt

ToJSON SatInt 
Instance details

Defined in Data.SatInt

Methods

toJSON :: SatInt -> Value

toEncoding :: SatInt -> Encoding

toJSONList :: [SatInt] -> Value

toEncodingList :: [SatInt] -> Encoding

omitField :: SatInt -> Bool

Bits SatInt 
Instance details

Defined in Data.SatInt

FiniteBits SatInt 
Instance details

Defined in Data.SatInt

Bounded SatInt 
Instance details

Defined in Data.SatInt

Generic SatInt 
Instance details

Defined in Data.SatInt

Associated Types

type Rep SatInt :: Type -> Type Source #

Num SatInt 
Instance details

Defined in Data.SatInt

Read SatInt 
Instance details

Defined in Data.SatInt

Show SatInt 
Instance details

Defined in Data.SatInt

FromField SatInt 
Instance details

Defined in Data.SatInt

Methods

parseField :: Field -> Parser SatInt

NFData SatInt 
Instance details

Defined in Data.SatInt

Methods

rnf :: SatInt -> () Source #

Eq SatInt 
Instance details

Defined in Data.SatInt

Ord SatInt 
Instance details

Defined in Data.SatInt

NoThunks SatInt 
Instance details

Defined in Data.SatInt

Methods

noThunks :: Context -> SatInt -> IO (Maybe ThunkInfo)

wNoThunks :: Context -> SatInt -> IO (Maybe ThunkInfo)

showTypeOf :: Proxy SatInt -> String

Prim SatInt 
Instance details

Defined in Data.SatInt

Serialise SatInt 
Instance details

Defined in Data.SatInt

Methods

encode :: SatInt -> Encoding

decode :: Decoder s SatInt

encodeList :: [SatInt] -> Encoding

decodeList :: Decoder s [SatInt]

Lift SatInt 
Instance details

Defined in Data.SatInt

Methods

lift :: Quote m => SatInt -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => SatInt -> Code m SatInt Source #

type Rep SatInt 
Instance details

Defined in Data.SatInt

type Rep SatInt = D1 ('MetaData "SatInt" "Data.SatInt" "plutus-core-1.36.0.0-DNHbUMfdUMU8Mm8qem5zt9-satint" 'True) (C1 ('MetaCons "SI" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSatInt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

fromSatInt :: Num a => SatInt -> a #

Network's costing parameters

A less drastic approach (that does not rely on a HF) to affect the network's (and plutus's by extension) behaviour is by tweaking the values of the cost model parameters.

The network does not associate names to cost model parameters; Plutus attaches names to the network's cost model parameters (values) either in a raw textual form or typed by a specific plutus version.

See Note [Cost model parameters]

toCostModelParams :: IsParamName p => [(p, Int64)] -> CostModelParams Source #

Untags the plutus version from the typed cost model parameters and returns their raw textual form (internally used by CostModelInterface).

class (Enum a, Bounded a) => IsParamName a where Source #

A parameter name for different plutus versions.

Each Plutus version should expose such an enumeration as an ADT and create an instance of ParamName out of it.

A valid parameter name has to be enumeration, bounded, ordered, and prettyprintable to a "lower-Kebab" string.

Minimal complete definition

showParamName

Methods

showParamName :: a -> Text Source #

Produce the raw textual form for a given typed-by-plutus-version cost model parameter Any implementation *must be* an injective function. The GIsParamName generic implementation guarantees injectivity.

readParamName :: Text -> Maybe a Source #

default implementation that inverts the showParamName operation (not very efficient)

data CostModelApplyError #

Instances

Instances details
Data CostModelApplyError 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostModelInterface

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CostModelApplyError -> c CostModelApplyError Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CostModelApplyError Source #

toConstr :: CostModelApplyError -> Constr Source #

dataTypeOf :: CostModelApplyError -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CostModelApplyError) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CostModelApplyError) Source #

gmapT :: (forall b. Data b => b -> b) -> CostModelApplyError -> CostModelApplyError Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CostModelApplyError -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CostModelApplyError -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> CostModelApplyError -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CostModelApplyError -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CostModelApplyError -> m CostModelApplyError Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CostModelApplyError -> m CostModelApplyError Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CostModelApplyError -> m CostModelApplyError Source #

Exception CostModelApplyError 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostModelInterface

Generic CostModelApplyError 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostModelInterface

Associated Types

type Rep CostModelApplyError :: Type -> Type Source #

Show CostModelApplyError 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostModelInterface

NFData CostModelApplyError 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostModelInterface

Eq CostModelApplyError 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostModelInterface

NoThunks CostModelApplyError 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostModelInterface

Methods

noThunks :: Context -> CostModelApplyError -> IO (Maybe ThunkInfo)

wNoThunks :: Context -> CostModelApplyError -> IO (Maybe ThunkInfo)

showTypeOf :: Proxy CostModelApplyError -> String

Pretty CostModelApplyError 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostModelInterface

Methods

pretty :: CostModelApplyError -> Doc ann

prettyList :: [CostModelApplyError] -> Doc ann

type Rep CostModelApplyError 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostModelInterface

type Rep CostModelApplyError = D1 ('MetaData "CostModelApplyError" "PlutusCore.Evaluation.Machine.CostModelInterface" "plutus-core-1.36.0.0-7ehJj5tIPqoJIiiivXkX9N" 'False) (C1 ('MetaCons "CMUnknownParamError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: (C1 ('MetaCons "CMInternalReadError" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CMInternalWriteError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String))))

data CostModelApplyWarn #

Instances

Instances details
Pretty CostModelApplyWarn 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostModelInterface

Methods

pretty :: CostModelApplyWarn -> Doc ann

prettyList :: [CostModelApplyWarn] -> Doc ann

Evaluation context

data EvaluationContext Source #

An opaque type that contains all the static parameters that the evaluator needs to evaluate a script. This is so that they can be computed once and cached, rather than being recomputed on every evaluation.

Different protocol versions may require different bundles of machine parameters, which allows us for example to tweak the shape of the costing function of a builtin, so that the builtin costs less. Currently this means that we have to create multiple DefaultMachineParameters per language version, which we put into a cache (represented by an association list) in order to avoid costly recomputation of machine parameters.

In order to get the appropriate DefaultMachineParameters at validation time we look it up in the cache using a semantics variant as a key. We compute the semantics variant from the protocol version using the stored function. Note that the semantics variant depends on the language version too, but the latter is known statically (because each language version has its own evaluation context), hence there's no reason to require it to be provided at runtime.

To say it differently, there's a matrix of semantics variants indexed by (LL, PV) pairs and we cache its particular row corresponding to the statically given LL in an EvaluationContext.

The reason why we associate a DefaultMachineParameters with a semantics variant rather than a protocol version are

  1. generally there are far more protocol versions than semantics variants supported by a specific language version, so we save on pointless duplication of bundles of machine parameters
  2. builtins don't know anything about protocol versions, only semantics variants. It is therefore more semantically precise to associate bundles of machine parameters with semantics variants than with protocol versions

Constructors

EvaluationContext 

Fields

Instances

Instances details
Generic EvaluationContext Source # 
Instance details

Defined in PlutusLedgerApi.Common.Eval

Associated Types

type Rep EvaluationContext :: Type -> Type Source #

NFData EvaluationContext Source # 
Instance details

Defined in PlutusLedgerApi.Common.Eval

Methods

rnf :: EvaluationContext -> () Source #

NoThunks EvaluationContext Source # 
Instance details

Defined in PlutusLedgerApi.Common.Eval

Methods

noThunks :: Context -> EvaluationContext -> IO (Maybe ThunkInfo)

wNoThunks :: Context -> EvaluationContext -> IO (Maybe ThunkInfo)

showTypeOf :: Proxy EvaluationContext -> String

type Rep EvaluationContext Source # 
Instance details

Defined in PlutusLedgerApi.Common.Eval

type Rep EvaluationContext = D1 ('MetaData "EvaluationContext" "PlutusLedgerApi.Common.Eval" "plutus-ledger-api-1.36.0.0-5YP34Z4WNIC2QzLmhyGjha" 'False) (C1 ('MetaCons "EvaluationContext" 'PrefixI 'True) (S1 ('MetaSel ('Just "_evalCtxLedgerLang") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 PlutusLedgerLanguage) :*: (S1 ('MetaSel ('Just "_evalCtxToSemVar") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (MajorProtocolVersion -> BuiltinSemanticsVariant DefaultFun)) :*: S1 ('MetaSel ('Just "_evalCtxMachParsCache") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [(BuiltinSemanticsVariant DefaultFun, DefaultMachineParameters)]))))

mkDynEvaluationContext :: MonadError CostModelApplyError m => PlutusLedgerLanguage -> [BuiltinSemanticsVariant DefaultFun] -> (MajorProtocolVersion -> BuiltinSemanticsVariant DefaultFun) -> CostModelParams -> m EvaluationContext Source #

Create an EvaluationContext given all builtin semantics variants supported by the provided language version.

The input is a Map of Texts to cost integer values (aka CostModelParams, CostModel) See Note [Inlining meanings of builtins].

IMPORTANT: the toSemVar argument computes the semantics variant for each MajorProtocolVersion and it must only return semantics variants from the semVars list, as well as cover ANY MajorProtocolVersion, including those that do not exist yet (i.e. toSemVar must never fail).

IMPORTANT: The evaluation context of every Plutus version must be recreated upon a protocol update with the updated cost model parameters.

mkTermToEvaluate Source #

Arguments

:: MonadError EvaluationError m 
=> PlutusLedgerLanguage

the Plutus ledger language of the script under execution.

-> MajorProtocolVersion

which major protocol version to run the operation in

-> ScriptForEvaluation

the script to evaluate

-> [Data]

the arguments that the script's underlying term will be applied to

-> m (Term NamedDeBruijn DefaultUni DefaultFun ()) 

Shared helper for the evaluation functions: evaluateScriptCounting and evaluateScriptRestricting,

Given a ScriptForEvaluation:

1) applies the term to a list of Data arguments (e.g. Datum, Redeemer, ScriptContext) 2) checks that the applied-term is well-scoped 3) returns the applied-term

Supporting types used in the context types

Builtins

data BuiltinByteString #

Instances

Instances details
Data BuiltinByteString 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BuiltinByteString -> c BuiltinByteString Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BuiltinByteString Source #

toConstr :: BuiltinByteString -> Constr Source #

dataTypeOf :: BuiltinByteString -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c BuiltinByteString) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BuiltinByteString) Source #

gmapT :: (forall b. Data b => b -> b) -> BuiltinByteString -> BuiltinByteString Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinByteString -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinByteString -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> BuiltinByteString -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> BuiltinByteString -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> BuiltinByteString -> m BuiltinByteString Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinByteString -> m BuiltinByteString Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinByteString -> m BuiltinByteString Source #

Monoid BuiltinByteString 
Instance details

Defined in PlutusTx.Builtins.Internal

Semigroup BuiltinByteString 
Instance details

Defined in PlutusTx.Builtins.Internal

Show BuiltinByteString 
Instance details

Defined in PlutusTx.Builtins.Internal

NFData BuiltinByteString 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

rnf :: BuiltinByteString -> () Source #

Eq BuiltinByteString 
Instance details

Defined in PlutusTx.Builtins.Internal

Ord BuiltinByteString 
Instance details

Defined in PlutusTx.Builtins.Internal

Hashable BuiltinByteString 
Instance details

Defined in PlutusTx.Builtins.Internal

ByteArray BuiltinByteString 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

allocRet :: Int -> (Ptr p -> IO a) -> IO (a, BuiltinByteString)

ByteArrayAccess BuiltinByteString 
Instance details

Defined in PlutusTx.Builtins.Internal

HasBlueprintDefinition BuiltinByteString 
Instance details

Defined in PlutusTx.Blueprint.Definition.Unroll

Associated Types

type Unroll BuiltinByteString :: [Type]

Methods

definitionId :: DefinitionId

HasFromBuiltin BuiltinByteString 
Instance details

Defined in PlutusTx.Builtins.HasBuiltin

Associated Types

type FromBuiltin BuiltinByteString

Eq BuiltinByteString 
Instance details

Defined in PlutusTx.Eq

FromData BuiltinByteString 
Instance details

Defined in PlutusTx.IsData.Class

ToData BuiltinByteString 
Instance details

Defined in PlutusTx.IsData.Class

UnsafeFromData BuiltinByteString 
Instance details

Defined in PlutusTx.IsData.Class

Monoid BuiltinByteString 
Instance details

Defined in PlutusTx.Monoid

Ord BuiltinByteString 
Instance details

Defined in PlutusTx.Ord

Semigroup BuiltinByteString 
Instance details

Defined in PlutusTx.Semigroup

Pretty BuiltinByteString 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

pretty :: BuiltinByteString -> Doc ann

prettyList :: [BuiltinByteString] -> Doc ann

Serialise BuiltinByteString 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

encode :: BuiltinByteString -> Encoding

decode :: Decoder s BuiltinByteString

encodeList :: [BuiltinByteString] -> Encoding

decodeList :: Decoder s [BuiltinByteString]

HasBlueprintSchema BuiltinByteString referencedTypes 
Instance details

Defined in PlutusTx.Blueprint.Class

Methods

schema :: Schema referencedTypes

HasFromOpaque BuiltinByteString BuiltinByteString 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

HasToOpaque BuiltinByteString BuiltinByteString 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

HasTermLevel uni ByteString => Lift uni BuiltinByteString 
Instance details

Defined in PlutusTx.Lift.Class

Methods

lift :: BuiltinByteString -> RTCompile uni fun (Term TyName Name uni fun ())

HasTypeLevel uni ByteString => Typeable uni BuiltinByteString 
Instance details

Defined in PlutusTx.Lift.Class

Methods

typeRep :: Proxy BuiltinByteString -> RTCompile uni fun (Type TyName uni ())

type Unroll BuiltinByteString 
Instance details

Defined in PlutusTx.Blueprint.Definition.Unroll

type FromBuiltin BuiltinByteString 
Instance details

Defined in PlutusTx.Builtins.HasBuiltin

type FromBuiltin BuiltinByteString = ByteString

toBuiltin :: HasToBuiltin a => a -> ToBuiltin a #

fromBuiltin :: HasFromBuiltin arep => arep -> FromBuiltin arep #

toOpaque :: HasToOpaque a arep => a -> arep #

fromOpaque :: HasFromOpaque arep a => arep -> a #

Data

data Data #

Constructors

Constr Integer [Data] 
Map [(Data, Data)] 
List [Data] 
I Integer 
B ByteString 

Instances

Instances details
Data Data 
Instance details

Defined in PlutusCore.Data

Methods

gfoldl :: (forall d b. Data0 d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Data -> c Data Source #

gunfold :: (forall b r. Data0 b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Data Source #

toConstr :: Data -> Constr Source #

dataTypeOf :: Data -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data0 d => c (t d)) -> Maybe (c Data) Source #

dataCast2 :: Typeable t => (forall d e. (Data0 d, Data0 e) => c (t d e)) -> Maybe (c Data) Source #

gmapT :: (forall b. Data0 b => b -> b) -> Data -> Data Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data0 d => d -> r') -> Data -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data0 d => d -> r') -> Data -> r Source #

gmapQ :: (forall d. Data0 d => d -> u) -> Data -> [u] Source #

gmapQi :: Int -> (forall d. Data0 d => d -> u) -> Data -> u Source #

gmapM :: Monad m => (forall d. Data0 d => d -> m d) -> Data -> m Data Source #

gmapMp :: MonadPlus m => (forall d. Data0 d => d -> m d) -> Data -> m Data Source #

gmapMo :: MonadPlus m => (forall d. Data0 d => d -> m d) -> Data -> m Data Source #

Generic Data 
Instance details

Defined in PlutusCore.Data

Associated Types

type Rep Data :: Type -> Type Source #

Methods

from :: Data -> Rep Data x Source #

to :: Rep Data x -> Data Source #

Read Data 
Instance details

Defined in PlutusCore.Data

Show Data 
Instance details

Defined in PlutusCore.Data

NFData Data 
Instance details

Defined in PlutusCore.Data

Methods

rnf :: Data -> () Source #

Eq Data 
Instance details

Defined in PlutusCore.Data

Methods

(==) :: Data -> Data -> Bool Source #

(/=) :: Data -> Data -> Bool Source #

Ord Data 
Instance details

Defined in PlutusCore.Data

Hashable Data 
Instance details

Defined in PlutusCore.Data

Methods

hashWithSalt :: Int -> Data -> Int

hash :: Data -> Int

NoThunks Data 
Instance details

Defined in PlutusCore.Data

Methods

noThunks :: Context -> Data -> IO (Maybe ThunkInfo)

wNoThunks :: Context -> Data -> IO (Maybe ThunkInfo)

showTypeOf :: Proxy Data -> String

HasToBuiltin Data 
Instance details

Defined in PlutusTx.Builtins.HasBuiltin

Associated Types

type ToBuiltin Data

Methods

toBuiltin :: Data -> ToBuiltin Data #

Pretty Data 
Instance details

Defined in PlutusCore.Data

Methods

pretty :: Data -> Doc ann

prettyList :: [Data] -> Doc ann

Serialise Data 
Instance details

Defined in PlutusCore.Data

Methods

encode :: Data -> Encoding

decode :: Decoder s Data

encodeList :: [Data] -> Encoding

decodeList :: Decoder s [Data]

PrettyBy ConstConfig Data 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

prettyBy :: ConstConfig -> Data -> Doc ann

prettyListBy :: ConstConfig -> [Data] -> Doc ann

KnownBuiltinTypeIn DefaultUni term Data => MakeKnownIn DefaultUni term Data 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown :: Data -> BuiltinResult term

KnownBuiltinTypeIn DefaultUni term Data => ReadKnownIn DefaultUni term Data 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown :: term -> ReadKnownM Data

Contains DefaultUni Data 
Instance details

Defined in PlutusCore.Default.Universe

Methods

knownUni :: DefaultUni (Esc Data)

KnownBuiltinTypeAst tyname DefaultUni Data => KnownTypeAst tyname DefaultUni Data 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type IsBuiltin DefaultUni Data :: Bool

type ToHoles DefaultUni Data :: [Hole]

type ToBinds DefaultUni acc Data :: [Some TyNameRep]

Methods

typeAst :: Type tyname DefaultUni ()

type Rep Data 
Instance details

Defined in PlutusCore.Data

type ToBuiltin Data 
Instance details

Defined in PlutusTx.Builtins.HasBuiltin

type ToBuiltin Data = BuiltinData
type IsBuiltin DefaultUni Data 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni Data = IsBuiltin DefaultUni (ElaborateBuiltin DefaultUni Data)
type ToHoles DefaultUni Data 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni Data = ToHoles DefaultUni (ElaborateBuiltin DefaultUni Data)
type ToBinds DefaultUni acc Data 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Data = ToBinds DefaultUni acc (ElaborateBuiltin DefaultUni Data)

data BuiltinData #

Constructors

BuiltinData ~Data 

Instances

Instances details
Data BuiltinData 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BuiltinData -> c BuiltinData Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BuiltinData Source #

toConstr :: BuiltinData -> Constr Source #

dataTypeOf :: BuiltinData -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c BuiltinData) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BuiltinData) Source #

gmapT :: (forall b. Data b => b -> b) -> BuiltinData -> BuiltinData Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinData -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinData -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> BuiltinData -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> BuiltinData -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> BuiltinData -> m BuiltinData Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinData -> m BuiltinData Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinData -> m BuiltinData Source #

Generic BuiltinData 
Instance details

Defined in PlutusTx.Builtins.Internal

Associated Types

type Rep BuiltinData :: Type -> Type Source #

Show BuiltinData 
Instance details

Defined in PlutusTx.Builtins.Internal

NFData BuiltinData 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

rnf :: BuiltinData -> () Source #

Eq BuiltinData 
Instance details

Defined in PlutusTx.Builtins.Internal

Ord BuiltinData 
Instance details

Defined in PlutusTx.Builtins.Internal

HasBlueprintDefinition BuiltinData 
Instance details

Defined in PlutusTx.Blueprint.Definition.Unroll

Associated Types

type Unroll BuiltinData :: [Type]

Methods

definitionId :: DefinitionId

HasFromBuiltin BuiltinData 
Instance details

Defined in PlutusTx.Builtins.HasBuiltin

Associated Types

type FromBuiltin BuiltinData

Methods

fromBuiltin :: BuiltinData -> FromBuiltin BuiltinData #

MkNil BuiltinData 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

Methods

mkNil :: BuiltinList BuiltinData

Eq BuiltinData 
Instance details

Defined in PlutusTx.Eq

FromData BuiltinData 
Instance details

Defined in PlutusTx.IsData.Class

ToData BuiltinData 
Instance details

Defined in PlutusTx.IsData.Class

UnsafeFromData BuiltinData 
Instance details

Defined in PlutusTx.IsData.Class

Pretty BuiltinData 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

pretty :: BuiltinData -> Doc ann

prettyList :: [BuiltinData] -> Doc ann

HasBlueprintSchema BuiltinData referencedTypes 
Instance details

Defined in PlutusTx.Blueprint.Class

Methods

schema :: Schema referencedTypes

HasFromOpaque BuiltinData BuiltinData 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

HasToOpaque BuiltinData BuiltinData 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

HasTermLevel uni Data => Lift uni BuiltinData 
Instance details

Defined in PlutusTx.Lift.Class

Methods

lift :: BuiltinData -> RTCompile uni fun (Term TyName Name uni fun ())

HasTypeLevel uni Data => Typeable uni BuiltinData 
Instance details

Defined in PlutusTx.Lift.Class

Methods

typeRep :: Proxy BuiltinData -> RTCompile uni fun (Type TyName uni ())

MkNil (BuiltinPair BuiltinData BuiltinData) 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

Methods

mkNil :: BuiltinList (BuiltinPair BuiltinData BuiltinData)

HasToOpaque (BuiltinData, BuiltinData) (BuiltinPair BuiltinData BuiltinData) 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

type Rep BuiltinData 
Instance details

Defined in PlutusTx.Builtins.Internal

type Rep BuiltinData = D1 ('MetaData "BuiltinData" "PlutusTx.Builtins.Internal" "plutus-tx-1.36.0.0-8y1X6QaF1WM5mIhDTsyzym" 'False) (C1 ('MetaCons "BuiltinData" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceLazy 'DecidedLazy) (Rec0 Data)))
type Unroll BuiltinData 
Instance details

Defined in PlutusTx.Blueprint.Definition.Unroll

type Unroll BuiltinData = '[BuiltinData]
type FromBuiltin BuiltinData 
Instance details

Defined in PlutusTx.Builtins.HasBuiltin

type FromBuiltin BuiltinData = Data

class ToData a where #

Methods

toBuiltinData :: a -> BuiltinData #

Instances

Instances details
ToData Void 
Instance details

Defined in PlutusTx.IsData.Class

ToData Address Source # 
Instance details

Defined in PlutusLedgerApi.V1.Address

ToData LedgerBytes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Bytes

ToData ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

ToData ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

ToData TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

ToData TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

ToData Credential Source # 
Instance details

Defined in PlutusLedgerApi.V1.Credential

ToData StakingCredential Source # 
Instance details

Defined in PlutusLedgerApi.V1.Credential

ToData PubKeyHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Crypto

ToData DCert Source # 
Instance details

Defined in PlutusLedgerApi.V1.DCert

ToData ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Contexts

ToData ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Contexts

ToData TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Contexts

ToData TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Contexts

ToData TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

ToData TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

ToData TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

ToData AssetClass Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Value

ToData CurrencySymbol Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Value

ToData Lovelace Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Value

ToData TokenName Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Value

ToData Value Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Value

ToData Datum Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

ToData DatumHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

ToData Redeemer Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

ToData RedeemerHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

ToData ScriptHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

ToData DiffMilliSeconds Source # 
Instance details

Defined in PlutusLedgerApi.V1.Time

ToData POSIXTime Source # 
Instance details

Defined in PlutusLedgerApi.V1.Time

ToData RedeemerPtr Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

ToData ScriptTag Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

ToData TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

ToData TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

ToData TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

ToData AssetClass Source # 
Instance details

Defined in PlutusLedgerApi.V1.Value

ToData CurrencySymbol Source # 
Instance details

Defined in PlutusLedgerApi.V1.Value

ToData Lovelace Source # 
Instance details

Defined in PlutusLedgerApi.V1.Value

ToData TokenName Source # 
Instance details

Defined in PlutusLedgerApi.V1.Value

ToData Value Source # 
Instance details

Defined in PlutusLedgerApi.V1.Value

ToData ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

ToData TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

ToData TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

ToData ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

ToData TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

ToData TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

ToData OutputDatum Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Tx

ToData TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Tx

ToData OutputDatum Source # 
Instance details

Defined in PlutusLedgerApi.V2.Tx

ToData TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Tx

ToData ChangedParameters Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

ToData ColdCommitteeCredential Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

ToData Committee Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

ToData Constitution Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

ToData DRep Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

ToData DRepCredential Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

ToData Delegatee Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

ToData GovernanceAction Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

ToData GovernanceActionId Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

ToData HotCommitteeCredential Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

ToData ProposalProcedure Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

ToData ProtocolVersion Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

ToData ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

ToData ScriptInfo Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

ToData ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

ToData TxCert Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

ToData TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

ToData TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

ToData Vote Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

ToData Voter Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

ToData ChangedParameters Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

ToData ColdCommitteeCredential Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

ToData Committee Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

ToData Constitution Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

ToData DRep Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

ToData DRepCredential Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

ToData Delegatee Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

ToData GovernanceAction Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

ToData GovernanceActionId Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

ToData HotCommitteeCredential Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

ToData ProposalProcedure Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

ToData ProtocolVersion Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

ToData ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

ToData ScriptInfo Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

ToData ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

ToData TxCert Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

ToData TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

ToData TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

ToData Vote Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

ToData Voter Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

ToData TxId Source # 
Instance details

Defined in PlutusLedgerApi.V3.Tx

ToData TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V3.Tx

ToData BuiltinBLS12_381_G1_Element 
Instance details

Defined in PlutusTx.IsData.Class

Methods

toBuiltinData :: BuiltinBLS12_381_G1_Element -> BuiltinData #

ToData BuiltinBLS12_381_G2_Element 
Instance details

Defined in PlutusTx.IsData.Class

Methods

toBuiltinData :: BuiltinBLS12_381_G2_Element -> BuiltinData #

(TypeError ('Text "toBuiltinData is not supported for BuiltinBLS12_381_MlResult") :: Constraint) => ToData BuiltinBLS12_381_MlResult 
Instance details

Defined in PlutusTx.IsData.Class

Methods

toBuiltinData :: BuiltinBLS12_381_MlResult -> BuiltinData #

ToData BuiltinByteString 
Instance details

Defined in PlutusTx.IsData.Class

ToData BuiltinData 
Instance details

Defined in PlutusTx.IsData.Class

ToData Rational 
Instance details

Defined in PlutusTx.Ratio

ToData Integer 
Instance details

Defined in PlutusTx.IsData.Class

(TypeError ('Text "Int is not supported, use Integer instead") :: Constraint) => ToData Int 
Instance details

Defined in PlutusTx.IsData.Class

ToData a => ToData (Extended a) Source # 
Instance details

Defined in PlutusLedgerApi.V1.Interval

ToData a => ToData (Interval a) Source # 
Instance details

Defined in PlutusLedgerApi.V1.Interval

ToData a => ToData (LowerBound a) Source # 
Instance details

Defined in PlutusLedgerApi.V1.Interval

ToData a => ToData (UpperBound a) Source # 
Instance details

Defined in PlutusLedgerApi.V1.Interval

ToData a => ToData [a] 
Instance details

Defined in PlutusTx.IsData.Class

Methods

toBuiltinData :: [a] -> BuiltinData #

(ToData k, ToData v) => ToData (Map k v) 
Instance details

Defined in PlutusTx.AssocMap

Methods

toBuiltinData :: Map k v -> BuiltinData #

ToData (Map k a) 
Instance details

Defined in PlutusTx.Data.AssocMap

Methods

toBuiltinData :: Map k a -> BuiltinData #

class FromData a where #

Instances

Instances details
FromData Void 
Instance details

Defined in PlutusTx.IsData.Class

FromData Address Source # 
Instance details

Defined in PlutusLedgerApi.V1.Address

FromData LedgerBytes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Bytes

FromData ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

FromData ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

FromData TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

FromData TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

FromData Credential Source # 
Instance details

Defined in PlutusLedgerApi.V1.Credential

FromData StakingCredential Source # 
Instance details

Defined in PlutusLedgerApi.V1.Credential

FromData PubKeyHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Crypto

FromData DCert Source # 
Instance details

Defined in PlutusLedgerApi.V1.DCert

FromData ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Contexts

FromData ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Contexts

FromData TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Contexts

FromData TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Contexts

FromData TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

FromData TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

FromData TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

FromData AssetClass Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Value

FromData CurrencySymbol Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Value

FromData Lovelace Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Value

FromData TokenName Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Value

FromData Value Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Value

FromData Datum Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

FromData DatumHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

FromData Redeemer Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

FromData RedeemerHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

FromData ScriptHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

FromData DiffMilliSeconds Source # 
Instance details

Defined in PlutusLedgerApi.V1.Time

FromData POSIXTime Source # 
Instance details

Defined in PlutusLedgerApi.V1.Time

FromData RedeemerPtr Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

FromData ScriptTag Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

FromData TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

FromData TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

FromData TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

FromData AssetClass Source # 
Instance details

Defined in PlutusLedgerApi.V1.Value

FromData CurrencySymbol Source # 
Instance details

Defined in PlutusLedgerApi.V1.Value

FromData Lovelace Source # 
Instance details

Defined in PlutusLedgerApi.V1.Value

FromData TokenName Source # 
Instance details

Defined in PlutusLedgerApi.V1.Value

FromData Value Source # 
Instance details

Defined in PlutusLedgerApi.V1.Value

FromData ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

FromData TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

FromData TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

FromData ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

FromData TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

FromData TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

FromData OutputDatum Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Tx

FromData TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Tx

FromData OutputDatum Source # 
Instance details

Defined in PlutusLedgerApi.V2.Tx

FromData TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Tx

FromData ChangedParameters Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

FromData ColdCommitteeCredential Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

FromData Committee Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

FromData Constitution Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

FromData DRep Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

FromData DRepCredential Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

FromData Delegatee Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

FromData GovernanceAction Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

FromData GovernanceActionId Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

FromData HotCommitteeCredential Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

FromData ProposalProcedure Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

FromData ProtocolVersion Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

FromData ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

FromData ScriptInfo Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

FromData ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

FromData TxCert Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

FromData TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

FromData TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

FromData Vote Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

FromData Voter Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

FromData ChangedParameters Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

FromData ColdCommitteeCredential Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

FromData Committee Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

FromData Constitution Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

FromData DRep Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

FromData DRepCredential Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

FromData Delegatee Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

FromData GovernanceAction Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

FromData GovernanceActionId Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

FromData HotCommitteeCredential Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

FromData ProposalProcedure Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

FromData ProtocolVersion Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

FromData ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

FromData ScriptInfo Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

FromData ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

FromData TxCert Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

FromData TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

FromData TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

FromData Vote Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

FromData Voter Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

FromData TxId Source # 
Instance details

Defined in PlutusLedgerApi.V3.Tx

FromData TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V3.Tx

FromData BuiltinBLS12_381_G1_Element 
Instance details

Defined in PlutusTx.IsData.Class

Methods

fromBuiltinData :: BuiltinData -> Maybe BuiltinBLS12_381_G1_Element #

FromData BuiltinBLS12_381_G2_Element 
Instance details

Defined in PlutusTx.IsData.Class

Methods

fromBuiltinData :: BuiltinData -> Maybe BuiltinBLS12_381_G2_Element #

(TypeError ('Text "fromBuiltinData is not supported for BuiltinBLS12_381_MlResult") :: Constraint) => FromData BuiltinBLS12_381_MlResult 
Instance details

Defined in PlutusTx.IsData.Class

Methods

fromBuiltinData :: BuiltinData -> Maybe BuiltinBLS12_381_MlResult #

FromData BuiltinByteString 
Instance details

Defined in PlutusTx.IsData.Class

FromData BuiltinData 
Instance details

Defined in PlutusTx.IsData.Class

FromData Rational 
Instance details

Defined in PlutusTx.Ratio

FromData Integer 
Instance details

Defined in PlutusTx.IsData.Class

(TypeError ('Text "Int is not supported, use Integer instead") :: Constraint) => FromData Int 
Instance details

Defined in PlutusTx.IsData.Class

FromData a => FromData (Extended a) Source # 
Instance details

Defined in PlutusLedgerApi.V1.Interval

FromData a => FromData (Interval a) Source # 
Instance details

Defined in PlutusLedgerApi.V1.Interval

FromData a => FromData (LowerBound a) Source # 
Instance details

Defined in PlutusLedgerApi.V1.Interval

FromData a => FromData (UpperBound a) Source # 
Instance details

Defined in PlutusLedgerApi.V1.Interval

FromData a => FromData [a] 
Instance details

Defined in PlutusTx.IsData.Class

(FromData k, FromData v) => FromData (Map k v) 
Instance details

Defined in PlutusTx.AssocMap

FromData (Map k a) 
Instance details

Defined in PlutusTx.Data.AssocMap

class UnsafeFromData a where #

Instances

Instances details
UnsafeFromData Void 
Instance details

Defined in PlutusTx.IsData.Class

UnsafeFromData Address Source # 
Instance details

Defined in PlutusLedgerApi.V1.Address

UnsafeFromData LedgerBytes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Bytes

UnsafeFromData ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

UnsafeFromData ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

UnsafeFromData TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

UnsafeFromData TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

UnsafeFromData Credential Source # 
Instance details

Defined in PlutusLedgerApi.V1.Credential

UnsafeFromData StakingCredential Source # 
Instance details

Defined in PlutusLedgerApi.V1.Credential

UnsafeFromData PubKeyHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Crypto

UnsafeFromData DCert Source # 
Instance details

Defined in PlutusLedgerApi.V1.DCert

UnsafeFromData ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Contexts

UnsafeFromData ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Contexts

UnsafeFromData TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Contexts

UnsafeFromData TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Contexts

UnsafeFromData TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

UnsafeFromData TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

UnsafeFromData TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

UnsafeFromData AssetClass Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Value

UnsafeFromData CurrencySymbol Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Value

UnsafeFromData Lovelace Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Value

UnsafeFromData TokenName Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Value

UnsafeFromData Value Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Value

UnsafeFromData Datum Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

UnsafeFromData DatumHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

UnsafeFromData Redeemer Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

UnsafeFromData RedeemerHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

UnsafeFromData ScriptHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

UnsafeFromData DiffMilliSeconds Source # 
Instance details

Defined in PlutusLedgerApi.V1.Time

UnsafeFromData POSIXTime Source # 
Instance details

Defined in PlutusLedgerApi.V1.Time

UnsafeFromData RedeemerPtr Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

UnsafeFromData ScriptTag Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

UnsafeFromData TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

UnsafeFromData TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

UnsafeFromData TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

UnsafeFromData AssetClass Source # 
Instance details

Defined in PlutusLedgerApi.V1.Value

UnsafeFromData CurrencySymbol Source # 
Instance details

Defined in PlutusLedgerApi.V1.Value

UnsafeFromData Lovelace Source # 
Instance details

Defined in PlutusLedgerApi.V1.Value

UnsafeFromData TokenName Source # 
Instance details

Defined in PlutusLedgerApi.V1.Value

UnsafeFromData Value Source # 
Instance details

Defined in PlutusLedgerApi.V1.Value

UnsafeFromData ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

UnsafeFromData TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

UnsafeFromData TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

UnsafeFromData ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

UnsafeFromData TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

UnsafeFromData TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

UnsafeFromData OutputDatum Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Tx

UnsafeFromData TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Tx

UnsafeFromData OutputDatum Source # 
Instance details

Defined in PlutusLedgerApi.V2.Tx

UnsafeFromData TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Tx

UnsafeFromData ChangedParameters Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

UnsafeFromData ColdCommitteeCredential Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

UnsafeFromData Committee Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

UnsafeFromData Constitution Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

UnsafeFromData DRep Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

UnsafeFromData DRepCredential Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

UnsafeFromData Delegatee Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

UnsafeFromData GovernanceAction Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

UnsafeFromData GovernanceActionId Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

UnsafeFromData HotCommitteeCredential Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

UnsafeFromData ProposalProcedure Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

UnsafeFromData ProtocolVersion Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

UnsafeFromData ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

UnsafeFromData ScriptInfo Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

UnsafeFromData ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

UnsafeFromData TxCert Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

UnsafeFromData TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

UnsafeFromData TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

UnsafeFromData Vote Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

UnsafeFromData Voter Source # 
Instance details

Defined in PlutusLedgerApi.V3.Contexts

UnsafeFromData ChangedParameters Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

UnsafeFromData ColdCommitteeCredential Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

UnsafeFromData Committee Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

UnsafeFromData Constitution Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

UnsafeFromData DRep Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

UnsafeFromData DRepCredential Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

UnsafeFromData Delegatee Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

UnsafeFromData GovernanceAction Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

UnsafeFromData GovernanceActionId Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

UnsafeFromData HotCommitteeCredential Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

UnsafeFromData ProposalProcedure Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

UnsafeFromData ProtocolVersion Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

UnsafeFromData ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

UnsafeFromData ScriptInfo Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

UnsafeFromData ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

UnsafeFromData TxCert Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

UnsafeFromData TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

UnsafeFromData TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

UnsafeFromData Vote Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

UnsafeFromData Voter Source # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

UnsafeFromData TxId Source # 
Instance details

Defined in PlutusLedgerApi.V3.Tx

UnsafeFromData TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V3.Tx

UnsafeFromData BuiltinBLS12_381_G1_Element 
Instance details

Defined in PlutusTx.IsData.Class

Methods

unsafeFromBuiltinData :: BuiltinData -> BuiltinBLS12_381_G1_Element #

UnsafeFromData BuiltinBLS12_381_G2_Element 
Instance details

Defined in PlutusTx.IsData.Class

Methods

unsafeFromBuiltinData :: BuiltinData -> BuiltinBLS12_381_G2_Element #

(TypeError ('Text "unsafeFromBuiltinData is not supported for BuiltinBLS12_381_MlResult") :: Constraint) => UnsafeFromData BuiltinBLS12_381_MlResult 
Instance details

Defined in PlutusTx.IsData.Class

Methods

unsafeFromBuiltinData :: BuiltinData -> BuiltinBLS12_381_MlResult #

UnsafeFromData BuiltinByteString 
Instance details

Defined in PlutusTx.IsData.Class

UnsafeFromData BuiltinData 
Instance details

Defined in PlutusTx.IsData.Class

UnsafeFromData Rational 
Instance details

Defined in PlutusTx.Ratio

UnsafeFromData Integer 
Instance details

Defined in PlutusTx.IsData.Class

(TypeError ('Text "Int is not supported, use Integer instead") :: Constraint) => UnsafeFromData Int 
Instance details

Defined in PlutusTx.IsData.Class

UnsafeFromData a => UnsafeFromData (Extended a) Source # 
Instance details

Defined in PlutusLedgerApi.V1.Interval

UnsafeFromData a => UnsafeFromData (Interval a) Source # 
Instance details

Defined in PlutusLedgerApi.V1.Interval

UnsafeFromData a => UnsafeFromData (LowerBound a) Source # 
Instance details

Defined in PlutusLedgerApi.V1.Interval

UnsafeFromData a => UnsafeFromData (UpperBound a) Source # 
Instance details

Defined in PlutusLedgerApi.V1.Interval

UnsafeFromData a => UnsafeFromData [a] 
Instance details

Defined in PlutusTx.IsData.Class

(UnsafeFromData k, UnsafeFromData v) => UnsafeFromData (Map k v) 
Instance details

Defined in PlutusTx.AssocMap

UnsafeFromData (Map k a) 
Instance details

Defined in PlutusTx.Data.AssocMap

toData :: ToData a => a -> Data #

Misc

class Monad m => MonadError e (m :: Type -> Type) | m -> e Source #

The strategy of combining computations that can throw exceptions by bypassing bound functions from the point an exception is thrown to the point that it is handled.

Is parameterized over the type of error information and the monad type constructor. It is common to use Either String as the monad type constructor for an error monad in which error descriptions take the form of strings. In that case and many other common cases the resulting monad is already defined as an instance of the MonadError class. You can also define your own error type and/or use a monad type constructor other than Either String or Either IOError. In these cases you will have to explicitly define instances of the MonadError class. (If you are using the deprecated Control.Monad.Error or Control.Monad.Trans.Error, you may also have to define an Error instance.)

Minimal complete definition

throwError, catchError

Instances

Instances details
MonadError IOException IO 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: IOException -> IO a Source #

catchError :: IO a -> (IOException -> IO a) -> IO a Source #

MonadError BuiltinError BuiltinResult 
Instance details

Defined in PlutusCore.Builtin.Result

Methods

throwError :: BuiltinError -> BuiltinResult a Source #

catchError :: BuiltinResult a -> (BuiltinError -> BuiltinResult a) -> BuiltinResult a Source #

MonadError () EvaluationResult 
Instance details

Defined in PlutusCore.Evaluation.Result

Methods

throwError :: () -> EvaluationResult a Source #

catchError :: EvaluationResult a -> (() -> EvaluationResult a) -> EvaluationResult a Source #

MonadError () Maybe

Since: mtl-2.2.2

Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: () -> Maybe a Source #

catchError :: Maybe a -> (() -> Maybe a) -> Maybe a Source #

MonadError e (Either e) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> Either e a Source #

catchError :: Either e a -> (e -> Either e a) -> Either e a Source #

MonadError e m => MonadError e (Free m) 
Instance details

Defined in Control.Monad.Free

Methods

throwError :: e -> Free m a Source #

catchError :: Free m a -> (e -> Free m a) -> Free m a Source #

MonadError e m => MonadError e (GenT m) 
Instance details

Defined in Hedgehog.Internal.Gen

Methods

throwError :: e -> GenT m a Source #

catchError :: GenT m a -> (e -> GenT m a) -> GenT m a Source #

MonadError e m => MonadError e (PropertyT m) 
Instance details

Defined in Hedgehog.Internal.Property

Methods

throwError :: e -> PropertyT m a Source #

catchError :: PropertyT m a -> (e -> PropertyT m a) -> PropertyT m a Source #

MonadError e m => MonadError e (TestT m) 
Instance details

Defined in Hedgehog.Internal.Property

Methods

throwError :: e -> TestT m a Source #

catchError :: TestT m a -> (e -> TestT m a) -> TestT m a Source #

MonadError e m => MonadError e (TreeT m) 
Instance details

Defined in Hedgehog.Internal.Tree

Methods

throwError :: e -> TreeT m a Source #

catchError :: TreeT m a -> (e -> TreeT m a) -> TreeT m a Source #

MonadError e m => MonadError e (ListT m) 
Instance details

Defined in ListT

Methods

throwError :: e -> ListT m a Source #

catchError :: ListT m a -> (e -> ListT m a) -> ListT m a Source #

MonadError e m => MonadError e (QuoteT m) 
Instance details

Defined in PlutusCore.Quote

Methods

throwError :: e -> QuoteT m a Source #

catchError :: QuoteT m a -> (e -> QuoteT m a) -> QuoteT m a Source #

MonadError e m => MonadError e (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

throwError :: e -> ResourceT m a Source #

catchError :: ResourceT m a -> (e -> ResourceT m a) -> ResourceT m a Source #

MonadError e m => MonadError e (MaybeT m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> MaybeT m a Source #

catchError :: MaybeT m a -> (e -> MaybeT m a) -> MaybeT m a Source #

(Functor f, MonadError e m) => MonadError e (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

throwError :: e -> FreeT f m a Source #

catchError :: FreeT f m a -> (e -> FreeT f m a) -> FreeT f m a Source #

(Monoid w, MonadError e m) => MonadError e (AccumT w m)

Since: mtl-2.3

Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> AccumT w m a Source #

catchError :: AccumT w m a -> (e -> AccumT w m a) -> AccumT w m a Source #

Monad m => MonadError e (ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> ExceptT e m a Source #

catchError :: ExceptT e m a -> (e -> ExceptT e m a) -> ExceptT e m a Source #

MonadError e m => MonadError e (IdentityT m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> IdentityT m a Source #

catchError :: IdentityT m a -> (e -> IdentityT m a) -> IdentityT m a Source #

MonadError e m => MonadError e (ReaderT r m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> ReaderT r m a Source #

catchError :: ReaderT r m a -> (e -> ReaderT r m a) -> ReaderT r m a Source #

MonadError e m => MonadError e (StateT s m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> StateT s m a Source #

catchError :: StateT s m a -> (e -> StateT s m a) -> StateT s m a Source #

MonadError e m => MonadError e (StateT s m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> StateT s m a Source #

catchError :: StateT s m a -> (e -> StateT s m a) -> StateT s m a Source #

(Monoid w, MonadError e m) => MonadError e (WriterT w m)

Since: mtl-2.3

Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> WriterT w m a Source #

catchError :: WriterT w m a -> (e -> WriterT w m a) -> WriterT w m a Source #

(Monoid w, MonadError e m) => MonadError e (WriterT w m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> WriterT w m a Source #

catchError :: WriterT w m a -> (e -> WriterT w m a) -> WriterT w m a Source #

(Monoid w, MonadError e m) => MonadError e (WriterT w m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> WriterT w m a Source #

catchError :: WriterT w m a -> (e -> WriterT w m a) -> WriterT w m a Source #

(Monoid w, MonadError e m) => MonadError e (RWST r w s m)

Since: mtl-2.3

Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> RWST r w s m a Source #

catchError :: RWST r w s m a -> (e -> RWST r w s m a) -> RWST r w s m a Source #

(Monoid w, MonadError e m) => MonadError e (RWST r w s m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> RWST r w s m a Source #

catchError :: RWST r w s m a -> (e -> RWST r w s m a) -> RWST r w s m a Source #

(Monoid w, MonadError e m) => MonadError e (RWST r w s m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> RWST r w s m a Source #

catchError :: RWST r w s m a -> (e -> RWST r w s m a) -> RWST r w s m a Source #

MonadError e m => MonadError e (DefT key uni fun ann m) 
Instance details

Defined in PlutusIR.Compiler.Definitions

Methods

throwError :: e -> DefT key uni fun ann m a Source #

catchError :: DefT key uni fun ann m a -> (e -> DefT key uni fun ann m a) -> DefT key uni fun ann m a Source #

ThrowableBuiltins uni fun => MonadError (CekEvaluationException NamedDeBruijn uni fun) (CekM uni fun s) 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Methods

throwError :: CekEvaluationException NamedDeBruijn uni fun -> CekM uni fun s a Source #

catchError :: CekM uni fun s a -> (CekEvaluationException NamedDeBruijn uni fun -> CekM uni fun s a) -> CekM uni fun s a Source #