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 c) (Map (Credential 'Staking c) Coin)
- iRTreasuryL ∷ Lens' (InstantaneousRewards c) (Map (Credential 'Staking c) Coin)
- deltaReservesL ∷ Lens' (InstantaneousRewards c) DeltaCoin
- deltaTreasuryL ∷ Lens' (InstantaneousRewards c) DeltaCoin
- unGenDelegsL ∷ Lens' (GenDelegs c) (Map (KeyHash 'Genesis c) (GenDelegPair c))
- fGenDelegSlotL ∷ Lens' (FutureGenDeleg c) SlotNo
- fGenDelegGenKeyHashL ∷ Lens' (FutureGenDeleg c) (KeyHash 'Genesis c)
- isCredMapL ∷ Lens' (IncrementalStake c) (Map (Credential 'Staking c) Coin)
- isPtrMapL ∷ Lens' (IncrementalStake c) (Map Ptr Coin)
- nmLikelihoodsL ∷ Lens' (NonMyopic c) (Map (KeyHash 'StakePool c) [Float])
- nmRewardPotL ∷ Lens' (NonMyopic c) Coin
- spRewL ∷ Lens' (Split c) (Map (Credential 'Staking c) Coin)
- spDepL ∷ Lens' (Split c) (Map (Credential 'Staking c) Coin)
- spDelL ∷ Lens' (Split c) (Map (Credential 'Staking c) (KeyHash 'StakePool c))
- spRevPtrL ∷ Lens' (Split c) (Map (Credential 'Staking c) (Set Ptr))
- spPtrL ∷ Lens' (Split c) (Map Ptr (Credential 'Staking c))
- spDRepL ∷ Lens' (Split c) (Map (Credential 'Staking c) (DRep c))
- data Split c = Split {}
- splitUMap ∷ UMap c → Split c
- unSplitUMap ∷ Split c → UMap c
- rewardsUMapL ∷ Lens' (UMap c) (Map (Credential 'Staking c) Coin)
- stakeDepositsUMapL ∷ Lens' (UMap c) (Map (Credential 'Staking c) Coin)
- ptrsUMapL ∷ Lens' (UMap c) (Map Ptr (Credential 'Staking c))
- delegationsUMapL ∷ Lens' (UMap c) (Map (Credential 'Staking c) (KeyHash 'StakePool c))
- drepUMapL ∷ Lens' (UMap c) (Map (Credential 'Staking c) (DRep c))
- 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 (EraCrypto era)) (TxOutF era)) (UTxO era)
- fstL ∷ Lens' (a, b) a
- sndL ∷ Lens' (a, b) b
Documentation
iRReservesL ∷ Lens' (InstantaneousRewards c) (Map (Credential 'Staking c) Coin) Source #
iRTreasuryL ∷ Lens' (InstantaneousRewards c) (Map (Credential 'Staking c) Coin) Source #
unGenDelegsL ∷ Lens' (GenDelegs c) (Map (KeyHash 'Genesis c) (GenDelegPair c)) Source #
fGenDelegGenKeyHashL ∷ Lens' (FutureGenDeleg c) (KeyHash 'Genesis c) Source #
isCredMapL ∷ Lens' (IncrementalStake c) (Map (Credential 'Staking c) Coin) Source #
Abstract view of the UMap
splitUMap ∷ UMap c → Split c Source #
The abstraction function, from concrete (UMap) to abstract (Split)
unSplitUMap ∷ Split c → UMap c Source #
The concretization function from abstract (Split) to concrete (UMap)
rewardsUMapL ∷ Lens' (UMap c) (Map (Credential 'Staking c) Coin) Source #
stakeDepositsUMapL ∷ Lens' (UMap c) (Map (Credential 'Staking c) Coin) Source #
delegationsUMapL ∷ Lens' (UMap c) (Map (Credential 'Staking c) (KeyHash 'StakePool c)) 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 (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