It would be cool if we could have Ghc.Generics support to allow the generation of Convertable's getGet/getPut. It can be very tedious to write this code otherwise.
something like
class Convertable a where
getGet :: MessageType -> Get a -- ^get a 'Get' function for the static data
getPut :: a -> Put -- ^get a 'Put' function for the static data
-- inspired by
default getGet :: (Generic a) => MessageType -> Get a
getGet = genericGetGet
default getGet :: (Generic a) => MessageType -> Put
getGet = genericGetPut
It would be cool if we could have Ghc.Generics support to allow the generation of Convertable's getGet/getPut. It can be very tedious to write this code otherwise.
something like