diff options
author | Sebastian Graf <sgraf1337@gmail.com> | 2019-11-03 19:42:52 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-03-14 12:54:29 -0400 |
commit | b73c9c5face16cc8bedf4168ce10770c7cc67f80 (patch) | |
tree | 9e5b60b2cfd7ddbae3562c21e838a797fe7539f0 /compiler/GHC/Driver/Session.hs | |
parent | 96b3c66b50c77c105dd97b7ef9b44d0779d712b1 (diff) | |
download | haskell-b73c9c5face16cc8bedf4168ce10770c7cc67f80.tar.gz |
Implement the UnliftedDatatypes extension
GHC Proposal: 0265-unlifted-datatypes.rst
Discussion: https://github.com/ghc-proposals/ghc-proposals/pull/265
Issues: https://gitlab.haskell.org/ghc/ghc/-/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.
Diffstat (limited to 'compiler/GHC/Driver/Session.hs')
-rw-r--r-- | compiler/GHC/Driver/Session.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs index f33373b130..eb14bbc91f 100644 --- a/compiler/GHC/Driver/Session.hs +++ b/compiler/GHC/Driver/Session.hs @@ -3611,6 +3611,7 @@ xFlagsDeps = [ flagSpec "UndecidableInstances" LangExt.UndecidableInstances, flagSpec "UndecidableSuperClasses" LangExt.UndecidableSuperClasses, flagSpec "UnicodeSyntax" LangExt.UnicodeSyntax, + flagSpec "UnliftedDatatypes" LangExt.UnliftedDatatypes, flagSpec "UnliftedFFITypes" LangExt.UnliftedFFITypes, flagSpec "UnliftedNewtypes" LangExt.UnliftedNewtypes, flagSpec "ViewPatterns" LangExt.ViewPatterns @@ -3794,6 +3795,10 @@ impliedXFlags , (LangExt.TemplateHaskell, turnOn, LangExt.TemplateHaskellQuotes) , (LangExt.Strict, turnOn, LangExt.StrictData) + + -- The extensions needed to declare an H98 unlifted data type + , (LangExt.UnliftedDatatypes, turnOn, LangExt.DataKinds) + , (LangExt.UnliftedDatatypes, turnOn, LangExt.StandaloneKindSignatures) ] -- Note [When is StarIsType enabled] |