ouroboros-consensus-0.1.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

Synopsis

Documentation

data family Query blk :: Type -> Type Source #

Different queries supported by the ledger, indexed by the result type.

Instances

Instances details
ShowQuery (Query (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showResult :: Query (DualBlock m a) result -> result -> String #

All SingleEraBlock xs => ShowQuery (Query (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

Methods

showResult :: Query (HardForkBlock xs) result -> result -> String #

SameDepIndex (Query (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

sameDepIndex :: Query (DualBlock m a) a0 -> Query (DualBlock m a) b -> Maybe (a0 :~: b) Source #

All SingleEraBlock xs => SameDepIndex (Query (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

Methods

sameDepIndex :: Query (HardForkBlock xs) a -> Query (HardForkBlock xs) b -> Maybe (a :~: b) Source #

SerialiseHFC xs => SerialiseResult (HardForkBlock xs) (Query (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseNodeToClient

SerialiseHFC xs => SerialiseNodeToClient (HardForkBlock xs) (SomeSecond Query (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseNodeToClient

SameDepIndex (Query blk) => Eq (SomeSecond Query blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Query

Methods

(==) :: SomeSecond Query blk -> SomeSecond Query blk -> Bool #

(/=) :: SomeSecond Query blk -> SomeSecond Query blk -> Bool #

(forall result. Show (Query blk result)) => Show (SomeSecond Query blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Query

Show (Query (DualBlock m a) result) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showsPrec :: Int -> Query (DualBlock m a) result -> ShowS #

show :: Query (DualBlock m a) result -> String #

showList :: [Query (DualBlock m a) result] -> ShowS #

All SingleEraBlock xs => Show (Query (HardForkBlock xs) result) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

Methods

showsPrec :: Int -> Query (HardForkBlock xs) result -> ShowS #

show :: Query (HardForkBlock xs) result -> String #

showList :: [Query (HardForkBlock xs) result] -> ShowS #

(Typeable m, Typeable a) => ShowProxy (Query (DualBlock m a) :: Type -> Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Typeable xs => ShowProxy (Query (HardForkBlock xs) :: Type -> Type) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

data Query (HardForkBlock xs) a Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

data Query (HardForkBlock xs) a where
data Query (DualBlock m a) result Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

data Query (DualBlock m a) result

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

Instances details
All SingleEraBlock xs => ShowQuery (QueryIfCurrent xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

Methods

showResult :: QueryIfCurrent xs result -> result -> String #

All SingleEraBlock xs => SameDepIndex (QueryIfCurrent xs) Source # 
Instance details

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 # 
Instance details

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 #

data QueryHardFork xs result where Source #

Instances

Instances details
All SingleEraBlock xs => ShowQuery (QueryHardFork xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

Methods

showResult :: QueryHardFork xs result -> result -> String #

SameDepIndex (QueryHardFork xs) Source # 
Instance details

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 # 
Instance details

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 #

decodeQueryAnytimeResult :: QueryAnytime result -> forall s. Decoder s result Source #

decodeQueryHardForkResult :: SListI xs => QueryHardFork xs result -> forall s. Decoder s result Source #

Orphan instances

All SingleEraBlock xs => ShowQuery (Query (HardForkBlock xs)) Source # 
Instance details

Methods

showResult :: Query (HardForkBlock xs) result -> result -> String #

All SingleEraBlock xs => SameDepIndex (Query (HardForkBlock xs)) Source # 
Instance details

Methods

sameDepIndex :: Query (HardForkBlock xs) a -> Query (HardForkBlock xs) b -> Maybe (a :~: b) Source #

All SingleEraBlock xs => QueryLedger (HardForkBlock xs) Source # 
Instance details

All SingleEraBlock xs => Show (Query (HardForkBlock xs) result) Source # 
Instance details

Methods

showsPrec :: Int -> Query (HardForkBlock xs) result -> ShowS #

show :: Query (HardForkBlock xs) result -> String #

showList :: [Query (HardForkBlock xs) result] -> ShowS #

Typeable xs => ShowProxy (Query (HardForkBlock xs) :: Type -> Type) Source # 
Instance details