Moduletyped-protocols-1.2.2.0
Network.TypedProtocol
- 20 types
- 3 classes
- 17 values
- Packagetyped-protocols-1.2.2.0
- Exports49
- LicenceApache-2.0
Constructors
ClientHasAgency :: StateAgency st ~ 'ClientAgency => ActiveAgency' st 'ClientAgencyServerHasAgency :: StateAgency st ~ 'ServerAgency => ActiveAgency' st 'ServerAgency
Instances1Show
Show (ActiveAgency' st agency)Defined in typed-protocols-1.2.2.0 · Network.TypedProtocol.Core
Constructors
Instances4SingI, Sing
SingI 'ClientAgencyDefined in typed-protocols-1.2.2.0 · Network.TypedProtocol.CoreSingI 'NobodyAgencyDefined in typed-protocols-1.2.2.0 · Network.TypedProtocol.CoreSingI 'ServerAgencyDefined in typed-protocols-1.2.2.0 · Network.TypedProtocol.Coretype Sing = SingAgencyDefined in typed-protocols-1.2.2.0 · Network.TypedProtocol.Core
Equations
Methods
activeAgency :: ActiveAgency' st agency
Instances2IsActiveState
'ClientAgency ~ StateAgency st => IsActiveState st 'ClientAgencyDefined in typed-protocols-1.2.2.0 · Network.TypedProtocol.Core'ServerAgency ~ StateAgency st => IsActiveState st 'ServerAgencyDefined in typed-protocols-1.2.2.0 · Network.TypedProtocol.Core
Constructors
Pipelined :: N -> Type -> IsPipelined psNonPipelined :: IsPipelined psLookahead :: N -> SenderVariability ps -> IsPipelined ps
type
type NobodyHasAgencyProof (pr :: PeerRole) (st :: ps) = ReflRelativeAgency (StateAgency st) 'NobodyHasAgency (Relative pr (StateAgency st))Equations
Outstanding 'NonPipelined = 'ZOutstanding ('Pipelined n _1) = nOutstanding ('Lookahead _1 _2) = 'Z
Equations
OutstandingSenders 'NonPipelined = 'ZOutstandingSenders ('Pipelined _1 _2) = 'ZOutstandingSenders ('Lookahead n _1) = n
Associated types
data family Message ps (st :: ps) (st' :: ps)type family StateAgency (st :: ps) :: Agencytype family StateToken :: ps -> Type
Constructors
Equations
Constructors
Constructors
VariableSender :: SenderVariability psFixedSender :: ps -> ps -> SenderVariability ps
Constructors
Instances1Show
Show (SingAgency a)Defined in typed-protocols-1.2.2.0 · Network.TypedProtocol.Core
Constructors
Instances1Show
Show (SingPeerRole pr)Defined in typed-protocols-1.2.2.0 · Network.TypedProtocol.Core
Methods
stateToken :: StateToken st
type
type TheyHaveAgencyProof (pr :: PeerRole) (st :: ps) = ReflRelativeAgency (StateAgency st) 'TheyHaveAgency (Relative pr (StateAgency st))type
type WeHaveAgencyProof (pr :: PeerRole) (st :: ps) = ReflRelativeAgency (StateAgency st) 'WeHaveAgency (Relative pr (StateAgency st))Constructors
DriversendMessage :: forall (st :: ps) (st' :: ps). (StateTokenI st, StateTokenI st', ActiveState st) => WeHaveAgencyProof pr st -> Message ps st st' -> m ()recvMessage :: forall (st :: ps). (StateTokenI st, ActiveState st) => TheyHaveAgencyProof pr st -> dstate -> m (SomeMessage st, dstate)initialDState :: dstate
Constructors
SomeMessage :: (StateTokenI st, StateTokenI st', ActiveState st) => Message ps st st' -> SomeMessage st
Constructors
TerminalStates :: StateAgency st ~ 'NobodyAgency => StateToken st -> StateToken st -> TerminalStates ps