From acdabc48455bc3d458220961d401def30acd02c8 Mon Sep 17 00:00:00 2001 From: Ihar Tsalka Date: Thu, 27 Oct 2022 12:14:48 +0300 Subject: [PATCH 1/6] Update typeclasses.md Update the infographic to modern cats/cats-effect versions --- docs/typeclasses.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/typeclasses.md b/docs/typeclasses.md index 6e7cf551a1..017dc3e947 100644 --- a/docs/typeclasses.md +++ b/docs/typeclasses.md @@ -227,8 +227,8 @@ You can find out more about law testing [here](typeclasses/lawtesting.md). ## Type classes in Cats -infographic -From [cats-infographic by @tpolecat](https://github.com/tpolecat/cats-infographic). +infographic +From [cats-infographic by @tsobako (originally developed by @tpolecat)](https://github.com/tsobako/cats-infographic). ## Incomplete type class instances in cats From 586ff8a63c5d1e06b108cbdf4b6c0f52bd7be443 Mon Sep 17 00:00:00 2001 From: Ihar Tsalka Date: Thu, 27 Oct 2022 12:17:44 +0300 Subject: [PATCH 2/6] Update typeclasses.md Fix link --- docs/typeclasses.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/typeclasses.md b/docs/typeclasses.md index 017dc3e947..589a11892f 100644 --- a/docs/typeclasses.md +++ b/docs/typeclasses.md @@ -228,7 +228,7 @@ You can find out more about law testing [here](typeclasses/lawtesting.md). ## Type classes in Cats infographic -From [cats-infographic by @tsobako (originally developed by @tpolecat)](https://github.com/tsobako/cats-infographic). +From [cats-infographic by @tsobako, originally developed by @tpolecat](https://github.com/tsobako/cats-infographic). ## Incomplete type class instances in cats From 545797cbd801e3969c5152783e63711a183520a2 Mon Sep 17 00:00:00 2001 From: Ihar Tsalka Date: Thu, 3 Nov 2022 15:31:55 +0300 Subject: [PATCH 3/6] Update inforgraphic for new cats version --- docs/img/cats-typeclasses.svg | 581 ++++++++++++++++++++++++++++++++++ docs/typeclasses.md | 4 +- 2 files changed, 583 insertions(+), 2 deletions(-) create mode 100644 docs/img/cats-typeclasses.svg diff --git a/docs/img/cats-typeclasses.svg b/docs/img/cats-typeclasses.svg new file mode 100644 index 0000000000..899bd50203 --- /dev/null +++ b/docs/img/cats-typeclasses.svg @@ -0,0 +1,581 @@ + + + + + + + + + + + + + + + + + + + + + + + + +Band + + +BoundedSemilattice + + +CommutativeGroup + + +CommutativeMonoid + + +CommutativeSemigroup + + +Eq + + +Group + + +Semigroup + + +Monoid + + +Order + + +PartialOrder + + +Semilattice + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Alternative + + +Applicative + + +ApplicativeError + + +Apply + + +Bifoldable + + +Bimonad + + +Bitraverse + + +Semigroupal + + +CoflatMap + + +Comonad + + +ContravariantSemigroupal + + +FlatMap + + +Foldable + + +Functor + + +Inject + + +InvariantSemigroupal + + +Monad + + +MonadError + + +MonoidK + + +NotNull + + +Reducible + + +SemigroupK + + +Show + + +Ask + + + + + + + + + + + + + + + + + + + + + + + + + + +Bifunctor + + +Contravariant + + +Invariant + + +Profunctor + + +Strong + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Traverse + + + + + + + + +Arrow + + +Category + + +Choice + + +Compose + + + + + + + + + + + + +Cats Type Classes + + +kernel + + +core/arrow + + +core +The highlighted type classes are the first ones +you should learn. They’re well documented +and well-known so it’s easy to get help. + +a |+| b + +a === b +a =!= b + +a >>> b +a <<< b + +a > b +a >= b +a < b +a <= b + + + +GenSpawn + + +GenConcurrent + + + + + + + + +effect +Some type classes introduce +symbolic operators. + + + +NonEmptyTraverse + + + + + + + + +InjectK + + +CommutativeArrow + + + + + +CommutativeFlatMap + + + + + +CommutativeMonad + + + + + + + + + + + +Local + + + + + +Listen + + +Tell + + + + + + + + +Raise + + + + + +Chronicle + + + + + +Stateful + + + + + +Functor + + +Applicative + + +Monad + + +mtl +MTL type classes do not extend core type +classes directly, but the effect is similar; the +dashed line can be read “implies”. + + + +Hash + + + + + +CommutativeApply + + + + + +CommutativeApplicative + + + + + + + + + + + + + + +Parallel + + +NonEmptyParallel + + + + + +ContravariantMonoidal + + + + + + + + +Distributive + + +InvariantMonoidal + + + + + +UnorderedFoldable + + + + + +UnorderedTraverse + + + + + + +cats-infographic 2.2 +for cats 2.5.0, cats-effect 3.0.1, and cats-mtl 1.1.1 • +  +Source available at github.com/tpolecat/cats-infographic • +  +Shareable under CC-BY-SA 4.0 + + +MonadCancel + + + + + +Unique + + + + + + + + +GenTemporal + + + + + +Clock + + + + + +Async + + + + + +Sync + + + + + + + + + + + +Defer + + + + + +Handle + + + + + +Censor + + + + + +Monoid + + + + + +ArrowChoice + + + + + + + + + diff --git a/docs/typeclasses.md b/docs/typeclasses.md index 589a11892f..6b5762c27f 100644 --- a/docs/typeclasses.md +++ b/docs/typeclasses.md @@ -227,8 +227,8 @@ You can find out more about law testing [here](typeclasses/lawtesting.md). ## Type classes in Cats -infographic -From [cats-infographic by @tsobako, originally developed by @tpolecat](https://github.com/tsobako/cats-infographic). +![Infographic](img/cats-typeclasses.svg) +(From cats-infographic by @tsobako, originally developed by @tpolecat). ## Incomplete type class instances in cats From 67aaa9a52c6785948ed73bbafdffcb364d1c8840 Mon Sep 17 00:00:00 2001 From: Ihar Tsalka Date: Mon, 7 Nov 2022 10:32:26 +0300 Subject: [PATCH 4/6] Remove svg typeclass graph and add mermaid version --- docs/img/cats-typeclasses.svg | 581 ---------------------------------- docs/typeclasses.md | 236 +++++++++++++- 2 files changed, 234 insertions(+), 583 deletions(-) delete mode 100644 docs/img/cats-typeclasses.svg diff --git a/docs/img/cats-typeclasses.svg b/docs/img/cats-typeclasses.svg deleted file mode 100644 index 899bd50203..0000000000 --- a/docs/img/cats-typeclasses.svg +++ /dev/null @@ -1,581 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - -Band - - -BoundedSemilattice - - -CommutativeGroup - - -CommutativeMonoid - - -CommutativeSemigroup - - -Eq - - -Group - - -Semigroup - - -Monoid - - -Order - - -PartialOrder - - -Semilattice - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Alternative - - -Applicative - - -ApplicativeError - - -Apply - - -Bifoldable - - -Bimonad - - -Bitraverse - - -Semigroupal - - -CoflatMap - - -Comonad - - -ContravariantSemigroupal - - -FlatMap - - -Foldable - - -Functor - - -Inject - - -InvariantSemigroupal - - -Monad - - -MonadError - - -MonoidK - - -NotNull - - -Reducible - - -SemigroupK - - -Show - - -Ask - - - - - - - - - - - - - - - - - - - - - - - - - - -Bifunctor - - -Contravariant - - -Invariant - - -Profunctor - - -Strong - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Traverse - - - - - - - - -Arrow - - -Category - - -Choice - - -Compose - - - - - - - - - - - - -Cats Type Classes - - -kernel - - -core/arrow - - -core -The highlighted type classes are the first ones -you should learn. They’re well documented -and well-known so it’s easy to get help. - -a |+| b - -a === b -a =!= b - -a >>> b -a <<< b - -a > b -a >= b -a < b -a <= b - - - -GenSpawn - - -GenConcurrent - - - - - - - - -effect -Some type classes introduce -symbolic operators. - - - -NonEmptyTraverse - - - - - - - - -InjectK - - -CommutativeArrow - - - - - -CommutativeFlatMap - - - - - -CommutativeMonad - - - - - - - - - - - -Local - - - - - -Listen - - -Tell - - - - - - - - -Raise - - - - - -Chronicle - - - - - -Stateful - - - - - -Functor - - -Applicative - - -Monad - - -mtl -MTL type classes do not extend core type -classes directly, but the effect is similar; the -dashed line can be read “implies”. - - - -Hash - - - - - -CommutativeApply - - - - - -CommutativeApplicative - - - - - - - - - - - - - - -Parallel - - -NonEmptyParallel - - - - - -ContravariantMonoidal - - - - - - - - -Distributive - - -InvariantMonoidal - - - - - -UnorderedFoldable - - - - - -UnorderedTraverse - - - - - - -cats-infographic 2.2 -for cats 2.5.0, cats-effect 3.0.1, and cats-mtl 1.1.1 • -  -Source available at github.com/tpolecat/cats-infographic • -  -Shareable under CC-BY-SA 4.0 - - -MonadCancel - - - - - -Unique - - - - - - - - -GenTemporal - - - - - -Clock - - - - - -Async - - - - - -Sync - - - - - - - - - - - -Defer - - - - - -Handle - - - - - -Censor - - - - - -Monoid - - - - - -ArrowChoice - - - - - - - - - diff --git a/docs/typeclasses.md b/docs/typeclasses.md index 6b5762c27f..d1d3f1154f 100644 --- a/docs/typeclasses.md +++ b/docs/typeclasses.md @@ -227,8 +227,240 @@ You can find out more about law testing [here](typeclasses/lawtesting.md). ## Type classes in Cats -![Infographic](img/cats-typeclasses.svg) -(From cats-infographic by @tsobako, originally developed by @tpolecat). +```mermaid +graph BT; + + classDef core fill:#BBBBFF,stroke-width:2px,stroke:#000; + classDef coreImportant fill:#6666FF,stroke-width:2px,stroke:#000; + classDef kernel fill:#FF99FF,stroke-width:2px,stroke:#000; + classDef kernelImportant fill:#FF00FF,stroke-width:2px,stroke:#000; + classDef effect fill:#FFFF00,stroke-width:2px,stroke:#000; + classDef arrow fill:#FFFF99,stroke-width:2px,stroke:#000; + classDef coreInMtl fill:#AAAA88,stroke-width:2px,stroke:#000; + classDef mtl fill:#FFBBBB,stroke-width:2px,stroke:#000; + + subgraph kernel + direction BT + id1(Eq):::kernelImportant; + id2(PartialOrder):::kernel; + id3(Hash):::kernel; + id4(Order):::kernelImportant; + + id2-->id1; + id3-->id1; + id4-->id2; + end + + subgraph core + direction BT + id5(Bifoldable):::core; + id6(Bifunctor):::core; + id7(Bitraverse):::core; + + id7-->id5; + id7-->id6; + end + + subgraph kernel + direction BT + id8(Semigroup):::kernelImportant; + id9(Band):::kernel; + id10(CommutativeSemigroup):::kernel; + id11(Monoid):::kernelImportant; + id12(Semilattice):::kernel; + id13(CommutativeMonoid):::kernel; + id14(Group):::kernel; + id15(BoundedSemilattice):::kernel; + id16(CommutativeGroup):::kernel; + + id9-->id8; + id10-->id8; + id11-->id8; + id12-->id9; + id12-->id10; + id13-->id10; + id13-->id11; + id14-->id11; + id15-->id12; + id15-->id13; + id16-->id13; + id16-->id14; + end + + subgraph arrow + direction BT + id17(Compose):::arrow; + id18(Profunctor):::arrow; + id19(Category):::arrow; + id20(Strong):::arrow; + id21(Choice):::arrow; + id22(Arrow):::arrow; + id23(ArrowChoice):::arrow; + id24(CommutaticeArrow):::arrow; + + id19-->id17; + id20-->id18; + id21-->id19; + id22-->id19; + id22-->id20; + id23-->id21; + id23-->id22; + id24-->id22; + end + + subgraph core + direction BT + id25(UnorderedFoldable):::core; + id26(UnorderedTraverse):::core; + id27(Invariant):::core; + id28(Foldable):::coreImportant; + id29(Functor):::coreImportant; + id30(Semigroupal):::core; + id31(Contravariant):::core; + id32(Reducible):::core; + id33(Traverse):::coreImportant; + id34(InvariantSemigroupal):::core; + id35(ContravariantSemigroupal):::core; + id36(NonEmptyTraverse):::core; + id37(Distributive):::core; + id38(Apply):::core; + id39(InvariantMonoidal):::core; + id40(CoflatMap):::core; + id41(FlatMap):::core; + id42(CommutativeApply):::core; + id43(Applicative):::coreImportant; + id44(ContravariantMonoidal):::core; + id45(Comonad):::core; + id46(CommutativeFlatMap):::core; + id47(Monad):::coreImportant; + id48(CommutativeApplicative):::core; + id49(ApplicativeError):::core; + id50(Bimonad):::core; + id51(CommutativeMonad):::core; + id52(MonadError):::core; + id53(SemigroupK):::core; + id56(NonEmptyAlternative):::core; + id54(MonoidK):::core; + id55(Alternative):::coreImportant; + + id26-->id25; + id28-->id25; + id29-->id27; + id31-->id27; + id32-->id28; + id33-->id26; + id33-->id28; + id33-->id29; + id34-->id27; + id34-->id30; + id35-->id31; + id35-->id34; + id36-->id32; + id36-->id33; + id38-->id29; + id38-->id34; + id39-->id34; + id40-->id29; + id37-->id29; + id41-->id38; + id42-->id38; + id43-->id38; + id43-->id39; + id44-->id35; + id44-->id39; + id45-->id40; + id46-->id41; + id46-->id42; + id47-->id41; + id47-->id43; + id48-->id42; + id48-->id43; + id49-->id43; + id50-->id45; + id50-->id47; + id51-->id46; + id51-->id47; + id51-->id48; + id52-->id47; + id52-->id49; + id56-->id43; + id56-->id53; + id55-->id43; + id55-->id54; + id55-->id56; + id54-->id53; + end + + subgraph effect + direction BT + id57(Unique):::effect; + id58(MonadCancel):::effect; + id59(GenSpawn):::effect; + id60(Clock):::effect; + id61(GenConcurrent):::effect; + id62(Defer):::effect; + id63(GenTemporal):::effect; + id64(Sync):::effect; + id65(Async):::effect; + + id58-->id52; + id59-->id57; + id59-->id58; + id61-->id59; + id63-->id60; + id63-->id61; + id64-->id57; + id64-->id58; + id64-->id60; + id64-->id62; + id65-->id63; + id65-->id64; + end + + subgraph mtl + direction BT + id66(Applicative):::coreInMtl; + id67(Functor):::coreInMtl; + id68(Ask):::mtl; + id69(Raise):::mtl; + id70(Tell):::mtl; + id71(Local):::mtl; + id72(Handle):::mtl; + id73(Listen):::mtl; + id74(Monoid):::coreInMtl; + id75(Monad):::coreInMtl; + id76(Censor):::mtl; + id77(Stateful):::mtl; + id78(Chronicle):::mtl; + + id68-.->id66; + id69-.->id67; + id70-.->id67; + id71--->id68; + id72-.->id66; + id72--->id69; + id73--->id70; + id76--->id73; + id76-.->id74; + id77-.->id75; + id78-.->id75; + id76-.->id66; + end + + + subgraph core + direction BT + id79(NotNull):::core; + id80(Show):::core; + id81(Inject):::core; + id82(InjectK):::core; + id83(Parallel):::core; + id84(NonEmptyParallel):::core; + + id83-->id84; + end +``` +(The typeclass graph based on @tpolecat's repository `cats-infographic`). ## Incomplete type class instances in cats From 5ca9f635184db2748ddea50ee081c70b3d06f7aa Mon Sep 17 00:00:00 2001 From: Ihar Tsalka Date: Mon, 7 Nov 2022 11:18:07 +0300 Subject: [PATCH 5/6] Fix tabs in mermaid graph --- docs/typeclasses.md | 143 ++++++++++++++++++++++---------------------- 1 file changed, 71 insertions(+), 72 deletions(-) diff --git a/docs/typeclasses.md b/docs/typeclasses.md index d1d3f1154f..16e8a8ceb9 100644 --- a/docs/typeclasses.md +++ b/docs/typeclasses.md @@ -245,10 +245,10 @@ graph BT; id2(PartialOrder):::kernel; id3(Hash):::kernel; id4(Order):::kernelImportant; - - id2-->id1; - id3-->id1; - id4-->id2; + + id2-->id1; + id3-->id1; + id4-->id2; end subgraph core @@ -256,11 +256,11 @@ graph BT; id5(Bifoldable):::core; id6(Bifunctor):::core; id7(Bitraverse):::core; - - id7-->id5; - id7-->id6; + + id7-->id5; + id7-->id6; end - + subgraph kernel direction BT id8(Semigroup):::kernelImportant; @@ -272,21 +272,21 @@ graph BT; id14(Group):::kernel; id15(BoundedSemilattice):::kernel; id16(CommutativeGroup):::kernel; - - id9-->id8; - id10-->id8; - id11-->id8; - id12-->id9; - id12-->id10; - id13-->id10; - id13-->id11; - id14-->id11; - id15-->id12; - id15-->id13; - id16-->id13; - id16-->id14; + + id9-->id8; + id10-->id8; + id11-->id8; + id12-->id9; + id12-->id10; + id13-->id10; + id13-->id11; + id14-->id11; + id15-->id12; + id15-->id13; + id16-->id13; + id16-->id14; end - + subgraph arrow direction BT id17(Compose):::arrow; @@ -297,17 +297,17 @@ graph BT; id22(Arrow):::arrow; id23(ArrowChoice):::arrow; id24(CommutaticeArrow):::arrow; - - id19-->id17; - id20-->id18; - id21-->id19; - id22-->id19; - id22-->id20; - id23-->id21; - id23-->id22; - id24-->id22; + + id19-->id17; + id20-->id18; + id21-->id19; + id22-->id19; + id22-->id20; + id23-->id21; + id23-->id22; + id24-->id22; end - + subgraph core direction BT id25(UnorderedFoldable):::core; @@ -390,7 +390,7 @@ graph BT; id55-->id56; id54-->id53; end - + subgraph effect direction BT id57(Unique):::effect; @@ -402,7 +402,7 @@ graph BT; id63(GenTemporal):::effect; id64(Sync):::effect; id65(Async):::effect; - + id58-->id52; id59-->id57; id59-->id58; @@ -416,48 +416,47 @@ graph BT; id65-->id63; id65-->id64; end - + subgraph mtl - direction BT - id66(Applicative):::coreInMtl; - id67(Functor):::coreInMtl; - id68(Ask):::mtl; - id69(Raise):::mtl; - id70(Tell):::mtl; - id71(Local):::mtl; - id72(Handle):::mtl; - id73(Listen):::mtl; - id74(Monoid):::coreInMtl; - id75(Monad):::coreInMtl; - id76(Censor):::mtl; - id77(Stateful):::mtl; - id78(Chronicle):::mtl; - - id68-.->id66; - id69-.->id67; - id70-.->id67; - id71--->id68; - id72-.->id66; - id72--->id69; - id73--->id70; - id76--->id73; - id76-.->id74; - id77-.->id75; - id78-.->id75; - id76-.->id66; + direction BT + id66(Applicative):::coreInMtl; + id67(Functor):::coreInMtl; + id68(Ask):::mtl; + id69(Raise):::mtl; + id70(Tell):::mtl; + id71(Local):::mtl; + id72(Handle):::mtl; + id73(Listen):::mtl; + id74(Monoid):::coreInMtl; + id75(Monad):::coreInMtl; + id76(Censor):::mtl; + id77(Stateful):::mtl; + id78(Chronicle):::mtl; + + id68-.->id66; + id69-.->id67; + id70-.->id67; + id71--->id68; + id72-.->id66; + id72--->id69; + id73--->id70; + id76--->id73; + id76-.->id74; + id77-.->id75; + id78-.->id75; + id76-.->id66; end - - + subgraph core direction BT - id79(NotNull):::core; - id80(Show):::core; - id81(Inject):::core; - id82(InjectK):::core; - id83(Parallel):::core; - id84(NonEmptyParallel):::core; - - id83-->id84; + id79(NotNull):::core; + id80(Show):::core; + id81(Inject):::core; + id82(InjectK):::core; + id83(Parallel):::core; + id84(NonEmptyParallel):::core; + + id83-->id84; end ``` (The typeclass graph based on @tpolecat's repository `cats-infographic`). From a5cc0bb93afa7cd937e754cc2640e54e4f730fc1 Mon Sep 17 00:00:00 2001 From: Ihar Tsalka Date: Wed, 7 Dec 2022 16:33:10 +0300 Subject: [PATCH 6/6] Refactor typeclass mermaid diagram --- docs/typeclasses.md | 119 +++++++++++++++++++++++++++----------------- 1 file changed, 73 insertions(+), 46 deletions(-) diff --git a/docs/typeclasses.md b/docs/typeclasses.md index 16e8a8ceb9..24146eda3d 100644 --- a/docs/typeclasses.md +++ b/docs/typeclasses.md @@ -1,4 +1,8 @@ # Type Classes + + + + Type classes are a powerful tool used in functional programming to enable ad-hoc polymorphism, more commonly known as overloading. Where many object-oriented languages leverage subtyping for polymorphic code, functional programming tends towards a combination of parametric polymorphism (think type parameters, like Java generics) @@ -227,17 +231,13 @@ You can find out more about law testing [here](typeclasses/lawtesting.md). ## Type classes in Cats +Dotted line means that typeclass does not inherit other typeclass, but uses it. +The highlighted type classes are the most important to learn in particular library. + ```mermaid graph BT; - - classDef core fill:#BBBBFF,stroke-width:2px,stroke:#000; - classDef coreImportant fill:#6666FF,stroke-width:2px,stroke:#000; classDef kernel fill:#FF99FF,stroke-width:2px,stroke:#000; classDef kernelImportant fill:#FF00FF,stroke-width:2px,stroke:#000; - classDef effect fill:#FFFF00,stroke-width:2px,stroke:#000; - classDef arrow fill:#FFFF99,stroke-width:2px,stroke:#000; - classDef coreInMtl fill:#AAAA88,stroke-width:2px,stroke:#000; - classDef mtl fill:#FFBBBB,stroke-width:2px,stroke:#000; subgraph kernel direction BT @@ -251,16 +251,6 @@ graph BT; id4-->id2; end - subgraph core - direction BT - id5(Bifoldable):::core; - id6(Bifunctor):::core; - id7(Bitraverse):::core; - - id7-->id5; - id7-->id6; - end - subgraph kernel direction BT id8(Semigroup):::kernelImportant; @@ -286,27 +276,35 @@ graph BT; id16-->id13; id16-->id14; end +``` - subgraph arrow +```mermaid +graph BT; + classDef core fill:#BBBBFF,stroke-width:2px,stroke:#000; + + subgraph core direction BT - id17(Compose):::arrow; - id18(Profunctor):::arrow; - id19(Category):::arrow; - id20(Strong):::arrow; - id21(Choice):::arrow; - id22(Arrow):::arrow; - id23(ArrowChoice):::arrow; - id24(CommutaticeArrow):::arrow; + id5(Bifoldable):::core; + id6(Bifunctor):::core; + id7(Bitraverse):::core; + id79(NotNull):::core; + id80(Show):::core; + id81(Inject):::core; + id82(InjectK):::core; + id83(Parallel):::core; + id84(NonEmptyParallel):::core; - id19-->id17; - id20-->id18; - id21-->id19; - id22-->id19; - id22-->id20; - id23-->id21; - id23-->id22; - id24-->id22; + id7-->id5; + id7-->id6; + id83-->id84; end +``` + +```mermaid +graph BT; + + classDef core fill:#BBBBFF,stroke-width:2px,stroke:#000; + classDef coreImportant fill:#6666FF,stroke-width:2px,stroke:#000; subgraph core direction BT @@ -390,9 +388,16 @@ graph BT; id55-->id56; id54-->id53; end +``` + +```mermaid +graph BT; + classDef core fill:#BBBBFF,stroke-width:2px,stroke:#000; + classDef effect fill:#FFFF00,stroke-width:2px,stroke:#000; subgraph effect direction BT + id52(MonadError):::core; id57(Unique):::effect; id58(MonadCancel):::effect; id59(GenSpawn):::effect; @@ -416,6 +421,39 @@ graph BT; id65-->id63; id65-->id64; end +``` + +```mermaid +graph BT; + classDef arrow fill:#FFFF99,stroke-width:2px,stroke:#000; + + subgraph arrow + direction BT + id17(Compose):::arrow; + id18(Profunctor):::arrow; + id19(Category):::arrow; + id20(Strong):::arrow; + id21(Choice):::arrow; + id22(Arrow):::arrow; + id23(ArrowChoice):::arrow; + id24(CommutaticeArrow):::arrow; + + id19-->id17; + id20-->id18; + id21-->id19; + id22-->id19; + id22-->id20; + id23-->id21; + id23-->id22; + id24-->id22; + end +``` + +```mermaid +graph BT; + + classDef coreInMtl fill:#AAAA88,stroke-width:2px,stroke:#000; + classDef mtl fill:#FFBBBB,stroke-width:2px,stroke:#000; subgraph mtl direction BT @@ -446,19 +484,8 @@ graph BT; id78-.->id75; id76-.->id66; end - - subgraph core - direction BT - id79(NotNull):::core; - id80(Show):::core; - id81(Inject):::core; - id82(InjectK):::core; - id83(Parallel):::core; - id84(NonEmptyParallel):::core; - - id83-->id84; - end ``` + (The typeclass graph based on @tpolecat's repository `cats-infographic`).