Implement proposal 106 - Define Kinds Without Promotion
This patch implements proposal #106 (TypeData
- Define Kinds Without Promotion).
The main points are:
-
compiler/Language/Haskell/Syntax/Decls.hs
: Add a Boolean fielddd_type
toHsDataDefn
to markdata type
definitions. -
compiler/GHC/Parser/PostProcess.hs
: InmkDataDefn
, promote the names of constructors in such declarations fromDataName
toTcClsName
. -
compiler/GHC/Types/TyThing.hs
: InimplicitTyConThings
, if the constructor name is aTcClsName
, just return the promoted type constructor instead of the data constructor stuff. -
compiler/GHC/Rename/Module.hs
: Check most restrictions ontype data
declarations incheck_type_data
called fromrnDataDefn
. -
compiler/GHC/Tc/TyCl.hs
: Check restrictions on constraints on constructor types incheckValidDataCon
.
The changes to HsDataDefn
require a matching merge request to Haddock (haddock!15 (merged)) to be applied simultaneously.
It also needs DataType
to be added to Cabal, but I couldn't find how to make a merge request for that.
Edited by Ross Paterson