Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PeerPipelined and kind inference #275

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion typed-protocols/src/Network/TypedProtocol/Pipelined.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 0 additions & 4 deletions typed-protocols/src/Network/TypedProtocol/ReqResp/Client.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down