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