Produce all DerivInfo in tcTyAndClassDecls
Before this refactoring:
-
DerivInfo
for data family instances was returned fromtcTyAndClassDecls
-
DerivInfo
for data declarations was generated withmkDerivInfos
and added at a later stage of the pipeline intcInstDeclsDeriv
After this refactoring:
-
DerivInfo
for both data family instances and data declarations is returned fromtcTyAndClassDecls
in a single list.
This uniform treatment results in a more convenient arrangement to fix #16731 (closed). It is now easy to access the TcTyCon
needed to get tcTyConHeaderKiVars
that I mention in #16731 (comment 202945)