HORIZON HASKELLDocslts/ghc-9.14.x99ffbb82026-10-19Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · 99ffbb8 · 2026-10-19

Modulecardano-ledger-shelley-test-1.9.0.0Haskell2010

Test.Cardano.Ledger.Shelley.Generator.Core

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

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%).