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.SimplePParams

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 EraPP provides this era parametric abstraction.

Synopsis

Documentation

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

Instances

Instances details
EraPP Allegra Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.SimplePParams

EraPP Alonzo Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.SimplePParams

EraPP Babbage Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.SimplePParams

EraPP Conway Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.SimplePParams

EraPP Mary Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.SimplePParams

EraPP Shelley Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.SimplePParams

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
(EraPP era, Reflect era, BaseUniverse fn) ⇒ HasSpec fn (SimplePParams era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.InstancesBasic

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.InstancesBasic

Associated Types

type Rep (SimplePParams era) ∷ TypeType Source #

Methods

fromSimplePParams era → Rep (SimplePParams era) x Source #

toRep (SimplePParams era) x → SimplePParams era Source #

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

Defined in Test.Cardano.Ledger.Constrained.Conway.InstancesBasic

HasSimpleRep (SimplePParams era) Source #

Use then generic HasSimpleRep and HasSpec instances for SimplePParams

Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.InstancesBasic

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.InstancesBasic

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.InstancesBasic

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

Defined in Test.Cardano.Ledger.Constrained.Conway.InstancesBasic

type Rep (SimplePParams era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.InstancesBasic

type Rep (SimplePParams era) = D1 ('MetaData "SimplePParams" "Test.Cardano.Ledger.Constrained.Conway.InstancesBasic" "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.InstancesBasic

type TheSop (SimplePParams era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.InstancesBasic

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.InstancesBasic

Associated Types

type Rep SimplePPUpdateTypeType Source #

Show SimplePPUpdate Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.InstancesBasic

HasSimpleRep SimplePPUpdate Source #

Use the generic HasSimpleRep and HasSpec instances for SimplePParams

Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.InstancesBasic

Eq SimplePPUpdate Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.InstancesBasic

BaseUniverse fn ⇒ HasSpec fn SimplePPUpdate Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.InstancesBasic

type Rep SimplePPUpdate Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.InstancesBasic

type Rep SimplePPUpdate = D1 ('MetaData "SimplePPUpdate" "Test.Cardano.Ledger.Constrained.Conway.InstancesBasic" "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.InstancesBasic

type TheSop SimplePPUpdate Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.InstancesBasic

type Prerequisites fn SimplePPUpdate Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.InstancesBasic

type TypeSpec fn SimplePPUpdate Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.InstancesBasic

simplePParamsSpec ∷ ∀ fn era. (EraPP 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 #

minFeeA_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #

minFeeB_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #

maxBBSize_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Word32 Source #

maxTxSize_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Word32 Source #

maxBHSize_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Word32 Source #

keyDeposit_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #

poolDeposit_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #

eMax_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn EpochInterval Source #

nOpt_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Natural Source #

rho_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn UnitInterval Source #

tau_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn UnitInterval Source #

minUTxOValue_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #

minPoolCost_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #

prices_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Prices Source #

maxValSize_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Natural Source #

dRepDeposit_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #

Orphan instances

EraPP Allegra Source # 
Instance details

EraPP Alonzo Source # 
Instance details

EraPP Babbage Source # 
Instance details

EraPP Conway Source # 
Instance details

EraPP Mary Source # 
Instance details

EraPP Shelley Source # 
Instance details