Note [Recursion and promoting data constructors]

GHC/Tc/TyCl.hs:2357 compiler

We don't want to allow promotion in a strongly connected component
when kind checking.

Consider:
  data T f = K (f (K Any))

When kind checking the `data T' declaration the local env contains the
mappings:
  T -> ATcTyCon <some initial kind>
  K -> APromotionErr

APromotionErr is only used for DataCons, and only used during type checking
in tcTyClGroup.

The same restriction applies constructors in to "type data" declarations.
See Note [Type data declarations] in GHC.Rename.Module.


************************************************************************
*                                                                      *
\subsection{Type checking}
*                                                                      *
************************************************************************

References 1

Referenced by 4