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_typetoHsDataDefnto markdata typedefinitions. -
compiler/GHC/Parser/PostProcess.hs: InmkDataDefn, promote the names of constructors in such declarations fromDataNametoTcClsName. -
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 datadeclarations incheck_type_datacalled 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