Cutting Boilerplate with GHC's DerivingVia: A Practical Look at Typeclass Composition
GHC's DerivingVia extension (since 8.6) lets you compose typeclass instances without boilerplate newtype wrappers. A practical walkthrough with JSON encoding example, role restrictions, and a verification checklist.