@@ -12,6 +12,33 @@ import Swiftz
1212
1313/// A bidirectional channel for information.
1414///
15+ /// A `Proxy` is so named because it can represent many different kinds of information flows. There
16+ /// are 6 overarching specific types that a `Proxy` can represent, each with separate semantics.
17+ ///
18+ /// An effectful computation.
19+ ///
20+ /// typealias Effect<Result> = Proxy<X, (), (), X, Result>
21+ ///
22+ /// A computation that yields values of type `B`.
23+ ///
24+ /// typealias Producer<B, Result> = Proxy<X, (), (), B, Result>
25+ ///
26+ /// A computation that can await values of type `A` and yield values of type `B`.
27+ ///
28+ /// typealias Pipe<A, B, Result> = Proxy<(), A, (), B, Result>
29+ ///
30+ /// A computation that can await values of type `A`.
31+ ///
32+ /// typealias Consumer<A, Result> = Proxy<(), A, (), X, Result>
33+ ///
34+ /// Sends requests of type `RequestT` and recieves responses of type `RespondT`.
35+ ///
36+ /// typealias Client<RequestT, RespondT, Result> = Proxy<RequestT, RespondT, (), X, Result>
37+ ///
38+ /// Receives values of type `ReceiveT` and responds with values of type `RespondT`.
39+ ///
40+ /// typealias Server<ReceiveT, RespondT, Result> = Proxy<X, (), ReceiveT, RespondT, Result>
41+ ///
1542/// The type parameters are as follows:
1643///
1744/// UO - upstream output
@@ -49,9 +76,6 @@ public struct Proxy<UO, UI, DI, DO, FR> {
4976 }
5077}
5178
52- /// A `Proxy` is so named because it can represent many different kinds of information flows. There
53- /// are 6 overarching specific types that a `Proxy` can represent, each with separate semantics.
54-
5579/// An effectful computation.
5680///
5781/// `Effect`s neither await nor yield.
0 commit comments