Currently, the Generic instance of Rec is oblivious of the functor wrapping the fields. This means the Generic instance it provides cannot be equivalent to that of an equivalent Haskell record.
Would there be a way to have:
newtype RecWithGeneric rs = RecWithGeneric (Rec ElField rs)
type Person1 = RecWithGeneric '["firstname" ::: Text, "lastname" ::: Text]
data Person2 = Person2
{ firstname :: Text
, lastname :: Text }
that ensures the Generic instances for Person1 and Person2 can be used instead of one another?
Currently, the Generic instance of
Recis oblivious of the functor wrapping the fields. This means the Generic instance it provides cannot be equivalent to that of an equivalent Haskell record.Would there be a way to have:
that ensures the Generic instances for Person1 and Person2 can be used instead of one another?