Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
- iRReservesL ∷ Lens' InstantaneousRewards (Map (Credential 'Staking) Coin)
- iRTreasuryL ∷ Lens' InstantaneousRewards (Map (Credential 'Staking) Coin)
- deltaReservesL ∷ Lens' InstantaneousRewards DeltaCoin
- deltaTreasuryL ∷ Lens' InstantaneousRewards DeltaCoin
- unGenDelegsL ∷ Lens' GenDelegs (Map (KeyHash 'Genesis) GenDelegPair)
- fGenDelegSlotL ∷ Lens' FutureGenDeleg SlotNo
- fGenDelegGenKeyHashL ∷ Lens' FutureGenDeleg (KeyHash 'Genesis)
- isCredMapL ∷ Lens' IncrementalStake (Map (Credential 'Staking) Coin)
- isPtrMapL ∷ Lens' IncrementalStake (Map Ptr Coin)
- nmLikelihoodsL ∷ Lens' NonMyopic (Map (KeyHash 'StakePool) [Float])
- nmRewardPotL ∷ Lens' NonMyopic Coin
- spRewL ∷ Lens' Split (Map (Credential 'Staking) Coin)
- spDepL ∷ Lens' Split (Map (Credential 'Staking) Coin)
- spDelL ∷ Lens' Split (Map (Credential 'Staking) (KeyHash 'StakePool))
- spRevPtrL ∷ Lens' Split (Map (Credential 'Staking) (Set Ptr))
- spPtrL ∷ Lens' Split (Map Ptr (Credential 'Staking))
- spDRepL ∷ Lens' Split (Map (Credential 'Staking) DRep)
- data Split = Split {}
- splitUMap ∷ UMap → Split
- unSplitUMap ∷ Split → UMap
- rewardsUMapL ∷ Lens' UMap (Map (Credential 'Staking) Coin)
- stakeDepositsUMapL ∷ Lens' UMap (Map (Credential 'Staking) Coin)
- ptrsUMapL ∷ Lens' UMap (Map Ptr (Credential 'Staking))
- delegationsUMapL ∷ Lens' UMap (Map (Credential 'Staking) (KeyHash 'StakePool))
- drepUMapL ∷ Lens' UMap (Map (Credential 'Staking) DRep)
- strictMaybeToMaybeL ∷ Lens' (StrictMaybe x) (Maybe x)
- idLens ∷ Lens' a a
- strictSeqListL ∷ Lens' (StrictSeq a) [a]
- mapCompactFormCoinL ∷ Lens' (Map a (CompactForm Coin)) (Map a Coin)
- pairL ∷ Lens' x y → Lens' a b → Lens' (x, a) (y, b)
- utxoFL ∷ Proof era → Lens' (Map TxIn (TxOutF era)) (UTxO era)
- fstL ∷ Lens' (a, b) a
- sndL ∷ Lens' (a, b) b
Documentation
Abstract view of the UMap
unSplitUMap ∷ Split → UMap Source #
The concretization function from abstract (Split) to concrete (UMap)
rewardsUMapL ∷ Lens' UMap (Map (Credential 'Staking) Coin) Source #
stakeDepositsUMapL ∷ Lens' UMap (Map (Credential 'Staking) Coin) Source #
delegationsUMapL ∷ Lens' UMap (Map (Credential 'Staking) (KeyHash 'StakePool)) Source #
strictMaybeToMaybeL ∷ Lens' (StrictMaybe x) (Maybe x) Source #
strictSeqListL ∷ Lens' (StrictSeq a) [a] Source #
mapCompactFormCoinL ∷ Lens' (Map a (CompactForm Coin)) (Map a Coin) Source #
utxoFL ∷ Proof era → Lens' (Map TxIn (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 ) (TxOutF era) -> UTxO era