From 3f0a07ff13f95fdcf9d898a9e2ac2c074aec4eac Mon Sep 17 00:00:00 2001 From: quasicomputational Date: Fri, 26 Apr 2019 16:34:38 +0100 Subject: [PATCH] Add EmptyDataDeriving as an Extension constructor. This was added in GHC 8.4 but apparently either no-one's missed its absence since then, or users have been suffering in silence with the warnings. --- Cabal/ChangeLog.md | 3 ++- Cabal/Language/Haskell/Extension.hs | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Cabal/ChangeLog.md b/Cabal/ChangeLog.md index 8af130e4cec..4f8b4e5a4f5 100644 --- a/Cabal/ChangeLog.md +++ b/Cabal/ChangeLog.md @@ -4,7 +4,8 @@ ([#5906](https://github.com/haskell/cabal/pull/5906)). * 'check' reports warnings for various ghc-\*-options fields separately ([#5342](https://github.com/haskell/cabal/issues/5432)). - * `KnownExtension`: added new extension `DerivingVia`. + * `KnownExtension`: added new extensions `DerivingVia` and + `EmptyDataDeriving`. * Add `extra-dynamic-library-flavours`, to specify extra dynamic library flavours to build and install from a .cabal file. * `autoconfUserHooks` now passes `--host=$HOST` when cross-compiling diff --git a/Cabal/Language/Haskell/Extension.hs b/Cabal/Language/Haskell/Extension.hs index 2740b72e52d..4eccbf29eae 100644 --- a/Cabal/Language/Haskell/Extension.hs +++ b/Cabal/Language/Haskell/Extension.hs @@ -818,6 +818,11 @@ data KnownExtension = -- | Have @*@ refer to @Type@. | StarIsType + -- | Liberalises deriving to provide instances for empty data types. + -- + -- * + | EmptyDataDeriving + deriving (Generic, Show, Read, Eq, Ord, Enum, Bounded, Typeable, Data) instance Binary KnownExtension