- Client
- Pure <RT, REQ, RES, R> (R value)
- request <RT, REQ, RES> (REQ value)
- lift <RT, REQ, RES, R> (Aff<R> ma)
- lift <RT, REQ, RES, R> (Eff<R> ma)
- lift <RT, REQ, RES, R> (Aff<RT, R> ma)
- lift <RT, REQ, RES, R> (Eff<RT, R> ma)
- use <RT, REQ, RES, R> (Aff<R> ma)
- use <RT, REQ, RES, R> (Eff<R> ma)
- use <RT, REQ, RES, R> (Aff<RT, R> ma)
- use <RT, REQ, RES, R> (Eff<RT, R> ma)
- use <RT, REQ, RES, R> (Aff<R> ma, Func<R, Unit> dispose)
- use <RT, REQ, RES, R> (Eff<R> ma, Func<R, Unit> dispose)
- use <RT, REQ, RES, R> (Aff<RT, R> ma, Func<R, Unit> dispose)
- use <RT, REQ, RES, R> (Eff<RT, R> ma, Func<R, Unit> dispose)
- release <RT, REQ, RES, R> (R dispose)
- Client <RT, REQ, RES, A>
- Value
- Client (Proxy<RT, REQ, RES, Unit, Void, A> value)
- ToProxy ()
- Bind <S> (Func<A, Proxy<RT, REQ, RES, Unit, Void, S>> f)
- Map <S> (Func<A, S> f)
- Bind <B> (Func<A, Client<RT, REQ, RES, B>> f)
- SelectMany <B> (Func<A, Client<RT, REQ, RES, B>> f)
- SelectMany <B, C> (Func<A, Client<RT, REQ, RES, B>> f, Func<A, B, C> project)
- Select <B> (Func<A, B> f)
- For <C1, C> (Func<Void, Proxy<RT, REQ, RES, C1, C, Unit>> body)
- Action <S> (Proxy<RT, REQ, RES, Unit, Void, S> r)
- PairEachRequestWithRespond <UOutA, AUInA> (Func<REQ, Proxy<RT, UOutA, AUInA, REQ, RES, A>> lhs)
- ReplaceRequest <UOutA, AUInA> (Func<REQ, Proxy<RT, UOutA, AUInA, Unit, Void, RES>> lhs)
- PairEachRespondWithRequest <DInC, DOutC> (Func<Void, Proxy<RT, Unit, Void, DInC, DOutC, A>> rhs)
- ReplaceRespond <DInC, DOutC> (Func<Void, Proxy<RT, REQ, RES, DInC, DOutC, Unit>> rhs)
- Reflect ()
- Observe ()
- Deconstruct (out Proxy<RT, REQ, RES, Unit, Void, A> value)
- | (Func<REQ, Server<RT, REQ, RES, A>> x, Client<RT, REQ, RES, A> y)
- SelectMany <B> (Func<A, Release<B>> bind)
- SelectMany <B, C> (Func<A, Release<B>> bind, Func<A, B, C> project)
- & ( Client<RT, REQ, RES, A> lhs, Client<RT, REQ, RES, A> rhs)
Client
sends requests of type REQ
and receives responses of type RES
.
Clients only request
and never respond
.
Upstream | Downstream
+---------+
| |
REQ <== <== Unit
| |
RES ==> ==> Void
| | |
+----|----+
|
A
method Client<RT, REQ, RES, R> Pure <RT, REQ, RES, R> (R value) Source #
Monad return / pure
method Client<RT, REQ, RES, RES> request <RT, REQ, RES> (REQ value) Source #
Send a value of type RES
downstream and block waiting for a reply of type REQ
respond
is the identity of the respond category.
method Client<RT, REQ, RES, R> lift <RT, REQ, RES, R> (Aff<R> ma) Source #
Lift am IO monad into the Proxy
monad transformer
method Client<RT, REQ, RES, R> lift <RT, REQ, RES, R> (Eff<R> ma) Source #
Lift am IO monad into the Proxy
monad transformer
method Client<RT, REQ, RES, R> lift <RT, REQ, RES, R> (Aff<RT, R> ma) Source #
Lift am IO monad into the Proxy
monad transformer
method Client<RT, REQ, RES, R> lift <RT, REQ, RES, R> (Eff<RT, R> ma) Source #
Lift am IO monad into the Proxy
monad transformer
method Client<RT, REQ, RES, R> use <RT, REQ, RES, R> (Aff<R> ma) Source #
Lift am IO monad into the Proxy
monad transformer
method Client<RT, REQ, RES, R> use <RT, REQ, RES, R> (Eff<R> ma) Source #
Lift am IO monad into the Proxy
monad transformer
method Client<RT, REQ, RES, R> use <RT, REQ, RES, R> (Aff<RT, R> ma) Source #
Lift am IO monad into the Proxy
monad transformer
method Client<RT, REQ, RES, R> use <RT, REQ, RES, R> (Eff<RT, R> ma) Source #
Lift am IO monad into the Proxy
monad transformer
method Client<RT, REQ, RES, R> use <RT, REQ, RES, R> (Aff<R> ma, Func<R, Unit> dispose) Source #
Lift am IO monad into the Proxy
monad transformer
method Client<RT, REQ, RES, R> use <RT, REQ, RES, R> (Eff<R> ma, Func<R, Unit> dispose) Source #
Lift am IO monad into the Proxy
monad transformer
method Client<RT, REQ, RES, R> use <RT, REQ, RES, R> (Aff<RT, R> ma, Func<R, Unit> dispose) Source #
Lift am IO monad into the Proxy
monad transformer
class Client <RT, REQ, RES, A> Source #
Client
sends requests of type REQ
and receives responses of type RES
.
Clients only request
and never respond
.
Upstream | Downstream
+---------+
| |
REQ <== <== Unit
| |
RES ==> ==> Void
| | |
+----|----+
|
A
method Proxy<RT, REQ, RES, Unit, Void, A> ToProxy () Source #
Calling this will effectively cast the sub-type to the base.
This type wraps up a Proxy
for convenience, and so it's a Proxy
proxy. So calling this method
isn't exactly the same as a cast operation, as it unwraps the Proxy
from within. It has the same effect
however, and removes a level of indirection
returns | A general |
method Proxy<RT, REQ, RES, Unit, Void, S> Bind <S> (Func<A, Proxy<RT, REQ, RES, Unit, Void, S>> f) Source #
Monadic bind operation, for chaining Proxy
computations together.
type | B | The mapped bound value type |
param | f | The bind function |
returns | A new |
method Proxy<RT, REQ, RES, Unit, Void, S> Map <S> (Func<A, S> f) Source #
Lifts a pure function into the Proxy
domain, causing it to map the bound value within
type | B | The mapped bound value type |
param | f | The map function |
returns | A new |
method Client<RT, REQ, RES, B> Bind <B> (Func<A, Client<RT, REQ, RES, B>> f) Source #
Monadic bind operation, for chaining Client
computations together.
type | B | The mapped bound value type |
param | f | The bind function |
returns | A new |
method Client<RT, REQ, RES, B> SelectMany <B> (Func<A, Client<RT, REQ, RES, B>> f) Source #
Monadic bind operation, for chaining Client
computations together.
type | B | The mapped bound value type |
param | f | The bind function |
returns | A new |
method Client<RT, REQ, RES, C> SelectMany <B, C> (Func<A, Client<RT, REQ, RES, B>> f, Func<A, B, C> project) Source #
Monadic bind operation, for chaining Client
computations together.
type | B | The mapped bound value type |
param | f | The bind function |
returns | A new |
method Client<RT, REQ, RES, B> Select <B> (Func<A, B> f) Source #
Lifts a pure function into the Proxy
domain, causing it to map the bound value within
type | B | The mapped bound value type |
param | f | The map function |
returns | A new |
method Proxy<RT, REQ, RES, C1, C, A> For <C1, C> (Func<Void, Proxy<RT, REQ, RES, C1, C, Unit>> body) Source #
For(body)
loops over the Proxy p
replacing each yield
with body
param | body | Any |
returns | A new |
method Proxy<RT, REQ, RES, Unit, Void, S> Action <S> (Proxy<RT, REQ, RES, Unit, Void, S> r) Source #
Applicative action
Invokes this Proxy
, then the Proxy r
param | r |
|
method Proxy<RT, UOutA, AUInA, Unit, Void, A> PairEachRequestWithRespond <UOutA, AUInA> (Func<REQ, Proxy<RT, UOutA, AUInA, REQ, RES, A>> lhs) Source #
Used by the various composition functions and when composing proxies with the |
operator. You usually
wouldn't need to call this directly, instead either pipe them using |
or call Proxy.compose(lhs, rhs)
(f +>> p) pairs each 'request' in this
with a 'respond' in lhs
.
method Proxy<RT, UOutA, AUInA, Unit, Void, A> ReplaceRequest <UOutA, AUInA> (Func<REQ, Proxy<RT, UOutA, AUInA, Unit, Void, RES>> lhs) Source #
Used by the various composition functions and when composing proxies with the |
operator. You usually
wouldn't need to call this directly, instead either pipe them using |
or call Proxy.compose(lhs, rhs)
method Proxy<RT, REQ, RES, DInC, DOutC, A> PairEachRespondWithRequest <DInC, DOutC> (Func<Void, Proxy<RT, Unit, Void, DInC, DOutC, A>> rhs) Source #
Used by the various composition functions and when composing proxies with the |
operator. You usually
wouldn't need to call this directly, instead either pipe them using |
or call Proxy.compose(lhs, rhs)
method Proxy<RT, REQ, RES, DInC, DOutC, A> ReplaceRespond <DInC, DOutC> (Func<Void, Proxy<RT, REQ, RES, DInC, DOutC, Unit>> rhs) Source #
Used by the various composition functions and when composing proxies with the |
operator. You usually
wouldn't need to call this directly, instead either pipe them using |
or call Proxy.compose(lhs, rhs)
method Proxy<RT, Void, Unit, RES, REQ, A> Reflect () Source #
Reverse the arrows of the Proxy
to find its dual.
returns | The dual of |
method Proxy<RT, REQ, RES, Unit, Void, A> Observe () Source #
Observe(lift (Pure(r))) = Observe(Pure(r))
Observe(lift (m.Bind(f))) = Observe(lift(m.Bind(x => lift(f(x)))))
This correctness comes at a small cost to performance, so use this function sparingly. This function is a convenience for low-level pipes implementers. You do not need to use observe if you stick to the safe API.
method void Deconstruct (out Proxy<RT, REQ, RES, Unit, Void, A> value) Source #
method Client<RT, REQ, RES, B> SelectMany <B> (Func<A, Release<B>> bind) Source #
Monadic bind operation, for chaining Client
computations together.
type | B | The mapped bound value type |
param | f | The bind function |
returns | A new |
method Client<RT, REQ, RES, C> SelectMany <B, C> (Func<A, Release<B>> bind, Func<A, B, C> project) Source #
Monadic bind operation, for chaining Client
computations together.
type | B | The mapped bound value type |
param | f | The bind function |
returns | A new |
operator | (Func<REQ, Server<RT, REQ, RES, A>> x, Client<RT, REQ, RES, A> y) Source #
Compose a Server
and a Client
together into an Effect
. Note the Server
is provided as a function
that takes a value of REQ
. This is how we model the request coming into the Server
. The resulting
Server
computation can then call Server.respond(response)
to reply to the Client
.
The Client
simply calls Client.request(req)
to post a request to the Server
, it is like an awaiting
that also posts. It will await the response from the Server
.
param | x |
|
param | y |
|
returns |
|