diff options
-rw-r--r-- | libraries/base/Data/Data.hs | 14 | ||||
-rw-r--r-- | libraries/base/changelog.md | 2 |
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 |