Generate some useful case class conversions with macros