cardano-ledger-test-9.9.9.9: Testing harness, tests and benchmarks for Shelley style cardano ledgers
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Cardano.Ledger.Constrained.Conway.Instances.PParams

Description

This module provides the necessary instances of HasSpec and HasSimpleRep for the components of PParams. It hides the fact that (PParams era) can have different underlying 'data' types in each era, and provides (Term fn) selector functions (e.g. minFeeA_, minFeeB_, etc.) for every PParam field (in every era). The class EraSpecPParams provides this era parametric abstraction. and instances of EraSpecPParams are defined here.

Synopsis

Documentation

class (Reflect era, Eq (PParamsHKD Identity era), Show (PParamsHKD Identity era), Eq (PParamsHKD StrictMaybe era), Show (PParamsHKD StrictMaybe era), EraPParams era) ⇒ EraSpecPParams era where Source #

Instances

Instances details
EraSpecPParams Allegra Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.PParams

EraSpecPParams Alonzo Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.PParams

EraSpecPParams Babbage Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.PParams

EraSpecPParams Conway Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.PParams

EraSpecPParams Mary Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.PParams

EraSpecPParams Shelley Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.PParams

data SimplePParams era Source #

Use this as the SimpleRep of (PParams era). It is polymorphic enough to encode PParams in EVERY Era. The EraPParams instances remove the fields that do not appear in that Era.

Instances

