summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Blažević <blamario@yahoo.com>2019-11-17 08:26:12 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-11-17 17:26:24 -0500
commit4a37a29b67db078ba29722c5615a37fd8091989b (patch)
tree7ab1be2b28c16e7ea97de577a0edcbb908ea1a32
parent34515e7c94250a8b5b85453a0481d0c8d313a7c5 (diff)
downloadhaskell-4a37a29b67db078ba29722c5615a37fd8091989b.tar.gz
Fixed issue #17435, missing Data instances
-rw-r--r--libraries/base/Data/Data.hs14
-rw-r--r--libraries/base/changelog.md2
2 files changed, 16 insertions, 0 deletions
diff --git a/libraries/base/Data/Data.hs b/libraries/base/Data/Data.hs
index dfa55676f6..8e285ac07c 100644
--- a/libraries/base/Data/Data.hs
+++ b/libraries/base/Data/Data.hs
@@ -131,6 +131,8 @@ import GHC.Show
import Text.Read( reads )
-- Imports for the instances
+import Control.Applicative (WrappedArrow(..), WrappedMonad(..), ZipList(..))
+ -- So we can give them Data instances
import Data.Functor.Identity -- So we can give Data instance for Identity
import Data.Int -- So we can give Data instance for Int8, ...
import Data.Type.Coercion
@@ -1156,6 +1158,18 @@ instance Data a => Data [a] where
------------------------------------------------------------------------------
+-- | @since 4.14.0.0
+deriving instance (Typeable (a :: Type -> Type -> Type), Typeable b, Typeable c,
+ Data (a b c))
+ => Data (WrappedArrow a b c)
+
+-- | @since 4.14.0.0
+deriving instance (Typeable (m :: Type -> Type), Typeable a, Data (m a))
+ => Data (WrappedMonad m a)
+
+-- | @since 4.14.0.0
+deriving instance Data a => Data (ZipList a)
+
-- | @since 4.9.0.0
deriving instance Data a => Data (NonEmpty a)
diff --git a/libraries/base/changelog.md b/libraries/base/changelog.md
index c42d5eb795..69fd172bf1 100644
--- a/libraries/base/changelog.md
+++ b/libraries/base/changelog.md
@@ -44,6 +44,8 @@
* Add `resizeSmallMutableArray#` to `GHC.Exts`.
+ * Add a `Data` instance to `WrappedArrow`, `WrappedMonad`, and `ZipList`.
+
## 4.13.0.0 *July 2019*
* Bundled with GHC 8.8.1