~/talk

Magnolia: Generic Derivation 2.0

Talkat Scale By the Bay 2017 · 2017-11-16..11-18· [scala]
slides:none on file

Magnolia is a ~400-line Apache-2 macro that generates typeclass instances for case classes, sealed traits, case objects, value classes and tuples, with special support for recursive ADTs and implicit prioritization. It deduplicates generated code and caches implicit searches so compilation can be much faster — one example shows 2 seconds vs ~50 seconds for a large ADT; worst-case measured speedups reach 4x and a microbenchmark gave 52x when creating a million instances. It also produces better error traces when derivation fails.

AI-written summary · about

  1. 0:00Introduction
  2. 0:49What is generic derivation
  3. 5:48What is Magnolia
  4. 9:51Type class
  5. 14:57Contravariant types
  6. 19:01Compiler performance
  7. 21:20Lifted case parameters
~/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.