Embrace -XTypeInType, add -XStarIsType
Summary: Implement the "Embrace Type :: Type" GHC proposal, .../ghc-proposals/blob/master/proposals/0020-no-type-in-type.rst GHC 8.0 included a major change to GHC's type system: the Type :: Type axiom. Though casual users were protected from this by hiding its features behind the -XTypeInType extension, all programs written in GHC 8+ have the axiom behind the scenes. In order to preserve backward compatibility, various legacy features were left unchanged. For example, with -XDataKinds but not -XTypeInType, GADTs could not be used in types. Now these restrictions are lifted and -XTypeInType becomes a redundant flag that will be eventually deprecated. * Incorporate the features currently in -XTypeInType into the -XPolyKinds and -XDataKinds extensions. * Introduce a new extension -XStarIsType to control how to parse * in code and whether to print it in error messages. Test Plan: Validate Reviewers: goldfire, hvr, bgamari, alanz, simonpj Reviewed By: goldfire, simonpj Subscribers: rwbarton, thomie, mpickering, carter GHC Trac Issues: #15195 Differential Revision: https://phabricator.haskell.org/D4748
Showing
- .gitignore 1 addition, 0 deletions.gitignore
- .gitmodules 2 additions, 2 deletions.gitmodules
- compiler/basicTypes/DataCon.hs 1 addition, 21 deletionscompiler/basicTypes/DataCon.hs
- compiler/basicTypes/Name.hs 1 addition, 20 deletionscompiler/basicTypes/Name.hs
- compiler/basicTypes/RdrName.hs 89 additions, 7 deletionscompiler/basicTypes/RdrName.hs
- compiler/basicTypes/SrcLoc.hs 3 additions, 2 deletionscompiler/basicTypes/SrcLoc.hs
- compiler/deSugar/DsMeta.hs 3 additions, 4 deletionscompiler/deSugar/DsMeta.hs
- compiler/hsSyn/Convert.hs 16 additions, 21 deletionscompiler/hsSyn/Convert.hs
- compiler/hsSyn/HsDecls.hs 4 additions, 5 deletionscompiler/hsSyn/HsDecls.hs
- compiler/hsSyn/HsExtension.hs 2 additions, 14 deletionscompiler/hsSyn/HsExtension.hs
- compiler/hsSyn/HsInstances.hs 0 additions, 5 deletionscompiler/hsSyn/HsInstances.hs
- compiler/hsSyn/HsTypes.hs 21 additions, 96 deletionscompiler/hsSyn/HsTypes.hs
- compiler/iface/IfaceType.hs 3 additions, 5 deletionscompiler/iface/IfaceType.hs
- compiler/main/DynFlags.hs 31 additions, 0 deletionscompiler/main/DynFlags.hs
- compiler/main/DynFlags.hs-boot 1 addition, 0 deletionscompiler/main/DynFlags.hs-boot
- compiler/main/HscTypes.hs 1 addition, 2 deletionscompiler/main/HscTypes.hs
- compiler/parser/Lexer.x 63 additions, 41 deletionscompiler/parser/Lexer.x
- compiler/parser/Parser.y 44 additions, 44 deletionscompiler/parser/Parser.y
- compiler/parser/RdrHsSyn.hs 116 additions, 74 deletionscompiler/parser/RdrHsSyn.hs
- compiler/prelude/PrelNames.hs 2 additions, 5 deletionscompiler/prelude/PrelNames.hs
Loading
Please register or sign in to comment