Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Ledger.Tables.MapKind
Contents
Synopsis
- class CanMapKeysMK (mk ∷ MapKind) where
- class CanMapMK (mk ∷ MapKind) where
- mapMK ∷ (v → v') → mk k v → mk k v'
- class (∀ k v. (Eq k, Eq v) ⇒ Eq (mk k v)) ⇒ EqMK (mk ∷ MapKind)
- class (∀ k v. (NoThunks k, NoThunks v) ⇒ NoThunks (mk k v)) ⇒ NoThunksMK (mk ∷ MapKind)
- class (∀ k v. (Show k, Show v) ⇒ Show (mk k v)) ⇒ ShowMK (mk ∷ MapKind)
- class ZeroableMK (mk ∷ MapKind) where
- bimapLedgerTables ∷ ∀ (x ∷ LedgerStateKind) (y ∷ LedgerStateKind) (mk ∷ MapKind). (CanMapKeysMK mk, CanMapMK mk, Ord (TxIn y)) ⇒ (TxIn x → TxIn y) → (TxOut x → TxOut y) → LedgerTables x mk → LedgerTables y mk
- data CodecMK k v = CodecMK {
- encodeKey ∷ !(k → Encoding)
- encodeValue ∷ !(v → Encoding)
- decodeKey ∷ !(∀ s. Decoder s k)
- decodeValue ∷ !(∀ s. Decoder s v)
- newtype DiffMK k v = DiffMK {}
- data EmptyMK k v = EmptyMK
- newtype KeysMK k v = KeysMK (Set k)
- newtype SeqDiffMK k v = SeqDiffMK {
- getSeqDiffMK ∷ DiffSeq k v
- data TrackingMK k v = TrackingMK !(Map k v) !(Diff k v)
- newtype ValuesMK k v = ValuesMK {
- getValuesMK ∷ Map k v
Classes
class CanMapKeysMK (mk ∷ MapKind) where Source #
Methods
Instances
CanMapKeysMK DiffMK Source # | |
CanMapKeysMK EmptyMK Source # | |
CanMapKeysMK KeysMK Source # | |
CanMapKeysMK TrackingMK Source # | |
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind Methods mapKeysMK ∷ Ord k' ⇒ (k → k') → TrackingMK k v → TrackingMK k' v Source # | |
CanMapKeysMK ValuesMK Source # | |
class (∀ k v. (Eq k, Eq v) ⇒ Eq (mk k v)) ⇒ EqMK (mk ∷ MapKind) Source #
For convenience, such that we don't have to include QuantifiedConstraints
everywhere.
Instances
EqMK DiffMK Source # | |
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |
EqMK EmptyMK Source # | |
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |
EqMK KeysMK Source # | |
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |
EqMK SeqDiffMK Source # | |
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |
EqMK TrackingMK Source # | |
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |
EqMK ValuesMK Source # | |
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind |
class (∀ k v. (NoThunks k, NoThunks v) ⇒ NoThunks (mk k v)) ⇒ NoThunksMK (mk ∷ MapKind) Source #
For convenience, such that we don't have to include QuantifiedConstraints
everywhere.
Instances
class (∀ k v. (Show k, Show v) ⇒ Show (mk k v)) ⇒ ShowMK (mk ∷ MapKind) Source #
For convenience, such that we don't have to include QuantifiedConstraints
everywhere.
Instances
ShowMK DiffMK Source # | |
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |
ShowMK EmptyMK Source # | |
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |
ShowMK KeysMK Source # | |
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |
ShowMK SeqDiffMK Source # | |
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |
ShowMK TrackingMK Source # | |
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |
ShowMK ValuesMK Source # | |
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind |
class ZeroableMK (mk ∷ MapKind) where Source #
bimapLedgerTables ∷ ∀ (x ∷ LedgerStateKind) (y ∷ LedgerStateKind) (mk ∷ MapKind). (CanMapKeysMK mk, CanMapMK mk, Ord (TxIn y)) ⇒ (TxIn x → TxIn y) → (TxOut x → TxOut y) → LedgerTables x mk → LedgerTables y mk Source #
Concrete MapKinds
A codec MapKind
that will be used to refer to
as the codecs that can encode every key and value in the LedgerTables
l CodecMK
.LedgerTables
l
mk
It is important to note that in the context of the HardForkCombinator, the
key k
has to be accessible from any era we are currently in, regardless of
which era it was created in. Because of that, we need that the serialization
of the key remains stable accross eras.
Ledger will provide more efficient encoders than CBOR, which will produce a
directly.ShortByteString
See also HasCanonicalTxIn
in
Ouroboros.Consensus.HardFork.Combinator.Ledger.
We will serialize UTxO maps as unstowed ledger tables when storing snapshots while using an in-memory backend for the LedgerDB.
Constructors
CodecMK | |
Fields
|
Instances
CanMapKeysMK DiffMK Source # | |||||
CanMapMK DiffMK Source # | |||||
EqMK DiffMK Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |||||
NoThunksMK DiffMK Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |||||
ShowMK DiffMK Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |||||
ZeroableMK DiffMK Source # | |||||
Functor (DiffMK k) Source # | |||||
Generic (DiffMK k v) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind Associated Types
| |||||
(Show k, Show v) ⇒ Show (DiffMK k v) Source # | |||||
(Eq k, Eq v) ⇒ Eq (DiffMK k v) Source # | |||||
(NoThunks k, NoThunks v) ⇒ NoThunks (DiffMK k v) Source # | |||||
type Rep (DiffMK k v) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |||||
type WriteHint (LedgerTables l DiffMK) Source # | |||||
Constructors
EmptyMK |
Instances
Instances
CanMapKeysMK KeysMK Source # | |||||
CanMapMK KeysMK Source # | |||||
EqMK KeysMK Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |||||
NoThunksMK KeysMK Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |||||
ShowMK KeysMK Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |||||
ZeroableMK KeysMK Source # | |||||
Ord k ⇒ Monoid (KeysMK k v) Source # | |||||
Ord k ⇒ Semigroup (KeysMK k v) Source # | |||||
Generic (KeysMK k v) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind Associated Types
| |||||
Show k ⇒ Show (KeysMK k v) Source # | |||||
Eq k ⇒ Eq (KeysMK k v) Source # | |||||
NoThunks k ⇒ NoThunks (KeysMK k v) Source # | |||||
type Rep (KeysMK k v) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind |
newtype SeqDiffMK k v Source #
Constructors
SeqDiffMK | |
Fields
|
Instances
data TrackingMK k v Source #
Constructors
TrackingMK !(Map k v) !(Diff k v) |
Instances
CanMapKeysMK TrackingMK Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind Methods mapKeysMK ∷ Ord k' ⇒ (k → k') → TrackingMK k v → TrackingMK k' v Source # | |||||
CanMapMK TrackingMK Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind Methods mapMK ∷ (v → v') → TrackingMK k v → TrackingMK k v' Source # | |||||
EqMK TrackingMK Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |||||
NoThunksMK TrackingMK Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |||||
ShowMK TrackingMK Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |||||
ZeroableMK TrackingMK Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |||||
Generic (TrackingMK k v) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind Associated Types
Methods from ∷ TrackingMK k v → Rep (TrackingMK k v) x # to ∷ Rep (TrackingMK k v) x → TrackingMK k v # | |||||
(Show k, Show v) ⇒ Show (TrackingMK k v) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind Methods showsPrec ∷ Int → TrackingMK k v → ShowS # show ∷ TrackingMK k v → String # showList ∷ [TrackingMK k v] → ShowS # | |||||
(Eq k, Eq v) ⇒ Eq (TrackingMK k v) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind Methods (==) ∷ TrackingMK k v → TrackingMK k v → Bool # (/=) ∷ TrackingMK k v → TrackingMK k v → Bool # | |||||
(NoThunks k, NoThunks v) ⇒ NoThunks (TrackingMK k v) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |||||
type Rep (TrackingMK k v) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind type Rep (TrackingMK k v) = D1 ('MetaData "TrackingMK" "Ouroboros.Consensus.Ledger.Tables.MapKind" "ouroboros-consensus-0.26.0.0-inplace" 'False) (C1 ('MetaCons "TrackingMK" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map k v)) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Diff k v)))) |
Constructors
ValuesMK | |
Fields
|
Instances
CanMapKeysMK ValuesMK Source # | |||||
CanMapMK ValuesMK Source # | |||||
EqMK ValuesMK Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |||||
NoThunksMK ValuesMK Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |||||
ShowMK ValuesMK Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |||||
ZeroableMK ValuesMK Source # | |||||
Generic (ValuesMK k v) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind Associated Types
| |||||
(Show k, Show v) ⇒ Show (ValuesMK k v) Source # | |||||
(Eq k, Eq v) ⇒ Eq (ValuesMK k v) Source # | |||||
(NoThunks k, NoThunks v) ⇒ NoThunks (ValuesMK k v) Source # | |||||
type Rep (ValuesMK k v) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.MapKind | |||||
type SerializeTablesHint (LedgerTables l ValuesMK) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables | |||||
type InitHint (LedgerTables l ValuesMK) Source # | |||||
type ReadHint (LedgerTables l ValuesMK) Source # | |||||