ouroboros-network-protocols
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Network.Protocol.LocalStateQuery.Codec

Synopsis

Documentation

codecLocalStateQuery Source #

Arguments

:: forall block point query (m :: Type -> Type). (MonadST m, ShowQuery query) 
=> NodeToClientVersion

eg whether to allow ImmutableTip in @MsgAcquire

-> (point -> Encoding) 
-> (forall s. Decoder s point) 
-> (forall result. query result -> Encoding) 
-> (forall s. Decoder s (Some query)) 
-> (forall result. query result -> result -> Encoding) 
-> (forall result. query result -> forall s. Decoder s result) 
-> Codec (LocalStateQuery block point query) DeserialiseFailure (State :: LocalStateQuery block point query -> Type) m ByteString 

codecLocalStateQueryId :: forall block point query (m :: Type -> Type). Monad m => (forall result1 result2. query result1 -> query result2 -> Maybe (result1 :~: result2)) -> Codec (LocalStateQuery block point query) CodecFailure (State :: LocalStateQuery block point query -> Type) m (AnyMessage (LocalStateQuery block point query) (State :: LocalStateQuery block point query -> Type)) Source #

An identity Codec for the LocalStateQuery protocol. It does not do any serialisation. It keeps the typed messages, wrapped in AnyMessage.

data Some (f :: k -> Type) where Source #

Constructors

Some :: forall {k} (f :: k -> Type) (a :: k). f a -> Some f