Magnolia is a generic macro for automatic derivation of typeclasses for datatypes composed from case classes and sealed traits. It supports recursively-defined datatypes out-of-the-box, and incurs no significant time-penalty during compilation. If derivation fails, error messages are detailed and informative.
Please see the Magnolia website for more information.