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