Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type MCostModel = CostModel MCekMachineCosts MBuiltinCostModel
- type MCekMachineCosts = CekMachineCostsBase Maybe
- type MBuiltinCostModel = BuiltinCostModelBase MCostingFun
- toMCostModel ∷ CostModel CekMachineCosts BuiltinCostModel → MCostModel
- extractCostModelParamsLedgerOrder ∷ (IsParamName p, Ord p) ⇒ MCostModel → Maybe (Map p Int64)
Documentation
toMCostModel ∷ CostModel CekMachineCosts BuiltinCostModel → MCostModel Source #
A helper function to lift to a "full" MCostModel
, by mapping *all* of its fields to Just
.
The fields can be later on cleared, by assigning them to Nothing
.
extractCostModelParamsLedgerOrder ∷ (IsParamName p, Ord p) ⇒ MCostModel → Maybe (Map p Int64) Source #
A variant of extractCostModelParams
to make a mapping of params not in alphabetical order,
but in the ParamName
order, i.e. the order expected by the ledger.
Here, overconstrained to MCostModel
, but it could also work with `CostModel mcosts bcosts`.