HORIZON HASKELLDocslts/ghc-9.14.xd82dee82026-10-12Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · d82dee8 · 2026-10-12

Modulecardano-ledger-shelley-test-1.9.0.0Haskell2010

Test.Cardano.Ledger.Shelley.Generator.Core

  • 12 types
  • 27 values
datadata GenEnv c era
#

Generator environment.

Constructors

Instances4HasTrace
datadata ScriptSpace era
#

Constructors

Instances1Show
  • Show (Script era) => Show (ScriptSpace era)Defined in cardano-ledger-shelley-test-1.9.0.0 · Test.Cardano.Ledger.Shelley.Generator.Core
datadata KeySpace c era
#

Collection of all keys which are required to generate a trace.

These are the _only_ keys which should be involved in the trace.

Constructors

Instances1Show
  • (Era era, Show (Script era), Crypto c) => Show (KeySpace c era)Defined in cardano-ledger-shelley-test-1.9.0.0 · Test.Cardano.Ledger.Shelley.Generator.Core
valuefindPayKeyPairCred
  1. :: Credential kr
  2. -> Map (KeyHash kr) (KeyPair kr)
  3. -> KeyPair kr
#

Find first matching key pair for a credential. Returns the matching key pair where the first element of the pair matched the hash in addr.

valuegenTxOut :: EraTxOut era => Gen (Value era) -> [Addr] -> Gen [TxOut era]
#

Generates a list of coins for the given Addr and produced a TxOut for each Addr

Note: we need to keep the initial utxo coin sizes large enough so that when we simulate sequences of transactions, we have enough funds available to include certificates that require deposits.

valuegenesisCoins :: TxId -> [TxOut era] -> UTxO era
#

Creates the UTxO for a new ledger with the specified genesis TxId and transaction outputs.

valueincreasingProbabilityAt :: Gen a -> (a, a) -> Gen a
#

Generate values the given distribution in 90% of the cases, and values at the bounds of the range in 10% of the cases.

This can be used to generate enough extreme values. The exponential and linear distributions provided by hedgehog will generate a small percentage of these (0-1%).

valuetooLateInEpoch :: SlotNo -> Bool
#

True if the given slot is within the last `2 * stabilityWindow` slots of the current epoch.

typetype PreAlonzo era = TxWits era ~ ShelleyTxWits era
#

For use in the Serialisation and Example Tests, which assume Shelley, Allegra, or Mary Eras.