diff options
-rw-r--r-- | libraries/base/Data/Data.hs | 4 | ||||
-rw-r--r-- | libraries/base/changelog.md | 2 | ||||
-rw-r--r-- | testsuite/tests/annotations/should_fail/annfail10.stderr | 4 |
3 files changed, 8 insertions, 2 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 diff --git a/testsuite/tests/annotations/should_fail/annfail10.stderr b/testsuite/tests/annotations/should_fail/annfail10.stderr index 6e7732f938..6a52a9c8d8 100644 --- a/testsuite/tests/annotations/should_fail/annfail10.stderr +++ b/testsuite/tests/annotations/should_fail/annfail10.stderr @@ -10,7 +10,7 @@ annfail10.hs:9:1: error: instance Data.Data.Data Ordering -- Defined in ‘Data.Data’ instance Data.Data.Data Integer -- Defined in ‘Data.Data’ ...plus 15 others - ...plus 39 instances involving out-of-scope types + ...plus 40 instances involving out-of-scope types (use -fprint-potential-instances to see them all) • In the annotation: {-# ANN f 1 #-} @@ -23,6 +23,6 @@ annfail10.hs:9:11: error: instance Num Double -- Defined in ‘GHC.Float’ instance Num Float -- Defined in ‘GHC.Float’ ...plus two others - ...plus 13 instances involving out-of-scope types + ...plus 14 instances involving out-of-scope types (use -fprint-potential-instances to see them all) • In the annotation: {-# ANN f 1 #-} |