Commit 3bd1dd4d authored by Ryan Scott's avatar Ryan Scott

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
parent d328abc8
......@@ -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
......
......@@ -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
......
......@@ -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 #-}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment