summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2016-11-17 09:55:55 -0500
committerRyan Scott <ryan.gl.scott@gmail.com>2016-11-17 09:55:55 -0500
commit07e40e905357db805e6dbb557b35d6bdf76eaec6 (patch)
treeebf804f3c6ae28eef41c06a69e3c82b54c4a794f
parentcede770cc7dddd132ebbc101e60402d8bb37007e (diff)
downloadhaskell-07e40e905357db805e6dbb557b35d6bdf76eaec6.tar.gz
Add Data instance for Const
-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