Commit c8702e30 authored by Ben Gamari's avatar Ben Gamari 🐢

TcErrors: Fix plural form of "instance" error

Previously "types" was inappropriately made plural instead of
"instance",

    instance Eq Ordering -- Defined in ‘GHC.Classes’
    ...plus 24 others
    ...plus 13 instance involving out-of-scope typess
parent 1f894f29
...@@ -2016,8 +2016,8 @@ pprPotentials dflags sty herald insts ...@@ -2016,8 +2016,8 @@ pprPotentials dflags sty herald insts
| null not_in_scope | null not_in_scope
= empty = empty
| otherwise | otherwise
= hang (herald <+> speakNOf (length not_in_scope) = hang (herald <+> speakNOf (length not_in_scope) (text "instance")
(text "instance involving out-of-scope types")) <+> text "involving out-of-scope types")
2 (ppWhen show_potentials (pprInstances not_in_scope)) 2 (ppWhen show_potentials (pprInstances not_in_scope))
flag_hint = ppUnless (show_potentials || length show_these == length insts) $ flag_hint = ppUnless (show_potentials || length show_these == length insts) $
......
...@@ -10,7 +10,7 @@ annfail10.hs:9:1: error: ...@@ -10,7 +10,7 @@ annfail10.hs:9:1: error:
instance Data.Data.Data Ordering -- Defined in ‘Data.Data’ instance Data.Data.Data Ordering -- Defined in ‘Data.Data’
instance Data.Data.Data Integer -- Defined in ‘Data.Data’ instance Data.Data.Data Integer -- Defined in ‘Data.Data’
...plus 15 others ...plus 15 others
...plus 24 instance involving out-of-scope typess ...plus 24 instances involving out-of-scope types
(use -fprint-potential-instances to see them all) (use -fprint-potential-instances to see them all)
• In the annotation: {-# ANN f 1 #-} • In the annotation: {-# ANN f 1 #-}
...@@ -23,6 +23,6 @@ annfail10.hs:9:11: error: ...@@ -23,6 +23,6 @@ annfail10.hs:9:11: error:
instance Num Double -- Defined in ‘GHC.Float’ instance Num Double -- Defined in ‘GHC.Float’
instance Num Float -- Defined in ‘GHC.Float’ instance Num Float -- Defined in ‘GHC.Float’
...plus two others ...plus two others
...plus 12 instance involving out-of-scope typess ...plus 12 instances involving out-of-scope types
(use -fprint-potential-instances to see them all) (use -fprint-potential-instances to see them all)
• In the annotation: {-# ANN f 1 #-} • In the annotation: {-# ANN f 1 #-}
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
instance Show Ordering -- Defined in ‘GHC.Show’ instance Show Ordering -- Defined in ‘GHC.Show’
instance Show Integer -- Defined in ‘GHC.Show’ instance Show Integer -- Defined in ‘GHC.Show’
...plus 23 others ...plus 23 others
...plus 20 instance involving out-of-scope typess ...plus 20 instances involving out-of-scope types
(use -fprint-potential-instances to see them all) (use -fprint-potential-instances to see them all)
• In a stmt of an interactive GHCi command: print it • In a stmt of an interactive GHCi command: print it
...@@ -25,6 +25,6 @@ ...@@ -25,6 +25,6 @@
instance Show Ordering -- Defined in ‘GHC.Show’ instance Show Ordering -- Defined in ‘GHC.Show’
instance Show Integer -- Defined in ‘GHC.Show’ instance Show Integer -- Defined in ‘GHC.Show’
...plus 23 others ...plus 23 others
...plus 20 instance involving out-of-scope typess ...plus 20 instances involving out-of-scope types
(use -fprint-potential-instances to see them all) (use -fprint-potential-instances to see them all)
• In a stmt of an interactive GHCi command: print it • In a stmt of an interactive GHCi command: print it
...@@ -9,6 +9,6 @@ ...@@ -9,6 +9,6 @@
instance Show Ordering -- Defined in ‘GHC.Show’ instance Show Ordering -- Defined in ‘GHC.Show’
instance Show Integer -- Defined in ‘GHC.Show’ instance Show Integer -- Defined in ‘GHC.Show’
...plus 30 others ...plus 30 others
...plus 9 instance involving out-of-scope typess ...plus 9 instances involving out-of-scope types
(use -fprint-potential-instances to see them all) (use -fprint-potential-instances to see them all)
• In a stmt of an interactive GHCi command: print it • In a stmt of an interactive GHCi command: print it
...@@ -8,7 +8,7 @@ overloadedlistsfail01.hs:5:8: error: ...@@ -8,7 +8,7 @@ overloadedlistsfail01.hs:5:8: error:
instance Show Integer -- Defined in ‘GHC.Show’ instance Show Integer -- Defined in ‘GHC.Show’
instance Show a => Show (Maybe a) -- Defined in ‘GHC.Show’ instance Show a => Show (Maybe a) -- Defined in ‘GHC.Show’
...plus 22 others ...plus 22 others
...plus five instance involving out-of-scope typess ...plus five instances involving out-of-scope types
(use -fprint-potential-instances to see them all) (use -fprint-potential-instances to see them all)
• In the expression: print [1] • In the expression: print [1]
In an equation for ‘main’: main = print [1] In an equation for ‘main’: main = print [1]
......
...@@ -19,7 +19,7 @@ TH_localname.hs:3:11: error: ...@@ -19,7 +19,7 @@ TH_localname.hs:3:11: error:
Language.Haskell.TH.Syntax.Lift (Maybe a) Language.Haskell.TH.Syntax.Lift (Maybe a)
-- Defined in ‘Language.Haskell.TH.Syntax’ -- Defined in ‘Language.Haskell.TH.Syntax’
...plus 14 others ...plus 14 others
...plus 10 instance involving out-of-scope typess ...plus 10 instances involving out-of-scope types
(use -fprint-potential-instances to see them all) (use -fprint-potential-instances to see them all)
• In the expression: Language.Haskell.TH.Syntax.lift y • In the expression: Language.Haskell.TH.Syntax.lift y
In the expression: In the expression:
......
...@@ -8,7 +8,7 @@ holes2.hs:3:5: warning: ...@@ -8,7 +8,7 @@ holes2.hs:3:5: warning:
instance Show Integer -- Defined in ‘GHC.Show’ instance Show Integer -- Defined in ‘GHC.Show’
instance Show a => Show (Maybe a) -- Defined in ‘GHC.Show’ instance Show a => Show (Maybe a) -- Defined in ‘GHC.Show’
...plus 22 others ...plus 22 others
...plus four instance involving out-of-scope typess ...plus four instances involving out-of-scope types
(use -fprint-potential-instances to see them all) (use -fprint-potential-instances to see them all)
• In the expression: show _ • In the expression: show _
In an equation for ‘f’: f = show _ In an equation for ‘f’: f = show _
......
...@@ -11,7 +11,7 @@ T10971b.hs:4:11: error: ...@@ -11,7 +11,7 @@ T10971b.hs:4:11: error:
instance Foldable Maybe -- Defined in ‘Data.Foldable’ instance Foldable Maybe -- Defined in ‘Data.Foldable’
instance Foldable ((,) a) -- Defined in ‘Data.Foldable’ instance Foldable ((,) a) -- Defined in ‘Data.Foldable’
...plus one other ...plus one other
...plus 9 instance involving out-of-scope typess ...plus 9 instances involving out-of-scope types
(use -fprint-potential-instances to see them all) (use -fprint-potential-instances to see them all)
• In the expression: length x • In the expression: length x
In the expression: \ x -> length x In the expression: \ x -> length x
...@@ -29,7 +29,7 @@ T10971b.hs:5:13: error: ...@@ -29,7 +29,7 @@ T10971b.hs:5:13: error:
instance Traversable Maybe -- Defined in ‘Data.Traversable’ instance Traversable Maybe -- Defined in ‘Data.Traversable’
instance Traversable ((,) a) -- Defined in ‘Data.Traversable’ instance Traversable ((,) a) -- Defined in ‘Data.Traversable’
...plus one other ...plus one other
...plus 9 instance involving out-of-scope typess ...plus 9 instances involving out-of-scope types
(use -fprint-potential-instances to see them all) (use -fprint-potential-instances to see them all)
• In the expression: fmapDefault f x • In the expression: fmapDefault f x
In the expression: \ f x -> fmapDefault f x In the expression: \ f x -> fmapDefault f x
...@@ -47,7 +47,7 @@ T10971b.hs:6:14: error: ...@@ -47,7 +47,7 @@ T10971b.hs:6:14: error:
instance Traversable Maybe -- Defined in ‘Data.Traversable’ instance Traversable Maybe -- Defined in ‘Data.Traversable’
instance Traversable ((,) a) -- Defined in ‘Data.Traversable’ instance Traversable ((,) a) -- Defined in ‘Data.Traversable’
...plus one other ...plus one other
...plus 9 instance involving out-of-scope typess ...plus 9 instances involving out-of-scope types
(use -fprint-potential-instances to see them all) (use -fprint-potential-instances to see them all)
• In the expression: fmapDefault f x • In the expression: fmapDefault f x
In the expression: (fmapDefault f x, length x) In the expression: (fmapDefault f x, length x)
...@@ -65,7 +65,7 @@ T10971b.hs:6:31: error: ...@@ -65,7 +65,7 @@ T10971b.hs:6:31: error:
instance Foldable Maybe -- Defined in ‘Data.Foldable’ instance Foldable Maybe -- Defined in ‘Data.Foldable’
instance Foldable ((,) a) -- Defined in ‘Data.Foldable’ instance Foldable ((,) a) -- Defined in ‘Data.Foldable’
...plus one other ...plus one other
...plus 9 instance involving out-of-scope typess ...plus 9 instances involving out-of-scope types
(use -fprint-potential-instances to see them all) (use -fprint-potential-instances to see them all)
• In the expression: length x • In the expression: length x
In the expression: (fmapDefault f x, length x) In the expression: (fmapDefault f x, length x)
......
...@@ -7,7 +7,7 @@ T5095.hs:9:9: error: ...@@ -7,7 +7,7 @@ T5095.hs:9:9: error:
-- Defined in ‘Data.Either’ -- Defined in ‘Data.Either’
instance Eq Ordering -- Defined in ‘GHC.Classes’ instance Eq Ordering -- Defined in ‘GHC.Classes’
...plus 24 others ...plus 24 others
...plus 14 instance involving out-of-scope typess ...plus 14 instances involving out-of-scope types
(use -fprint-potential-instances to see them all) (use -fprint-potential-instances to see them all)
(The choice depends on the instantiation of ‘a’ (The choice depends on the instantiation of ‘a’
To pick the first instance above, use IncoherentInstances To pick the first instance above, use IncoherentInstances
......
...@@ -9,10 +9,10 @@ tcfail072.hs:23:13: error: ...@@ -9,10 +9,10 @@ tcfail072.hs:23:13: error:
These potential instances exist: These potential instances exist:
instance Ord Ordering -- Defined in ‘GHC.Classes’ instance Ord Ordering -- Defined in ‘GHC.Classes’
instance Ord Integer instance Ord Integer
-- Defined in ‘integer-gmp-1.0.0.0:GHC.Integer.Type’ -- Defined in ‘integer-gmp-1.0.0.1:GHC.Integer.Type’
instance Ord a => Ord (Maybe a) -- Defined in ‘GHC.Base’ instance Ord a => Ord (Maybe a) -- Defined in ‘GHC.Base’
...plus 22 others ...plus 22 others
...plus two instance involving out-of-scope typess ...plus two instances involving out-of-scope types
(use -fprint-potential-instances to see them all) (use -fprint-potential-instances to see them all)
• In the expression: g A • In the expression: g A
In an equation for ‘g’: g (B _ _) = g A In an equation for ‘g’: g (B _ _) = g A
...@@ -12,7 +12,7 @@ tcfail133.hs:68:7: error: ...@@ -12,7 +12,7 @@ tcfail133.hs:68:7: error:
instance (Show a, Show b, Number a, Digit b) => Show (a :@ b) instance (Show a, Show b, Number a, Digit b) => Show (a :@ b)
-- Defined at tcfail133.hs:11:54 -- Defined at tcfail133.hs:11:54
...plus 25 others ...plus 25 others
...plus four instance involving out-of-scope typess ...plus four instances involving out-of-scope types
(use -fprint-potential-instances to see them all) (use -fprint-potential-instances to see them all)
• In the expression: show $ add (One :@ Zero) (One :@ One) • In the expression: show $ add (One :@ Zero) (One :@ One)
In an equation for ‘foo’: In an equation for ‘foo’:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment