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

Description

Define Lenses that facilitate accessing the types in the Var Model. Note the types in the Model, are often wrapped in a newtype in the real state, or they are embedded in something like UMap to save space. So we need interesting Lenses to make this possible. Many other (more standard) Lenses are defined in Cardano.Ledger.Shelley.LedgerState

Synopsis

Documentation

data Split c Source #

Abstract view of the UMap

splitUMapUMap c → Split c Source #

The abstraction function, from concrete (UMap) to abstract (Split)

unSplitUMapSplit c → UMap c Source #

The concretization function from abstract (Split) to concrete (UMap)

pairLLens' x y → Lens' a b → Lens' (x, a) (y, b) Source #

utxoFLProof era → Lens' (Map (TxIn (EraCrypto era)) (TxOutF era)) (UTxO era) Source #

Lens to convert from the abstract type UtxO type of the Model, to the concrete UTxO type. The mode uses the type family abstraction TxOutF, and does not wrap the map with the UtxO constructor. Note the getter is liftUTxO from Test.Cardano.Ledger.Constrained.Classes liftUTxO :: Map (TxIn (EraCrypto era)) (TxOutF era) -> UTxO era

fstLLens' (a, b) a Source #

sndLLens' (a, b) b Source #