| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
PlutusCore.Evaluation.Machine.ExBudget
Synopsis
- data ExBudget = ExBudget {}
- minusExBudget :: ExBudget -> ExBudget -> ExBudget
- class ExBudgetBuiltin fun exBudgetCat where
- exBudgetBuiltin :: fun -> exBudgetCat
- newtype ExRestrictingBudget = ExRestrictingBudget {}
- data LowerInitialCharacter
- largeBudget :: ExRestrictingBudget
- enormousBudget :: ExRestrictingBudget
Documentation
Constructors
| ExBudget | |
Fields | |
Instances
| Decoder s [ExBudget] # | |
| PrettyBy config ExBudget # | |
Defined in PlutusCore.Evaluation.Machine.ExBudget | |
| Lift ExBudget # | |
| type Rep ExBudget # | |
Defined in PlutusCore.Evaluation.Machine.ExBudget type Rep ExBudget = D1 ('MetaData "ExBudget" "PlutusCore.Evaluation.Machine.ExBudget" "plutus-core-1.60.0.0-inplace" 'False) (C1 ('MetaCons "ExBudget" 'PrefixI 'True) (S1 ('MetaSel ('Just "exBudgetCPU") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ExCPU) :*: S1 ('MetaSel ('Just "exBudgetMemory") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ExMemory))) | |
minusExBudget :: ExBudget -> ExBudget -> ExBudget #
Subtract one ExBudget from another. Does not guarantee that the result is positive.
class ExBudgetBuiltin fun exBudgetCat where #
A class for injecting a Builtin into an exBudgetCat.
We need it, because the constant application machinery calls spendBudget before reducing a
constant application and we want to be general over exBudgetCat there, but still track the
built-in functions category, hence the ad hoc polymorphism.
Methods
exBudgetBuiltin :: fun -> exBudgetCat #
Instances
| ExBudgetBuiltin fun () # | A dummy |
Defined in PlutusCore.Evaluation.Machine.ExBudget Methods exBudgetBuiltin :: fun -> () # | |
| ExBudgetBuiltin fun (ExBudgetCategory fun) # | |
Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal Methods exBudgetBuiltin :: fun -> ExBudgetCategory fun # | |
newtype ExRestrictingBudget #
Constructors
| ExRestrictingBudget | |
Fields | |
Instances
data LowerInitialCharacter #
This is used elsewhere to convert cost models into JSON objects where the names of the fields are exactly the same as the names of the builtins.
Instances
| StringModifier LowerInitialCharacter # | |
Defined in PlutusCore.Evaluation.Machine.ExBudget Methods getStringModifier :: String -> String # | |
largeBudget :: ExRestrictingBudget #
When we want to just evaluate the program that is intended to run out of budget we use the
Restricting mode with this big budget designed to make the CEK machine terminate in a
fraction of a second on the reference machine.
enormousBudget :: ExRestrictingBudget #
When we want to just evaluate the program we use the Restricting mode with an enormous
budget, so that evaluation costs of on-chain budgeting are reflected accurately in benchmarks.