Playing with Shapeless
summary
Play-Formless generates Play Framework Form mappings from case classes using Shapeless (LabelledGeneric, HLists and singleton-typed symbols) so a full form can be derived in one line of code. It provides type-driven defaults via polymorphic function values, handles refined types to turn type-level constraints into runtime validators, and enables type-safe field access with symbol names checked at compile time. It works at compile time with negligible runtime overhead but has rough IDE support and sometimes obscure compile errors.
AI-written summary · about
chapters (9)
- 0:00Introduction to talk
- 1:06Play Framework form mappings
- 3:11Problems with current approach
- 4:59How Shapeless integration works
- 8:09Transforming HLists to mappings
- 13:12Default mappings from types
- 16:46Refined types integration
- 19:26Benefits and downsides
- 20:50About Interval and Q&A
related talks
31mShapeless? - Easy!
49mRoll Your Own Shapeless
23mCASE STUDY FOR A REAL-WORLD TYPE-LEVEL PROGRAMMING
43mAdventures in Metaprogramming: Macros versus Shapeless
01h 01mThe Shape(less) of Type Class Derivation in Scala 3
29mADVENTURES IN META-PROGRAMMING
26mShapeless Party Tricks in the Enterprise
24mLet the Scala compiler work for you
