summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiles Anderson <agander@gmail.com>2022-08-29 23:01:47 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-11-09 09:27:52 -0500
commit92ccb8de9624ea930d66152b2f6a181941a497c9 (patch)
tree6231d4f2c6a7e4e60a18f7d9f128ffab1e0ffe10
parent080fffa1015bcc0cff8ab4ad1eeb507fb7a13383 (diff)
downloadhaskell-92ccb8de9624ea930d66152b2f6a181941a497c9.tar.gz
Use TcRnDiagnostic in GHC.Tc.TyCl.Instance (#20117)
The following `TcRnDiagnostic` messages have been introduced: TcRnWarnUnsatisfiedMinimalDefinition TcRnMisplacedInstSig TcRnBadBootFamInstDeclErr TcRnIllegalFamilyInstance TcRnAssocInClassErr TcRnBadFamInstDecl TcRnNotOpenFamily
-rw-r--r--compiler/GHC/Driver/Errors/Ppr.hs2
-rw-r--r--compiler/GHC/Tc/Errors/Ppr.hs56
-rw-r--r--compiler/GHC/Tc/Errors/Types.hs87
-rw-r--r--compiler/GHC/Tc/TyCl/Instance.hs56
-rw-r--r--compiler/GHC/Types/Error/Codes.hs7
-rw-r--r--testsuite/tests/backpack/should_compile/bkp47.stderr2
-rw-r--r--testsuite/tests/backpack/should_fail/bkpfail25.stderr2
-rw-r--r--testsuite/tests/deSugar/should_compile/T14546d.stderr2
-rw-r--r--testsuite/tests/deriving/should_compile/T14094.stderr4
-rw-r--r--testsuite/tests/deriving/should_compile/T4966.stderr2
-rw-r--r--testsuite/tests/deriving/should_compile/T9968a.stderr2
-rw-r--r--testsuite/tests/deriving/should_compile/deriving-1935.stderr6
-rw-r--r--testsuite/tests/deriving/should_compile/drv003.stderr4
-rw-r--r--testsuite/tests/ghci/scripts/T5820.stderr2
-rw-r--r--testsuite/tests/ghci/scripts/ghci019.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_compile/Class3.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_compile/Simple2.stderr6
-rw-r--r--testsuite/tests/indexed-types/should_fail/BadFamInstDecl.hs4
-rw-r--r--testsuite/tests/indexed-types/should_fail/BadFamInstDecl.stderr7
-rw-r--r--testsuite/tests/indexed-types/should_fail/BadFamInstDecl_aux.hs4
-rw-r--r--testsuite/tests/indexed-types/should_fail/HsBootFam.hs3
-rw-r--r--testsuite/tests/indexed-types/should_fail/HsBootFam.stderr5
-rw-r--r--testsuite/tests/indexed-types/should_fail/HsBootFam_aux.hs6
-rw-r--r--testsuite/tests/indexed-types/should_fail/HsBootFam_aux.hs-boot6
-rw-r--r--testsuite/tests/indexed-types/should_fail/Overlap3.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_fail/Overlap7.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_fail/SimpleFail7.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_fail/T3092.stderr4
-rw-r--r--testsuite/tests/indexed-types/should_fail/T7862.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_fail/all.T2
-rw-r--r--testsuite/tests/module/mod45.stderr4
-rw-r--r--testsuite/tests/parser/should_compile/T2245.stderr4
-rw-r--r--testsuite/tests/parser/should_compile/read014.stderr2
-rw-r--r--testsuite/tests/perf/compiler/T15304.stderr4
-rw-r--r--testsuite/tests/simplCore/should_compile/simpl020.stderr2
-rw-r--r--testsuite/tests/typecheck/prog001/typecheck.prog001.stderr2
-rw-r--r--testsuite/tests/typecheck/should_compile/HasKey.stderr2
-rw-r--r--testsuite/tests/typecheck/should_compile/T7903.stderr4
-rw-r--r--testsuite/tests/typecheck/should_compile/tc078.stderr4
-rw-r--r--testsuite/tests/typecheck/should_compile/tc115.stderr2
-rw-r--r--testsuite/tests/typecheck/should_compile/tc116.stderr2
-rw-r--r--testsuite/tests/typecheck/should_compile/tc125.stderr10
-rw-r--r--testsuite/tests/typecheck/should_compile/tc126.stderr4
-rw-r--r--testsuite/tests/typecheck/should_compile/tc161.stderr2
-rw-r--r--testsuite/tests/typecheck/should_compile/tc175.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T21583.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/T5051.stderr2
-rw-r--r--testsuite/tests/warnings/minimal/WarnMinimal.stderr16
48 files changed, 257 insertions, 110 deletions
diff --git a/compiler/GHC/Driver/Errors/Ppr.hs b/compiler/GHC/Driver/Errors/Ppr.hs
index 69e3c28740..9ba53902bc 100644
--- a/compiler/GHC/Driver/Errors/Ppr.hs
+++ b/compiler/GHC/Driver/Errors/Ppr.hs
@@ -328,4 +328,4 @@ instance Diagnostic DriverMessage where
DriverHomePackagesNotClosed {}
-> noHints
- diagnosticCode = constructorCode \ No newline at end of file
+ diagnosticCode = constructorCode
diff --git a/compiler/GHC/Tc/Errors/Ppr.hs b/compiler/GHC/Tc/Errors/Ppr.hs
index 60b92643da..ad23585fd0 100644
--- a/compiler/GHC/Tc/Errors/Ppr.hs
+++ b/compiler/GHC/Tc/Errors/Ppr.hs
@@ -1154,6 +1154,34 @@ instance Diagnostic TcRnMessage where
False -> text (TH.pprint item))
TcRnReportCustomQuasiError _ msg -> mkSimpleDecorated $ text msg
TcRnInterfaceLookupError _ sdoc -> mkSimpleDecorated sdoc
+ TcRnUnsatisfiedMinimalDef mindef
+ -> mkSimpleDecorated $
+ vcat [text "No explicit implementation for"
+ ,nest 2 $ pprBooleanFormulaNice mindef
+ ]
+ TcRnMisplacedInstSig name hs_ty
+ -> mkSimpleDecorated $
+ vcat [ hang (text "Illegal type signature in instance declaration:")
+ 2 (hang (pprPrefixName name)
+ 2 (dcolon <+> ppr hs_ty))
+ ]
+ TcRnBadBootFamInstDecl {}
+ -> mkSimpleDecorated $
+ text "Illegal family instance in hs-boot file"
+ TcRnIllegalFamilyInstance tycon
+ -> mkSimpleDecorated $
+ vcat [ text "Illegal family instance for" <+> quotes (ppr tycon)
+ , nest 2 $ parens (ppr tycon <+> text "is not an indexed type family")]
+ TcRnMissingClassAssoc name
+ -> mkSimpleDecorated $
+ text "Associated type" <+> quotes (ppr name) <+>
+ text "must be inside a class instance"
+ TcRnBadFamInstDecl tc_name
+ -> mkSimpleDecorated $
+ text "Illegal family instance for" <+> quotes (ppr tc_name)
+ TcRnNotOpenFamily tc
+ -> mkSimpleDecorated $
+ text "Illegal instance for closed family" <+> quotes (ppr tc)
diagnosticReason = \case
TcRnUnknownMessage m
@@ -1522,6 +1550,20 @@ instance Diagnostic TcRnMessage where
-> if isError then ErrorWithoutFlag else WarningWithoutFlag
TcRnInterfaceLookupError{}
-> ErrorWithoutFlag
+ TcRnUnsatisfiedMinimalDef{}
+ -> WarningWithFlag (Opt_WarnMissingMethods)
+ TcRnMisplacedInstSig{}
+ -> ErrorWithoutFlag
+ TcRnBadBootFamInstDecl{}
+ -> ErrorWithoutFlag
+ TcRnIllegalFamilyInstance{}
+ -> ErrorWithoutFlag
+ TcRnMissingClassAssoc{}
+ -> ErrorWithoutFlag
+ TcRnBadFamInstDecl{}
+ -> ErrorWithoutFlag
+ TcRnNotOpenFamily{}
+ -> ErrorWithoutFlag
diagnosticHints = \case
TcRnUnknownMessage m
@@ -1892,6 +1934,20 @@ instance Diagnostic TcRnMessage where
-> noHints
TcRnInterfaceLookupError{}
-> noHints
+ TcRnUnsatisfiedMinimalDef{}
+ -> noHints
+ TcRnMisplacedInstSig{}
+ -> [suggestExtension LangExt.InstanceSigs]
+ TcRnBadBootFamInstDecl{}
+ -> noHints
+ TcRnIllegalFamilyInstance{}
+ -> noHints
+ TcRnMissingClassAssoc{}
+ -> noHints
+ TcRnBadFamInstDecl{}
+ -> [suggestExtension LangExt.TypeFamilies]
+ TcRnNotOpenFamily{}
+ -> noHints
diagnosticCode = constructorCode
diff --git a/compiler/GHC/Tc/Errors/Types.hs b/compiler/GHC/Tc/Errors/Types.hs
index 053e53a16a..2baccd1ee1 100644
--- a/compiler/GHC/Tc/Errors/Types.hs
+++ b/compiler/GHC/Tc/Errors/Types.hs
@@ -2545,6 +2545,93 @@ data TcRnMessage where
-}
TcRnInterfaceLookupError :: !Name -> !SDoc -> TcRnMessage
+ {- | TcRnUnsatisfiedMinimalDef is a warning that occurs when a class instance
+ is missing methods that are required by the minimal definition.
+
+ Example:
+ class C a where
+ foo :: a -> a
+ instance C () -- | foo needs to be defined here
+
+ Test cases:
+ testsuite/tests/typecheck/prog001/typecheck.prog001
+ testsuite/tests/typecheck/should_compile/tc126
+ testsuite/tests/typecheck/should_compile/T7903
+ testsuite/tests/typecheck/should_compile/tc116
+ testsuite/tests/typecheck/should_compile/tc175
+ testsuite/tests/typecheck/should_compile/HasKey
+ testsuite/tests/typecheck/should_compile/tc125
+ testsuite/tests/typecheck/should_compile/tc078
+ testsuite/tests/typecheck/should_compile/tc161
+ testsuite/tests/typecheck/should_fail/T5051
+ testsuite/tests/typecheck/should_fail/T21583
+ testsuite/tests/backpack/should_compile/bkp47
+ testsuite/tests/backpack/should_fail/bkpfail25
+ testsuite/tests/parser/should_compile/T2245
+ testsuite/tests/parser/should_compile/read014
+ testsuite/tests/indexed-types/should_compile/Class3
+ testsuite/tests/indexed-types/should_compile/Simple2
+ testsuite/tests/indexed-types/should_fail/T7862
+ testsuite/tests/deriving/should_compile/deriving-1935
+ testsuite/tests/deriving/should_compile/T9968a
+ testsuite/tests/deriving/should_compile/drv003
+ testsuite/tests/deriving/should_compile/T4966
+ testsuite/tests/deriving/should_compile/T14094
+ testsuite/tests/perf/compiler/T15304
+ testsuite/tests/warnings/minimal/WarnMinimal
+ testsuite/tests/simplCore/should_compile/simpl020
+ testsuite/tests/deSugar/should_compile/T14546d
+ testsuite/tests/ghci/scripts/T5820
+ testsuite/tests/ghci/scripts/ghci019
+ -}
+ TcRnUnsatisfiedMinimalDef :: ClassMinimalDef -> TcRnMessage
+
+ {- | 'TcRnMisplacedInstSig' is an error that happens when a method in
+ a class instance is given a type signature, but the user has not
+ enabled the @InstanceSigs@ extension.
+
+ Test case:
+ testsuite/tests/module/mod45
+ -}
+ TcRnMisplacedInstSig :: Name -> (LHsSigType GhcRn) -> TcRnMessage
+ {- | 'TcRnBadBootFamInstDecl' is an error that is triggered by a
+ type family instance being declared in an hs-boot file.
+
+ Test case:
+ testsuite/tests/indexed-types/should_fail/HsBootFam
+ -}
+ TcRnBadBootFamInstDecl :: {} -> TcRnMessage
+ {- | 'TcRnIllegalFamilyInstance' is an error that occurs when an associated
+ type or data family is given a top-level instance.
+
+ Test case:
+ testsuite/tests/indexed-types/should_fail/T3092
+ -}
+ TcRnIllegalFamilyInstance :: TyCon -> TcRnMessage
+ {- | 'TcRnMissingClassAssoc' is an error that occurs when a class instance
+ for a class with an associated type or data family is missing a corresponding
+ family instance declaration.
+
+ Test case:
+ testsuite/tests/indexed-types/should_fail/SimpleFail7
+ -}
+ TcRnMissingClassAssoc :: TyCon -> TcRnMessage
+ {- | 'TcRnBadFamInstDecl' is an error that is triggered by a type or data family
+ instance without the @TypeFamilies@ extension.
+
+ Test case:
+ testsuite/tests/indexed-types/should_fail/BadFamInstDecl
+ -}
+ TcRnBadFamInstDecl :: TyCon -> TcRnMessage
+ {- | 'TcRnNotOpenFamily' is an error that is triggered by attempting to give
+ a top-level (open) type family instance for a closed type family.
+
+ Test cases:
+ testsuite/tests/indexed-types/should_fail/Overlap7
+ testsuite/tests/indexed-types/should_fail/Overlap3
+ -}
+ TcRnNotOpenFamily :: TyCon -> TcRnMessage
+
deriving Generic
-- | Things forbidden in @type data@ declarations.
diff --git a/compiler/GHC/Tc/TyCl/Instance.hs b/compiler/GHC/Tc/TyCl/Instance.hs
index 2eccaa22fc..c5bb704b41 100644
--- a/compiler/GHC/Tc/TyCl/Instance.hs
+++ b/compiler/GHC/Tc/TyCl/Instance.hs
@@ -81,7 +81,7 @@ import GHC.Utils.Outputable
import GHC.Utils.Panic
import GHC.Types.SrcLoc
import GHC.Utils.Misc
-import GHC.Data.BooleanFormula ( isUnsatisfied, pprBooleanFormulaNice )
+import GHC.Data.BooleanFormula ( isUnsatisfied )
import qualified GHC.LanguageExtensions as LangExt
import Control.Monad
@@ -591,7 +591,7 @@ tcTyFamInstDecl mb_clsinfo (L loc decl@(TyFamInstDecl { tfid_eqn = eqn }))
-- (0) Check it's an open type family
; checkTc (isTypeFamilyTyCon fam_tc) (wrongKindOfFamily fam_tc)
- ; checkTc (isOpenTypeFamilyTyCon fam_tc) (notOpenFamily fam_tc)
+ ; checkTc (isOpenTypeFamilyTyCon fam_tc) (TcRnNotOpenFamily fam_tc)
-- (1) do the work of verifying the synonym group
-- For some reason we don't have a location for the equation
@@ -618,16 +618,16 @@ tcFamInstDeclChecks mb_clsinfo fam_tc
; traceTc "tcFamInstDecl" (ppr fam_tc)
; type_families <- xoptM LangExt.TypeFamilies
; is_boot <- tcIsHsBootOrSig -- Are we compiling an hs-boot file?
- ; checkTc type_families $ badFamInstDecl fam_tc
- ; checkTc (not is_boot) $ badBootFamInstDeclErr
+ ; checkTc type_families (TcRnBadFamInstDecl fam_tc)
+ ; checkTc (not is_boot) TcRnBadBootFamInstDecl
-- Check that it is a family TyCon, and that
-- oplevel type instances are not for associated types.
- ; checkTc (isFamilyTyCon fam_tc) (notFamily fam_tc)
+ ; checkTc (isFamilyTyCon fam_tc) (TcRnIllegalFamilyInstance fam_tc)
; when (isNotAssociated mb_clsinfo && -- Not in a class decl
isTyConAssoc fam_tc) -- but an associated type
- (addErr $ assocInClassErr fam_tc)
+ (addErr $ TcRnMissingClassAssoc fam_tc)
}
{- Note [Associated type instances]
@@ -1937,7 +1937,7 @@ tcMethodBodyHelp hs_sig_fn sel_id local_meth_id meth_bind
= do { (sig_ty, hs_wrap)
<- setSrcSpan (getLocA hs_sig_ty) $
do { inst_sigs <- xoptM LangExt.InstanceSigs
- ; checkTc inst_sigs (misplacedInstSig sel_name hs_sig_ty)
+ ; checkTc inst_sigs (TcRnMisplacedInstSig sel_name hs_sig_ty)
; let ctxt = FunSigCtxt sel_name NoRRC
; sig_ty <- tcHsSigType ctxt hs_sig_ty
; let local_meth_ty = idType local_meth_id
@@ -2025,14 +2025,6 @@ methSigCtxt sel_name sig_ty meth_ty env0
, text " Class sig:" <+> ppr meth_ty ])
; return (env2, msg) }
-misplacedInstSig :: Name -> LHsSigType GhcRn -> TcRnMessage
-misplacedInstSig name hs_ty
- = mkTcRnUnknownMessage $ mkPlainError noHints $
- vcat [ hang (text "Illegal type signature in instance declaration:")
- 2 (hang (pprPrefixName name)
- 2 (dcolon <+> ppr hs_ty))
- , text "(Use InstanceSigs to allow this)" ]
-
{- Note [Instance method signatures]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
With -XInstanceSigs we allow the user to supply a signature for the
@@ -2155,14 +2147,9 @@ derivBindCtxt sel_id clas tys
warnUnsatisfiedMinimalDefinition :: ClassMinimalDef -> TcM ()
warnUnsatisfiedMinimalDefinition mindef
= do { warn <- woptM Opt_WarnMissingMethods
- ; let msg = mkTcRnUnknownMessage $
- mkPlainDiagnostic (WarningWithFlag Opt_WarnMissingMethods) noHints message
+ ; let msg = TcRnUnsatisfiedMinimalDef mindef
; diagnosticTc warn msg
}
- where
- message = vcat [text "No explicit implementation for"
- ,nest 2 $ pprBooleanFormulaNice mindef
- ]
{-
Note [Export helper functions]
@@ -2376,30 +2363,3 @@ inst_decl_ctxt :: SDoc -> SDoc
inst_decl_ctxt doc = hang (text "In the instance declaration for")
2 (quotes doc)
-badBootFamInstDeclErr :: TcRnMessage
-badBootFamInstDeclErr
- = mkTcRnUnknownMessage $ mkPlainError noHints $ text "Illegal family instance in hs-boot file"
-
-notFamily :: TyCon -> TcRnMessage
-notFamily tycon
- = mkTcRnUnknownMessage $ mkPlainError noHints $
- vcat [ text "Illegal family instance for" <+> quotes (ppr tycon)
- , nest 2 $ parens (ppr tycon <+> text "is not an indexed type family")]
-
-assocInClassErr :: TyCon -> TcRnMessage
-assocInClassErr name
- = mkTcRnUnknownMessage $ mkPlainError noHints $
- text "Associated type" <+> quotes (ppr name) <+>
- text "must be inside a class instance"
-
-badFamInstDecl :: TyCon -> TcRnMessage
-badFamInstDecl tc_name
- = mkTcRnUnknownMessage $ mkPlainError noHints $
- vcat [ text "Illegal family instance for" <+>
- quotes (ppr tc_name)
- , nest 2 (parens $ text "Use TypeFamilies to allow indexed type families") ]
-
-notOpenFamily :: TyCon -> TcRnMessage
-notOpenFamily tc
- = mkTcRnUnknownMessage $ mkPlainError noHints $
- text "Illegal instance for closed family" <+> quotes (ppr tc)
diff --git a/compiler/GHC/Types/Error/Codes.hs b/compiler/GHC/Types/Error/Codes.hs
index 4c13126699..6bda338d4e 100644
--- a/compiler/GHC/Types/Error/Codes.hs
+++ b/compiler/GHC/Types/Error/Codes.hs
@@ -482,6 +482,13 @@ type family GhcDiagnosticCode c = n | n -> c where
GhcDiagnosticCode "TcRnCannotRepresentType" = 75721
GhcDiagnosticCode "TcRnReportCustomQuasiError" = 39584
GhcDiagnosticCode "TcRnInterfaceLookupError" = 52243
+ GhcDiagnosticCode "TcRnUnsatisfiedMinimalDef" = 06201
+ GhcDiagnosticCode "TcRnMisplacedInstSig" = 06202
+ GhcDiagnosticCode "TcRnBadBootFamInstDecl" = 06203
+ GhcDiagnosticCode "TcRnIllegalFamilyInstance" = 06204
+ GhcDiagnosticCode "TcRnMissingClassAssoc" = 06205
+ GhcDiagnosticCode "TcRnBadFamInstDecl" = 06206
+ GhcDiagnosticCode "TcRnNotOpenFamily" = 06207
-- IllegalNewtypeReason
GhcDiagnosticCode "DoesNotHaveSingleField" = 23517
diff --git a/testsuite/tests/backpack/should_compile/bkp47.stderr b/testsuite/tests/backpack/should_compile/bkp47.stderr
index 134cbd4f42..07e13231bb 100644
--- a/testsuite/tests/backpack/should_compile/bkp47.stderr
+++ b/testsuite/tests/backpack/should_compile/bkp47.stderr
@@ -6,7 +6,7 @@
[1 of 4] Compiling A[sig] ( r/A.hsig, nothing )
[2 of 4] Compiling B ( r/B.hs, nothing )
-bkp47.bkp:19:18: warning: [-Wmissing-methods (in -Wdefault)]
+bkp47.bkp:19:18: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
either ‘f’ or ‘g’
• In the instance declaration for ‘C Int’
diff --git a/testsuite/tests/backpack/should_fail/bkpfail25.stderr b/testsuite/tests/backpack/should_fail/bkpfail25.stderr
index 08cb0711fe..9433904ee5 100644
--- a/testsuite/tests/backpack/should_fail/bkpfail25.stderr
+++ b/testsuite/tests/backpack/should_fail/bkpfail25.stderr
@@ -2,7 +2,7 @@
[1 of 2] Compiling H[sig] ( p/H.hsig, nothing )
[2 of 2] Compiling M ( p/M.hs, nothing )
-bkpfail25.bkp:8:18: warning: [-Wmissing-methods (in -Wdefault)]
+bkpfail25.bkp:8:18: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘fmap’
• In the instance declaration for ‘Functor T’
diff --git a/testsuite/tests/deSugar/should_compile/T14546d.stderr b/testsuite/tests/deSugar/should_compile/T14546d.stderr
index 415a71afa4..3fa378d86a 100644
--- a/testsuite/tests/deSugar/should_compile/T14546d.stderr
+++ b/testsuite/tests/deSugar/should_compile/T14546d.stderr
@@ -1,5 +1,5 @@
-T14546d.hs:3:10: warning: [-Wmissing-methods (in -Wdefault)]
+T14546d.hs:3:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘+’, ‘*’, ‘abs’, ‘signum’, and (either ‘negate’ or ‘-’)
• In the instance declaration for ‘Num D’
diff --git a/testsuite/tests/deriving/should_compile/T14094.stderr b/testsuite/tests/deriving/should_compile/T14094.stderr
index 0f346a0261..d9a9ba7ef9 100644
--- a/testsuite/tests/deriving/should_compile/T14094.stderr
+++ b/testsuite/tests/deriving/should_compile/T14094.stderr
@@ -7,12 +7,12 @@ T14094.hs:12:1: warning: [GHC-08585] [-Wmissing-methods (in -Wdefault)]
• No explicit associated type or default declaration for ‘T’
• In the instance declaration for ‘C Int’
-T14094.hs:12:10: warning: [-Wmissing-methods (in -Wdefault)]
+T14094.hs:12:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘m’
• In the instance declaration for ‘C Int’
-T14094.hs:13:1: warning: [-Wmissing-methods (in -Wdefault)]
+T14094.hs:13:1: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘m’
• In the instance declaration for ‘C Bool’
diff --git a/testsuite/tests/deriving/should_compile/T4966.stderr b/testsuite/tests/deriving/should_compile/T4966.stderr
index a705c20793..fb516b6334 100644
--- a/testsuite/tests/deriving/should_compile/T4966.stderr
+++ b/testsuite/tests/deriving/should_compile/T4966.stderr
@@ -2,7 +2,7 @@
T4966.hs:3:14: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
-T4966.hs:35:30: warning: [-Wmissing-methods (in -Wdefault)]
+T4966.hs:35:30: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
either ‘==’ or ‘/=’
• In the instance declaration for ‘Eq (TreeListObject a)’
diff --git a/testsuite/tests/deriving/should_compile/T9968a.stderr b/testsuite/tests/deriving/should_compile/T9968a.stderr
index dad865ef4b..6c77d65670 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: [-Wmissing-methods (in -Wdefault)]
+T9968a.hs:8:13: 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-1935.stderr b/testsuite/tests/deriving/should_compile/deriving-1935.stderr
index 3864e8e2f0..c32a340532 100644
--- a/testsuite/tests/deriving/should_compile/deriving-1935.stderr
+++ b/testsuite/tests/deriving/should_compile/deriving-1935.stderr
@@ -1,15 +1,15 @@
-deriving-1935.hs:18:11: warning: [-Wmissing-methods (in -Wdefault)]
+deriving-1935.hs:18:11: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
either ‘==’ or ‘/=’
• In the instance declaration for ‘Eq (T a)’
-deriving-1935.hs:21:11: warning: [-Wmissing-methods (in -Wdefault)]
+deriving-1935.hs:21:11: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
either ‘==’ or ‘/=’
• In the instance declaration for ‘Eq (S a)’
-deriving-1935.hs:22:11: warning: [-Wmissing-methods (in -Wdefault)]
+deriving-1935.hs:22:11: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
either ‘compare’ or ‘<=’
• In the instance declaration for ‘Ord (S a)’
diff --git a/testsuite/tests/deriving/should_compile/drv003.stderr b/testsuite/tests/deriving/should_compile/drv003.stderr
index f939631a8e..f0e8485a9d 100644
--- a/testsuite/tests/deriving/should_compile/drv003.stderr
+++ b/testsuite/tests/deriving/should_compile/drv003.stderr
@@ -1,10 +1,10 @@
-drv003.hs:14:10: warning: [-Wmissing-methods (in -Wdefault)]
+drv003.hs:14:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
either ‘==’ or ‘/=’
• In the instance declaration for ‘Eq (Foo a)’
-drv003.hs:17:10: warning: [-Wmissing-methods (in -Wdefault)]
+drv003.hs:17:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
either ‘==’ or ‘/=’
• In the instance declaration for ‘Eq (Bar b)’
diff --git a/testsuite/tests/ghci/scripts/T5820.stderr b/testsuite/tests/ghci/scripts/T5820.stderr
index 370aa6d95c..f8db31f671 100644
--- a/testsuite/tests/ghci/scripts/T5820.stderr
+++ b/testsuite/tests/ghci/scripts/T5820.stderr
@@ -1,5 +1,5 @@
-T5820.hs:4:10: warning: [-Wmissing-methods (in -Wdefault)]
+T5820.hs:4:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
either ‘==’ or ‘/=’
• In the instance declaration for ‘Eq Foo’
diff --git a/testsuite/tests/ghci/scripts/ghci019.stderr b/testsuite/tests/ghci/scripts/ghci019.stderr
index 51d5a0123f..2f7df7f4eb 100644
--- a/testsuite/tests/ghci/scripts/ghci019.stderr
+++ b/testsuite/tests/ghci/scripts/ghci019.stderr
@@ -1,5 +1,5 @@
-ghci019.hs:10:10: warning: [-Wmissing-methods (in -Wdefault)]
+ghci019.hs:10:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
either ‘Prelude.==’ or ‘Prelude./=’
• In the instance declaration for ‘Prelude.Eq Foo’
diff --git a/testsuite/tests/indexed-types/should_compile/Class3.stderr b/testsuite/tests/indexed-types/should_compile/Class3.stderr
index 86aa24c69d..122279b449 100644
--- a/testsuite/tests/indexed-types/should_compile/Class3.stderr
+++ b/testsuite/tests/indexed-types/should_compile/Class3.stderr
@@ -1,5 +1,5 @@
-Class3.hs:7:10: warning: [-Wmissing-methods (in -Wdefault)]
+Class3.hs:7:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘foo’
• In the instance declaration for ‘C ()’
diff --git a/testsuite/tests/indexed-types/should_compile/Simple2.stderr b/testsuite/tests/indexed-types/should_compile/Simple2.stderr
index 70d825dbf6..530469bab3 100644
--- a/testsuite/tests/indexed-types/should_compile/Simple2.stderr
+++ b/testsuite/tests/indexed-types/should_compile/Simple2.stderr
@@ -3,7 +3,7 @@ Simple2.hs:21:1: warning: [GHC-08585] [-Wmissing-methods (in -Wdefault)]
• No explicit associated type or default declaration for ‘S3n’
• In the instance declaration for ‘C3 Char’
-Simple2.hs:21:10: warning: [-Wmissing-methods (in -Wdefault)]
+Simple2.hs:21:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘foo3n’ and ‘bar3n’
• In the instance declaration for ‘C3 Char’
@@ -12,7 +12,7 @@ Simple2.hs:29:1: warning: [GHC-08585] [-Wmissing-methods (in -Wdefault)]
• No explicit associated type or default declaration for ‘S3n’
• In the instance declaration for ‘C3 Bool’
-Simple2.hs:29:10: warning: [-Wmissing-methods (in -Wdefault)]
+Simple2.hs:29:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘foo3n’ and ‘bar3n’
• In the instance declaration for ‘C3 Bool’
@@ -25,7 +25,7 @@ Simple2.hs:39:1: warning: [GHC-08585] [-Wmissing-methods (in -Wdefault)]
• No explicit associated type or default declaration for ‘S3’
• In the instance declaration for ‘C3 Float’
-Simple2.hs:39:10: warning: [-Wmissing-methods (in -Wdefault)]
+Simple2.hs:39:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘foo3n’ and ‘bar3n’
• In the instance declaration for ‘C3 Float’
diff --git a/testsuite/tests/indexed-types/should_fail/BadFamInstDecl.hs b/testsuite/tests/indexed-types/should_fail/BadFamInstDecl.hs
new file mode 100644
index 0000000000..ab894db1b1
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/BadFamInstDecl.hs
@@ -0,0 +1,4 @@
+module BadFamInstDecl where
+import BadFamInstDecl_aux
+
+type instance T Int = Char
diff --git a/testsuite/tests/indexed-types/should_fail/BadFamInstDecl.stderr b/testsuite/tests/indexed-types/should_fail/BadFamInstDecl.stderr
new file mode 100644
index 0000000000..8b87a97cba
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/BadFamInstDecl.stderr
@@ -0,0 +1,7 @@
+[1 of 2] Compiling BadFamInstDecl_aux ( BadFamInstDecl_aux.hs, BadFamInstDecl_aux.o )
+[2 of 2] Compiling BadFamInstDecl ( BadFamInstDecl.hs, BadFamInstDecl.o )
+
+BadFamInstDecl.hs:4:1: [GHC-06206]
+ Illegal family instance for ‘T’
+ In the type instance declaration for ‘T’
+ Suggested fix: Perhaps you intended to use TypeFamilies
diff --git a/testsuite/tests/indexed-types/should_fail/BadFamInstDecl_aux.hs b/testsuite/tests/indexed-types/should_fail/BadFamInstDecl_aux.hs
new file mode 100644
index 0000000000..09f1873a44
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/BadFamInstDecl_aux.hs
@@ -0,0 +1,4 @@
+{-# LANGUAGE TypeFamilies #-}
+module BadFamInstDecl_aux where
+
+type family T a
diff --git a/testsuite/tests/indexed-types/should_fail/HsBootFam.hs b/testsuite/tests/indexed-types/should_fail/HsBootFam.hs
new file mode 100644
index 0000000000..0fbae41933
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/HsBootFam.hs
@@ -0,0 +1,3 @@
+module HsBootFam where
+
+import {-# SOURCE #-} HsBootFam_aux
diff --git a/testsuite/tests/indexed-types/should_fail/HsBootFam.stderr b/testsuite/tests/indexed-types/should_fail/HsBootFam.stderr
new file mode 100644
index 0000000000..a6950a3ade
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/HsBootFam.stderr
@@ -0,0 +1,5 @@
+[1 of 3] Compiling HsBootFam_aux[boot] ( HsBootFam_aux.hs-boot, HsBootFam_aux.o-boot )
+
+HsBootFam_aux.hs-boot:6:1: [GHC-06203]
+ Illegal family instance in hs-boot file
+ In the type instance declaration for ‘F’
diff --git a/testsuite/tests/indexed-types/should_fail/HsBootFam_aux.hs b/testsuite/tests/indexed-types/should_fail/HsBootFam_aux.hs
new file mode 100644
index 0000000000..d74cda5e7a
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/HsBootFam_aux.hs
@@ -0,0 +1,6 @@
+{-# LANGUAGE TypeFamilies #-}
+
+module HsBootFam_aux where
+
+type family F a
+type instance F Int = Char
diff --git a/testsuite/tests/indexed-types/should_fail/HsBootFam_aux.hs-boot b/testsuite/tests/indexed-types/should_fail/HsBootFam_aux.hs-boot
new file mode 100644
index 0000000000..d74cda5e7a
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/HsBootFam_aux.hs-boot
@@ -0,0 +1,6 @@
+{-# LANGUAGE TypeFamilies #-}
+
+module HsBootFam_aux where
+
+type family F a
+type instance F Int = Char
diff --git a/testsuite/tests/indexed-types/should_fail/Overlap3.stderr b/testsuite/tests/indexed-types/should_fail/Overlap3.stderr
index 5659fd1875..144ce6c020 100644
--- a/testsuite/tests/indexed-types/should_fail/Overlap3.stderr
+++ b/testsuite/tests/indexed-types/should_fail/Overlap3.stderr
@@ -1,4 +1,4 @@
-Overlap3.hs:8:1:
+Overlap3.hs:8:1: [GHC-06207]
Illegal instance for closed family ‘F’
In the type instance declaration for ‘F’
diff --git a/testsuite/tests/indexed-types/should_fail/Overlap7.stderr b/testsuite/tests/indexed-types/should_fail/Overlap7.stderr
index 179251d5a2..04f765f495 100644
--- a/testsuite/tests/indexed-types/should_fail/Overlap7.stderr
+++ b/testsuite/tests/indexed-types/should_fail/Overlap7.stderr
@@ -1,4 +1,4 @@
-Overlap7.hs:8:1:
+Overlap7.hs:8:1: [GHC-06207]
Illegal instance for closed family ‘F’
In the type instance declaration for ‘F’
diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail7.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail7.stderr
index 643709ec7e..1cd89db629 100644
--- a/testsuite/tests/indexed-types/should_fail/SimpleFail7.stderr
+++ b/testsuite/tests/indexed-types/should_fail/SimpleFail7.stderr
@@ -1,4 +1,4 @@
-SimpleFail7.hs:8:1:
+SimpleFail7.hs:8:1: [GHC-06205]
Associated type ‘S5’ must be inside a class instance
In the data instance declaration for ‘S5’
diff --git a/testsuite/tests/indexed-types/should_fail/T3092.stderr b/testsuite/tests/indexed-types/should_fail/T3092.stderr
index 141945c781..4754b3326f 100644
--- a/testsuite/tests/indexed-types/should_fail/T3092.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T3092.stderr
@@ -1,10 +1,10 @@
-T3092.hs:5:1:
+T3092.hs:5:1: [GHC-06204]
Illegal family instance for ‘T’
(T is not an indexed type family)
In the data instance declaration for ‘T’
-T3092.hs:8:1:
+T3092.hs:8:1: [GHC-06204]
Illegal family instance for ‘S’
(S is not an indexed type family)
In the type instance declaration for ‘S’
diff --git a/testsuite/tests/indexed-types/should_fail/T7862.stderr b/testsuite/tests/indexed-types/should_fail/T7862.stderr
index d430310aa9..a625b56098 100644
--- a/testsuite/tests/indexed-types/should_fail/T7862.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T7862.stderr
@@ -1,5 +1,5 @@
-T7862.hs:23:10: warning: [-Wmissing-methods (in -Wdefault)]
+T7862.hs:23:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘+’, ‘*’, ‘abs’, ‘signum’, ‘fromInteger’, and (either ‘negate’
or
diff --git a/testsuite/tests/indexed-types/should_fail/all.T b/testsuite/tests/indexed-types/should_fail/all.T
index c056a1e056..e990d572c0 100644
--- a/testsuite/tests/indexed-types/should_fail/all.T
+++ b/testsuite/tests/indexed-types/should_fail/all.T
@@ -169,3 +169,5 @@ test('ExpandTFs', normal, compile_fail, [''])
test('T20465', normal, compile_fail, [''])
test('T20521', normal, compile_fail, [''])
test('T21896', normal, compile_fail, [''])
+test('HsBootFam', [extra_files(['HsBootFam_aux.hs','HsBootFam_aux.hs-boot'])], multimod_compile_fail, ['HsBootFam', ''])
+test('BadFamInstDecl', [extra_files(['BadFamInstDecl_aux.hs'])], multimod_compile_fail, ['BadFamInstDecl', ''])
diff --git a/testsuite/tests/module/mod45.stderr b/testsuite/tests/module/mod45.stderr
index 8f62bad0e3..6e159e133d 100644
--- a/testsuite/tests/module/mod45.stderr
+++ b/testsuite/tests/module/mod45.stderr
@@ -1,6 +1,6 @@
-mod45.hs:6:11: error:
+mod45.hs:6:11: error: [GHC-06202]
• Illegal type signature in instance declaration:
(==) :: T -> T -> Bool
- (Use InstanceSigs to allow this)
• In the instance declaration for ‘Eq T’
+ Suggested fix: Perhaps you intended to use InstanceSigs
diff --git a/testsuite/tests/parser/should_compile/T2245.stderr b/testsuite/tests/parser/should_compile/T2245.stderr
index 03424ac20c..2255ce885b 100644
--- a/testsuite/tests/parser/should_compile/T2245.stderr
+++ b/testsuite/tests/parser/should_compile/T2245.stderr
@@ -1,12 +1,12 @@
-T2245.hs:4:10: warning: [-Wmissing-methods (in -Wdefault)]
+T2245.hs:4:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘+’, ‘*’, ‘abs’, ‘signum’, ‘fromInteger’, and (either ‘negate’
or
‘-’)
• In the instance declaration for ‘Num T’
-T2245.hs:5:10: warning: [-Wmissing-methods (in -Wdefault)]
+T2245.hs:5:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘fromRational’ and (either ‘recip’ or ‘/’)
• In the instance declaration for ‘Fractional T’
diff --git a/testsuite/tests/parser/should_compile/read014.stderr b/testsuite/tests/parser/should_compile/read014.stderr
index c30202f784..88ba43d65d 100644
--- a/testsuite/tests/parser/should_compile/read014.stderr
+++ b/testsuite/tests/parser/should_compile/read014.stderr
@@ -6,7 +6,7 @@ read014.hs:4:1: warning: [GHC-38417] [-Wmissing-signatures (in -Wall)]
read014.hs:4:5: warning: [-Wunused-matches (in -Wextra)]
Defined but not used: ‘x’
-read014.hs:6:10: warning: [-Wmissing-methods (in -Wdefault)]
+read014.hs:6:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘+’, ‘*’, ‘abs’, ‘signum’, and ‘fromInteger’
• In the instance declaration for ‘Num (a, b)’
diff --git a/testsuite/tests/perf/compiler/T15304.stderr b/testsuite/tests/perf/compiler/T15304.stderr
index 0f33758144..b4493ed0b7 100644
--- a/testsuite/tests/perf/compiler/T15304.stderr
+++ b/testsuite/tests/perf/compiler/T15304.stderr
@@ -1,10 +1,10 @@
-T15304.hs:675:10: warning: [-Wmissing-methods (in -Wdefault)]
+T15304.hs:675:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘fromRational’ and (either ‘recip’ or ‘/’)
• In the instance declaration for ‘Fractional Cl3’
-T15304.hs:677:10: warning: [-Wmissing-methods (in -Wdefault)]
+T15304.hs:677:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘asinh’, ‘acosh’, and ‘atanh’
• In the instance declaration for ‘Floating Cl3’
diff --git a/testsuite/tests/simplCore/should_compile/simpl020.stderr b/testsuite/tests/simplCore/should_compile/simpl020.stderr
index 2ac861f888..0741cdbcbc 100644
--- a/testsuite/tests/simplCore/should_compile/simpl020.stderr
+++ b/testsuite/tests/simplCore/should_compile/simpl020.stderr
@@ -1,5 +1,5 @@
-Simpl020_A.hs:26:10: warning: [-Wmissing-methods (in -Wdefault)]
+Simpl020_A.hs:26:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘toGUIObject’ and ‘cset’
• In the instance declaration for ‘GUIObject ()’
diff --git a/testsuite/tests/typecheck/prog001/typecheck.prog001.stderr b/testsuite/tests/typecheck/prog001/typecheck.prog001.stderr
index 3893a29237..69fb255134 100644
--- a/testsuite/tests/typecheck/prog001/typecheck.prog001.stderr
+++ b/testsuite/tests/typecheck/prog001/typecheck.prog001.stderr
@@ -1,5 +1,5 @@
-B.hs:7:10: warning: [-Wmissing-methods (in -Wdefault)]
+B.hs:7:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘row’
• In the instance declaration for ‘Matrix Bool Val’
diff --git a/testsuite/tests/typecheck/should_compile/HasKey.stderr b/testsuite/tests/typecheck/should_compile/HasKey.stderr
index 76b78a6491..edd36ad260 100644
--- a/testsuite/tests/typecheck/should_compile/HasKey.stderr
+++ b/testsuite/tests/typecheck/should_compile/HasKey.stderr
@@ -1,5 +1,5 @@
-HasKey.hs:22:10: warning: [-Wmissing-methods (in -Wdefault)]
+HasKey.hs:22:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
either ‘compare’ or ‘<=’
• In the instance declaration for ‘Ord (Keyed x)’
diff --git a/testsuite/tests/typecheck/should_compile/T7903.stderr b/testsuite/tests/typecheck/should_compile/T7903.stderr
index 515cd6eb28..0ed18a2fa1 100644
--- a/testsuite/tests/typecheck/should_compile/T7903.stderr
+++ b/testsuite/tests/typecheck/should_compile/T7903.stderr
@@ -1,10 +1,10 @@
-T7903.hs:8:10: warning: [-Wmissing-methods (in -Wdefault)]
+T7903.hs:8:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
either ‘==’ or ‘/=’
• In the instance declaration for ‘Eq (a -> b)’
-T7903.hs:9:10: warning: [-Wmissing-methods (in -Wdefault)]
+T7903.hs:9:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
either ‘compare’ or ‘<=’
• In the instance declaration for ‘Ord (a -> b)’
diff --git a/testsuite/tests/typecheck/should_compile/tc078.stderr b/testsuite/tests/typecheck/should_compile/tc078.stderr
index 453ad780e0..d913de4584 100644
--- a/testsuite/tests/typecheck/should_compile/tc078.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc078.stderr
@@ -1,10 +1,10 @@
-tc078.hs:9:10: warning: [-Wmissing-methods (in -Wdefault)]
+tc078.hs:9:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
either ‘==’ or ‘/=’
• In the instance declaration for ‘Eq (Bar a)’
-tc078.hs:10:10: warning: [-Wmissing-methods (in -Wdefault)]
+tc078.hs:10:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
either ‘compare’ or ‘<=’
• In the instance declaration for ‘Ord (Bar a)’
diff --git a/testsuite/tests/typecheck/should_compile/tc115.stderr b/testsuite/tests/typecheck/should_compile/tc115.stderr
index 449e4cdbe8..c5f1847ab8 100644
--- a/testsuite/tests/typecheck/should_compile/tc115.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc115.stderr
@@ -1,5 +1,5 @@
-tc115.hs:13:10: warning: [-Wmissing-methods (in -Wdefault)]
+tc115.hs:13:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘foo’
• In the instance declaration for ‘Foo [m a] (m a)’
diff --git a/testsuite/tests/typecheck/should_compile/tc116.stderr b/testsuite/tests/typecheck/should_compile/tc116.stderr
index d4de632323..c900218c1a 100644
--- a/testsuite/tests/typecheck/should_compile/tc116.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc116.stderr
@@ -1,5 +1,5 @@
-tc116.hs:13:10: warning: [-Wmissing-methods (in -Wdefault)]
+tc116.hs:13:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘foo’
• In the instance declaration for ‘Foo [m a] (m a)’
diff --git a/testsuite/tests/typecheck/should_compile/tc125.stderr b/testsuite/tests/typecheck/should_compile/tc125.stderr
index b1136b602c..1aaf839172 100644
--- a/testsuite/tests/typecheck/should_compile/tc125.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc125.stderr
@@ -1,25 +1,25 @@
-tc125.hs:17:10: warning: [-Wmissing-methods (in -Wdefault)]
+tc125.hs:17:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘add’
• In the instance declaration for ‘Add Z a a’
-tc125.hs:18:10: warning: [-Wmissing-methods (in -Wdefault)]
+tc125.hs:18:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘add’
• In the instance declaration for ‘Add (S a) b (S c)’
-tc125.hs:22:10: warning: [-Wmissing-methods (in -Wdefault)]
+tc125.hs:22:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘mul’
• In the instance declaration for ‘Mul Z a Z’
-tc125.hs:23:10: warning: [-Wmissing-methods (in -Wdefault)]
+tc125.hs:23:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘mul’
• In the instance declaration for ‘Mul (S a) b d’
-tc125.hs:30:10: warning: [-Wmissing-methods (in -Wdefault)]
+tc125.hs:30:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘add’
• In the instance declaration for
diff --git a/testsuite/tests/typecheck/should_compile/tc126.stderr b/testsuite/tests/typecheck/should_compile/tc126.stderr
index 6ccb8d6b25..0ef55aa660 100644
--- a/testsuite/tests/typecheck/should_compile/tc126.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc126.stderr
@@ -1,10 +1,10 @@
-tc126.hs:16:25: warning: [-Wmissing-methods (in -Wdefault)]
+tc126.hs:16:25: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘bug’
• In the instance declaration for ‘Bug (Int -> r) Int r’
-tc126.hs:17:10: warning: [-Wmissing-methods (in -Wdefault)]
+tc126.hs:17:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘bug’
• In the instance declaration for ‘Bug f (c a) (c r)’
diff --git a/testsuite/tests/typecheck/should_compile/tc161.stderr b/testsuite/tests/typecheck/should_compile/tc161.stderr
index 6140a7cac1..d412a64512 100644
--- a/testsuite/tests/typecheck/should_compile/tc161.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc161.stderr
@@ -1,5 +1,5 @@
-tc161.hs:17:10: warning: [-Wmissing-methods (in -Wdefault)]
+tc161.hs:17:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘op’
• In the instance declaration for ‘Foo Int’
diff --git a/testsuite/tests/typecheck/should_compile/tc175.stderr b/testsuite/tests/typecheck/should_compile/tc175.stderr
index 57959c1396..7359a63d10 100644
--- a/testsuite/tests/typecheck/should_compile/tc175.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc175.stderr
@@ -1,5 +1,5 @@
-tc175.hs:13:10: warning: [-Wmissing-methods (in -Wdefault)]
+tc175.hs:13:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
either ‘showsPrec’ or ‘show’
• In the instance declaration for ‘Show (a -> b)’
diff --git a/testsuite/tests/typecheck/should_fail/T21583.stderr b/testsuite/tests/typecheck/should_fail/T21583.stderr
index 13ad0f96f3..04aa3d938d 100644
--- a/testsuite/tests/typecheck/should_fail/T21583.stderr
+++ b/testsuite/tests/typecheck/should_fail/T21583.stderr
@@ -11,17 +11,17 @@ T21583.hs:14:28: error: [GHC-39567] [-Wstar-is-type (in -Wall, -Wcompat), Werror
deprecated in the future.
Suggested fix: Use ‘Type’ from ‘Data.Kind’ instead.
-T21583.hs:56:10: warning: [-Wmissing-methods (in -Wdefault)]
+T21583.hs:56:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘fmap’
• In the instance declaration for ‘Functor (SplitFunctor g f)’
-T21583.hs:58:10: warning: [-Wmissing-methods (in -Wdefault)]
+T21583.hs:58:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
either ‘foldMap’ or ‘foldr’
• In the instance declaration for ‘Foldable (SplitFunctor g f)’
-T21583.hs:60:10: warning: [-Wmissing-methods (in -Wdefault)]
+T21583.hs:60:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
either ‘traverse’ or ‘sequenceA’
• In the instance declaration for ‘Traversable (SplitFunctor g f)’
diff --git a/testsuite/tests/typecheck/should_fail/T5051.stderr b/testsuite/tests/typecheck/should_fail/T5051.stderr
index 83a9ac8aef..8a9c872e73 100644
--- a/testsuite/tests/typecheck/should_fail/T5051.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5051.stderr
@@ -1,5 +1,5 @@
-T5051.hs:8:30: warning: [-Wmissing-methods (in -Wdefault)]
+T5051.hs:8:30: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
either ‘==’ or ‘/=’
• In the instance declaration for ‘Eq [T]’
diff --git a/testsuite/tests/warnings/minimal/WarnMinimal.stderr b/testsuite/tests/warnings/minimal/WarnMinimal.stderr
index c474f450fb..06389aa3c6 100644
--- a/testsuite/tests/warnings/minimal/WarnMinimal.stderr
+++ b/testsuite/tests/warnings/minimal/WarnMinimal.stderr
@@ -1,25 +1,25 @@
-WarnMinimal.hs:16:10: warning: [-Wmissing-methods (in -Wdefault)]
+WarnMinimal.hs:16:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
either ‘foo1’ or ‘foo2’
• In the instance declaration for ‘Foo Int’
-WarnMinimal.hs:60:10: warning: [-Wmissing-methods (in -Wdefault)]
+WarnMinimal.hs:60:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
either ‘join'’ or ‘bind'’
• In the instance declaration for ‘Monad' ((->) e)’
-WarnMinimal.hs:66:10: warning: [-Wmissing-methods (in -Wdefault)]
+WarnMinimal.hs:66:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘return'’
• In the instance declaration for ‘Monad' Id’
-WarnMinimal.hs:72:10: warning: [-Wmissing-methods (in -Wdefault)]
+WarnMinimal.hs:72:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘return'’
• In the instance declaration for ‘Monad' Id2’
-WarnMinimal.hs:79:10: warning: [-Wmissing-methods (in -Wdefault)]
+WarnMinimal.hs:79:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘return'’ and (either (‘fmap'’ and ‘join'’) or ‘bind'’)
• In the instance declaration for ‘Monad' Id3’
@@ -42,19 +42,19 @@ WarnMinimal.hs:92:1: warning: [GHC-13511]
but there is no default implementation.
• In the class declaration for ‘Cheater3’
-WarnMinimal.hs:99:10: warning: [-Wmissing-methods (in -Wdefault)]
+WarnMinimal.hs:99:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘+’, ‘*’, ‘abs’, ‘signum’, ‘fromInteger’, and (either ‘negate’
or
‘-’)
• In the instance declaration for ‘Num Bool’
-WarnMinimal.hs:105:10: warning: [-Wmissing-methods (in -Wdefault)]
+WarnMinimal.hs:105:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
‘needed’ and ‘_alsoNeeded’
• In the instance declaration for ‘NoExplicit Int’
-WarnMinimal.hs:116:10: warning: [-Wmissing-methods (in -Wdefault)]
+WarnMinimal.hs:116:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
• No explicit implementation for
either ‘===’ or ‘/==’
• In the instance declaration for ‘Eq' Blarg’