Category-parametric Programming
summary
Claim: most categorical constructions are parametric over the category, so you can write one generic library and specialize it. Implementation uses Scala + Cats, kind-projector and kind polymorphism, prototypes of typeclass encodings (for example EXO functors, hoist/monad-as-monoid-in-endofunctors), and a literate slide repo whose code mostly compiles except one slide. Runtime is erased but compilation gets slower; some ergonomic and inference pain points remain, but working instances and rewrites show the approach is feasible.
AI-written summary · about
chapters (22)
- 0:00Introduction
- 5:46Kind Projector
- 6:44Composition
- 7:14Classes
- 7:28Categories
- 13:47Nonobvious code
- 15:02Functors
- 19:04EndoFunctor
- 19:44EXOFunctor
- 21:18Traverse
- 24:43Other Functors
- 27:35Duality
- 30:18Sub categories
- 32:47Output shape
- 38:48ProFunctor
- 39:47Problems
- 42:23Applicative
- 42:40Mono ID
- 43:08Kind Polymorphism
- 43:48MA Nodes
- 44:24Polymorphism
- 44:54Thank you
related talks
47mScalaFiddle and Categories
01h 11mHands on Chat About Categories
01h 15mA Crash Course in Category Theory
45mA practical introduction to Category Theory
51mCategory Theory for People who Can't be Bothered to Learn It (Part 2)
45mCategory Theory for People who Can't be Bothered to Learn It (Part 1)
01h 39mIsomorphic Reasoning: Counting with Types Part 1
46mChasing Arrows, in categories containing functors and monads
