cardano-ledger-core-1.16.0.0: Core components of Cardano ledgers from the Shelley release on.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Cardano.Ledger.Core.Arbitrary

Synopsis

Documentation

genBadPtrGen Ptr Source #

Generate a Ptr with full 64bit range for values. Not allowed starting in Babbage

Plutus

Utils

Will need to find a better home in the future

uniformSubSet Source #

Arguments

∷ (StatefulGen g m, Ord k) 
Maybe Int

Size of the subset. If supplied will be clamped to [0, Set.size s] interval, otherwise will be generated randomly.

Set k 
→ g 
→ m (Set k) 

uniformSubMap Source #

Arguments

∷ (StatefulGen g m, Ord k) 
Maybe Int

Size of the subMap. If supplied will be clamped to [0, Map.size s] interval, otherwise will be generated randomly.

Map k v 
→ g 
→ m (Map k v) 

uniformSubMapElems Source #

Arguments

∷ (StatefulGen g m, Monoid f) 
⇒ (k → v → f → f) 
Maybe Int

Size of the subMap. If supplied will be clamped to [0, Map.size s] interval, otherwise will be generated randomly.

Map k v 
→ g 
→ m f 

Orphan instances

Arbitrary AddrAttributes Source # 
Instance details

Arbitrary Address Source # 
Instance details

Arbitrary ActiveSlotCoeff Source # 
Instance details

Arbitrary CertIx Source # 
Instance details

Arbitrary DnsName Source # 
Instance details

Arbitrary Network Source # 
Instance details

Arbitrary NonNegativeInterval Source #

Decimal numbers only

Instance details

Arbitrary Nonce Source # 
Instance details

Arbitrary Port Source # 
Instance details

Arbitrary PositiveInterval Source #

Decimal numbers only

Instance details

Arbitrary PositiveUnitInterval Source #

Decimal numbers only

Instance details

Arbitrary ProtVer Source # 
Instance details

Arbitrary TxIx Source # 
Instance details

Arbitrary UnitInterval Source #

Decimal numbers only

Instance details

Arbitrary Url Source # 
Instance details

Methods

arbitraryGen Url Source #

shrinkUrl → [Url] Source #

Arbitrary Coin Source # 
Instance details

Arbitrary DeltaCoin Source # 
Instance details

Arbitrary Ptr Source # 
Instance details

Methods

arbitraryGen Ptr Source #

shrinkPtr → [Ptr] Source #

Arbitrary ChainCode Source # 
Instance details

Arbitrary CostModel Source # 
Instance details

Arbitrary CostModels Source #

This Arbitrary instance assumes the inflexible deserialization scheme prior to version 9.

Instance details

Arbitrary ExUnits Source # 
Instance details

Arbitrary Prices Source # 
Instance details

Arbitrary Language Source # 
Instance details

Arbitrary PoolMetadata Source # 
Instance details

Arbitrary SizeOfPoolOwners Source # 
Instance details

Arbitrary SizeOfPoolRelays Source # 
Instance details

Arbitrary StakePoolRelay Source # 
Instance details

Arbitrary RewardType Source # 
Instance details

Arbitrary RDPair Source # 
Instance details

Arbitrary EpochInterval Source # 
Instance details

GenValid ActiveSlotCoeff Source # 
Instance details

GenValid NonNegativeInterval Source # 
Instance details

GenValid PositiveInterval Source # 
Instance details

GenValid PositiveUnitInterval Source # 
Instance details

GenValid UnitInterval Source # 
Instance details

Validity ActiveSlotCoeff Source # 
Instance details

Validity NonNegativeInterval Source # 
Instance details

Validity PositiveInterval Source # 
Instance details

Validity PositiveUnitInterval Source # 
Instance details

Validity UnitInterval Source # 
Instance details

(Era era, EncCBOR (f era), Arbitrary (f era)) ⇒ Arbitrary (Sized (f era)) Source # 
Instance details

Methods

arbitraryGen (Sized (f era)) Source #

shrinkSized (f era) → [Sized (f era)] Source #

Arbitrary (Attributes AddrAttributes) Source # 
Instance details

Crypto c ⇒ Arbitrary (Addr c) Source # 
Instance details

Methods

arbitraryGen (Addr c) Source #

shrinkAddr c → [Addr c] Source #

Arbitrary (BootstrapAddress c) Source # 
Instance details

Crypto c ⇒ Arbitrary (CompactAddr c) Source # 
Instance details

Crypto c ⇒ Arbitrary (RewardAccount c) Source # 
Instance details

Crypto c ⇒ Arbitrary (Withdrawals c) Source # 
Instance details

Crypto c ⇒ Arbitrary (AuxiliaryDataHash c) Source # 
Instance details

Crypto c ⇒ Arbitrary (Anchor c) Source # 
Instance details

Methods

arbitraryGen (Anchor c) Source #

shrinkAnchor c → [Anchor c] Source #

Crypto c ⇒ Arbitrary (BlocksMade c) Source # 
Instance details

Era era ⇒ Arbitrary (CertState era) Source # 
Instance details

Methods

arbitraryGen (CertState era) Source #

shrinkCertState era → [CertState era] Source #

Crypto c ⇒ Arbitrary (CommitteeAuthorization c) Source # 
Instance details

Era era ⇒ Arbitrary (CommitteeState era) Source # 
Instance details

Era era ⇒ Arbitrary (DState era) Source # 
Instance details

Methods

