Template Haskell reification for Data Families is buggy?
I have found an example where I think that the TH reification for data/newtype families is incorrect, in that if forgets non-bound type variables in instance declarations.
For the attached example, it will infer the Info:
FamilyI (FamilyD DataFam TyFamReifyDefs.F [PlainTV a_1627399879,PlainTV b_1627399880] (Just StarT)) [DataInstD [] TyFamReifyDefs.F [ConT GHC.Types.Int] [NormalC TyFamReifyDefs.FInt [(NotStrict,VarT x_1627399881)]] []]
Note how the variable x is not declared in the body of the DataInstD. Since it does not need to have the same name as the family-declared variable, substituting is non-trivial this way...