summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving
diff options
context:
space:
mode:
authorBaldur Blöndal <baldurpet@gmail.com>2022-09-22 01:27:53 +0000
committerTopsii <tobiashaslop@hotmail.de>2022-11-30 21:16:36 +0100
commitd87f28d810b9c536ca4db7f363163e6d0dd6c93c (patch)
tree558597fb2921abf4c201019f9ade7b0037443751 /testsuite/tests/deriving
parentb4cfa8e235715d8c73b2ba0ba05ed8ef92629218 (diff)
downloadhaskell-d87f28d810b9c536ca4db7f363163e6d0dd6c93c.tar.gz
Make Functor a quantified superclass of Bifunctor.
See https://github.com/haskell/core-libraries-committee/issues/91 for discussion. This change relates Bifunctor with Functor by requiring second = fmap. Moreover this change is a step towards unblocking the major version bump of bifunctors and profunctors to major version 6. This paves the way to move the Profunctor class into base. For that Functor first similarly becomes a superclass of Profunctor in the new major version 6.
Diffstat (limited to 'testsuite/tests/deriving')
-rw-r--r--testsuite/tests/deriving/should_compile/T9968a.hs2
-rw-r--r--testsuite/tests/deriving/should_compile/T9968a.stderr2
-rw-r--r--testsuite/tests/deriving/should_compile/deriving-via-compile.hs2
3 files changed, 3 insertions, 3 deletions
diff --git a/testsuite/tests/deriving/should_compile/T9968a.hs b/testsuite/tests/deriving/should_compile/T9968a.hs
index ca5b1b082e..7681581d33 100644
--- a/testsuite/tests/deriving/should_compile/T9968a.hs
+++ b/testsuite/tests/deriving/should_compile/T9968a.hs
@@ -5,4 +5,4 @@ module T9968 where
import Data.Bifunctor
data Blah a b = A a | B b
- deriving (Bifunctor)
+ deriving (Functor, Bifunctor)
diff --git a/testsuite/tests/deriving/should_compile/T9968a.stderr b/testsuite/tests/deriving/should_compile/T9968a.stderr
index 6c77d65670..942879d1c0 100644
--- a/testsuite/tests/deriving/should_compile/T9968a.stderr
+++ b/testsuite/tests/deriving/should_compile/T9968a.stderr
@@ -1,5 +1,5 @@
-T9968a.hs:8:13: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
+T9968a.hs:8:22: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
either ‘bimap’ or (‘first’ and ‘second’)
• In the instance declaration for ‘Bifunctor Blah’
diff --git a/testsuite/tests/deriving/should_compile/deriving-via-compile.hs b/testsuite/tests/deriving/should_compile/deriving-via-compile.hs
index 261110c255..7754b561d5 100644
--- a/testsuite/tests/deriving/should_compile/deriving-via-compile.hs
+++ b/testsuite/tests/deriving/should_compile/deriving-via-compile.hs
@@ -308,7 +308,7 @@ instance Biapplicative (,) where
(f a b, f' a' b')
newtype WrapBiapp p a b = WrapBiap (p a b)
- deriving newtype (Bifunctor, Biapplicative, Eq)
+ deriving newtype (Functor, Bifunctor, Biapplicative, Eq)
instance (Biapplicative p, Num a, Num b) => Num (WrapBiapp p a b) where
(+) = biliftA2 (+) (+)