Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.HardFork.Combinator.Ledger.Query
Contents
Synopsis
- data family BlockQuery blk ∷ Type → Type
- type HardForkQueryResult xs = Either (MismatchEraInfo xs)
- data QueryAnytime result where
- data QueryHardFork xs result where
- GetInterpreter ∷ QueryHardFork xs (Interpreter xs)
- GetCurrentEra ∷ QueryHardFork xs (EraIndex xs)
- data QueryIfCurrent ∷ [Type] → Type → Type where
- QZ ∷ BlockQuery x result → QueryIfCurrent (x ': xs) result
- QS ∷ QueryIfCurrent xs result → QueryIfCurrent (x ': xs) result
- decodeQueryAnytimeResult ∷ QueryAnytime result → ∀ s. Decoder s result
- decodeQueryHardForkResult ∷ SListI xs ⇒ QueryHardFork xs result → ∀ s. Decoder s result
- encodeQueryAnytimeResult ∷ QueryAnytime result → result → Encoding
- encodeQueryHardForkResult ∷ SListI xs ⇒ QueryHardFork xs result → result → Encoding
- getHardForkQuery ∷ BlockQuery (HardForkBlock xs) result → (∀ result'. (result :~: HardForkQueryResult xs result') → QueryIfCurrent xs result' → r) → (∀ x' xs'. (xs :~: (x' ': xs')) → ProofNonEmpty xs' → QueryAnytime result → EraIndex xs → r) → (∀ x' xs'. (xs :~: (x' ': xs')) → ProofNonEmpty xs' → QueryHardFork xs result → r) → r
- hardForkQueryInfo ∷ All SingleEraBlock xs ⇒ QueryIfCurrent xs result → NS SingleEraInfo xs
Documentation
data family BlockQuery blk ∷ Type → Type Source #
Different queries supported by the ledger, indexed by the result type.
Instances
type HardForkQueryResult xs = Either (MismatchEraInfo xs) Source #
data QueryAnytime result where Source #
Constructors
GetEraStart ∷ QueryAnytime (Maybe Bound) |
Instances
ShowQuery QueryAnytime Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query Methods showResult ∷ QueryAnytime result → result → String Source # | |
SameDepIndex QueryAnytime Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query Methods sameDepIndex ∷ QueryAnytime a → QueryAnytime b → Maybe (a :~: b) Source # | |
Show (QueryAnytime result) Source # | |
Serialise (Some QueryAnytime) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query Methods encode ∷ Some QueryAnytime → Encoding decode ∷ Decoder s (Some QueryAnytime) encodeList ∷ [Some QueryAnytime] → Encoding decodeList ∷ Decoder s [Some QueryAnytime] |
data QueryHardFork xs result where Source #
Constructors
GetInterpreter ∷ QueryHardFork xs (Interpreter xs) | |
GetCurrentEra ∷ QueryHardFork xs (EraIndex xs) |
Instances
All SingleEraBlock xs ⇒ ShowQuery (QueryHardFork xs) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query Methods showResult ∷ QueryHardFork xs result → result → String Source # | |
SameDepIndex (QueryHardFork xs) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query Methods sameDepIndex ∷ QueryHardFork xs a → QueryHardFork xs b → Maybe (a :~: b) Source # | |
Show (QueryHardFork xs result) Source # | |
data QueryIfCurrent ∷ [Type] → Type → Type where Source #
Constructors
QZ ∷ BlockQuery x result → QueryIfCurrent (x ': xs) result | |
QS ∷ QueryIfCurrent xs result → QueryIfCurrent (x ': xs) result |
Instances
All SingleEraBlock xs ⇒ ShowQuery (QueryIfCurrent xs) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query Methods showResult ∷ QueryIfCurrent xs result → result → String Source # | |
All SingleEraBlock xs ⇒ SameDepIndex (QueryIfCurrent xs) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query Methods sameDepIndex ∷ QueryIfCurrent xs a → QueryIfCurrent xs b → Maybe (a :~: b) Source # | |
All SingleEraBlock xs ⇒ Show (QueryIfCurrent xs result) Source # | |
decodeQueryAnytimeResult ∷ QueryAnytime result → ∀ s. Decoder s result Source #
decodeQueryHardForkResult ∷ SListI xs ⇒ QueryHardFork xs result → ∀ s. Decoder s result Source #
encodeQueryAnytimeResult ∷ QueryAnytime result → result → Encoding Source #
encodeQueryHardForkResult ∷ SListI xs ⇒ QueryHardFork xs result → result → Encoding Source #
getHardForkQuery ∷ BlockQuery (HardForkBlock xs) result → (∀ result'. (result :~: HardForkQueryResult xs result') → QueryIfCurrent xs result' → r) → (∀ x' xs'. (xs :~: (x' ': xs')) → ProofNonEmpty xs' → QueryAnytime result → EraIndex xs → r) → (∀ x' xs'. (xs :~: (x' ': xs')) → ProofNonEmpty xs' → QueryHardFork xs result → r) → r Source #
hardForkQueryInfo ∷ All SingleEraBlock xs ⇒ QueryIfCurrent xs result → NS SingleEraInfo xs Source #