Deriving pleasure
summary
Generates a claim: Magnolia is a compact macro (~300 lines) that produces generic type-class derivations without shapeless, with concrete mechanics — it detects recursion cycles, aborts nested invocations, inserts placeholders and post-processes the generated AST to resolve indirect implicit cycles. It handles recursive and even generic ADTs, emits debuggable derivation traces pointing to the first missing implicit, and currently matches shapeless on speed while promising smaller generated trees after planned deduplication. Useful when automatic, type-safe derivation and clearer error locations matter.
AI-written summary · about
chapters (4)
related talks
25mMagnolia: Generic Derivation 2.0
43mAdventures in Metaprogramming: Macros versus Shapeless
42mAvoiding macros with inline and derived
34mMaterialize Typeclasses with Magnolia
29mADVENTURES IN META-PROGRAMMING
12mMulti-Stage Programming with Generative and Analytical Macros
49mRoll Your Own Shapeless
40mMacros vs Types
