Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
typed-protocols: provide ProtocolState and PeerHasAgency
'SingProtocolState' is a 'ProtocolState' singleton. The type of 'ProtocolState' kind provides information about current state and its agency. 'SingPeerHasAgency' is a 'PeerHasAgency' singleton. The kinds 'PeerHasAgency' and 'ProtocolState' are isomorphic. Like 'SingProtocolState' it gives access to the protocol state and agency, but it allows to match only for 'ClientAgency' or 'ServerAgency', while 'SingProtocolState' allows to also match for 'NobodyAgency'. Limiting the possible pattern matches to only active agencies, is, for example, useful in a 'Codec', where we know that the protocol must be in a state whose agency is either on the client or server side. This patch also modifies 'Yield', 'YieldPipelined' and 'Message' constructors constraints. This prepares for future changes where we will need to deduce that a sent message changes the agency.
- Loading branch information
Showing
16 changed files
with
307 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.