-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcats-effect.dot
73 lines (59 loc) · 2.42 KB
/
cats-effect.dot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
digraph G {
rankdir=LR
node [fontname=courier shape=none]
edge [fontname=courier color=grey fontcolor=grey60]
labelloc=t
fontname="times-italic"
// fontsize=32
// style=dotted
color=white
label="cats-effect"
feab [label=<F[Either[<font color="red3">A</font>, <font color="blue3">B</font>]]>]
// subgraph cluster_fa {
// label=""
fa [label=<F[<font color="red3">A</font>]>]
// }
fb [label=<F[<font color="blue3">B</font>]>]
lazy_a [label=<<font color="red3">⇒ A</font>>]
ioa [label=<IO[<font color="red3">A</font>]>]
cb [label=<(Either[Throwable, <font color="red3">A</font>] ⇒ Unit) ⇒ Unit>]
fu [label="F[Unit]"]
subgraph cluster_bracket {
label=""
// bgcolor=green
fa -> fb [label=<Bracket[F].bracket(_)<br/>(<font color="red3">A</font> ⇒ F[<font color="blue3">B</font>])<br/>(<font color="red3">A</font> ⇒ F[Unit])>]
}
// a -> fa [label="Apply[F].pure"]
subgraph cluster_sync {
label=""
lazy_a -> fa [label="Sync[F].delay"]
}
cb -> fa [label="Async[F].async"]
subgraph cluster_io {
label=""
future_a [label=<Future[<font color="red3">A</font>]>]
io_future_a [label=<IO[Future[<font color="red3">A</font>]]>]
ioa -> fa [label="LiftIO.liftIO"]
ioa -> future_a [label="unsafeToFuture"]
future_a -> io_future_a [label="IO.delay"]
io_future_a -> ioa [label="IO.fromFuture"]
}
subgraph cluster_concurrent {
label="Concurrent[F]"
bgcolor=lightcyan
fafb [label=<(F[<font color="red3">A</font>], F[<font color="blue3">B</font>])>]
cancel [label=<(Either[Throwable, <font color="red3">A</font>] ⇒ Unit) ⇒ CancelToken[F]>]
f_fiber_fa [label=<F[Fiber[F, <font color="red3">A</font>]]>]
fiber [label=<Fiber[F, <font color="red3">A</font>]>]
cancel -> fa [label="Concurrent[F].cancelable"]
fa -> f_fiber_fa [label="Concurrent[F].start"]
fafb -> feab [label="Concurrent[F].race"]
fiber -> fa [label="join"]
fiber -> fu [label="cancel"]
f_fiber_fa -> fiber [style=dotted arrowhead=none]
}
syncio_unit [label="SyncIO[Unit]"]
fa -> syncio_unit [label=<Effect[F].runAsync(_)<br/>(Either[Throwable, <font color="red3">A</font>] ⇒ IO[Unit])>]
syncio_cancel [label="SyncIO[CancelToken[F]]"]
fa -> syncio_cancel [label=<ConcurrentEffect[F].runCancelable(_)<br/>(Either[Throwable, <font color="red3">A</font>] ⇒ IO[Unit])>]
}