| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Consensus.Ledger.Query
Synopsis
- data family Query blk :: Type -> Type
- class (ShowQuery (Query blk), SameDepIndex (Query blk)) => QueryLedger blk where
- answerQuery :: ExtLedgerCfg blk -> Query blk result -> ExtLedgerState blk -> result
- class (forall result. Show (query result)) => ShowQuery (query :: Type -> Type) where
- showResult :: query result -> result -> String
Documentation
data family Query blk :: Type -> Type Source #
Different queries supported by the ledger, indexed by the result type.
Instances
class (ShowQuery (Query blk), SameDepIndex (Query blk)) => QueryLedger blk where Source #
Query the ledger extended state.
Used by the LocalStateQuery protocol to allow clients to query the extended ledger state.
Methods
answerQuery :: ExtLedgerCfg blk -> Query blk result -> ExtLedgerState blk -> result Source #
Answer the given query about the extended ledger state.
Instances
| All SingleEraBlock xs => QueryLedger (HardForkBlock xs) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query Methods answerQuery :: ExtLedgerCfg (HardForkBlock xs) -> Query (HardForkBlock xs) result -> ExtLedgerState (HardForkBlock xs) -> result Source # | |
| Bridge m a => QueryLedger (DualBlock m a) Source # | Not used in the tests: no constructors |
Defined in Ouroboros.Consensus.Ledger.Dual Methods answerQuery :: ExtLedgerCfg (DualBlock m a) -> Query (DualBlock m a) result -> ExtLedgerState (DualBlock m a) -> result Source # | |
class (forall result. Show (query result)) => ShowQuery (query :: Type -> Type) where #
Methods
showResult :: query result -> result -> String #
Instances
| ShowQuery QueryAnytime Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query Methods showResult :: QueryAnytime result -> result -> String # | |
| ShowQuery (Query (DualBlock m a)) Source # | |
Defined in Ouroboros.Consensus.Ledger.Dual Methods showResult :: Query (DualBlock m a) result -> result -> String # | |
| All SingleEraBlock xs => ShowQuery (Query (HardForkBlock xs)) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query Methods showResult :: Query (HardForkBlock xs) result -> result -> String # | |
| All SingleEraBlock xs => ShowQuery (QueryHardFork xs) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query Methods showResult :: QueryHardFork xs result -> result -> String # | |
| All SingleEraBlock xs => ShowQuery (QueryIfCurrent xs) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query Methods showResult :: QueryIfCurrent xs result -> result -> String # | |