Make DataKinds the sole arbiter of kind-level literals (and friends)
Previously, the use of kind-level literals, promoted tuples,
and promoted lists required enabling both DataKinds
and
PolyKinds
. This made sense back in a TypeInType
world, but not so
much now that TypeInType
's role has been superseded. Nowadays,
PolyKinds
only controls kind polymorphism, so let's make DataKinds
the thing that controls the other aspects of TypeInType
, which include
literals, promoted tuples and promoted lists.
There are some other things that overzealously required PolyKinds
,
which this patch fixes as well:
- Previously, using constraints in kinds (e.g.,
data T :: () -> Type
) requiredPolyKinds
, despite the fact that this is orthogonal to kind polymorphism. This now requiresDataKinds
instead. - Previously, using kind annotations in kinds
(e.g.,
data T :: (Type :: Type) -> Type
) required bothKindSignatures
andPolyKinds
. This doesn't make much sense, so it only requiresKindSignatures
now.
Fixes #18831 (closed).