<div dir="ltr"><div>I was hacking GHC to see if it's able to derive Generic1 instance for datatypes with kind (Type -> Type) -> Type by omitting some checks. I noticed that the type parameter is substituted by GHC.Types.Any, preventing higher-kinded instances from typechecking. I found a comment implying that this is intentional; in GHC.Tc.Deriv.Generic.hs:977,<br><blockquote>Alternatively, we could have avoided this problem by expanding all type<br>synonyms on the RHSes of Rep1 instances. But we might blow up the size of<br>these types even further by doing this, so we choose not to do so.</blockquote></div><div>It wasn't obvious to me if binding a parameter in the type synonym instance declaration of Rep1 cause problems, because that's what I'd do if I were to define an instance by hand. Is there any offending example?</div><div><br></div><div>I'm also trying to make such change myself (it doesn't add a type parameter and I'm not sure why) <a href="https://gitlab.haskell.org/fumieval/ghc/-/commit/bfe7766af80d90590b6b032d1839694b82b8919a">https://gitlab.haskell.org/fumieval/ghc/-/commit/bfe7766af80d90590b6b032d1839694b82b8919a</a></div></div>