summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2017-03-10 11:20:00 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2017-03-10 16:04:39 +0000
commit7e96526ac2ef5987ecb03217d3d616b6281c1441 (patch)
treeed201840c894bcb71f8811e839fedc82308cfaf7 /testsuite/tests/ghci
parentbc0f3abd0914808e33f84229818ab90842611bdd (diff)
downloadhaskell-7e96526ac2ef5987ecb03217d3d616b6281c1441.tar.gz
Fix TcSimplify.decideQuantification for kind variables
TcSimplify.decideQuantification was doing the Wrong Thing when "growing" the type variables to quantify over. We were trying to do this on a tyvar set where we'd split off the dependent type varaibles; and we just got it wrong. A kind variable wasn't being generalised properly, with confusing knock on consequences. All this led to Trac #13371 and Trac #13393. This commit tidies it all up: * The type TcDepVars is renamed as CandidateQTvs; and splitDepVarsOfType to candidateQTyVarsOfType * The code in TcSimplify.decideQuantification is simpler. It no longer does the tricky "grow" stuff over TcDepVars. Instead it use ordinary VarSets (thereby eliminating the nasty growThetaTyVarsDSet) and uses that to filter the result of candidateQTyVarsOfType. * I documented that candidateQTyVarsOfType returns the type variables in a good order in which to quantify, and rewrote it to use an accumulator pattern, so that we would predicatably get left-to-right ordering. In doing all this I also made UniqDFM behave a little more nicely: * When inserting an element that is there already, keep the old tag, while still overwriting with the new value. * This means that when doing udfmToList we get back elements in the order they were originally inserted, rather than in reverse order. It's not a big deal, but in a subsequent commit I use it to improve the order of type variables in inferred types. All this led to a lot of error message wibbles: - changing the order of quantified variables - changing the order in which instances are listed in GHCi - changing the tidying of variables in typechecker erors There's a submodule update for 'array' because one of its tests has an error-message change. I may not have associated all of them with the correct commit.
Diffstat (limited to 'testsuite/tests/ghci')
-rw-r--r--testsuite/tests/ghci/scripts/T11524a.stdout8
-rw-r--r--testsuite/tests/ghci/scripts/T11975.stdout2
-rw-r--r--testsuite/tests/ghci/scripts/T12550.stdout28
-rw-r--r--testsuite/tests/ghci/scripts/T4175.stdout32
-rw-r--r--testsuite/tests/ghci/scripts/T6018ghcifail.stderr6
-rw-r--r--testsuite/tests/ghci/scripts/T7627.stdout26
-rw-r--r--testsuite/tests/ghci/scripts/T7939.stdout4
-rw-r--r--testsuite/tests/ghci/scripts/T8469.stdout10
-rw-r--r--testsuite/tests/ghci/scripts/T8535.stdout2
-rw-r--r--testsuite/tests/ghci/scripts/T9881.stdout16
-rw-r--r--testsuite/tests/ghci/scripts/ghci011.stdout38
-rw-r--r--testsuite/tests/ghci/scripts/ghci020.stdout2
-rw-r--r--testsuite/tests/ghci/should_run/T10145.stdout2
-rw-r--r--testsuite/tests/ghci/should_run/T12549.stdout2
14 files changed, 89 insertions, 89 deletions
diff --git a/testsuite/tests/ghci/scripts/T11524a.stdout b/testsuite/tests/ghci/scripts/T11524a.stdout
index 27122574e9..007d2ae097 100644
--- a/testsuite/tests/ghci/scripts/T11524a.stdout
+++ b/testsuite/tests/ghci/scripts/T11524a.stdout
@@ -6,8 +6,8 @@ pattern Pu :: p -> p -- Defined at <interactive>:18:1
pattern Pue :: a -> a1 -> (a, Ex) -- Defined at <interactive>:19:1
pattern Pur :: (Num a, Eq a) => a -> [a]
-- Defined at <interactive>:20:1
-pattern Purp :: (Num a1, Eq a1) => Show a => a1
- -> a -> ([a1], UnivProv a)
+pattern Purp :: (Num a, Eq a) => Show a1 => a
+ -> a1 -> ([a], UnivProv a1)
-- Defined at <interactive>:21:1
pattern Pure :: (Num a, Eq a) => a -> a1 -> ([a], Ex)
-- Defined at <interactive>:22:1
@@ -31,8 +31,8 @@ pattern Pue :: forall {a}. () => forall {a1}. a -> a1 -> (a, Ex)
-- Defined at <interactive>:19:1
pattern Pur :: forall {a}. (Num a, Eq a) => a -> [a]
-- Defined at <interactive>:20:1
-pattern Purp :: forall {a} {a1}. (Num a1, Eq a1) => Show a => a1
- -> a -> ([a1], UnivProv a)
+pattern Purp :: forall {a} {a1}. (Num a, Eq a) => Show a1 => a
+ -> a1 -> ([a], UnivProv a1)
-- Defined at <interactive>:21:1
pattern Pure :: forall {a}. (Num a, Eq a) => forall {a1}. a
-> a1 -> ([a], Ex)
diff --git a/testsuite/tests/ghci/scripts/T11975.stdout b/testsuite/tests/ghci/scripts/T11975.stdout
index 23adaf02db..1a3dd4341a 100644
--- a/testsuite/tests/ghci/scripts/T11975.stdout
+++ b/testsuite/tests/ghci/scripts/T11975.stdout
@@ -1,5 +1,5 @@
mapM
- :: forall {t :: * -> *} {b} {m :: * -> *} {a}.
+ :: forall {t :: * -> *} {m :: * -> *} {a} {b}.
(Monad m, Traversable t) =>
(a -> m b) -> t a -> m (t b)
mapM
diff --git a/testsuite/tests/ghci/scripts/T12550.stdout b/testsuite/tests/ghci/scripts/T12550.stdout
index de3f8d15d6..d4ac6b86fb 100644
--- a/testsuite/tests/ghci/scripts/T12550.stdout
+++ b/testsuite/tests/ghci/scripts/T12550.stdout
@@ -1,16 +1,16 @@
-f :: forall {b} {a :: * -> *}. C a => a b
-f :: forall {b} {a :: * -> *}. C a => a b
-f :: forall {b} {a :: * -> *}. C a => a b
-f :: forall {b} {a :: * -> *}. C a => a b
-f :: forall {b} {a :: * -> *}. C a => a b
-f :: forall {b} {a :: * -> *}. C a => a b
-f ∷ ∀ {b} {a ∷ ★ → ★}. C a ⇒ a b
-f ∷ ∀ {b} {a ∷ ★ → ★}. C a ⇒ a b
-f ∷ ∀ {b} {a ∷ ★ → ★}. C a ⇒ a b
-f ∷ ∀ {b} {a ∷ ★ → ★}. C a ⇒ a b
-f ∷ ∀ {b} {a ∷ ★ → ★}. C a ⇒ a b
-f ∷ ∀ {b} {a ∷ ★ → ★}. C a ⇒ a b
-fmap ∷ ∀ {f ∷ ★ → ★} {b} {a}. Functor f ⇒ (a → b) → f a → f b
+f :: forall {a :: * -> *} {b}. C a => a b
+f :: forall {a :: * -> *} {b}. C a => a b
+f :: forall {a :: * -> *} {b}. C a => a b
+f :: forall {a :: * -> *} {b}. C a => a b
+f :: forall {a :: * -> *} {b}. C a => a b
+f :: forall {a :: * -> *} {b}. C a => a b
+f ∷ ∀ {a ∷ ★ → ★} {b}. C a ⇒ a b
+f ∷ ∀ {a ∷ ★ → ★} {b}. C a ⇒ a b
+f ∷ ∀ {a ∷ ★ → ★} {b}. C a ⇒ a b
+f ∷ ∀ {a ∷ ★ → ★} {b}. C a ⇒ a b
+f ∷ ∀ {a ∷ ★ → ★} {b}. C a ⇒ a b
+f ∷ ∀ {a ∷ ★ → ★} {b}. C a ⇒ a b
+fmap ∷ ∀ {f ∷ ★ → ★} {a} {b}. Functor f ⇒ (a → b) → f a → f b
class Functor (f ∷ ★ → ★) where
fmap ∷ ∀ a b. (a → b) → f a → f b
...
@@ -62,6 +62,6 @@ class Datatype (d ∷ k) where
t d f a → [Char]
...
-- Defined in ‘GHC.Generics’
-(:*:) ∷ ∀ {g ∷ ★ → ★} {p} {f ∷ ★ → ★}. f p → g p → (:*:) f g p
+(:*:) ∷ ∀ {f ∷ ★ → ★} {p} {g ∷ ★ → ★}. f p → g p → (:*:) f g p
Rep ∷ ★ → ★ → ★
M1 ∷ ∀ k. ★ → Meta → (k → ★) → k → ★
diff --git a/testsuite/tests/ghci/scripts/T4175.stdout b/testsuite/tests/ghci/scripts/T4175.stdout
index 994886cc4a..fff1b150e5 100644
--- a/testsuite/tests/ghci/scripts/T4175.stdout
+++ b/testsuite/tests/ghci/scripts/T4175.stdout
@@ -4,8 +4,8 @@ type instance A Int Int = () -- Defined at T4175.hs:8:15
type instance A (B a) b = () -- Defined at T4175.hs:10:15
data family B a -- Defined at T4175.hs:12:1
instance G B -- Defined at T4175.hs:34:10
-data instance B () = MkB -- Defined at T4175.hs:13:15
type instance A (B a) b = () -- Defined at T4175.hs:10:15
+data instance B () = MkB -- Defined at T4175.hs:13:15
class C a where
type family D a b :: *
-- Defined at T4175.hs:16:5
@@ -18,38 +18,38 @@ type family E a :: *
-- Defined at T4175.hs:24:1
data () = () -- Defined in ‘GHC.Tuple’
instance C () -- Defined at T4175.hs:21:10
-instance Monoid () -- Defined in ‘GHC.Base’
-instance Bounded () -- Defined in ‘GHC.Enum’
-instance Enum () -- Defined in ‘GHC.Enum’
-instance Read () -- Defined in ‘GHC.Read’
instance Eq () -- Defined in ‘GHC.Classes’
+instance Monoid () -- Defined in ‘GHC.Base’
instance Ord () -- Defined in ‘GHC.Classes’
instance Show () -- Defined in ‘GHC.Show’
+instance Read () -- Defined in ‘GHC.Read’
+instance Enum () -- Defined in ‘GHC.Enum’
+instance Bounded () -- Defined in ‘GHC.Enum’
type instance D () a = Bool -- Defined at T4175.hs:22:10
data instance B () = MkB -- Defined at T4175.hs:13:15
data Maybe a = Nothing | Just a -- Defined in ‘GHC.Base’
-instance Traversable Maybe -- Defined in ‘Data.Traversable’
-instance Monoid a => Monoid (Maybe a) -- Defined in ‘GHC.Base’
-instance Foldable Maybe -- Defined in ‘Data.Foldable’
-instance Read a => Read (Maybe a) -- Defined in ‘GHC.Read’
instance Applicative Maybe -- Defined in ‘GHC.Base’
+instance Eq a => Eq (Maybe a) -- Defined in ‘GHC.Base’
instance Functor Maybe -- Defined in ‘GHC.Base’
instance Monad Maybe -- Defined in ‘GHC.Base’
-instance Eq a => Eq (Maybe a) -- Defined in ‘GHC.Base’
+instance Monoid a => Monoid (Maybe a) -- Defined in ‘GHC.Base’
instance Ord a => Ord (Maybe a) -- Defined in ‘GHC.Base’
instance Show a => Show (Maybe a) -- Defined in ‘GHC.Show’
+instance Read a => Read (Maybe a) -- Defined in ‘GHC.Read’
+instance Foldable Maybe -- Defined in ‘Data.Foldable’
+instance Traversable Maybe -- Defined in ‘Data.Traversable’
type instance A (Maybe a) a = a -- Defined at T4175.hs:9:15
data Int = I# Int# -- Defined in ‘GHC.Types’
instance C Int -- Defined at T4175.hs:18:10
-instance Integral Int -- Defined in ‘GHC.Real’
-instance Num Int -- Defined in ‘GHC.Num’
-instance Real Int -- Defined in ‘GHC.Real’
-instance Bounded Int -- Defined in ‘GHC.Enum’
-instance Enum Int -- Defined in ‘GHC.Enum’
-instance Read Int -- Defined in ‘GHC.Read’
instance Eq Int -- Defined in ‘GHC.Classes’
instance Ord Int -- Defined in ‘GHC.Classes’
instance Show Int -- Defined in ‘GHC.Show’
+instance Read Int -- Defined in ‘GHC.Read’
+instance Enum Int -- Defined in ‘GHC.Enum’
+instance Num Int -- Defined in ‘GHC.Num’
+instance Real Int -- Defined in ‘GHC.Real’
+instance Bounded Int -- Defined in ‘GHC.Enum’
+instance Integral Int -- Defined in ‘GHC.Real’
type instance D Int b = String -- Defined at T4175.hs:19:10
type instance A Int Int = () -- Defined at T4175.hs:8:15
class Z a -- Defined at T4175.hs:28:1
diff --git a/testsuite/tests/ghci/scripts/T6018ghcifail.stderr b/testsuite/tests/ghci/scripts/T6018ghcifail.stderr
index 9184aff580..c5037a1f58 100644
--- a/testsuite/tests/ghci/scripts/T6018ghcifail.stderr
+++ b/testsuite/tests/ghci/scripts/T6018ghcifail.stderr
@@ -49,7 +49,7 @@
<interactive>:60:15: error:
Type family equation violates injectivity annotation.
- Kind variable ‘k2’ cannot be inferred from the right-hand side.
+ Kind variable ‘k1’ cannot be inferred from the right-hand side.
Use -fprint-explicit-kinds to see the kind arguments
In the type family equation:
PolyKindVars '[] = '[] -- Defined at <interactive>:60:15
@@ -59,7 +59,7 @@
Kind variable ‘k’ cannot be inferred from the right-hand side.
Use -fprint-explicit-kinds to see the kind arguments
In the type family equation:
- forall k (b :: k) (a :: k).
+ forall k (a :: k) (b :: k).
Fc a b = Int -- Defined at <interactive>:64:15
<interactive>:68:15: error:
@@ -68,7 +68,7 @@
cannot be inferred from the right-hand side.
Use -fprint-explicit-kinds to see the kind arguments
In the type family equation:
- forall k (b :: k) (a :: k).
+ forall k (a :: k) (b :: k).
Gc a b = Int -- Defined at <interactive>:68:15
<interactive>:81:15: error:
diff --git a/testsuite/tests/ghci/scripts/T7627.stdout b/testsuite/tests/ghci/scripts/T7627.stdout
index b577bdf403..c13a3f3ba0 100644
--- a/testsuite/tests/ghci/scripts/T7627.stdout
+++ b/testsuite/tests/ghci/scripts/T7627.stdout
@@ -1,30 +1,30 @@
data () = () -- Defined in ‘GHC.Tuple’
+instance Eq () -- Defined in ‘GHC.Classes’
instance Monoid () -- Defined in ‘GHC.Base’
-instance Bounded () -- Defined in ‘GHC.Enum’
+instance Ord () -- Defined in ‘GHC.Classes’
+instance Show () -- Defined in ‘GHC.Show’
instance Read () -- Defined in ‘GHC.Read’
instance Enum () -- Defined in ‘GHC.Enum’
-instance Show () -- Defined in ‘GHC.Show’
-instance Eq () -- Defined in ‘GHC.Classes’
-instance Ord () -- Defined in ‘GHC.Classes’
+instance Bounded () -- Defined in ‘GHC.Enum’
data (##) = (##) -- Defined in ‘GHC.Prim’
() :: ()
(##) :: (# #)
( ) :: ()
(# #) :: (# #)
data (,) a b = (,) a b -- Defined in ‘GHC.Tuple’
-instance Traversable ((,) a) -- Defined in ‘Data.Traversable’
-instance Foldable ((,) a) -- Defined in ‘Data.Foldable’
+instance Monoid a => Applicative ((,) a) -- Defined in ‘GHC.Base’
+instance (Eq a, Eq b) => Eq (a, b) -- Defined in ‘GHC.Classes’
+instance Functor ((,) a) -- Defined in ‘GHC.Base’
+instance Monoid a => Monad ((,) a) -- Defined in ‘GHC.Base’
instance (Monoid a, Monoid b) => Monoid (a, b)
-- Defined in ‘GHC.Base’
-instance (Bounded a, Bounded b) => Bounded (a, b)
- -- Defined in ‘GHC.Enum’
-instance (Eq a, Eq b) => Eq (a, b) -- Defined in ‘GHC.Classes’
instance (Ord a, Ord b) => Ord (a, b) -- Defined in ‘GHC.Classes’
-instance (Read a, Read b) => Read (a, b) -- Defined in ‘GHC.Read’
instance (Show a, Show b) => Show (a, b) -- Defined in ‘GHC.Show’
-instance Monoid a => Applicative ((,) a) -- Defined in ‘GHC.Base’
-instance Functor ((,) a) -- Defined in ‘GHC.Base’
-instance Monoid a => Monad ((,) a) -- Defined in ‘GHC.Base’
+instance (Read a, Read b) => Read (a, b) -- Defined in ‘GHC.Read’
+instance Foldable ((,) a) -- Defined in ‘Data.Foldable’
+instance Traversable ((,) a) -- Defined in ‘Data.Traversable’
+instance (Bounded a, Bounded b) => Bounded (a, b)
+ -- Defined in ‘GHC.Enum’
data (#,#) (a :: TYPE k0) (b :: TYPE k1) = (#,#) a b
-- Defined in ‘GHC.Prim’
(,) :: a -> b -> (a, b)
diff --git a/testsuite/tests/ghci/scripts/T7939.stdout b/testsuite/tests/ghci/scripts/T7939.stdout
index 0b41ebb2c6..2b2c8b73ad 100644
--- a/testsuite/tests/ghci/scripts/T7939.stdout
+++ b/testsuite/tests/ghci/scripts/T7939.stdout
@@ -16,12 +16,12 @@ H :: Bool -> Bool
type family J (a :: [k]) :: Bool
where
[k] J k '[] = 'False
- [k, (t :: [k]), (h :: k)] J k (h : t) = 'True
+ [k, (h :: k), (t :: [k])] J k (h : t) = 'True
-- Defined at T7939.hs:17:1
J :: [k] -> Bool
type family K (a1 :: [a]) :: Maybe a
where
[a] K a '[] = 'Nothing
- [a, (t :: [a]), (h :: a)] K a (h : t) = 'Just h
+ [a, (h :: a), (t :: [a])] K a (h : t) = 'Just h
-- Defined at T7939.hs:21:1
K :: [a] -> Maybe a
diff --git a/testsuite/tests/ghci/scripts/T8469.stdout b/testsuite/tests/ghci/scripts/T8469.stdout
index 0bbaaedfbe..ec14842359 100644
--- a/testsuite/tests/ghci/scripts/T8469.stdout
+++ b/testsuite/tests/ghci/scripts/T8469.stdout
@@ -1,10 +1,10 @@
data Int = GHC.Types.I# GHC.Prim.Int# -- Defined in ‘GHC.Types’
-instance Bounded Int -- Defined in ‘GHC.Enum’
+instance Eq Int -- Defined in ‘GHC.Classes’
+instance Ord Int -- Defined in ‘GHC.Classes’
+instance Show Int -- Defined in ‘GHC.Show’
instance Read Int -- Defined in ‘GHC.Read’
instance Enum Int -- Defined in ‘GHC.Enum’
-instance Integral Int -- Defined in ‘GHC.Real’
instance Num Int -- Defined in ‘GHC.Num’
instance Real Int -- Defined in ‘GHC.Real’
-instance Show Int -- Defined in ‘GHC.Show’
-instance Eq Int -- Defined in ‘GHC.Classes’
-instance Ord Int -- Defined in ‘GHC.Classes’
+instance Bounded Int -- Defined in ‘GHC.Enum’
+instance Integral Int -- Defined in ‘GHC.Real’
diff --git a/testsuite/tests/ghci/scripts/T8535.stdout b/testsuite/tests/ghci/scripts/T8535.stdout
index 2aea35f3de..3995bc0b20 100644
--- a/testsuite/tests/ghci/scripts/T8535.stdout
+++ b/testsuite/tests/ghci/scripts/T8535.stdout
@@ -1,6 +1,6 @@
data (->) (a :: TYPE q) (b :: TYPE r) -- Defined in ‘GHC.Prim’
infixr 0 `(->)`
-instance Monoid b => Monoid (a -> b) -- Defined in ‘GHC.Base’
instance Applicative ((->) a) -- Defined in ‘GHC.Base’
instance Functor ((->) r) -- Defined in ‘GHC.Base’
instance Monad ((->) r) -- Defined in ‘GHC.Base’
+instance Monoid b => Monoid (a -> b) -- Defined in ‘GHC.Base’
diff --git a/testsuite/tests/ghci/scripts/T9881.stdout b/testsuite/tests/ghci/scripts/T9881.stdout
index a73f0e8fb8..18fa4d521f 100644
--- a/testsuite/tests/ghci/scripts/T9881.stdout
+++ b/testsuite/tests/ghci/scripts/T9881.stdout
@@ -3,15 +3,15 @@ data Data.ByteString.Lazy.ByteString
| Data.ByteString.Lazy.Internal.Chunk {-# UNPACK #-}Data.ByteString.ByteString
Data.ByteString.Lazy.ByteString
-- Defined in ‘Data.ByteString.Lazy.Internal’
+instance Eq Data.ByteString.Lazy.ByteString
+ -- Defined in ‘Data.ByteString.Lazy.Internal’
instance Monoid Data.ByteString.Lazy.ByteString
-- Defined in ‘Data.ByteString.Lazy.Internal’
-instance Read Data.ByteString.Lazy.ByteString
+instance Ord Data.ByteString.Lazy.ByteString
-- Defined in ‘Data.ByteString.Lazy.Internal’
instance Show Data.ByteString.Lazy.ByteString
-- Defined in ‘Data.ByteString.Lazy.Internal’
-instance Eq Data.ByteString.Lazy.ByteString
- -- Defined in ‘Data.ByteString.Lazy.Internal’
-instance Ord Data.ByteString.Lazy.ByteString
+instance Read Data.ByteString.Lazy.ByteString
-- Defined in ‘Data.ByteString.Lazy.Internal’
data Data.ByteString.ByteString
@@ -20,13 +20,13 @@ data Data.ByteString.ByteString
{-# UNPACK #-}Int
{-# UNPACK #-}Int
-- Defined in ‘Data.ByteString.Internal’
+instance Eq Data.ByteString.ByteString
+ -- Defined in ‘Data.ByteString.Internal’
instance Monoid Data.ByteString.ByteString
-- Defined in ‘Data.ByteString.Internal’
-instance Read Data.ByteString.ByteString
+instance Ord Data.ByteString.ByteString
-- Defined in ‘Data.ByteString.Internal’
instance Show Data.ByteString.ByteString
-- Defined in ‘Data.ByteString.Internal’
-instance Eq Data.ByteString.ByteString
- -- Defined in ‘Data.ByteString.Internal’
-instance Ord Data.ByteString.ByteString
+instance Read Data.ByteString.ByteString
-- Defined in ‘Data.ByteString.Internal’
diff --git a/testsuite/tests/ghci/scripts/ghci011.stdout b/testsuite/tests/ghci/scripts/ghci011.stdout
index 0bffb9720c..372930d66d 100644
--- a/testsuite/tests/ghci/scripts/ghci011.stdout
+++ b/testsuite/tests/ghci/scripts/ghci011.stdout
@@ -1,33 +1,33 @@
data [] a = [] | a : [a] -- Defined in ‘GHC.Types’
-instance Monoid [a] -- Defined in ‘GHC.Base’
-instance Foldable [] -- Defined in ‘Data.Foldable’
-instance Traversable [] -- Defined in ‘Data.Traversable’
-instance Read a => Read [a] -- Defined in ‘GHC.Read’
-instance Show a => Show [a] -- Defined in ‘GHC.Show’
instance Applicative [] -- Defined in ‘GHC.Base’
+instance Eq a => Eq [a] -- Defined in ‘GHC.Classes’
instance Functor [] -- Defined in ‘GHC.Base’
instance Monad [] -- Defined in ‘GHC.Base’
-instance Eq a => Eq [a] -- Defined in ‘GHC.Classes’
+instance Monoid [a] -- Defined in ‘GHC.Base’
instance Ord a => Ord [a] -- Defined in ‘GHC.Classes’
+instance Show a => Show [a] -- Defined in ‘GHC.Show’
+instance Read a => Read [a] -- Defined in ‘GHC.Read’
+instance Foldable [] -- Defined in ‘Data.Foldable’
+instance Traversable [] -- Defined in ‘Data.Traversable’
data () = () -- Defined in ‘GHC.Tuple’
+instance Eq () -- Defined in ‘GHC.Classes’
instance Monoid () -- Defined in ‘GHC.Base’
-instance Read () -- Defined in ‘GHC.Read’
-instance Bounded () -- Defined in ‘GHC.Enum’
-instance Enum () -- Defined in ‘GHC.Enum’
instance Ord () -- Defined in ‘GHC.Classes’
instance Show () -- Defined in ‘GHC.Show’
-instance Eq () -- Defined in ‘GHC.Classes’
+instance Read () -- Defined in ‘GHC.Read’
+instance Enum () -- Defined in ‘GHC.Enum’
+instance Bounded () -- Defined in ‘GHC.Enum’
data (,) a b = (,) a b -- Defined in ‘GHC.Tuple’
-instance Traversable ((,) a) -- Defined in ‘Data.Traversable’
-instance Foldable ((,) a) -- Defined in ‘Data.Foldable’
+instance Monoid a => Applicative ((,) a) -- Defined in ‘GHC.Base’
+instance (Eq a, Eq b) => Eq (a, b) -- Defined in ‘GHC.Classes’
+instance Functor ((,) a) -- Defined in ‘GHC.Base’
+instance Monoid a => Monad ((,) a) -- Defined in ‘GHC.Base’
instance (Monoid a, Monoid b) => Monoid (a, b)
-- Defined in ‘GHC.Base’
-instance (Bounded a, Bounded b) => Bounded (a, b)
- -- Defined in ‘GHC.Enum’
-instance (Eq a, Eq b) => Eq (a, b) -- Defined in ‘GHC.Classes’
instance (Ord a, Ord b) => Ord (a, b) -- Defined in ‘GHC.Classes’
-instance (Read a, Read b) => Read (a, b) -- Defined in ‘GHC.Read’
instance (Show a, Show b) => Show (a, b) -- Defined in ‘GHC.Show’
-instance Monoid a => Applicative ((,) a) -- Defined in ‘GHC.Base’
-instance Functor ((,) a) -- Defined in ‘GHC.Base’
-instance Monoid a => Monad ((,) a) -- Defined in ‘GHC.Base’
+instance (Read a, Read b) => Read (a, b) -- Defined in ‘GHC.Read’
+instance Foldable ((,) a) -- Defined in ‘Data.Foldable’
+instance Traversable ((,) a) -- Defined in ‘Data.Traversable’
+instance (Bounded a, Bounded b) => Bounded (a, b)
+ -- Defined in ‘GHC.Enum’
diff --git a/testsuite/tests/ghci/scripts/ghci020.stdout b/testsuite/tests/ghci/scripts/ghci020.stdout
index 2aea35f3de..3995bc0b20 100644
--- a/testsuite/tests/ghci/scripts/ghci020.stdout
+++ b/testsuite/tests/ghci/scripts/ghci020.stdout
@@ -1,6 +1,6 @@
data (->) (a :: TYPE q) (b :: TYPE r) -- Defined in ‘GHC.Prim’
infixr 0 `(->)`
-instance Monoid b => Monoid (a -> b) -- Defined in ‘GHC.Base’
instance Applicative ((->) a) -- Defined in ‘GHC.Base’
instance Functor ((->) r) -- Defined in ‘GHC.Base’
instance Monad ((->) r) -- Defined in ‘GHC.Base’
+instance Monoid b => Monoid (a -> b) -- Defined in ‘GHC.Base’
diff --git a/testsuite/tests/ghci/should_run/T10145.stdout b/testsuite/tests/ghci/should_run/T10145.stdout
index 2aea35f3de..3995bc0b20 100644
--- a/testsuite/tests/ghci/should_run/T10145.stdout
+++ b/testsuite/tests/ghci/should_run/T10145.stdout
@@ -1,6 +1,6 @@
data (->) (a :: TYPE q) (b :: TYPE r) -- Defined in ‘GHC.Prim’
infixr 0 `(->)`
-instance Monoid b => Monoid (a -> b) -- Defined in ‘GHC.Base’
instance Applicative ((->) a) -- Defined in ‘GHC.Base’
instance Functor ((->) r) -- Defined in ‘GHC.Base’
instance Monad ((->) r) -- Defined in ‘GHC.Base’
+instance Monoid b => Monoid (a -> b) -- Defined in ‘GHC.Base’
diff --git a/testsuite/tests/ghci/should_run/T12549.stdout b/testsuite/tests/ghci/should_run/T12549.stdout
index fd0a45c46b..bd446f741a 100644
--- a/testsuite/tests/ghci/should_run/T12549.stdout
+++ b/testsuite/tests/ghci/should_run/T12549.stdout
@@ -1,3 +1,3 @@
-f :: forall k1 k2 (b :: k1) (a :: k1 -> k2 -> *) (c :: k2).
+f :: forall k1 k2 (a :: k1 -> k2 -> *) (b :: k1) (c :: k2).
C a =>
a b c