diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2017-02-23 18:09:58 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-02-23 18:57:17 -0500 |
commit | c88b7c9a06e387c3b9bdb359b9e1e4f3a9fba696 (patch) | |
tree | d0291e43a1506c10385a4b3e29b5d7cdae3d0b77 /libraries/base/Data/Data.hs | |
parent | 8d64395b43cb73d110767cab512a368b3db018de (diff) | |
download | haskell-c88b7c9a06e387c3b9bdb359b9e1e4f3a9fba696.tar.gz |
Add instances for (:~~:) mirroring those for (:~:)
`(:~~:)`, the hetergeneous version of `(:~:)`, should have class
instances similar to those of `(:~:)`, especially since their
implementations aren't particularly tricky or surprising. This adds
them.
Reviewers: bgamari, austin, hvr, goldfire
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D3181
Diffstat (limited to 'libraries/base/Data/Data.hs')
-rw-r--r-- | libraries/base/Data/Data.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libraries/base/Data/Data.hs b/libraries/base/Data/Data.hs index 12f9378a9a..8233f98b1c 100644 --- a/libraries/base/Data/Data.hs +++ b/libraries/base/Data/Data.hs @@ -1210,6 +1210,11 @@ deriving instance (Data t) => Data (Proxy t) -- | @since 4.7.0.0 deriving instance (a ~ b, Data a) => Data (a :~: b) +-- | @since 4.10.0.0 +deriving instance (Typeable i, Typeable j, Typeable a, Typeable b, + (a :: i) ~~ (b :: j)) + => Data (a :~~: b) + -- | @since 4.7.0.0 deriving instance (Coercible a b, Data a, Data b) => Data (Coercion a b) |