~/talk

Automatic type class instance derivation with shapeless

TalkinFrenchat Scala.IO 2017 · 2017-11-02..11-03· [typescript]
links:none on file
slides:none on file

Shows how to use the shapeless library to automatically derive Scala type-class instances (specifically Ordering) for case classes and ADTs by converting them to HLists and Coproducts via shapeless.Generic and composing existing implicit Orderings. Presents concrete code for implicit-driven recursive derivation that builds an Ordering from per-field orderings (including nested fields), and notes practical limits such as failure on recursive types, opaque compiler errors, and increased compilation cost.

AI-written summary · about

  1. 0:00Introduction
  2. 2:07Type classes in Scala
  3. 7:09Generic representations
  4. 13:05Automatic instance derivation
  5. 25:11Recursive types and errors
  6. 34:22Advanced HList and Coproduct
  7. 39:19Experience and best practices
  8. 42:08Q&A
~/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.