Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ReqRespClient req resp (m :: Type -> Type) a where
- SendMsgReq :: forall req resp (m :: Type -> Type) a. req -> (resp -> m (ReqRespClient req resp m a)) -> ReqRespClient req resp m a
- SendMsgDone :: forall (m :: Type -> Type) a req resp. m a -> ReqRespClient req resp m a
- reqRespClientPeer :: forall (m :: Type -> Type) req resp a. Monad m => ReqRespClient req resp m a -> Client (ReqResp req resp) 'NonPipelined ('StIdle :: ReqResp req resp) m a
- data ReqRespClientPipelined req resp (m :: Type -> Type) a where
- ReqRespClientPipelined :: forall req resp c (m :: Type -> Type) a. ReqRespIdle req resp 'Z c m a -> ReqRespClientPipelined req resp m a
- reqRespClientPeerPipelined :: forall (m :: Type -> Type) req resp a. Functor m => ReqRespClientPipelined req resp m a -> ClientPipelined (ReqResp req resp) ('StIdle :: ReqResp req resp) m a
- data ReqRespIdle req resp (n :: N) c (m :: Type -> Type) a where
- SendMsgReqPipelined :: forall req resp (m :: Type -> Type) c (n :: N) a. req -> (resp -> m c) -> ReqRespIdle req resp ('S n) c m a -> ReqRespIdle req resp n c m a
- CollectPipelined :: forall req resp (n1 :: N) c (m :: Type -> Type) a. Maybe (ReqRespIdle req resp ('S n1) c m a) -> (c -> m (ReqRespIdle req resp n1 c m a)) -> ReqRespIdle req resp ('S n1) c m a
- SendMsgDonePipelined :: forall a req resp c (m :: Type -> Type). a -> ReqRespIdle req resp 'Z c m a
- reqRespClientPeerIdle :: forall req resp (n :: N) c (m :: Type -> Type) a. Functor m => ReqRespIdle req resp n c m a -> Client (ReqResp req resp) ('Pipelined n c) ('StIdle :: ReqResp req resp) m a
- requestOnce :: forall req resp m. Monad m => (forall x. Server (ReqResp req resp) 'NonPipelined ('StIdle :: ReqResp req resp) m x) -> req -> m resp
Normal client
data ReqRespClient req resp (m :: Type -> Type) a where Source #
SendMsgReq :: forall req resp (m :: Type -> Type) a. req -> (resp -> m (ReqRespClient req resp m a)) -> ReqRespClient req resp m a | |
SendMsgDone :: forall (m :: Type -> Type) a req resp. m a -> ReqRespClient req resp m a |
reqRespClientPeer :: forall (m :: Type -> Type) req resp a. Monad m => ReqRespClient req resp m a -> Client (ReqResp req resp) 'NonPipelined ('StIdle :: ReqResp req resp) m a Source #
Interpret a particular client action sequence into the client side of the
ReqResp
protocol.
Pipelined client
data ReqRespClientPipelined req resp (m :: Type -> Type) a where Source #
A request-response client designed for running the ReqResp
protocol in
a pipelined way.
ReqRespClientPipelined :: forall req resp c (m :: Type -> Type) a. ReqRespIdle req resp 'Z c m a -> ReqRespClientPipelined req resp m a | A |
reqRespClientPeerPipelined :: forall (m :: Type -> Type) req resp a. Functor m => ReqRespClientPipelined req resp m a -> ClientPipelined (ReqResp req resp) ('StIdle :: ReqResp req resp) m a Source #
Interpret a pipelined client as a Peer
on the client side of
the ReqResp
protocol.
data ReqRespIdle req resp (n :: N) c (m :: Type -> Type) a where Source #
SendMsgReqPipelined :: forall req resp (m :: Type -> Type) c (n :: N) a. req -> (resp -> m c) -> ReqRespIdle req resp ('S n) c m a -> ReqRespIdle req resp n c m a | Send a |
CollectPipelined :: forall req resp (n1 :: N) c (m :: Type -> Type) a. Maybe (ReqRespIdle req resp ('S n1) c m a) -> (c -> m (ReqRespIdle req resp n1 c m a)) -> ReqRespIdle req resp ('S n1) c m a | |
SendMsgDonePipelined :: forall a req resp c (m :: Type -> Type). a -> ReqRespIdle req resp 'Z c m a | Termination of the req-resp protocol. |
reqRespClientPeerIdle :: forall req resp (n :: N) c (m :: Type -> Type) a. Functor m => ReqRespIdle req resp n c m a -> Client (ReqResp req resp) ('Pipelined n c) ('StIdle :: ReqResp req resp) m a Source #
Request once
requestOnce :: forall req resp m. Monad m => (forall x. Server (ReqResp req resp) 'NonPipelined ('StIdle :: ReqResp req resp) m x) -> req -> m resp Source #