| 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
minusExBudget ∷ ExBudget → ExBudget → ExBudget Source #
Subtract one ExBudget from another. Does not guarantee that the result is positive.
class ExBudgetBuiltin fun exBudgetCat where Source #
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 Source #
Instances
| ExBudgetBuiltin fun () Source # | A dummy |
Defined in PlutusCore.Evaluation.Machine.ExBudget Methods exBudgetBuiltin ∷ fun → () Source # | |
| ExBudgetBuiltin fun (ExBudgetCategory fun) Source # | |
Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal Methods exBudgetBuiltin ∷ fun → ExBudgetCategory fun Source # | |
newtype ExRestrictingBudget Source #
Constructors
| ExRestrictingBudget | |
Fields | |
Instances
| Monoid ExRestrictingBudget Source # | |
| Semigroup ExRestrictingBudget Source # | |
| Show ExRestrictingBudget Source # | |
Defined in PlutusCore.Evaluation.Machine.ExBudget | |
| NFData ExRestrictingBudget Source # | |
Defined in PlutusCore.Evaluation.Machine.ExBudget Methods rnf ∷ ExRestrictingBudget → () Source # | |
| Eq ExRestrictingBudget Source # | |
Defined in PlutusCore.Evaluation.Machine.ExBudget Methods (==) ∷ ExRestrictingBudget → ExRestrictingBudget → Bool Source # (/=) ∷ ExRestrictingBudget → ExRestrictingBudget → Bool Source # | |
| Pretty ExRestrictingBudget Source # | |
Defined in PlutusCore.Evaluation.Machine.ExBudget Methods pretty ∷ ExRestrictingBudget → Doc ann Source # prettyList ∷ [ExRestrictingBudget] → Doc ann Source # | |
| PrettyBy config ExRestrictingBudget Source # | |
Defined in PlutusCore.Evaluation.Machine.ExBudget Methods prettyBy ∷ config → ExRestrictingBudget → Doc ann Source # prettyListBy ∷ config → [ExRestrictingBudget] → Doc ann Source # | |
data LowerInitialCharacter Source #
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 Source # | |
Defined in PlutusCore.Evaluation.Machine.ExBudget Methods | |
largeBudget ∷ ExRestrictingBudget Source #
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 Source #
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.