diff --git a/typed-protocols/src/Network/TypedProtocol/Pipelined.hs b/typed-protocols/src/Network/TypedProtocol/Pipelined.hs index 446f9ab7d2c..d3dcd521586 100644 --- a/typed-protocols/src/Network/TypedProtocol/Pipelined.hs +++ b/typed-protocols/src/Network/TypedProtocol/Pipelined.hs @@ -11,7 +11,7 @@ module Network.TypedProtocol.Pipelined where import Network.TypedProtocol.Core -data PeerPipelined ps pk st m a where +data PeerPipelined ps (pk :: PeerKind) (st :: ps) m a where PeerPipelined :: PeerSender ps pk st Z c m a -> PeerPipelined ps pk st m a diff --git a/typed-protocols/src/Network/TypedProtocol/ReqResp/Client.hs b/typed-protocols/src/Network/TypedProtocol/ReqResp/Client.hs index 8e876048ea8..0624a7de5ae 100644 --- a/typed-protocols/src/Network/TypedProtocol/ReqResp/Client.hs +++ b/typed-protocols/src/Network/TypedProtocol/ReqResp/Client.hs @@ -82,17 +82,13 @@ data ReqRespSender req resp n c m a where SendMsgDonePipelined :: a -> ReqRespSender req resp Z c m a -{- --- This is the inferred type, but using it results in a weird type error! reqRespClientPeerPipelined :: Monad m => ReqRespClientPipelined req resp m a -> PeerPipelined (ReqResp req resp) AsClient StIdle m a --} reqRespClientPeerPipelined (ReqRespClientPipelined peer) = PeerPipelined (reqRespClientPeerSender peer) - reqRespClientPeerSender :: Monad m => ReqRespSender req resp n c m a