summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2016-11-18 09:33:01 -0500
committerRyan Scott <ryan.gl.scott@gmail.com>2016-11-18 09:33:01 -0500
commit3bd1dd4d75fde3b922d4de08c16f29bdeb8e05d7 (patch)
tree164995ca274bc7853d176e20b8f55afdcd091a3b /libraries
parentd328abc84962dbe16763e6e82418c5bb7a2b8628 (diff)
downloadhaskell-3bd1dd4d75fde3b922d4de08c16f29bdeb8e05d7.tar.gz
Add Data instance for Const
Summary: Fixes #12438. As discussed on the Haskell libraries mailing list here: https://mail.haskell.org/pipermail/libraries/2016-November/027396.html Reviewers: hvr, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2726 GHC Trac Issues: #12438
Diffstat (limited to 'libraries')
-rw-r--r--libraries/base/Data/Data.hs4
-rw-r--r--libraries/base/changelog.md2
2 files changed, 6 insertions, 0 deletions
diff --git a/libraries/base/Data/Data.hs b/libraries/base/Data/Data.hs
index df37ab1a1a..e43ec74e3f 100644
--- a/libraries/base/Data/Data.hs
+++ b/libraries/base/Data/Data.hs
@@ -9,6 +9,7 @@
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE TypeInType #-}
{-# LANGUAGE TypeOperators #-}
-----------------------------------------------------------------------------
@@ -1197,6 +1198,9 @@ deriving instance (Coercible a b, Data a, Data b) => Data (Coercion a b)
-- | @since 4.9.0.0
deriving instance Data a => Data (Identity a)
+-- | @since 4.10.0.0
+deriving instance (Typeable k, Data a, Typeable (b :: k)) => Data (Const a b)
+
-- | @since 4.7.0.0
deriving instance Data Version
diff --git a/libraries/base/changelog.md b/libraries/base/changelog.md
index a01c878a53..dcc171979f 100644
--- a/libraries/base/changelog.md
+++ b/libraries/base/changelog.md
@@ -26,6 +26,8 @@
* Add `Semigroup` instance for `IO`, as well as for `Event` and `Lifetime`
from `GHC.Event` (#12464)
+ * Add `Data` instance for `Const` (#12438)
+
## 4.9.0.0 *May 2016*
* Bundled with GHC 8.0