arbitraryGen (DState era) Source #

shrinkDState era → [DState era] Source #

Crypto c ⇒ Arbitrary (FutureGenDeleg c) Source # 
Instance details

Crypto c ⇒ Arbitrary (InstantaneousRewards c) Source # 
Instance details

Era era ⇒ Arbitrary (PState era) Source # 
Instance details

Methods

arbitraryGen (PState era) Source #

shrinkPState era → [PState era] Source #

Era era ⇒ Arbitrary (VState era) Source # 
Instance details

Methods

arbitraryGen (VState era) Source #

shrinkVState era → [VState era] Source #

Arbitrary (CompactForm Coin) Source # 
Instance details

(Era era, Arbitrary (PParamsHKD Identity era)) ⇒ Arbitrary (PParams era) Source # 
Instance details

Methods

arbitraryGen (PParams era) Source #

shrinkPParams era → [PParams era] Source #

(Era era, Arbitrary (PParamsHKD StrictMaybe era)) ⇒ Arbitrary (PParamsUpdate era) Source # 
Instance details

Crypto c ⇒ Arbitrary (PoolCert c) Source # 
Instance details

Crypto c ⇒ Arbitrary (StakeReference c) Source # 
Instance details

Crypto c ⇒ Arbitrary (DRep c) Source # 
Instance details

Methods

arbitraryGen (DRep c) Source #

shrinkDRep c → [DRep c] Source #

Crypto c ⇒ Arbitrary (DRepState c) Source # 
Instance details

Crypto c ⇒ Arbitrary (SnapShot c) Source # 
Instance details

Crypto c ⇒ Arbitrary (SnapShots c) Source # 
Instance details

Crypto c ⇒ Arbitrary (Stake c) Source #

In the system, Stake never contains more than the sum of all Ada (which is constant). This makes it safe to store individual Coins (in CompactForm) as Word64. But we must be careful that we never generate Stake where the sum of all the coins exceeds (maxBound :: Word64) There will never be a real Stake in the system with that many Ada, because total Ada is constant. So using a restricted Arbitrary Generator is OK.

Instance details

Methods

arbitraryGen (Stake c) Source #

shrinkStake c → [Stake c] Source #

Arbitrary (NoUpdate a) Source # 
Instance details

Crypto c ⇒ Arbitrary (ScriptHash c) Source # 
Instance details

Crypto c ⇒ Arbitrary (BootstrapWitness c) Source # 
Instance details

Crypto c ⇒ Arbitrary (GenDelegPair c) Source # 
Instance details

Crypto c ⇒ Arbitrary (GenDelegs c) Source # 
Instance details

Crypto c ⇒ Arbitrary (IndividualPoolStake c) Source # 
Instance details

Crypto c ⇒ Arbitrary (PoolDistr c) Source # 
Instance details

Crypto c ⇒ Arbitrary (PoolParams c) Source # 
Instance details

Crypto c ⇒ Arbitrary (Reward c) Source # 
Instance details

Methods

arbitraryGen (Reward c) Source #

shrinkReward c → [Reward c] Source #

Crypto c ⇒ Arbitrary (TxId c) Source # 
Instance details

Methods

arbitraryGen (TxId c) Source #

shrinkTxId c → [TxId c] Source #

Crypto c ⇒ Arbitrary (TxIn c) Source # 
Instance details

Methods

arbitraryGen (TxIn c) Source #

shrinkTxIn c → [TxIn c] Source #

Crypto c ⇒ Arbitrary (UMElem c) Source # 
Instance details

Methods

arbitraryGen (UMElem c) Source #

shrinkUMElem c → [UMElem c] Source #

Crypto c ⇒ Arbitrary (UMap c) Source # 
Instance details

Methods

arbitraryGen (UMap c) Source #

shrinkUMap c → [UMap c] Source #

(EraTxOut era, Arbitrary (TxOut era)) ⇒ Arbitrary (UTxO era) Source # 
Instance details

Methods

arbitraryGen (UTxO era) Source #

shrinkUTxO era → [UTxO era] Source #

Arbitrary a ⇒ Arbitrary (Mismatch r a) Source # 
Instance details

Methods

arbitraryGen (Mismatch r a) Source #

shrinkMismatch r a → [Mismatch r a] Source #

Crypto c ⇒ Arbitrary (Credential r c) Source # 
Instance details

Methods

arbitraryGen (Credential r c) Source #

shrinkCredential r c → [Credential r c] Source #

Crypto c ⇒ Arbitrary (KeyHash r c) Source # 
Instance details

Methods

arbitraryGen (KeyHash r c) Source #

shrinkKeyHash r c → [KeyHash r c] Source #

DSIGNAlgorithm (DSIGN c) ⇒ Arbitrary (VKey kd c) Source # 
Instance details

Methods

arbitraryGen (VKey kd c) Source #

shrinkVKey kd c → [VKey kd c] Source #

Crypto c ⇒ Arbitrary (VRFVerKeyHash r c) Source # 
Instance details

(Typeable kr, Crypto c) ⇒ Arbitrary (WitVKey kr c) Source # 
Instance details

Methods

arbitraryGen (WitVKey kr c) Source #

shrinkWitVKey kr c → [WitVKey kr c] Source #

Crypto c ⇒ Arbitrary (SafeHash c i) Source # 
Instance details

Methods

arbitraryGen (SafeHash c i) Source #

shrinkSafeHash c i → [SafeHash c i] Source #