plutus-core-1.30.0.0: Language library for Plutus Core
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusCore.Evaluation.Machine.CostingFun.SimpleJSON

Description

A JSON representation of costing functions for Plutus Core builtins which produces a simple cost model which can be used from Agda and other executables

Synopsis

Documentation

data Model Source #

This type reflects what is actually in the JSON. The stuff in CostingFun.Core and CostingFun.JSON is much more rigid, allowing parsing only for the model types applicable to the various ModelNArguments types; it also requires entries for everything in DefaultFun. Using the type defined here allows us to be more flexible and parse stuff that's not exactly what's expected in builtinCostModel.json.

Instances

Instances details
FromJSON Model Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.SimpleJSON

Methods

parseJSON ∷ Value → Parser Model

parseJSONList ∷ Value → Parser [Model]

omittedFieldMaybe Model

Show Model Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.SimpleJSON

Lift Model Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.SimpleJSON

Methods

liftQuote m ⇒ Model → m Exp Source #

liftTyped ∷ ∀ (m ∷ TypeType). Quote m ⇒ ModelCode m Model Source #

data CpuAndMemoryModel Source #

A CPU usage modelling function and a memory usage modelling function bundled together

Constructors

CpuAndMemoryModel 

Fields