Template haskell to do the encodable stuff.