Implement the UnliftedDatatypes extension
GHC Proposal: 0265-unlifted-datatypes.rst Discussion: https://github.com/ghc-proposals/ghc-proposals/pull/265 Issues: #19523 Implementation Details: Note [Implementation of UnliftedDatatypes] This patch introduces the `UnliftedDatatypes` extension. When this extension is enabled, GHC relaxes the restrictions around what result kinds are allowed in data declarations. This allows data types for which an unlifted or levity-polymorphic result kind is inferred. The most significant changes are in `GHC.Tc.TyCl`, where `Note [Implementation of UnliftedDatatypes]` describes the details of the implementation. Fixes #19523.
Showing
- compiler/GHC/Builtin/Types.hs 5 additions, 2 deletionscompiler/GHC/Builtin/Types.hs
- compiler/GHC/Core/Lint.hs 1 addition, 0 deletionscompiler/GHC/Core/Lint.hs
- compiler/GHC/Core/TyCon.hs 1 addition, 1 deletioncompiler/GHC/Core/TyCon.hs
- compiler/GHC/Core/Type.hs 128 additions, 85 deletionscompiler/GHC/Core/Type.hs
- compiler/GHC/CoreToStg.hs 10 additions, 9 deletionscompiler/GHC/CoreToStg.hs
- compiler/GHC/Driver/Session.hs 5 additions, 0 deletionscompiler/GHC/Driver/Session.hs
- compiler/GHC/Stg/Lint.hs 5 additions, 3 deletionscompiler/GHC/Stg/Lint.hs
- compiler/GHC/Stg/Syntax.hs 1 addition, 1 deletioncompiler/GHC/Stg/Syntax.hs
- compiler/GHC/StgToCmm/Env.hs 7 additions, 4 deletionscompiler/GHC/StgToCmm/Env.hs
- compiler/GHC/Tc/Gen/HsType.hs 74 additions, 33 deletionscompiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/TyCl.hs 75 additions, 14 deletionscompiler/GHC/Tc/TyCl.hs
- compiler/GHC/Tc/TyCl/Instance.hs 9 additions, 6 deletionscompiler/GHC/Tc/TyCl/Instance.hs
- compiler/GHC/Tc/Utils/TcMType.hs 7 additions, 0 deletionscompiler/GHC/Tc/Utils/TcMType.hs
- docs/users_guide/9.2.1-notes.rst 19 additions, 0 deletionsdocs/users_guide/9.2.1-notes.rst
- docs/users_guide/exts/primitives.rst 94 additions, 4 deletionsdocs/users_guide/exts/primitives.rst
- libraries/ghc-boot-th/GHC/LanguageExtensions/Type.hs 1 addition, 0 deletionslibraries/ghc-boot-th/GHC/LanguageExtensions/Type.hs
- libraries/ghc-prim/GHC/Types.hs 2 additions, 1 deletionlibraries/ghc-prim/GHC/Types.hs
- testsuite/tests/driver/T4437.hs 1 addition, 0 deletionstestsuite/tests/driver/T4437.hs
- testsuite/tests/unlifted-datatypes/Makefile 3 additions, 0 deletionstestsuite/tests/unlifted-datatypes/Makefile
- testsuite/tests/unlifted-datatypes/should_compile/Makefile 3 additions, 0 deletionstestsuite/tests/unlifted-datatypes/should_compile/Makefile
Loading
Please register or sign in to comment