~/talk

The Shape(less) of Type Class Derivation in Scala 3

Talkat Scala Days Lausanne 2019 · 2019-06-11..06-13· [scala]
slides:none on file

Scala 3 adds three concrete primitives—Mirror, derives clause and a companion-driven derived hook—that let libraries synthesize typeclass instances with minimal runtime cost; shapeless3 is a poly-kinded rewrite that implements a poly-kinded Generic as a refinement of Mirror, uses tuples instead of HLists, and provides a compact kernel plus per-kind veneers for products, coproducts and higher-kinded functors. The preview on GitHub generates derived instances in companions (cached, low bytecode footprint), handles higher-kinded mapping and record transforms, and can be back-ported to Scala 2.13/2.14.

AI-written summary · about

  1. 0:00Introduction
  2. 4:13What is type class derivation
  3. 10:21The mirror type
  4. 15:09The mirror monotype
  5. 20:27Examples
  6. 26:58Derived Clause
  7. 35:44Question Marks
  8. 36:59Shapeless to
  9. 41:17Generic to
  10. 42:31Kind Star
  11. 43:20Generic
  12. 45:11Instances
  13. 46:39Products
  14. 46:58Signatures
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.