I have the following:
data Dog =
Dog
{ _x :: Int
}
makeFieldsNoPrefix ''Dog
data Cat =
Cat
{ _dog :: Dog
}
makeFieldsNoPrefix ''Cat
This gives me a HasX
and a HasDog
class along with instances instance HasDog Cat Dog
and instance HasX Dog Int
But i'd also like to generate instance HasX Cat Int
, is this TH functionality available somewhere?