Note [Recursion and promoting data constructors]
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
- Type data declarations GHC.Rename.Module
Referenced by 4
- GHC.Tc.TyCl call site ×2
- Type data declarations GHC.Rename.Module
- GHC.Tc.Errors.Types.PromotionErr call site