Mastering Typeclass Induction
summary
Scala code uses implicit resolution to do full type-level list as nested tuples induction: base case = unit, induction step = implicit that combines named head and named tail. It derives compile-time strings for names, builds a path-dependent out type that becomes nested Either/Option to represent union-of-event results (click/play/pause), and implements a dynamic dispatcher that parses payloads via a JSON parser (Circe/Cersei mentioned). That machinery also generates HTTP servers and clients (Finagle used), produces docs, and runs at compile time — proof-of-concept code exists but is rough.
AI-written summary · about
chapters (8)
- 0:00Introduction and problem
- 1:47Defining the core concepts
- 6:03Principles of induction
- 9:11Type class fundamentals
- 13:52Baby's first induction
- 23:27Dynamic dispatch induction
- 30:31Generating HTTP servers
- 37:01Q&A and closing thoughts
related talks
35mMastering Typeclass Induction
20mType Classes for the Rest of Us
41mThe Dialectics of Type-Level Programming
44mTelling the Truth with Types
30mHaving a cake and eating it too Introduction to Typeclasses
35mIntroducing Typelevel Scala into an OO environment
33mTYPE CLASSES FROM THE GROUND UP
31mBoring use cases for exciting types