Instances details
(EraSpecPParams era, Reflect era, BaseUniverse fn) ⇒ HasSpec fn (SimplePParams era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

Associated Types

type TypeSpec fn (SimplePParams era) Source #

type Prerequisites fn (SimplePParams era) Source #

Generic (SimplePParams era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

Associated Types

type Rep (SimplePParams era) ∷ TypeType Source #

Methods

fromSimplePParams era → Rep (SimplePParams era) x Source #

toRep (SimplePParams era) x → SimplePParams era Source #

(EraSpecPParams era, Reflect era) ⇒ Show (SimplePParams era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

HasSimpleRep (SimplePParams era) Source #

Use then generic HasSimpleRep and HasSpec instances for SimplePParams

Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

Associated Types

type SimpleRep (SimplePParams era) Source #

type TheSop (SimplePParams era) ∷ [Type] Source #

Eq (SimplePParams era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

Methods

(==)SimplePParams era → SimplePParams era → Bool Source #

(/=)SimplePParams era → SimplePParams era → Bool Source #

type Prerequisites fn (SimplePParams era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

type Prerequisites fn (SimplePParams era) = ()
type TypeSpec fn (SimplePParams era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

type Rep (SimplePParams era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

type Rep (SimplePParams era) = D1 ('MetaData "SimplePParams" "Test.Cardano.Ledger.Constrained.Conway.Instances.Basic" "cardano-ledger-test-9.9.9.9-inplace" 'False) (C1 ('MetaCons "SimplePParams" 'PrefixI 'True) (((((S1 ('MetaSel ('Just "minFeeA") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Coin) :*: S1 ('MetaSel ('Just "minFeeB") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Coin)) :*: (S1 ('MetaSel ('Just "maxBBSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32) :*: S1 ('MetaSel ('Just "maxTxSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32))) :*: ((S1 ('MetaSel ('Just "maxBHSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32) :*: S1 ('MetaSel ('Just "keyDeposit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Coin)) :*: (S1 ('MetaSel ('Just "poolDeposit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Coin) :*: S1 ('MetaSel ('Just "eMax") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EpochInterval)))) :*: (((S1 ('MetaSel ('Just "nOpt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural) :*: S1 ('MetaSel ('Just "a0") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NonNegativeInterval)) :*: (S1 ('MetaSel ('Just "rho") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnitInterval) :*: S1 ('MetaSel ('Just "tau") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnitInterval))) :*: ((S1 ('MetaSel ('Just "decentral") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnitInterval) :*: S1 ('MetaSel ('Just "protocolVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ProtVer)) :*: (S1 ('MetaSel ('Just "minUTxOValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Coin) :*: (S1 ('MetaSel ('Just "minPoolCost") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Coin) :*: S1 ('MetaSel ('Just "coinsPerUTxOWord") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Coin)))))) :*: ((((S1 ('MetaSel ('Just "costModels") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CostModels) :*: S1 ('MetaSel ('Just "prices") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Prices)) :*: (S1 ('MetaSel ('Just "maxTxExUnits") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ExUnits) :*: S1 ('MetaSel ('Just "maxBlockExUnits") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ExUnits))) :*: ((S1 ('MetaSel ('Just "maxValSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural) :*: S1 ('MetaSel ('Just "collateralPercentage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural)) :*: (S1 ('MetaSel ('Just "maxCollateralInputs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural) :*: S1 ('MetaSel ('Just "coinsPerUTxOByte") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Coin)))) :*: (((S1 ('MetaSel ('Just "poolVotingThresholds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PoolVotingThresholds) :*: S1 ('MetaSel ('Just "drepVotingThresholds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DRepVotingThresholds)) :*: (S1 ('MetaSel ('Just "committeeMinSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural) :*: S1 ('MetaSel ('Just "committeeMaxTermLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EpochInterval))) :*: ((S1 ('MetaSel ('Just "govActionLifetime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EpochInterval) :*: S1 ('MetaSel ('Just "govActionDeposit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Coin)) :*: (S1 ('MetaSel ('Just "dRepDeposit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Coin) :*: (S1 ('MetaSel ('Just "dRepActivity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EpochInterval) :*: S1 ('MetaSel ('Just "minFeeRefScriptCostPerByte") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NonNegativeInterval))))))))
type SimpleRep (SimplePParams era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

type TheSop (SimplePParams era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

data SimplePPUpdate Source #

Use this as the SimpleRep of (PParamsUpdate era)

Instances

Instances details
Generic SimplePPUpdate Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

Associated Types

type Rep SimplePPUpdateTypeType Source #

Show SimplePPUpdate Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

HasSimpleRep SimplePPUpdate Source #

Use the generic HasSimpleRep and HasSpec instances for SimplePParams

Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

Eq SimplePPUpdate Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

BaseUniverse fn ⇒ HasSpec fn SimplePPUpdate Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

type Rep SimplePPUpdate Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

type Rep SimplePPUpdate = D1 ('MetaData "SimplePPUpdate" "Test.Cardano.Ledger.Constrained.Conway.Instances.Basic" "cardano-ledger-test-9.9.9.9-inplace" 'False) (C1 ('MetaCons "SimplePPUpdate" 'PrefixI 'True) (((((S1 ('MetaSel ('Just "uminFeeA") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe Coin)) :*: S1 ('MetaSel ('Just "uminFeeB") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe Coin))) :*: (S1 ('MetaSel ('Just "umaxBBSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe Word32)) :*: S1 ('MetaSel ('Just "umaxTxSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe Word32)))) :*: ((S1 ('MetaSel ('Just "umaxBHSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe Word32)) :*: S1 ('MetaSel ('Just "ukeyDeposit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe Coin))) :*: (S1 ('MetaSel ('Just "upoolDeposit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe Coin)) :*: S1 ('MetaSel ('Just "ueMax") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe EpochInterval))))) :*: (((S1 ('MetaSel ('Just "unOpt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe Natural)) :*: S1 ('MetaSel ('Just "ua0") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe NonNegativeInterval))) :*: (S1 ('MetaSel ('Just "urho") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe UnitInterval)) :*: S1 ('MetaSel ('Just "utau") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe UnitInterval)))) :*: ((S1 ('MetaSel ('Just "udecentral") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe UnitInterval)) :*: S1 ('MetaSel ('Just "uprotocolVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe ProtVer))) :*: (S1 ('MetaSel ('Just "uminUTxOValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe Coin)) :*: (S1 ('MetaSel ('Just "uminPoolCost") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe Coin)) :*: S1 ('MetaSel ('Just "ucoinsPerUTxOWord") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe Coin))))))) :*: ((((S1 ('MetaSel ('Just "ucostModels") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe CostModels)) :*: S1 ('MetaSel ('Just "uprices") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe Prices))) :*: (S1 ('MetaSel ('Just "umaxTxExUnits") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe ExUnits)) :*: S1 ('MetaSel ('Just "umaxBlockExUnits") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe ExUnits)))) :*: ((S1 ('MetaSel ('Just "umaxValSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe Natural)) :*: S1 ('MetaSel ('Just "ucollateralPercentage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe Natural))) :*: (S1 ('MetaSel ('Just "umaxCollateralInputs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe Natural)) :*: S1 ('MetaSel ('Just "ucoinsPerUTxOByte") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe Coin))))) :*: (((S1 ('MetaSel ('Just "upoolVotingThresholds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe PoolVotingThresholds)) :*: S1 ('MetaSel ('Just "udrepVotingThresholds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe DRepVotingThresholds))) :*: (S1 ('MetaSel ('Just "ucommitteeMinSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe Natural)) :*: S1 ('MetaSel ('Just "ucommitteeMaxTermLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe EpochInterval)))) :*: ((S1 ('MetaSel ('Just "ugovActionLifetime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe EpochInterval)) :*: S1 ('MetaSel ('Just "ugovActionDeposit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe Coin))) :*: (S1 ('MetaSel ('Just "udRepDeposit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe Coin)) :*: (S1 ('MetaSel ('Just "udRepActivity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe EpochInterval)) :*: S1 ('MetaSel ('Just "uminFeeRefScriptCostPerByte") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictMaybe NonNegativeInterval)))))))))
type SimpleRep SimplePPUpdate Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

type TheSop SimplePPUpdate Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

type Prerequisites fn SimplePPUpdate Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

type TypeSpec fn SimplePPUpdate Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

simplePParamsSpec ∷ ∀ fn era. (EraSpecPParams era, BaseUniverse fn) ⇒ Specification fn (SimplePParams era) Source #

A sample of how to constrain (PParams era) for every Era, by writing a specification for SimplePParams. Constrained but not applicable fields (for that era) are elided in the result. Missing fields are left unconstrained and will appear as random values in the result. This can easily be lifted to PParams: see Test.Cardano.Ledger.Constrained.Conway.PParams(pparamsSpec)

cSJust_ ∷ (HasSpec fn a, IsNormalType a) ⇒ Term fn a → Term fn (StrictMaybe a) Source #

Orphan instances

EraSpecPParams Allegra Source # 
Instance details

EraSpecPParams Alonzo Source # 
Instance details

EraSpecPParams Babbage Source # 
Instance details

EraSpecPParams Conway Source # 
Instance details

EraSpecPParams Mary Source # 
Instance details

EraSpecPParams Shelley Source # 
Instance details