Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Server ps (st :: ps) (f :: ps -> Type) (m :: Type -> Type) a = Peer ps 'AsServer st f m a
- pattern Effect :: forall ps st f m a. m (Server ps st f m a) -> Server ps st f m a
- pattern Yield :: forall ps st f m a st'. () => (StateTokenI st, StateTokenI st', StateAgency st ~ 'ServerAgency) => f st -> f st' -> Message ps st st' -> Server ps st' f m a -> Server ps st f m a
- pattern Await :: forall ps st f m a. () => (StateTokenI st, StateAgency st ~ 'ClientAgency) => (forall (st' :: ps). f st -> Message ps st st' -> (Server ps st' f m a, f st')) -> Server ps st f m a
- pattern Done :: forall ps st f m a. () => (StateTokenI st, StateAgency st ~ 'NobodyAgency) => a -> Server ps st f m a
Server type alias and its pattern synonyms
type Server ps (st :: ps) (f :: ps -> Type) (m :: Type -> Type) a = Peer ps 'AsServer st f m a Source #
Server role pattern for Effect
.
:: forall ps st f m a st'. () | |
=> (StateTokenI st, StateTokenI st', StateAgency st ~ 'ServerAgency) | |
=> f st | |
-> f st' | |
-> Message ps st st' | protocol message |
-> Server ps st' f m a | continuation |
-> Server ps st f m a |
Server role pattern for Yield
:: forall ps st f m a. () | |
=> (StateTokenI st, StateAgency st ~ 'ClientAgency) | |
=> (forall (st' :: ps). f st -> Message ps st st' -> (Server ps st' f m a, f st')) | continuation |
-> Server ps st f m a |
Server role pattern for Await
:: forall ps st f m a. () | |
=> (StateTokenI st, StateAgency st ~ 'NobodyAgency) | |
=> a | protocol return value |
-> Server ps st f m a |
Server role pattern for Done