Skip to content
  • Ryan Scott's avatar
    Make DataKinds the sole arbiter of kind-level literals (and friends) · 716385c9
    Ryan Scott authored and Marge Bot's avatar Marge Bot committed
    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`)
      required `PolyKinds`, despite the fact that this is orthogonal to kind
      polymorphism. This now requires `DataKinds` instead.
    * Previously, using kind annotations in kinds
      (e.g., `data T :: (Type :: Type) -> Type`) required both `KindSignatures`
      and `PolyKinds`. This doesn't make much sense, so it only requires
      `KindSignatures` now.
    
    Fixes #18831.
    716385c9