Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype PeerSharingAmount = PeerSharingAmount {}
- data PeerSharingResult peerAddress
- = PeerSharingResult [peerAddress]
- | PeerSharingNotRegisteredYet
- data PeerSharing (peerAddress :: k) where
- StIdle :: forall {k} (peerAddress :: k). PeerSharing peerAddress
- StBusy :: forall {k} (peerAddress :: k). PeerSharing peerAddress
- StDone :: forall {k} (peerAddress :: k). PeerSharing peerAddress
- data SingPeerSharing (k1 :: PeerSharing peerAddress) where
- SingIdle :: forall {k} {peerAddress :: k}. SingPeerSharing ('StIdle :: PeerSharing peerAddress)
- SingBusy :: forall {k} {peerAddress :: k}. SingPeerSharing ('StBusy :: PeerSharing peerAddress)
- SingDone :: forall {k} {peerAddress :: k}. SingPeerSharing ('StDone :: PeerSharing peerAddress)
Documentation
newtype PeerSharingAmount Source #
PeerSharing amount new type.
We use Word8
to be faithful to the CDDL specification.
Instances
data PeerSharingResult peerAddress Source #
PeerSharing Result type.
We need a constructor for the case when the Governor wins the race versus the Mux (when initialising the peer sharing miniprotocol). This leads the Governor to lookup a peer that hasn't been registered yet.
PeerSharingResult [peerAddress] | |
PeerSharingNotRegisteredYet |
Instances
Show peerAddress => Show (PeerSharingResult peerAddress) Source # | |
Defined in Ouroboros.Network.Protocol.PeerSharing.Type showsPrec :: Int -> PeerSharingResult peerAddress -> ShowS # show :: PeerSharingResult peerAddress -> String # showList :: [PeerSharingResult peerAddress] -> ShowS # | |
Eq peerAddress => Eq (PeerSharingResult peerAddress) Source # | |
Defined in Ouroboros.Network.Protocol.PeerSharing.Type (==) :: PeerSharingResult peerAddress -> PeerSharingResult peerAddress -> Bool # (/=) :: PeerSharingResult peerAddress -> PeerSharingResult peerAddress -> Bool # |
data PeerSharing (peerAddress :: k) where Source #
A kind to identify our protocol, and the types of the states in the state transition diagram of the protocol.
StIdle :: forall {k} (peerAddress :: k). PeerSharing peerAddress | The client can send a request and the server is waiting for a request. |
StBusy :: forall {k} (peerAddress :: k). PeerSharing peerAddress | The server is responsible for sending response back. |
StDone :: forall {k} (peerAddress :: k). PeerSharing peerAddress | Both the client and server are in the terminal state. They're done. |
Instances
ShowProxy (PeerSharing peer :: Type) Source # | |||||
Defined in Ouroboros.Network.Protocol.PeerSharing.Type showProxy :: Proxy (PeerSharing peer) -> String # | |||||
Show peerAddress => Show (PeerSharing peerAddress) Source # | |||||
Defined in Ouroboros.Network.Protocol.PeerSharing.Type showsPrec :: Int -> PeerSharing peerAddress -> ShowS # show :: PeerSharing peerAddress -> String # showList :: [PeerSharing peerAddress] -> ShowS # | |||||
Eq peerAddress => Eq (PeerSharing peerAddress) Source # | |||||
Defined in Ouroboros.Network.Protocol.PeerSharing.Type (==) :: PeerSharing peerAddress -> PeerSharing peerAddress -> Bool # (/=) :: PeerSharing peerAddress -> PeerSharing peerAddress -> Bool # | |||||
Protocol (PeerSharing peerAddress) Source # | |||||
Defined in Ouroboros.Network.Protocol.PeerSharing.Type
| |||||
StateTokenI ('StBusy :: PeerSharing peerAddress) Source # | |||||
Defined in Ouroboros.Network.Protocol.PeerSharing.Type stateToken :: StateToken ('StBusy :: PeerSharing peerAddress) # | |||||
StateTokenI ('StDone :: PeerSharing peerAddress) Source # | |||||
Defined in Ouroboros.Network.Protocol.PeerSharing.Type stateToken :: StateToken ('StDone :: PeerSharing peerAddress) # | |||||
StateTokenI ('StIdle :: PeerSharing peerAddress) Source # | |||||
Defined in Ouroboros.Network.Protocol.PeerSharing.Type stateToken :: StateToken ('StIdle :: PeerSharing peerAddress) # | |||||
NFData peerAddress => NFData (Message (PeerSharing peerAddress) from to) Source # | |||||
Defined in Ouroboros.Network.Protocol.PeerSharing.Type rnf :: Message (PeerSharing peerAddress) from to -> () # | |||||
Show peer => Show (Message (PeerSharing peer) from to) Source # | |||||
Defined in Ouroboros.Network.Protocol.PeerSharing.Type | |||||
data Message (PeerSharing peerAddress) (from :: PeerSharing peerAddress) (to :: PeerSharing peerAddress) Source # | |||||
Defined in Ouroboros.Network.Protocol.PeerSharing.Type data Message (PeerSharing peerAddress) (from :: PeerSharing peerAddress) (to :: PeerSharing peerAddress) where
| |||||
type StateToken Source # | |||||
Defined in Ouroboros.Network.Protocol.PeerSharing.Type | |||||
type StateAgency ('StBusy :: PeerSharing peerAddress) Source # | |||||
Defined in Ouroboros.Network.Protocol.PeerSharing.Type | |||||
type StateAgency ('StDone :: PeerSharing peerAddress) Source # | |||||
Defined in Ouroboros.Network.Protocol.PeerSharing.Type | |||||
type StateAgency ('StIdle :: PeerSharing peerAddress) Source # | |||||
Defined in Ouroboros.Network.Protocol.PeerSharing.Type |
data SingPeerSharing (k1 :: PeerSharing peerAddress) where Source #
SingIdle :: forall {k} {peerAddress :: k}. SingPeerSharing ('StIdle :: PeerSharing peerAddress) | |
SingBusy :: forall {k} {peerAddress :: k}. SingPeerSharing ('StBusy :: PeerSharing peerAddress) | |
SingDone :: forall {k} {peerAddress :: k}. SingPeerSharing ('StDone :: PeerSharing peerAddress) |
Instances
Show (SingPeerSharing peerAddress2) Source # | |
Defined in Ouroboros.Network.Protocol.PeerSharing.Type showsPrec :: Int -> SingPeerSharing peerAddress2 -> ShowS # show :: SingPeerSharing peerAddress2 -> String # showList :: [SingPeerSharing peerAddress2] -> ShowS # |