| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Consensus.HardFork.Combinator.Ledger.Query
Contents
Synopsis
- data family Query blk :: Type -> Type
- data QueryIfCurrent :: [Type] -> Type -> Type where
- QZ :: Query x result -> QueryIfCurrent (x ': xs) result
- QS :: QueryIfCurrent xs result -> QueryIfCurrent (x ': xs) result
- 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)
- getHardForkQuery :: Query (HardForkBlock xs) result -> (forall result'. (result :~: HardForkQueryResult xs result') -> QueryIfCurrent xs result' -> r) -> (forall x' xs'. (xs :~: (x' ': xs')) -> ProofNonEmpty xs' -> QueryAnytime result -> EraIndex xs -> r) -> (forall x' xs'. (xs :~: (x' ': xs')) -> ProofNonEmpty xs' -> QueryHardFork xs result -> r) -> r
- hardForkQueryInfo :: All SingleEraBlock xs => QueryIfCurrent xs result -> NS SingleEraInfo xs
- encodeQueryAnytimeResult :: QueryAnytime result -> result -> Encoding
- decodeQueryAnytimeResult :: QueryAnytime result -> forall s. Decoder s result
- encodeQueryHardForkResult :: SListI xs => QueryHardFork xs result -> result -> Encoding
- decodeQueryHardForkResult :: SListI xs => QueryHardFork xs result -> forall s. Decoder s result
Documentation
data family Query blk :: Type -> Type Source #
Different queries supported by the ledger, indexed by the result type.
Instances
data QueryIfCurrent :: [Type] -> Type -> Type where Source #
Constructors
| QZ :: Query 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 # | |
| 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 # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query Methods showsPrec :: Int -> QueryIfCurrent xs result -> ShowS # show :: QueryIfCurrent xs result -> String # showList :: [QueryIfCurrent xs result] -> ShowS # | |
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 # | |
| 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 # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query Methods showsPrec :: Int -> QueryAnytime result -> ShowS # show :: QueryAnytime result -> String # showList :: [QueryAnytime result] -> ShowS # | |
| Serialise (Some QueryAnytime) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query Methods encode :: Some QueryAnytime -> Encoding Source # decode :: Decoder s (Some QueryAnytime) Source # encodeList :: [Some QueryAnytime] -> Encoding Source # decodeList :: Decoder s [Some QueryAnytime] Source # | |
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 # | |
| 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 # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query Methods showsPrec :: Int -> QueryHardFork xs result -> ShowS # show :: QueryHardFork xs result -> String # showList :: [QueryHardFork xs result] -> ShowS # | |
getHardForkQuery :: Query (HardForkBlock xs) result -> (forall result'. (result :~: HardForkQueryResult xs result') -> QueryIfCurrent xs result' -> r) -> (forall x' xs'. (xs :~: (x' ': xs')) -> ProofNonEmpty xs' -> QueryAnytime result -> EraIndex xs -> r) -> (forall x' xs'. (xs :~: (x' ': xs')) -> ProofNonEmpty xs' -> QueryHardFork xs result -> r) -> r Source #
hardForkQueryInfo :: All SingleEraBlock xs => QueryIfCurrent xs result -> NS SingleEraInfo xs Source #
encodeQueryAnytimeResult :: QueryAnytime result -> result -> Encoding Source #
decodeQueryAnytimeResult :: QueryAnytime result -> forall s. Decoder s result Source #
encodeQueryHardForkResult :: SListI xs => QueryHardFork xs result -> result -> Encoding Source #
decodeQueryHardForkResult :: SListI xs => QueryHardFork xs result -> forall s. Decoder s result Source #
Orphan instances
| All SingleEraBlock xs => ShowQuery (Query (HardForkBlock xs)) Source # | |
Methods showResult :: Query (HardForkBlock xs) result -> result -> String # | |
| All SingleEraBlock xs => SameDepIndex (Query (HardForkBlock xs)) Source # | |
Methods sameDepIndex :: Query (HardForkBlock xs) a -> Query (HardForkBlock xs) b -> Maybe (a :~: b) Source # | |
| All SingleEraBlock xs => QueryLedger (HardForkBlock xs) Source # | |
Methods answerQuery :: ExtLedgerCfg (HardForkBlock xs) -> Query (HardForkBlock xs) result -> ExtLedgerState (HardForkBlock xs) -> result Source # | |
| All SingleEraBlock xs => Show (Query (HardForkBlock xs) result) Source # | |
| Typeable xs => ShowProxy (Query (HardForkBlock xs) :: Type -> Type) Source # | |