summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorsten Schmits <git@tryp.io>2023-04-26 21:56:16 +0200
committerTorsten Schmits <haskell-gitlab@schmits.me>2023-05-05 08:43:02 +0000
commit275836d211d119cb8786a91ca3108a4daa693cb2 (patch)
tree9dfc96c90e69cd97ba2e674407be8f30bf5ac26c
parente8b72ff6e4aee1f889a9168df57bb1b00168fd21 (diff)
downloadhaskell-275836d211d119cb8786a91ca3108a4daa693cb2.tar.gz
Add structured error messages for GHC.Rename.Utils
Tracking ticket: #20115 MR: !10350 This converts uses of `mkTcRnUnknownMessage` to newly added constructors of `TcRnMessage`.
-rw-r--r--compiler/GHC/Rename/Bind.hs11
-rw-r--r--compiler/GHC/Rename/Expr.hs3
-rw-r--r--compiler/GHC/Rename/HsType.hs6
-rw-r--r--compiler/GHC/Rename/Module.hs29
-rw-r--r--compiler/GHC/Rename/Utils.hs213
-rw-r--r--compiler/GHC/Tc/Errors/Ppr.hs173
-rw-r--r--compiler/GHC/Tc/Errors/Types.hs155
-rw-r--r--compiler/GHC/Tc/Module.hs2
-rw-r--r--compiler/GHC/Types/Error/Codes.hs12
-rw-r--r--compiler/GHC/Types/Hint.hs5
-rw-r--r--compiler/GHC/Types/Hint/Ppr.hs2
-rw-r--r--testsuite/tests/deSugar/should_compile/ds053.stderr2
-rw-r--r--testsuite/tests/deriving/should_compile/T13919.stderr2
-rw-r--r--testsuite/tests/driver/t22391/t22391.stderr2
-rw-r--r--testsuite/tests/driver/t22391/t22391j.stderr2
-rw-r--r--testsuite/tests/driver/werror.stderr4
-rw-r--r--testsuite/tests/gadt/T12087.stderr10
-rw-r--r--testsuite/tests/gadt/T14320.stderr2
-rw-r--r--testsuite/tests/gadt/T16427.stderr2
-rw-r--r--testsuite/tests/gadt/T18191.stderr10
-rw-r--r--testsuite/tests/ghci/prog018/prog018.stdout2
-rw-r--r--testsuite/tests/indexed-types/should_compile/ExplicitForAllFams2.stderr8
-rw-r--r--testsuite/tests/indexed-types/should_compile/T16356_Compile2.stderr12
-rw-r--r--testsuite/tests/indexed-types/should_compile/T16632.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_compile/UnusedTyVarWarnings.stderr8
-rw-r--r--testsuite/tests/indexed-types/should_compile/UnusedTyVarWarningsNamedWCs.stderr8
-rw-r--r--testsuite/tests/indexed-types/should_fail/SimpleFail6.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_fail/T16110_Fail1.stderr2
-rw-r--r--testsuite/tests/mdo/should_fail/mdofail002.stderr2
-rw-r--r--testsuite/tests/mdo/should_fail/mdofail003.stderr2
-rw-r--r--testsuite/tests/module/mod110.stderr2
-rw-r--r--testsuite/tests/module/mod151.stderr2
-rw-r--r--testsuite/tests/module/mod152.stderr2
-rw-r--r--testsuite/tests/module/mod153.stderr2
-rw-r--r--testsuite/tests/module/mod164.stderr2
-rw-r--r--testsuite/tests/module/mod165.stderr2
-rw-r--r--testsuite/tests/module/mod23.stderr2
-rw-r--r--testsuite/tests/module/mod24.stderr2
-rw-r--r--testsuite/tests/module/mod62.stderr2
-rw-r--r--testsuite/tests/overloadedrecflds/ghci/GHCiDRF.stdout6
-rw-r--r--testsuite/tests/overloadedrecflds/ghci/duplicaterecfldsghci01.stdout2
-rw-r--r--testsuite/tests/overloadedrecflds/should_compile/BootFldReexport.stderr2
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/DRFUnused.stderr2
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/NoFieldSelectorsFail.stderr2
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/T11167_ambiguous_fixity.stderr2
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/T13132_duplicaterecflds.stderr4
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/T16745.stderr2
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/T17420.stderr2
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/T17469.stderr2
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/T18999_NoDisambiguateRecordFields.stderr2
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/T23010_fail.stderr2
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail02.stderr2
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail04.stderr2
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail05.stderr2
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail06.stderr6
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail11.stderr2
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail12.stderr4
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail13.stderr8
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldswasrunnowfail06.stderr8
-rw-r--r--testsuite/tests/parser/should_compile/read014.stderr4
-rw-r--r--testsuite/tests/parser/should_fail/T12446.stderr4
-rw-r--r--testsuite/tests/parser/should_fail/T18251c.stderr4
-rw-r--r--testsuite/tests/patsyn/should_fail/T14114.stderr6
-rw-r--r--testsuite/tests/polykinds/T10451.stderr2
-rw-r--r--testsuite/tests/quasiquotation/qq006/qq006.stderr2
-rw-r--r--testsuite/tests/rename/should_compile/T13839.stdout2
-rw-r--r--testsuite/tests/rename/should_compile/T13839a.stderr2
-rw-r--r--testsuite/tests/rename/should_compile/T17a.stderr2
-rw-r--r--testsuite/tests/rename/should_compile/T17b.stderr2
-rw-r--r--testsuite/tests/rename/should_compile/T17d.stderr2
-rw-r--r--testsuite/tests/rename/should_compile/T17e.stderr4
-rw-r--r--testsuite/tests/rename/should_compile/T1972.stderr2
-rw-r--r--testsuite/tests/rename/should_compile/T3371.stderr2
-rw-r--r--testsuite/tests/rename/should_compile/T3449.stderr2
-rw-r--r--testsuite/tests/rename/should_compile/T7145b.stderr2
-rw-r--r--testsuite/tests/rename/should_compile/mc10.stderr2
-rw-r--r--testsuite/tests/rename/should_compile/rn040.stderr4
-rw-r--r--testsuite/tests/rename/should_compile/rn041.stderr6
-rw-r--r--testsuite/tests/rename/should_compile/rn047.stderr2
-rw-r--r--testsuite/tests/rename/should_compile/rn063.stderr4
-rw-r--r--testsuite/tests/rename/should_compile/unused_haddock.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/T11167_ambig.stderr4
-rw-r--r--testsuite/tests/rename/should_fail/T13644.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/T13847.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/T15487.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/T15957_Fail.stderr36
-rw-r--r--testsuite/tests/rename/should_fail/T16114.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/T18240a.stderr10
-rw-r--r--testsuite/tests/rename/should_fail/T18240b.stderr12
-rw-r--r--testsuite/tests/rename/should_fail/T5951.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/T6148a.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/T6148b.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/T6148c.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/T6148d.stderr8
-rw-r--r--testsuite/tests/rename/should_fail/T8448.stderr3
-rw-r--r--testsuite/tests/rename/should_fail/rnfail001.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/rnfail004.stderr4
-rw-r--r--testsuite/tests/rename/should_fail/rnfail021.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/rnfail034.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/rnfail039.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/rnfail044.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/rnfail046.stderr2
-rw-r--r--testsuite/tests/runghc/T17171b.stderr2
-rw-r--r--testsuite/tests/th/T12411.stderr4
-rw-r--r--testsuite/tests/th/T16133.stderr8
-rw-r--r--testsuite/tests/th/TH_recover_warns.stderr4
-rw-r--r--testsuite/tests/th/TH_spliceD1.stderr2
-rw-r--r--testsuite/tests/typecheck/should_compile/T18470.stderr2
-rw-r--r--testsuite/tests/typecheck/should_compile/T2497.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/ExplicitSpecificity5.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/ExplicitSpecificity6.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/ExplicitSpecificity9.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T15527.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T16394.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T18455.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T18723a.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T18723b.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T18723c.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T19397E1.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T19397E2.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T8570.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail037.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail038.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail083.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail084.stderr2
-rw-r--r--testsuite/tests/warnings/should_fail/WarningGroups.stderr4
126 files changed, 622 insertions, 390 deletions
diff --git a/compiler/GHC/Rename/Bind.hs b/compiler/GHC/Rename/Bind.hs
index 661c271fb9..503e56bd57 100644
--- a/compiler/GHC/Rename/Bind.hs
+++ b/compiler/GHC/Rename/Bind.hs
@@ -42,7 +42,7 @@ import GHC.Rename.Names
import GHC.Rename.Env
import GHC.Rename.Fixity
import GHC.Rename.Utils ( mapFvRn
- , checkDupRdrNames, checkDupRdrNamesN
+ , checkDupRdrNames
, warnUnusedLocalBinds
, warnForallIdentifier
, checkUnusedRecordWildcard
@@ -719,7 +719,7 @@ rnPatSynBind sig_fn bind@(PSB { psb_id = L l name
-- from the left-hand side
case details of
PrefixCon _ vars ->
- do { checkDupRdrNamesN vars
+ do { checkDupRdrNames vars
; names <- mapM lookupPatSynBndr vars
; return ( (pat', PrefixCon noTypeArgs names)
, mkFVs (map unLoc names)) }
@@ -877,7 +877,7 @@ rnMethodBinds :: Bool -- True <=> is a class declaration
-- * the default method bindings in a class decl
-- * the method bindings in an instance decl
rnMethodBinds is_cls_decl cls ktv_names binds sigs
- = do { checkDupRdrNamesN (collectMethodBinders binds)
+ = do { checkDupRdrNames (collectMethodBinders binds)
-- Check that the same method is not given twice in the
-- same instance decl instance C T where
-- f x = ...
@@ -1038,18 +1038,17 @@ renameSig ctxt sig@(ClassOpSig _ is_deflt vs ty)
<+> quotes (ppr v1))
renameSig _ (SpecInstSig (_, src) ty)
- = do { checkInferredVars doc inf_msg ty
+ = do { checkInferredVars doc ty
; (new_ty, fvs) <- rnHsSigType doc TypeLevel ty
-- Check if there are any nested `forall`s or contexts, which are
-- illegal in the type of an instance declaration (see
-- Note [No nested foralls or contexts in instance types] in
-- GHC.Hs.Type).
- ; addNoNestedForallsContextsErr doc (text "SPECIALISE instance type")
+ ; addNoNestedForallsContextsErr doc NFC_Specialize
(getLHsInstDeclHead new_ty)
; return (SpecInstSig (noAnn, src) new_ty,fvs) }
where
doc = SpecInstSigCtx
- inf_msg = Just (text "Inferred type variables are not allowed")
-- {-# SPECIALISE #-} pragmas can refer to imported Ids
-- so, in the top-level case (when mb_names is Nothing)
diff --git a/compiler/GHC/Rename/Expr.hs b/compiler/GHC/Rename/Expr.hs
index b68ff6a492..2afc0f0fa6 100644
--- a/compiler/GHC/Rename/Expr.hs
+++ b/compiler/GHC/Rename/Expr.hs
@@ -56,6 +56,7 @@ import GHC.Driver.Session
import GHC.Builtin.Names
import GHC.Builtin.Types ( nilDataConName )
+import GHC.Types.Basic (TypeOrKind (TypeLevel))
import GHC.Types.FieldLabel
import GHC.Types.Fixity
import GHC.Types.Id.Make
@@ -324,7 +325,7 @@ rnExpr (HsApp x fun arg)
rnExpr (HsAppType _ fun at arg)
= do { type_app <- xoptM LangExt.TypeApplications
- ; unless type_app $ addErr $ typeAppErr "type" $ hswc_body arg
+ ; unless type_app $ addErr $ typeAppErr TypeLevel $ hswc_body arg
; (fun',fvFun) <- rnLExpr fun
; (arg',fvArg) <- rnHsWcType HsTypeCtx arg
; return (HsAppType NoExtField fun' at arg', fvFun `plusFV` fvArg) }
diff --git a/compiler/GHC/Rename/HsType.hs b/compiler/GHC/Rename/HsType.hs
index 500a6f8407..049bbe2c22 100644
--- a/compiler/GHC/Rename/HsType.hs
+++ b/compiler/GHC/Rename/HsType.hs
@@ -49,7 +49,7 @@ import GHC.Hs
import GHC.Rename.Env
import GHC.Rename.Doc
import GHC.Rename.Utils ( mapFvRn, bindLocalNamesFV
- , typeAppErr, newLocalBndrRn, checkDupRdrNamesN
+ , typeAppErr, newLocalBndrRn, checkDupRdrNames
, checkShadowedRdrNames, warnForallIdentifier )
import GHC.Rename.Fixity ( lookupFieldFixityRn, lookupFixityRn
, lookupTyFixityRn )
@@ -686,7 +686,7 @@ rnHsTyKi env (HsAppTy _ ty1 ty2)
rnHsTyKi env (HsAppKindTy _ ty at k)
= do { kind_app <- xoptM LangExt.TypeApplications
- ; unless kind_app (addErr (typeAppErr "kind" k))
+ ; unless kind_app (addErr (typeAppErr KindLevel k))
; (ty', fvs1) <- rnLHsTyKi env ty
; (k', fvs2) <- rnLHsTyKi (env {rtke_level = KindLevel }) k
; return (HsAppKindTy noExtField ty' at k', fvs1 `plusFV` fvs2) }
@@ -1184,7 +1184,7 @@ bindLHsTyVarBndrs :: (OutputableBndrFlag flag 'Renamed)
-> RnM (b, FreeVars)
bindLHsTyVarBndrs doc wuf mb_assoc tv_bndrs thing_inside
= do { when (isNothing mb_assoc) (checkShadowedRdrNames tv_names_w_loc)
- ; checkDupRdrNamesN tv_names_w_loc
+ ; checkDupRdrNames tv_names_w_loc
; go tv_bndrs thing_inside }
where
tv_names_w_loc = map hsLTyVarLocName tv_bndrs
diff --git a/compiler/GHC/Rename/Module.hs b/compiler/GHC/Rename/Module.hs
index 1602b2b92d..e91749cf2d 100644
--- a/compiler/GHC/Rename/Module.hs
+++ b/compiler/GHC/Rename/Module.hs
@@ -30,7 +30,7 @@ import GHC.Rename.Bind
import GHC.Rename.Doc
import GHC.Rename.Env
import GHC.Rename.Utils ( mapFvRn, bindLocalNames
- , checkDupRdrNamesN, bindLocalNamesFV
+ , checkDupRdrNames, bindLocalNamesFV
, checkShadowedRdrNames, warnUnusedTypePatterns
, newLocalBndrsRn
, noNestedForallsContextsErr
@@ -605,7 +605,7 @@ rnClsInstDecl (ClsInstDecl { cid_poly_ty = inst_ty, cid_binds = mbinds
, cid_sigs = uprags, cid_tyfam_insts = ats
, cid_overlap_mode = oflag
, cid_datafam_insts = adts })
- = do { checkInferredVars ctxt inf_err inst_ty
+ = do { checkInferredVars ctxt inst_ty
; (inst_ty', inst_fvs) <- rnHsSigType ctxt TypeLevel inst_ty
; let (ktv_names, _, head_ty') = splitLHsInstDeclTy inst_ty'
-- Check if there are any nested `forall`s or contexts, which are
@@ -613,7 +613,7 @@ rnClsInstDecl (ClsInstDecl { cid_poly_ty = inst_ty, cid_binds = mbinds
-- Note [No nested foralls or contexts in instance types] in
-- GHC.Hs.Type)...
mb_nested_msg = noNestedForallsContextsErr
- (text "Instance head") head_ty'
+ NFC_InstanceHead head_ty'
-- ...then check if the instance head is actually headed by a
-- class type constructor...
eith_cls = case hsTyGetAppHead_maybe head_ty' of
@@ -669,7 +669,6 @@ rnClsInstDecl (ClsInstDecl { cid_poly_ty = inst_ty, cid_binds = mbinds
-- to remove the context).
where
ctxt = GenericCtx $ text "an instance declaration"
- inf_err = Just (text "Inferred type variables are not allowed")
-- The instance is malformed. We'd still like to make *some* progress
-- (rather than failing outright), so we report an error and continue for
@@ -1177,20 +1176,19 @@ rnSrcDerivDecl :: DerivDecl GhcPs -> RnM (DerivDecl GhcRn, FreeVars)
rnSrcDerivDecl (DerivDecl _ ty mds overlap)
= do { standalone_deriv_ok <- xoptM LangExt.StandaloneDeriving
; unless standalone_deriv_ok (addErr TcRnUnexpectedStandaloneDerivingDecl)
- ; checkInferredVars ctxt inf_err nowc_ty
+ ; checkInferredVars ctxt nowc_ty
; (mds', ty', fvs) <- rnLDerivStrategy ctxt mds $ rnHsSigWcType ctxt ty
-- Check if there are any nested `forall`s or contexts, which are
-- illegal in the type of an instance declaration (see
-- Note [No nested foralls or contexts in instance types] in
-- GHC.Hs.Type).
; addNoNestedForallsContextsErr ctxt
- (text "Standalone-derived instance head")
+ NFC_StandaloneDerivedInstanceHead
(getLHsInstDeclHead $ dropWildCards ty')
; warnNoDerivStrat mds' loc
; return (DerivDecl noAnn ty' mds' overlap, fvs) }
where
ctxt = DerivDeclCtx
- inf_err = Just (text "Inferred type variables are not allowed")
loc = getLocA nowc_ty
nowc_ty = dropWildCards ty
@@ -1219,7 +1217,7 @@ rnHsRuleDecl (HsRule { rd_ext = (_, st)
, rd_rhs = rhs })
= do { let rdr_names_w_loc = map (get_var . unLoc) tmvs
; mapM_ warnForallIdentifier rdr_names_w_loc
- ; checkDupRdrNamesN rdr_names_w_loc
+ ; checkDupRdrNames rdr_names_w_loc
; checkShadowedRdrNames rdr_names_w_loc
; names <- newLocalBndrsRn rdr_names_w_loc
; let doc = RuleCtx (unLoc rule_name)
@@ -1819,7 +1817,7 @@ rnTyClDecl (ClassDecl { tcdLayout = layout,
; let sig_rdr_names_w_locs =
[op | L _ (ClassOpSig _ False ops _) <- sigs
, op <- ops]
- ; checkDupRdrNamesN sig_rdr_names_w_locs
+ ; checkDupRdrNames sig_rdr_names_w_locs
-- Typechecker is responsible for checking that we only
-- give default-method bindings for things in this class.
-- The renamer *could* check this for class decls, but can't
@@ -2191,14 +2189,13 @@ rnLHsDerivingClause doc
rn_clause_pred :: LHsSigType GhcPs -> RnM (LHsSigType GhcRn, FreeVars)
rn_clause_pred pred_ty = do
- let inf_err = Just (text "Inferred type variables are not allowed")
- checkInferredVars doc inf_err pred_ty
+ checkInferredVars doc pred_ty
ret@(pred_ty', _) <- rnHsSigType doc TypeLevel pred_ty
-- Check if there are any nested `forall`s, which are illegal in a
-- `deriving` clause.
-- See Note [No nested foralls or contexts in instance types]
-- (Wrinkle: Derived instances) in GHC.Hs.Type.
- addNoNestedForallsContextsErr doc (text "Derived class type")
+ addNoNestedForallsContextsErr doc NFC_DerivedClassType
(getLHsInstDeclHead pred_ty')
pure ret
@@ -2233,7 +2230,7 @@ rnLDerivStrategy doc mds thing_inside
AnyclassStrategy _ -> boring_case (AnyclassStrategy noExtField)
NewtypeStrategy _ -> boring_case (NewtypeStrategy noExtField)
ViaStrategy (XViaStrategyPs _ via_ty) ->
- do checkInferredVars doc inf_err via_ty
+ do checkInferredVars doc via_ty
(via_ty', fvs1) <- rnHsSigType doc TypeLevel via_ty
let HsSig { sig_bndrs = via_outer_bndrs
, sig_body = via_body } = unLoc via_ty'
@@ -2243,12 +2240,10 @@ rnLDerivStrategy doc mds thing_inside
-- See Note [No nested foralls or contexts in instance types]
-- (Wrinkle: Derived instances) in GHC.Hs.Type.
addNoNestedForallsContextsErr doc
- (quotes (text "via") <+> text "type") via_body
+ NFC_ViaType via_body
(thing, fvs2) <- bindLocalNamesFV via_tvs thing_inside
pure (ViaStrategy via_ty', thing, fvs1 `plusFV` fvs2)
- inf_err = Just (text "Inferred type variables are not allowed")
-
boring_case :: ds -> RnM (ds, a, FreeVars)
boring_case ds = do
(thing, fvs) <- thing_inside
@@ -2501,7 +2496,7 @@ rnConDecl (ConDeclGADT { con_names = names
-- Note [GADT abstract syntax] (Wrinkle: No nested foralls or contexts)
-- in GHC.Hs.Type.
; addNoNestedForallsContextsErr ctxt
- (text "GADT constructor type signature") new_res_ty
+ NFC_GadtConSig new_res_ty
; let all_fvs = fvs1 `plusFV` fvs2 `plusFV` fvs3
diff --git a/compiler/GHC/Rename/Utils.hs b/compiler/GHC/Rename/Utils.hs
index a00d97dd0d..7b631edac0 100644
--- a/compiler/GHC/Rename/Utils.hs
+++ b/compiler/GHC/Rename/Utils.hs
@@ -9,7 +9,7 @@ This module contains miscellaneous functions related to renaming.
-}
module GHC.Rename.Utils (
- checkDupRdrNames, checkDupRdrNamesN, checkShadowedRdrNames,
+ checkDupRdrNames, checkShadowedRdrNames,
checkDupNames, checkDupAndShadowedNames, dupNamesErr,
checkTupSize, checkCTupSize,
addFvRn, mapFvRn, mapMaybeFvRn,
@@ -44,7 +44,6 @@ import GHC.Types.Name.Reader
import GHC.Tc.Errors.Types
-- import GHC.Tc.Utils.Env
import GHC.Tc.Utils.Monad
-import GHC.Types.Error
import GHC.Types.Name
import GHC.Types.Name.Set
import GHC.Types.Name.Env
@@ -53,19 +52,16 @@ import GHC.Types.SrcLoc as SrcLoc
import GHC.Types.SourceFile
import GHC.Types.SourceText ( SourceText(..), IntegralLit )
import GHC.Utils.Outputable
-import GHC.Utils.Panic
import GHC.Utils.Misc
-import GHC.Types.Basic ( TopLevelFlag(..), Origin(Generated) )
+import GHC.Types.Basic ( TopLevelFlag(..), Origin(Generated), TypeOrKind )
import GHC.Data.List.SetOps ( removeDupsOn )
import GHC.Data.Maybe ( whenIsJust )
import GHC.Driver.Session
import GHC.Data.FastString
import Control.Monad
-import Data.List (find, sortBy)
import GHC.Settings.Constants ( mAX_TUPLE_SIZE, mAX_CTUPLE_SIZE )
import qualified Data.List.NonEmpty as NE
import qualified GHC.LanguageExtensions as LangExt
-import GHC.Data.Bag
import qualified Data.List as List
{-
@@ -111,14 +107,7 @@ bindLocalNamesFV names enclosed_scope
checkDupRdrNames :: [LocatedN RdrName] -> RnM ()
-- Check for duplicated names in a binding group
checkDupRdrNames rdr_names_w_loc
- = mapM_ (dupNamesErr getLocA) dups
- where
- (_, dups) = removeDupsOn unLoc rdr_names_w_loc
-
-checkDupRdrNamesN :: [LocatedN RdrName] -> RnM ()
--- Check for duplicated names in a binding group
-checkDupRdrNamesN rdr_names_w_loc
- = mapM_ (dupNamesErr getLocA) dups
+ = mapM_ (\ ns -> dupNamesErr (getLocA <$> ns) (unLoc <$> ns)) dups
where
(_, dups) = removeDupsOn unLoc rdr_names_w_loc
@@ -129,7 +118,7 @@ checkDupNames names = check_dup_names (filterOut isSystemName names)
check_dup_names :: [Name] -> RnM ()
check_dup_names names
- = mapM_ (dupNamesErr nameSrcSpan) dups
+ = mapM_ (\ ns -> dupNamesErr (nameSrcSpan <$> ns) (getRdrName <$> ns)) dups
where
(_, dups) = removeDupsOn nameOccName names
@@ -192,19 +181,15 @@ checkShadowedOccs (global_env,local_env) get_loc_occ ns
-- @{a}@, but @forall a. [a] -> [a]@ would be accepted.
-- See @Note [Unobservably inferred type variables]@.
checkInferredVars :: HsDocContext
- -> Maybe SDoc
- -- ^ The error msg if the signature is not allowed to contain
- -- manually written inferred variables.
-> LHsSigType GhcPs
-> RnM ()
-checkInferredVars _ Nothing _ = return ()
-checkInferredVars ctxt (Just msg) ty =
+checkInferredVars ctxt ty =
let bndrs = sig_ty_bndrs ty
- in case find ((==) InferredSpec . hsTyVarBndrFlag) bndrs of
- Nothing -> return ()
- Just _ -> addErr $
+ in case filter ((==) InferredSpec . hsTyVarBndrFlag) bndrs of
+ [] -> return ()
+ iv : ivs -> addErr $
TcRnWithHsDocContext ctxt $
- mkTcRnUnknownMessage $ mkPlainError noHints msg
+ TcRnIllegalInferredTyVars (iv NE.:| ivs)
where
sig_ty_bndrs :: LHsSigType GhcPs -> [HsTyVarBndr Specificity GhcPs]
sig_ty_bndrs (L _ (HsSig{sig_bndrs = outer_bndrs}))
@@ -287,7 +272,9 @@ Note [No nested foralls or contexts in instance types] in GHC.Hs.Type).
-- "GHC.Rename.Module" and 'renameSig' in "GHC.Rename.Bind").
-- See @Note [No nested foralls or contexts in instance types]@ in
-- "GHC.Hs.Type".
-noNestedForallsContextsErr :: SDoc -> LHsType GhcRn -> Maybe (SrcSpan, TcRnMessage)
+noNestedForallsContextsErr :: NestedForallsContextsIn
+ -> LHsType GhcRn
+ -> Maybe (SrcSpan, TcRnMessage)
noNestedForallsContextsErr what lty =
case ignoreParens lty of
L l (HsForAllTy { hst_tele = tele })
@@ -304,12 +291,13 @@ noNestedForallsContextsErr what lty =
_ -> Nothing
where
nested_foralls_contexts_err =
- mkTcRnUnknownMessage $ mkPlainError noHints $
- what <+> text "cannot contain nested"
- <+> quotes forAllLit <> text "s or contexts"
+ TcRnNestedForallsContexts what
-- | A common way to invoke 'noNestedForallsContextsErr'.
-addNoNestedForallsContextsErr :: HsDocContext -> SDoc -> LHsType GhcRn -> RnM ()
+addNoNestedForallsContextsErr :: HsDocContext
+ -> NestedForallsContextsIn
+ -> LHsType GhcRn
+ -> RnM ()
addNoNestedForallsContextsErr ctxt what lty =
whenIsJust (noNestedForallsContextsErr what lty) $ \(l, err_msg) ->
addErrAt l $ TcRnWithHsDocContext ctxt err_msg
@@ -395,13 +383,7 @@ checkUnusedRecordWildcard loc fvs (Just dotdot_names) =
--
-- The `..` here doesn't bind any variables as `x` is already bound.
warnRedundantRecordWildcard :: RnM ()
-warnRedundantRecordWildcard =
- whenWOptM Opt_WarnRedundantRecordWildcards $
- let msg = mkTcRnUnknownMessage $
- mkPlainDiagnostic (WarningWithFlag Opt_WarnRedundantRecordWildcards)
- noHints
- redundantWildcardWarning
- in addDiagnostic msg
+warnRedundantRecordWildcard = addDiagnostic TcRnRedundantRecordWildcard
-- | Produce a warning when no variables bound by a `..` pattern are used.
@@ -418,21 +400,19 @@ warnUnusedRecordWildcard :: [Name] -> FreeVars -> RnM ()
warnUnusedRecordWildcard ns used_names = do
let used = filter (`elemNameSet` used_names) ns
traceRn "warnUnused" (ppr ns $$ ppr used_names $$ ppr used)
- warnIf (null used)
- unusedRecordWildcardWarning
+ warnIf (null used) (TcRnUnusedRecordWildcard ns)
warnUnusedLocalBinds, warnUnusedMatches, warnUnusedTypePatterns
:: [Name] -> FreeVars -> RnM ()
-warnUnusedLocalBinds = check_unused Opt_WarnUnusedLocalBinds
-warnUnusedMatches = check_unused Opt_WarnUnusedMatches
-warnUnusedTypePatterns = check_unused Opt_WarnUnusedTypePatterns
+warnUnusedLocalBinds = check_unused UnusedNameLocalBind
+warnUnusedMatches = check_unused UnusedNameMatch
+warnUnusedTypePatterns = check_unused UnusedNameTypePattern
-check_unused :: WarningFlag -> [Name] -> FreeVars -> RnM ()
-check_unused flag bound_names used_names
- = whenWOptM flag (warnUnused flag (filterOut (`elemNameSet` used_names)
- bound_names))
+check_unused :: UnusedNameProv -> [Name] -> FreeVars -> RnM ()
+check_unused prov bound_names used_names
+ = warnUnused prov (filterOut (`elemNameSet` used_names) bound_names)
warnForallIdentifier :: LocatedN RdrName -> RnM ()
warnForallIdentifier (L l rdr_name@(Unqual occ))
@@ -447,33 +427,30 @@ warnUnusedGREs :: [GlobalRdrElt] -> RnM ()
warnUnusedGREs gres = mapM_ warnUnusedGRE gres
-- NB the Names must not be the names of record fields!
-warnUnused :: WarningFlag -> [Name] -> RnM ()
-warnUnused flag names =
- mapM_ (\ nm -> warnUnused1 flag nm (nameOccName nm)) names
+warnUnused :: UnusedNameProv -> [Name] -> RnM ()
+warnUnused prov names =
+ mapM_ (\ nm -> warnUnused1 prov nm (nameOccName nm)) names
-warnUnused1 :: WarningFlag -> Name -> OccName -> RnM ()
-warnUnused1 flag child child_occ
+warnUnused1 :: UnusedNameProv -> Name -> OccName -> RnM ()
+warnUnused1 prov child child_occ
= when (reportable child child_occ) $
- addUnusedWarning flag
- child_occ (nameSrcSpan child)
- (text $ "Defined but not used" ++ opt_str)
- where
- opt_str = case flag of
- Opt_WarnUnusedTypePatterns -> " on the right hand side"
- _ -> ""
+ warn_unused_name prov (nameSrcSpan child) child_occ
+
+warn_unused_name :: UnusedNameProv -> SrcSpan -> OccName -> RnM ()
+warn_unused_name prov span child_occ =
+ addDiagnosticAt span (TcRnUnusedName child_occ prov)
warnUnusedGRE :: GlobalRdrElt -> RnM ()
warnUnusedGRE gre@(GRE { gre_lcl = lcl, gre_imp = is })
- | lcl = warnUnused1 Opt_WarnUnusedTopBinds nm occ
+ | lcl = warnUnused1 UnusedNameTopDecl nm occ
| otherwise = when (reportable nm occ) (mapM_ warn is)
where
occ = greOccName gre
nm = greName gre
- warn spec = addUnusedWarning Opt_WarnUnusedTopBinds occ span msg
- where
- span = importSpecLoc spec
- pp_mod = quotes (ppr (importSpecModule spec))
- msg = text "Imported from" <+> pp_mod <+> text "but not used"
+ warn spec =
+ warn_unused_name (UnusedNameImported (importSpecModule spec)) span occ
+ where
+ span = importSpecLoc spec
-- | Should we report the fact that this 'Name' is unused? The
-- 'OccName' may differ from 'nameOccName' due to
@@ -487,29 +464,6 @@ reportable child child_occ
| otherwise
= not (startsWithUnderscore child_occ)
-addUnusedWarning :: WarningFlag -> OccName -> SrcSpan -> SDoc -> RnM ()
-addUnusedWarning flag occ span msg = do
- let diag = mkTcRnUnknownMessage $ mkPlainDiagnostic (WarningWithFlag flag) noHints $
- sep [msg <> colon,
- nest 2 $ pprNonVarNameSpace (occNameSpace occ)
- <+> quotes (ppr occ)]
- addDiagnosticAt span diag
-
-unusedRecordWildcardWarning :: TcRnMessage
-unusedRecordWildcardWarning =
- mkTcRnUnknownMessage $ mkPlainDiagnostic (WarningWithFlag Opt_WarnUnusedRecordWildcards) noHints $
- wildcardDoc $ text "No variables bound in the record wildcard match are used"
-
-redundantWildcardWarning :: SDoc
-redundantWildcardWarning =
- wildcardDoc $ text "Record wildcard does not bind any new variables"
-
-wildcardDoc :: SDoc -> SDoc
-wildcardDoc herald =
- herald
- $$ nest 2 (text "Possible fix" <> colon <+> text "omit the"
- <+> quotes (text ".."))
-
{-
Note [Skipping ambiguity errors at use sites of local declarations]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -560,78 +514,23 @@ addNameClashErrRn rdr_name gres
num_flds = length flds
num_non_flds = length non_flds
-mkNameClashErr :: Outputable a
- => a -> NE.NonEmpty GlobalRdrElt -> TcRnMessage
-mkNameClashErr rdr_name gres =
- mkTcRnUnknownMessage $ mkPlainError noHints $
- (vcat [ text "Ambiguous occurrence" <+> quotes (ppr rdr_name)
- , text "It could refer to"
- , nest 3 (vcat (msg1 : msgs)) ])
- where
- np1 NE.:| nps = gres
- msg1 = text "either" <+> ppr_gre np1
- msgs = [text " or" <+> ppr_gre np | np <- nps]
- ppr_gre gre = sep [ pp_gre_name gre <> comma
- , pprNameProvenance gre]
-
- -- When printing the name, take care to qualify it in the same
- -- way as the provenance reported by pprNameProvenance, namely
- -- the head of 'gre_imp'. Otherwise we get confusing reports like
- -- Ambiguous occurrence ‘null’
- -- It could refer to either ‘T15487a.null’,
- -- imported from ‘Prelude’ at T15487.hs:1:8-13
- -- or ...
- -- See #15487
- pp_gre_name gre
- | isRecFldGRE gre
- = text "the field" <+> quotes (ppr occ) <+> parent_info
- | otherwise
- = quotes (pp_qual <> dot <> ppr occ)
- where
- occ = greOccName gre
- parent_info = case gre_par gre of
- NoParent -> empty
- ParentIs { par_is = par_name } -> text "of record" <+> quotes (ppr par_name)
- pp_qual
- | gre_lcl gre
- = ppr (nameModule $ greName gre)
- | Just imp <- headMaybe $ gre_imp gre
- -- This 'imp' is the one that
- -- pprNameProvenance chooses
- , ImpDeclSpec { is_as = mod } <- is_decl imp
- = ppr mod
- | otherwise
- = pprPanic "addNameClassErrRn" (ppr gre)
- -- Invariant: either 'lcl' is True or 'iss' is non-empty
-
-
-dupNamesErr :: Outputable n => (n -> SrcSpan) -> NE.NonEmpty n -> RnM ()
-dupNamesErr get_loc names
- = addErrAt big_loc $ mkTcRnUnknownMessage $ mkPlainError noHints $
- vcat [text "Conflicting definitions for" <+> quotes (ppr (NE.head names)),
- locations]
+mkNameClashErr :: RdrName -> NE.NonEmpty GlobalRdrElt -> TcRnMessage
+mkNameClashErr rdr_name gres = TcRnAmbiguousName rdr_name gres
+
+dupNamesErr :: NE.NonEmpty SrcSpan -> NE.NonEmpty RdrName -> RnM ()
+dupNamesErr locs names
+ = addErrAt big_loc (TcRnBindingNameConflict (NE.head names) locs)
where
- locs = map get_loc (NE.toList names)
- big_loc = foldr1 combineSrcSpans locs
- locations = text "Bound at:" <+> vcat (map ppr (sortBy SrcLoc.leftmost_smallest locs))
+ big_loc = foldr1 combineSrcSpans locs
badQualBndrErr :: RdrName -> TcRnMessage
-badQualBndrErr rdr_name
- = mkTcRnUnknownMessage $ mkPlainError noHints $
- text "Qualified name in binding position:" <+> ppr rdr_name
+badQualBndrErr rdr_name = TcRnQualifiedBinder rdr_name
-typeAppErr :: String -> LHsType GhcPs -> TcRnMessage
-typeAppErr what (L _ k)
- = mkTcRnUnknownMessage $ mkPlainError noHints $
- hang (text "Illegal visible" <+> text what <+> text "application"
- <+> quotes (char '@' <> ppr k))
- 2 (text "Perhaps you intended to use TypeApplications")
+typeAppErr :: TypeOrKind -> LHsType GhcPs -> TcRnMessage
+typeAppErr what (L _ k) = TcRnTypeApplicationsDisabled what k
badFieldConErr :: Name -> FieldLabelString -> TcRnMessage
-badFieldConErr con field
- = mkTcRnUnknownMessage $ mkPlainError noHints $
- hsep [text "Constructor" <+> quotes (ppr con),
- text "does not have field", quotes (ppr field)]
+badFieldConErr con field = TcRnInvalidRecordField con field
-- | Ensure that a boxed or unboxed tuple has arity no larger than
-- 'mAX_TUPLE_SIZE'.
@@ -640,10 +539,7 @@ checkTupSize tup_size
| tup_size <= mAX_TUPLE_SIZE
= return ()
| otherwise
- = addErr $ mkTcRnUnknownMessage $ mkPlainError noHints $
- sep [text "A" <+> int tup_size <> text "-tuple is too large for GHC",
- nest 2 (parens (text "max size is" <+> int mAX_TUPLE_SIZE)),
- nest 2 (text "Workaround: use nested tuples or define a data type")]
+ = addErr (TcRnTupleTooLarge tup_size)
-- | Ensure that a constraint tuple has arity no larger than 'mAX_CTUPLE_SIZE'.
checkCTupSize :: Int -> TcM ()
@@ -651,10 +547,7 @@ checkCTupSize tup_size
| tup_size <= mAX_CTUPLE_SIZE
= return ()
| otherwise
- = addErr $ mkTcRnUnknownMessage $ mkPlainError noHints $
- hang (text "Constraint tuple arity too large:" <+> int tup_size
- <+> parens (text "max arity =" <+> int mAX_CTUPLE_SIZE))
- 2 (text "Instead, use a nested tuple")
+ = addErr (TcRnCTupleTooLarge tup_size)
{- *********************************************************************
* *
diff --git a/compiler/GHC/Tc/Errors/Ppr.hs b/compiler/GHC/Tc/Errors/Ppr.hs
index ef00752196..751a5f7682 100644
--- a/compiler/GHC/Tc/Errors/Ppr.hs
+++ b/compiler/GHC/Tc/Errors/Ppr.hs
@@ -86,6 +86,7 @@ import GHC.Data.Bag
import GHC.Data.FastString
import GHC.Data.List.SetOps ( nubOrdBy )
import GHC.Data.Maybe
+import GHC.Settings.Constants (mAX_TUPLE_SIZE, mAX_CTUPLE_SIZE)
import GHC.Utils.Misc
import GHC.Utils.Outputable
import GHC.Utils.Panic
@@ -1790,6 +1791,74 @@ instance Diagnostic TcRnMessage where
TcRnIllegalDataCon name
-> mkSimpleDecorated $
hsep [text "Illegal data constructor name", quotes (ppr name)]
+ TcRnNestedForallsContexts entity
+ -> mkSimpleDecorated $
+ what <+> text "cannot contain nested"
+ <+> quotes forAllLit <> text "s or contexts"
+ where
+ what = case entity of
+ NFC_Specialize -> text "SPECIALISE instance type"
+ NFC_ViaType -> quotes (text "via") <+> text "type"
+ NFC_GadtConSig -> text "GADT constructor type signature"
+ NFC_InstanceHead -> text "Instance head"
+ NFC_StandaloneDerivedInstanceHead -> text "Standalone-derived instance head"
+ NFC_DerivedClassType -> text "Derived class type"
+ TcRnRedundantRecordWildcard
+ -> mkSimpleDecorated $
+ text "Record wildcard does not bind any new variables"
+ TcRnUnusedRecordWildcard _
+ -> mkSimpleDecorated $
+ text "No variables bound in the record wildcard match are used"
+ TcRnUnusedName name reason
+ -> mkSimpleDecorated $
+ pprUnusedName name reason
+ TcRnQualifiedBinder rdr_name
+ -> mkSimpleDecorated $
+ text "Qualified name in binding position:" <+> ppr rdr_name
+ TcRnTypeApplicationsDisabled tok t
+ -> mkSimpleDecorated $
+ text "Illegal visible" <+> text what <+> text "application"
+ <+> quotes (char '@' <> ppr t)
+ where
+ what = case tok of
+ TypeLevel -> "type"
+ KindLevel -> "kind"
+ TcRnInvalidRecordField con field
+ -> mkSimpleDecorated $
+ hsep [text "Constructor" <+> quotes (ppr con),
+ text "does not have field", quotes (ppr field)]
+ TcRnTupleTooLarge tup_size
+ -> mkSimpleDecorated $
+ sep [text "A" <+> int tup_size <> text "-tuple is too large for GHC",
+ nest 2 (parens (text "max size is" <+> int mAX_TUPLE_SIZE)),
+ nest 2 (text "Workaround: use nested tuples or define a data type")]
+ TcRnCTupleTooLarge tup_size
+ -> mkSimpleDecorated $
+ hang (text "Constraint tuple arity too large:" <+> int tup_size
+ <+> parens (text "max arity =" <+> int mAX_CTUPLE_SIZE))
+ 2 (text "Instead, use a nested tuple")
+ TcRnIllegalInferredTyVars _
+ -> mkSimpleDecorated $
+ text "Inferred type variables are not allowed"
+ TcRnAmbiguousName name gres
+ -> mkSimpleDecorated $
+ vcat [ text "Ambiguous occurrence" <+> quotes (ppr name)
+ , text "It could refer to"
+ , nest 3 (vcat (msg1 : msgs)) ]
+ where
+ np1 NE.:| nps = gres
+ msg1 = text "either" <+> ppr_gre np1
+ msgs = [text " or" <+> ppr_gre np | np <- nps]
+ ppr_gre gre = sep [ pprAmbiguousGreName gre <> comma
+ , pprNameProvenance gre]
+ TcRnBindingNameConflict name locs
+ -> mkSimpleDecorated $
+ vcat [text "Conflicting definitions for" <+> quotes (ppr name),
+ locations]
+ where
+ locations =
+ text "Bound at:"
+ <+> vcat (map ppr (sortBy leftmost_smallest (NE.toList locs)))
diagnosticReason = \case
TcRnUnknownMessage m
@@ -2386,7 +2455,35 @@ instance Diagnostic TcRnMessage where
-> ErrorWithoutFlag
TcRnIllegalDataCon{}
-> ErrorWithoutFlag
-
+ TcRnNestedForallsContexts{}
+ -> ErrorWithoutFlag
+ TcRnRedundantRecordWildcard
+ -> WarningWithFlag Opt_WarnRedundantRecordWildcards
+ TcRnUnusedRecordWildcard{}
+ -> WarningWithFlag Opt_WarnUnusedRecordWildcards
+ TcRnUnusedName _ prov
+ -> WarningWithFlag $ case prov of
+ UnusedNameTopDecl -> Opt_WarnUnusedTopBinds
+ UnusedNameImported _ -> Opt_WarnUnusedTopBinds
+ UnusedNameTypePattern -> Opt_WarnUnusedTypePatterns
+ UnusedNameMatch -> Opt_WarnUnusedMatches
+ UnusedNameLocalBind -> Opt_WarnUnusedLocalBinds
+ TcRnQualifiedBinder{}
+ -> ErrorWithoutFlag
+ TcRnTypeApplicationsDisabled{}
+ -> ErrorWithoutFlag
+ TcRnInvalidRecordField{}
+ -> ErrorWithoutFlag
+ TcRnTupleTooLarge{}
+ -> ErrorWithoutFlag
+ TcRnCTupleTooLarge{}
+ -> ErrorWithoutFlag
+ TcRnIllegalInferredTyVars{}
+ -> ErrorWithoutFlag
+ TcRnAmbiguousName{}
+ -> ErrorWithoutFlag
+ TcRnBindingNameConflict{}
+ -> ErrorWithoutFlag
diagnosticHints = \case
TcRnUnknownMessage m
@@ -3024,6 +3121,30 @@ instance Diagnostic TcRnMessage where
-> [suggestExtension LangExt.PackageImports]
TcRnIllegalDataCon{}
-> noHints
+ TcRnNestedForallsContexts{}
+ -> noHints
+ TcRnRedundantRecordWildcard
+ -> [SuggestRemoveRecordWildcard]
+ TcRnUnusedRecordWildcard{}
+ -> [SuggestRemoveRecordWildcard]
+ TcRnUnusedName{}
+ -> noHints
+ TcRnQualifiedBinder{}
+ -> noHints
+ TcRnTypeApplicationsDisabled{}
+ -> [suggestExtension LangExt.TypeApplications]
+ TcRnInvalidRecordField{}
+ -> noHints
+ TcRnTupleTooLarge{}
+ -> noHints
+ TcRnCTupleTooLarge{}
+ -> noHints
+ TcRnIllegalInferredTyVars{}
+ -> noHints
+ TcRnAmbiguousName{}
+ -> noHints
+ TcRnBindingNameConflict{}
+ -> noHints
diagnosticCode :: TcRnMessage -> Maybe DiagnosticCode
diagnosticCode = constructorCode
@@ -5280,3 +5401,53 @@ pprUnusedImport decl = \case
case par of
ParentIs p -> pprNameUnqualified p <> parens (ppr fld_occ)
NoParent -> ppr fld_occ
+
+pprUnusedName :: OccName -> UnusedNameProv -> SDoc
+pprUnusedName name reason =
+ sep [ msg <> colon
+ , nest 2 $ pprNonVarNameSpace (occNameSpace name)
+ <+> quotes (ppr name)]
+ where
+ msg = case reason of
+ UnusedNameTopDecl ->
+ defined
+ UnusedNameImported mod ->
+ text "Imported from" <+> quotes (ppr mod) <+> text "but not used"
+ UnusedNameTypePattern ->
+ defined <+> text "on the right hand side"
+ UnusedNameMatch ->
+ defined
+ UnusedNameLocalBind ->
+ defined
+ defined = text "Defined but not used"
+
+-- When printing the name, take care to qualify it in the same
+-- way as the provenance reported by pprNameProvenance, namely
+-- the head of 'gre_imp'. Otherwise we get confusing reports like
+-- Ambiguous occurrence ‘null’
+-- It could refer to either ‘T15487a.null’,
+-- imported from ‘Prelude’ at T15487.hs:1:8-13
+-- or ...
+-- See #15487
+pprAmbiguousGreName :: GlobalRdrElt -> SDoc
+pprAmbiguousGreName gre
+ | isRecFldGRE gre
+ = text "the field" <+> quotes (ppr occ) <+> parent_info
+ | otherwise
+ = quotes (pp_qual <> dot <> ppr occ)
+ where
+ occ = greOccName gre
+ parent_info = case gre_par gre of
+ NoParent -> empty
+ ParentIs { par_is = par_name } -> text "of record" <+> quotes (ppr par_name)
+ pp_qual
+ | gre_lcl gre
+ = ppr (nameModule $ greName gre)
+ | Just imp <- headMaybe $ gre_imp gre
+ -- This 'imp' is the one that
+ -- pprNameProvenance chooses
+ , ImpDeclSpec { is_as = mod } <- is_decl imp
+ = ppr mod
+ | otherwise
+ = pprPanic "addNameClassErrRn" (ppr gre)
+ -- Invariant: either 'lcl' is True or 'iss' is non-empty
diff --git a/compiler/GHC/Tc/Errors/Types.hs b/compiler/GHC/Tc/Errors/Types.hs
index 9e017a6e52..23dc2cd3b0 100644
--- a/compiler/GHC/Tc/Errors/Types.hs
+++ b/compiler/GHC/Tc/Errors/Types.hs
@@ -114,6 +114,8 @@ module GHC.Tc.Errors.Types (
, ImportLookupReason (..)
, UnusedImportReason (..)
, UnusedImportName (..)
+ , NestedForallsContextsIn(..)
+ , UnusedNameProv(..)
) where
import GHC.Prelude
@@ -139,7 +141,7 @@ import qualified GHC.Types.Name.Occurrence as OccName
import GHC.Types.Name.Reader
import GHC.Types.SrcLoc
import GHC.Types.TyThing (TyThing)
-import GHC.Types.Var (Id, TyCoVar, TyVar, TcTyVar, CoVar)
+import GHC.Types.Var (Id, TyCoVar, TyVar, TcTyVar, CoVar, Specificity)
import GHC.Types.Var.Env (TidyEnv)
import GHC.Types.Var.Set (TyVarSet, VarSet)
import GHC.Unit.Types (Module)
@@ -3907,6 +3909,134 @@ data TcRnMessage where
TcRnIllegalDataCon :: !RdrName -- ^ The constructor name
-> TcRnMessage
+ {-| TcRnNestedForallsContexts is an error indicating that multiple foralls or
+ contexts are nested/curried where this is not supported,
+ like @∀ x. ∀ y.@ instead of @∀ x y.@.
+
+ Test cases:
+ T12087, T14320, T16114, T16394, T16427, T18191, T18240a, T18240b, T18455, T5951
+ -}
+ TcRnNestedForallsContexts :: !NestedForallsContextsIn -> TcRnMessage
+
+ {-| TcRnRedundantRecordWildcard is a warning indicating that a pattern uses
+ a record wildcard even though all of the record's fields are bound explicitly.
+
+ Test cases:
+ T15957_Fail
+ -}
+ TcRnRedundantRecordWildcard :: TcRnMessage
+
+ {-| TcRnUnusedRecordWildcard is a warning indicating that a pattern uses
+ a record wildcard while none of the fields bound by it are used.
+
+ Test cases:
+ T15957_Fail
+ -}
+ TcRnUnusedRecordWildcard :: ![Name] -- ^ The names bound by the wildcard
+ -> TcRnMessage
+
+ {-| TcRnUnusedName is a warning indicating that a defined or imported name
+ is not used in the module.
+
+ Test cases:
+ ds053, mc10, overloadedrecfldsfail05, overloadedrecfldsfail06, prog018,
+ read014, rn040, rn041, rn047, rn063, T13839, T13839a, T13919, T17171b,
+ T17a, T17b, T17d, T17e, T18470, T1972, t22391, t22391j, T2497, T3371,
+ T3449, T7145b, T7336, TH_recover_warns, unused_haddock, WarningGroups,
+ werror
+ -}
+ TcRnUnusedName :: !OccName -- ^ The unused name
+ -> !UnusedNameProv -- ^ The provenance of the name
+ -> TcRnMessage
+
+ {-| TcRnQualifiedBinder is an error indicating that a qualified name
+ was used in binding position.
+
+ Test cases:
+ mod62, rnfail021, rnfail034, rnfail039, rnfail046
+ -}
+ TcRnQualifiedBinder :: !RdrName -- ^ The name used as a binder
+ -> TcRnMessage
+
+ {-| TcRnTypeApplicationsDisabled is an error indicating that a type
+ application was used while the extension TypeApplications was disabled.
+
+ Test cases:
+ T12411, T12446, T15527, T16133, T18251c
+ -}
+ TcRnTypeApplicationsDisabled :: !TypeOrKind -- ^ Type or kind application
+ -> !(HsType GhcPs) -- ^ The type being applied
+ -> TcRnMessage
+
+ {-| TcRnInvalidRecordField is an error indicating that a record field was
+ used that doesn't exist in a constructor.
+
+ Test cases:
+ T13644, T13847, T17469, T8448, T8570, tcfail083, tcfail084
+ -}
+ TcRnInvalidRecordField :: !Name -- ^ The constructor name
+ -> !FieldLabelString -- ^ The name of the field
+ -> TcRnMessage
+
+ {-| TcRnTupleTooLarge is an error indicating that the arity of a tuple
+ exceeds mAX_TUPLE_SIZE.
+
+ Test cases:
+ T18723a, T18723b, T18723c, T6148a, T6148b, T6148c, T6148d
+ -}
+ TcRnTupleTooLarge :: !Int -- ^ The arity of the tuple
+ -> TcRnMessage
+
+ {-| TcRnCTupleTooLarge is an error indicating that the arity of a constraint
+ tuple exceeds mAX_CTUPLE_SIZE.
+
+ Test cases:
+ T10451
+ -}
+ TcRnCTupleTooLarge :: !Int -- ^ The arity of the constraint tuple
+ -> TcRnMessage
+
+ {-| TcRnIllegalInferredTyVars is an error indicating that some type variables
+ were quantified as inferred (like @∀ {a}.@) in a place where this is not
+ allowed, like in an instance declaration.
+
+ Test cases:
+ ExplicitSpecificity5, ExplicitSpecificity6, ExplicitSpecificity8,
+ ExplicitSpecificity9
+ -}
+ TcRnIllegalInferredTyVars :: !(NE.NonEmpty (HsTyVarBndr Specificity GhcPs))
+ -- ^ The offending type variables
+ -> TcRnMessage
+
+ {-| TcRnAmbiguousName is an error indicating that an unbound name
+ might refer to multiple names in scope.
+
+ Test cases:
+ BootFldReexport, DRFUnused, duplicaterecfldsghci01, GHCiDRF, mod110,
+ mod151, mod152, mod153, mod164, mod165, NoFieldSelectorsFail,
+ overloadedrecfldsfail02, overloadedrecfldsfail04, overloadedrecfldsfail11,
+ overloadedrecfldsfail12, overloadedrecfldsfail13,
+ overloadedrecfldswasrunnowfail06, rnfail044, T11167_ambig,
+ T11167_ambiguous_fixity, T13132_duplicaterecflds, T15487, T16745, T17420,
+ T18999_NoDisambiguateRecordFields, T19397E1, T19397E2, T23010_fail,
+ tcfail037
+ -}
+ TcRnAmbiguousName :: !RdrName -- ^ The name
+ -> !(NE.NonEmpty GlobalRdrElt) -- ^ The possible matches
+ -> TcRnMessage
+
+ {-| TcRnBindingNameConflict is an error indicating that multiple local or
+ top-level bindings have the same name.
+
+ Test cases:
+ dsrun006, mdofail002, mdofail003, mod23, mod24, qq006, rnfail001,
+ rnfail004, SimpleFail6, T14114, T16110_Fail1, tcfail038, TH_spliceD1
+ -}
+ TcRnBindingNameConflict :: !RdrName -- ^ The conflicting name
+ -> !(NE.NonEmpty SrcSpan)
+ -- ^ The locations of the duplicates
+ -> TcRnMessage
+
deriving Generic
-- | Things forbidden in @type data@ declarations.
@@ -5414,3 +5544,26 @@ data UnusedImportReason where
UnusedImportSome :: ![UnusedImportName] -- ^ The unsed names
-> UnusedImportReason
deriving (Generic)
+
+-- | Different places in which a nested foralls/contexts error might occur.
+data NestedForallsContextsIn
+ -- | Nested forall in @SPECIALISE instance@
+ = NFC_Specialize
+ -- | Nested forall in @deriving via@ (via-type)
+ | NFC_ViaType
+ -- | Nested forall in the type of a GADT constructor
+ | NFC_GadtConSig
+ -- | Nested forall in an instance head
+ | NFC_InstanceHead
+ -- | Nested forall in a standalone deriving instance head
+ | NFC_StandaloneDerivedInstanceHead
+ -- | Nested forall in deriving class type
+ | NFC_DerivedClassType
+
+-- | Provenance of an unused name.
+data UnusedNameProv
+ = UnusedNameTopDecl
+ | UnusedNameImported !ModuleName
+ | UnusedNameTypePattern
+ | UnusedNameMatch
+ | UnusedNameLocalBind
diff --git a/compiler/GHC/Tc/Module.hs b/compiler/GHC/Tc/Module.hs
index 1b02340061..637baba3b6 100644
--- a/compiler/GHC/Tc/Module.hs
+++ b/compiler/GHC/Tc/Module.hs
@@ -989,7 +989,7 @@ checkHiBootIface'
-- At least 2 matches: report an ambiguity error.
(gre1,_):(gre2,_):gres_ids -> do
addErrAt (nameSrcSpan missing_name) $
- mkNameClashErr missing_name (gre1 NE.:| gre2 : map fst gres_ids)
+ mkNameClashErr (nameRdrName missing_name) (gre1 NE.:| gre2 : map fst gres_ids)
return Nothing
-- Single match: resolve the issue.
diff --git a/compiler/GHC/Types/Error/Codes.hs b/compiler/GHC/Types/Error/Codes.hs
index 46597c8e0c..cb80f713d4 100644
--- a/compiler/GHC/Types/Error/Codes.hs
+++ b/compiler/GHC/Types/Error/Codes.hs
@@ -586,6 +586,18 @@ type family GhcDiagnosticCode c = n | n -> c where
GhcDiagnosticCode "TcRnDuplicateDecls" = 29916
GhcDiagnosticCode "TcRnPackageImportsDisabled" = 10032
GhcDiagnosticCode "TcRnIllegalDataCon" = 78448
+ GhcDiagnosticCode "TcRnNestedForallsContexts" = 71492
+ GhcDiagnosticCode "TcRnRedundantRecordWildcard" = 15932
+ GhcDiagnosticCode "TcRnUnusedRecordWildcard" = 83475
+ GhcDiagnosticCode "TcRnUnusedName" = 40910
+ GhcDiagnosticCode "TcRnQualifiedBinder" = 28329
+ GhcDiagnosticCode "TcRnTypeApplicationsDisabled" = 23482
+ GhcDiagnosticCode "TcRnInvalidRecordField" = 53822
+ GhcDiagnosticCode "TcRnTupleTooLarge" = 94803
+ GhcDiagnosticCode "TcRnCTupleTooLarge" = 89347
+ GhcDiagnosticCode "TcRnIllegalInferredTyVars" = 54832
+ GhcDiagnosticCode "TcRnAmbiguousName" = 87543
+ GhcDiagnosticCode "TcRnBindingNameConflict" = 10498
-- PatSynInvalidRhsReason
GhcDiagnosticCode "PatSynNotInvertible" = 69317
diff --git a/compiler/GHC/Types/Hint.hs b/compiler/GHC/Types/Hint.hs
index 4ce8d04a9d..773ed4941d 100644
--- a/compiler/GHC/Types/Hint.hs
+++ b/compiler/GHC/Types/Hint.hs
@@ -434,6 +434,11 @@ data GhcHint
-}
| SuggestSafeHaskell
+ {-| Suggest removing a record wildcard from a pattern when it doesn't
+ bind anything useful.
+ -}
+ | SuggestRemoveRecordWildcard
+
-- | An 'InstantiationSuggestion' for a '.hsig' file. This is generated
-- by GHC in case of a 'DriverUnexpectedSignature' and suggests a way
-- to instantiate a particular signature, where the first argument is
diff --git a/compiler/GHC/Types/Hint/Ppr.hs b/compiler/GHC/Types/Hint/Ppr.hs
index c0945f29fe..76e678bb36 100644
--- a/compiler/GHC/Types/Hint/Ppr.hs
+++ b/compiler/GHC/Types/Hint/Ppr.hs
@@ -232,6 +232,8 @@ instance Outputable GhcHint where
pp_args = hsep (map ppr args)
SuggestSafeHaskell
-> text "Enable Safe Haskell through either Safe, Trustworthy or Unsafe."
+ SuggestRemoveRecordWildcard
+ -> text "Omit the" <+> quotes (text "..")
perhapsAsPat :: SDoc
perhapsAsPat = text "Perhaps you meant an as-pattern, which must not be surrounded by whitespace"
diff --git a/testsuite/tests/deSugar/should_compile/ds053.stderr b/testsuite/tests/deSugar/should_compile/ds053.stderr
index 841c6da753..563503db63 100644
--- a/testsuite/tests/deSugar/should_compile/ds053.stderr
+++ b/testsuite/tests/deSugar/should_compile/ds053.stderr
@@ -1,3 +1,3 @@
-ds053.hs:5:1: warning: [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
+ds053.hs:5:1: warning: [GHC-40910] [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
Defined but not used: ‘f’
diff --git a/testsuite/tests/deriving/should_compile/T13919.stderr b/testsuite/tests/deriving/should_compile/T13919.stderr
index 02cfb71aaa..10780d6c36 100644
--- a/testsuite/tests/deriving/should_compile/T13919.stderr
+++ b/testsuite/tests/deriving/should_compile/T13919.stderr
@@ -1,3 +1,3 @@
-T13919.hs:13:19: warning: [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
+T13919.hs:13:19: warning: [GHC-40910] [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
Defined but not used: record field of Foo4 ‘bar4’
diff --git a/testsuite/tests/driver/t22391/t22391.stderr b/testsuite/tests/driver/t22391/t22391.stderr
index bdb2abe792..22e1592e1a 100644
--- a/testsuite/tests/driver/t22391/t22391.stderr
+++ b/testsuite/tests/driver/t22391/t22391.stderr
@@ -33,7 +33,7 @@ src/Lib.hs:6:1: warning: [GHC-66111] [-Wunused-imports (in -Wextra)]
src/Lib.hs:8:1: warning: [GHC-38417] [-Wmissing-signatures (in -Wall)]
Top-level binding with no type signature: blah :: Integer
-src/Lib.hs:8:1: warning: [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
+src/Lib.hs:8:1: warning: [GHC-40910] [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
Defined but not used: ‘blah’
src/Lib.hs:8:8: warning: [GHC-18042] [-Wtype-defaults (in -Wall)]
diff --git a/testsuite/tests/driver/t22391/t22391j.stderr b/testsuite/tests/driver/t22391/t22391j.stderr
index bdb2abe792..22e1592e1a 100644
--- a/testsuite/tests/driver/t22391/t22391j.stderr
+++ b/testsuite/tests/driver/t22391/t22391j.stderr
@@ -33,7 +33,7 @@ src/Lib.hs:6:1: warning: [GHC-66111] [-Wunused-imports (in -Wextra)]
src/Lib.hs:8:1: warning: [GHC-38417] [-Wmissing-signatures (in -Wall)]
Top-level binding with no type signature: blah :: Integer
-src/Lib.hs:8:1: warning: [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
+src/Lib.hs:8:1: warning: [GHC-40910] [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
Defined but not used: ‘blah’
src/Lib.hs:8:8: warning: [GHC-18042] [-Wtype-defaults (in -Wall)]
diff --git a/testsuite/tests/driver/werror.stderr b/testsuite/tests/driver/werror.stderr
index 67cab2d5f9..1c5b681c8b 100644
--- a/testsuite/tests/driver/werror.stderr
+++ b/testsuite/tests/driver/werror.stderr
@@ -2,7 +2,7 @@
werror.hs:6:1: error: [GHC-38417] [-Wmissing-signatures (in -Wall), Werror=missing-signatures]
Top-level binding with no type signature: main :: IO ()
-werror.hs:7:13: error: [-Wunused-local-binds (in -Wextra, -Wunused-binds), Werror=unused-local-binds]
+werror.hs:7:13: error: [GHC-40910] [-Wunused-local-binds (in -Wextra, -Wunused-binds), Werror=unused-local-binds]
Defined but not used: ‘main’
werror.hs:7:13: error: [GHC-63397] [-Wname-shadowing (in -Wall), Werror=name-shadowing]
@@ -16,7 +16,7 @@ werror.hs:8:1: error: [GHC-94817] [-Wtabs (in -Wdefault), Werror=tabs]
werror.hs:10:1: error: [GHC-38417] [-Wmissing-signatures (in -Wall), Werror=missing-signatures]
Top-level binding with no type signature: f :: [a1] -> [a2]
-werror.hs:10:1: error: [-Wunused-top-binds (in -Wextra, -Wunused-binds), Werror=unused-top-binds]
+werror.hs:10:1: error: [GHC-40910] [-Wunused-top-binds (in -Wextra, -Wunused-binds), Werror=unused-top-binds]
Defined but not used: ‘f’
werror.hs:10:1: error: [GHC-62161] [-Wincomplete-patterns (in -Wextra), Werror=incomplete-patterns]
diff --git a/testsuite/tests/gadt/T12087.stderr b/testsuite/tests/gadt/T12087.stderr
index ef0251a003..7ef702e8e2 100644
--- a/testsuite/tests/gadt/T12087.stderr
+++ b/testsuite/tests/gadt/T12087.stderr
@@ -1,20 +1,20 @@
-T12087.hs:6:20: error:
+T12087.hs:6:20: error: [GHC-71492]
GADT constructor type signature cannot contain nested ‘forall’s or contexts
In the definition of data constructor ‘MkF1’
-T12087.hs:9:25: error:
+T12087.hs:9:25: error: [GHC-71492]
GADT constructor type signature cannot contain nested ‘forall’s or contexts
In the definition of data constructor ‘MkF2’
-T12087.hs:12:34: error:
+T12087.hs:12:34: error: [GHC-71492]
GADT constructor type signature cannot contain nested ‘forall’s or contexts
In the definition of data constructor ‘MkF3’
-T12087.hs:15:36: error:
+T12087.hs:15:36: error: [GHC-71492]
GADT constructor type signature cannot contain nested ‘forall’s or contexts
In the definition of data constructor ‘MkF4’
-T12087.hs:18:25: error:
+T12087.hs:18:25: error: [GHC-71492]
GADT constructor type signature cannot contain nested ‘forall’s or contexts
In the definition of data constructor ‘MkF5’
diff --git a/testsuite/tests/gadt/T14320.stderr b/testsuite/tests/gadt/T14320.stderr
index 9cfb6ed9fc..e83aef1b46 100644
--- a/testsuite/tests/gadt/T14320.stderr
+++ b/testsuite/tests/gadt/T14320.stderr
@@ -1,4 +1,4 @@
-T14320.hs:17:14: error:
+T14320.hs:17:14: error: [GHC-71492]
GADT constructor type signature cannot contain nested ‘forall’s or contexts
In the definition of data constructor ‘TEBad’
diff --git a/testsuite/tests/gadt/T16427.stderr b/testsuite/tests/gadt/T16427.stderr
index b7288c9cd6..233544d333 100644
--- a/testsuite/tests/gadt/T16427.stderr
+++ b/testsuite/tests/gadt/T16427.stderr
@@ -1,4 +1,4 @@
-T16427.hs:5:26: error:
+T16427.hs:5:26: error: [GHC-71492]
GADT constructor type signature cannot contain nested ‘forall’s or contexts
In the definition of data constructor ‘C’
diff --git a/testsuite/tests/gadt/T18191.stderr b/testsuite/tests/gadt/T18191.stderr
index ce877d0332..8e5662bec3 100644
--- a/testsuite/tests/gadt/T18191.stderr
+++ b/testsuite/tests/gadt/T18191.stderr
@@ -1,24 +1,24 @@
-T18191.hs:6:11: error:
+T18191.hs:6:11: error: [GHC-71492]
• GADT constructor type signature cannot contain nested ‘forall’s or contexts
• In the definition of data constructor ‘MkT’
-T18191.hs:9:11: error:
+T18191.hs:9:11: error: [GHC-71492]
• GADT constructor type signature cannot contain nested ‘forall’s or contexts
• In the definition of data constructor ‘MkS’
-T18191.hs:12:11: error:
+T18191.hs:12:11: error: [GHC-71492]
• GADT constructor type signature cannot contain nested ‘forall’s or contexts
• In the definition of data constructor ‘MkU’
-T18191.hs:15:21: error:
+T18191.hs:15:21: error: [GHC-71492]
• GADT constructor type signature cannot contain nested ‘forall’s or contexts
• In the definition of data constructor ‘MkZ1’
T18191.hs:15:31: error: [GHC-89246]
Record syntax is illegal here: {unZ1 :: (a, b)}
-T18191.hs:16:19: error:
+T18191.hs:16:19: error: [GHC-71492]
• GADT constructor type signature cannot contain nested ‘forall’s or contexts
• In the definition of data constructor ‘MkZ2’
diff --git a/testsuite/tests/ghci/prog018/prog018.stdout b/testsuite/tests/ghci/prog018/prog018.stdout
index 1fff03d755..dddc475a4a 100644
--- a/testsuite/tests/ghci/prog018/prog018.stdout
+++ b/testsuite/tests/ghci/prog018/prog018.stdout
@@ -7,7 +7,7 @@ A.hs:5:1: warning: [GHC-62161] [-Wincomplete-patterns (in -Wextra)]
In an equation for ‘incompletePattern’:
Patterns of type ‘Int’ not matched: p where p is not one of {0}
-A.hs:8:15: warning: [-Wunused-matches (in -Wextra)]
+A.hs:8:15: warning: [GHC-40910] [-Wunused-matches (in -Wextra)]
Defined but not used: ‘x’
B.hs:7:1: warning: [GHC-66111] [-Wunused-imports (in -Wextra)]
diff --git a/testsuite/tests/indexed-types/should_compile/ExplicitForAllFams2.stderr b/testsuite/tests/indexed-types/should_compile/ExplicitForAllFams2.stderr
index a8aece69eb..327f487a86 100644
--- a/testsuite/tests/indexed-types/should_compile/ExplicitForAllFams2.stderr
+++ b/testsuite/tests/indexed-types/should_compile/ExplicitForAllFams2.stderr
@@ -1,12 +1,12 @@
-ExplicitForAllFams2.hs:34:10: warning: [-Wunused-type-patterns]
+ExplicitForAllFams2.hs:34:10: warning: [GHC-40910] [-Wunused-type-patterns]
Defined but not used on the right hand side: type variable ‘t’
-ExplicitForAllFams2.hs:35:10: warning: [-Wunused-type-patterns]
+ExplicitForAllFams2.hs:35:10: warning: [GHC-40910] [-Wunused-type-patterns]
Defined but not used on the right hand side: type variable ‘a’
-ExplicitForAllFams2.hs:38:6: warning: [-Wunused-type-patterns]
+ExplicitForAllFams2.hs:38:6: warning: [GHC-40910] [-Wunused-type-patterns]
Defined but not used on the right hand side: type variable ‘t’
-ExplicitForAllFams2.hs:39:6: warning: [-Wunused-type-patterns]
+ExplicitForAllFams2.hs:39:6: warning: [GHC-40910] [-Wunused-type-patterns]
Defined but not used on the right hand side: type variable ‘a’
diff --git a/testsuite/tests/indexed-types/should_compile/T16356_Compile2.stderr b/testsuite/tests/indexed-types/should_compile/T16356_Compile2.stderr
index 41fe7794b8..9c41c884b6 100644
--- a/testsuite/tests/indexed-types/should_compile/T16356_Compile2.stderr
+++ b/testsuite/tests/indexed-types/should_compile/T16356_Compile2.stderr
@@ -1,18 +1,18 @@
-T16356_Compile2.hs:10:11: warning: [-Wunused-type-patterns]
+T16356_Compile2.hs:10:11: warning: [GHC-40910] [-Wunused-type-patterns]
Defined but not used on the right hand side: type variable ‘a’
-T16356_Compile2.hs:10:11: warning: [-Wunused-type-patterns]
+T16356_Compile2.hs:10:11: warning: [GHC-40910] [-Wunused-type-patterns]
Defined but not used on the right hand side: type variable ‘j’
-T16356_Compile2.hs:13:15: warning: [-Wunused-type-patterns]
+T16356_Compile2.hs:13:15: warning: [GHC-40910] [-Wunused-type-patterns]
Defined but not used on the right hand side: type variable ‘j’
-T16356_Compile2.hs:13:18: warning: [-Wunused-type-patterns]
+T16356_Compile2.hs:13:18: warning: [GHC-40910] [-Wunused-type-patterns]
Defined but not used on the right hand side: type variable ‘a’
-T16356_Compile2.hs:16:15: warning: [-Wunused-type-patterns]
+T16356_Compile2.hs:16:15: warning: [GHC-40910] [-Wunused-type-patterns]
Defined but not used on the right hand side: type variable ‘j’
-T16356_Compile2.hs:16:18: warning: [-Wunused-type-patterns]
+T16356_Compile2.hs:16:18: warning: [GHC-40910] [-Wunused-type-patterns]
Defined but not used on the right hand side: type variable ‘a’
diff --git a/testsuite/tests/indexed-types/should_compile/T16632.stderr b/testsuite/tests/indexed-types/should_compile/T16632.stderr
index 1f0aea9a87..061b25f2d1 100644
--- a/testsuite/tests/indexed-types/should_compile/T16632.stderr
+++ b/testsuite/tests/indexed-types/should_compile/T16632.stderr
@@ -1,5 +1,5 @@
-T16632.hs:5:17: warning: [-Wunused-type-patterns]
+T16632.hs:5:17: warning: [GHC-40910] [-Wunused-type-patterns]
Defined but not used on the right hand side: type variable ‘b’
|
5 | type instance F Char b Int = ()
diff --git a/testsuite/tests/indexed-types/should_compile/UnusedTyVarWarnings.stderr b/testsuite/tests/indexed-types/should_compile/UnusedTyVarWarnings.stderr
index b3b97f03a5..296fbea612 100644
--- a/testsuite/tests/indexed-types/should_compile/UnusedTyVarWarnings.stderr
+++ b/testsuite/tests/indexed-types/should_compile/UnusedTyVarWarnings.stderr
@@ -1,12 +1,12 @@
-UnusedTyVarWarnings.hs:8:5: warning: [-Wunused-type-patterns]
+UnusedTyVarWarnings.hs:8:5: warning: [GHC-40910] [-Wunused-type-patterns]
Defined but not used on the right hand side: type variable ‘b’
-UnusedTyVarWarnings.hs:11:18: warning: [-Wunused-type-patterns]
+UnusedTyVarWarnings.hs:11:18: warning: [GHC-40910] [-Wunused-type-patterns]
Defined but not used on the right hand side: type variable ‘b’
-UnusedTyVarWarnings.hs:27:5: warning: [-Wunused-type-patterns]
+UnusedTyVarWarnings.hs:27:5: warning: [GHC-40910] [-Wunused-type-patterns]
Defined but not used on the right hand side: type variable ‘a’
-UnusedTyVarWarnings.hs:33:17: warning: [-Wunused-type-patterns]
+UnusedTyVarWarnings.hs:33:17: warning: [GHC-40910] [-Wunused-type-patterns]
Defined but not used on the right hand side: type variable ‘b’
diff --git a/testsuite/tests/indexed-types/should_compile/UnusedTyVarWarningsNamedWCs.stderr b/testsuite/tests/indexed-types/should_compile/UnusedTyVarWarningsNamedWCs.stderr
index 4801686ae3..e623a73814 100644
--- a/testsuite/tests/indexed-types/should_compile/UnusedTyVarWarningsNamedWCs.stderr
+++ b/testsuite/tests/indexed-types/should_compile/UnusedTyVarWarningsNamedWCs.stderr
@@ -1,12 +1,12 @@
-UnusedTyVarWarningsNamedWCs.hs:8:5: warning: [-Wunused-type-patterns]
+UnusedTyVarWarningsNamedWCs.hs:8:5: warning: [GHC-40910] [-Wunused-type-patterns]
Defined but not used on the right hand side: type variable ‘b’
-UnusedTyVarWarningsNamedWCs.hs:11:18: warning: [-Wunused-type-patterns]
+UnusedTyVarWarningsNamedWCs.hs:11:18: warning: [GHC-40910] [-Wunused-type-patterns]
Defined but not used on the right hand side: type variable ‘b’
-UnusedTyVarWarningsNamedWCs.hs:27:5: warning: [-Wunused-type-patterns]
+UnusedTyVarWarningsNamedWCs.hs:27:5: warning: [GHC-40910] [-Wunused-type-patterns]
Defined but not used on the right hand side: type variable ‘a’
-UnusedTyVarWarningsNamedWCs.hs:33:17: warning: [-Wunused-type-patterns]
+UnusedTyVarWarningsNamedWCs.hs:33:17: warning: [GHC-40910] [-Wunused-type-patterns]
Defined but not used on the right hand side: type variable ‘b’
diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail6.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail6.stderr
index 92d8db7912..940aca6192 100644
--- a/testsuite/tests/indexed-types/should_fail/SimpleFail6.stderr
+++ b/testsuite/tests/indexed-types/should_fail/SimpleFail6.stderr
@@ -1,5 +1,5 @@
-SimpleFail6.hs:7:11: error:
+SimpleFail6.hs:7:11: error: [GHC-10498]
Conflicting definitions for ‘a’
Bound at: SimpleFail6.hs:7:11
SimpleFail6.hs:7:13
diff --git a/testsuite/tests/indexed-types/should_fail/T16110_Fail1.stderr b/testsuite/tests/indexed-types/should_fail/T16110_Fail1.stderr
index a20bada920..6b448d9328 100644
--- a/testsuite/tests/indexed-types/should_fail/T16110_Fail1.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T16110_Fail1.stderr
@@ -11,7 +11,7 @@ T16110_Fail1.hs:10:32: error: [GHC-76037]
T16110_Fail1.hs:10:34: error: [GHC-76037]
Not in scope: type variable ‘b’
-T16110_Fail1.hs:13:15: error:
+T16110_Fail1.hs:13:15: error: [GHC-10498]
Conflicting definitions for ‘dup’
Bound at: T16110_Fail1.hs:13:15-17
T16110_Fail1.hs:13:19-21
diff --git a/testsuite/tests/mdo/should_fail/mdofail002.stderr b/testsuite/tests/mdo/should_fail/mdofail002.stderr
index 7c0d7b679c..a038fc4630 100644
--- a/testsuite/tests/mdo/should_fail/mdofail002.stderr
+++ b/testsuite/tests/mdo/should_fail/mdofail002.stderr
@@ -1,5 +1,5 @@
-mdofail002.hs:10:9:
+mdofail002.hs:10:9: [GHC-10498]
Conflicting definitions for ‘x’
Bound at: mdofail002.hs:10:9
mdofail002.hs:11:9
diff --git a/testsuite/tests/mdo/should_fail/mdofail003.stderr b/testsuite/tests/mdo/should_fail/mdofail003.stderr
index 6d9741280e..d938463bef 100644
--- a/testsuite/tests/mdo/should_fail/mdofail003.stderr
+++ b/testsuite/tests/mdo/should_fail/mdofail003.stderr
@@ -1,5 +1,5 @@
-mdofail003.hs:10:9:
+mdofail003.hs:10:9: [GHC-10498]
Conflicting definitions for ‘x’
Bound at: mdofail003.hs:10:9
mdofail003.hs:11:13
diff --git a/testsuite/tests/module/mod110.stderr b/testsuite/tests/module/mod110.stderr
index 6a7ade9c44..38e9c79a54 100644
--- a/testsuite/tests/module/mod110.stderr
+++ b/testsuite/tests/module/mod110.stderr
@@ -1,5 +1,5 @@
-mod110.hs:11:10: error:
+mod110.hs:11:10: error: [GHC-87543]
Ambiguous occurrence ‘Eq’
It could refer to either ‘Prelude.Eq’,
imported from ‘Prelude’ at mod110.hs:4:1-14
diff --git a/testsuite/tests/module/mod151.stderr b/testsuite/tests/module/mod151.stderr
index 265ad86031..8bb41459fb 100644
--- a/testsuite/tests/module/mod151.stderr
+++ b/testsuite/tests/module/mod151.stderr
@@ -1,5 +1,5 @@
-mod151.hs:2:20: error:
+mod151.hs:2:20: error: [GHC-87543]
Ambiguous occurrence ‘id’
It could refer to either ‘Prelude.id’,
imported from ‘Prelude’ at mod151.hs:2:8
diff --git a/testsuite/tests/module/mod152.stderr b/testsuite/tests/module/mod152.stderr
index 769b45b1c5..d60269b757 100644
--- a/testsuite/tests/module/mod152.stderr
+++ b/testsuite/tests/module/mod152.stderr
@@ -1,5 +1,5 @@
-mod152.hs:2:26: error:
+mod152.hs:2:26: error: [GHC-87543]
Ambiguous occurrence ‘id’
It could refer to either ‘Prelude.id’,
imported from ‘Prelude’ at mod152.hs:2:8
diff --git a/testsuite/tests/module/mod153.stderr b/testsuite/tests/module/mod153.stderr
index 51f14a486c..989b27a77e 100644
--- a/testsuite/tests/module/mod153.stderr
+++ b/testsuite/tests/module/mod153.stderr
@@ -1,5 +1,5 @@
-mod153.hs:2:11: error:
+mod153.hs:2:11: error: [GHC-87543]
Ambiguous occurrence ‘id’
It could refer to either ‘Prelude.id’,
imported from ‘Prelude’ at mod153.hs:2:8
diff --git a/testsuite/tests/module/mod164.stderr b/testsuite/tests/module/mod164.stderr
index ecdeff8063..d6c0a9eec2 100644
--- a/testsuite/tests/module/mod164.stderr
+++ b/testsuite/tests/module/mod164.stderr
@@ -1,5 +1,5 @@
-mod164.hs:9:5:
+mod164.hs:9:5: [GHC-87543]
Ambiguous occurrence ‘D1’
It could refer to either ‘Mod164_A.D1’,
imported from ‘Mod164_A’ at mod164.hs:4:1-15
diff --git a/testsuite/tests/module/mod165.stderr b/testsuite/tests/module/mod165.stderr
index 927b36924d..9ef57d4bbd 100644
--- a/testsuite/tests/module/mod165.stderr
+++ b/testsuite/tests/module/mod165.stderr
@@ -1,5 +1,5 @@
-mod165.hs:9:5:
+mod165.hs:9:5: [GHC-87543]
Ambiguous occurrence ‘A.D1’
It could refer to either ‘A.D1’,
imported from ‘Mod164_A’ at mod165.hs:4:1-20
diff --git a/testsuite/tests/module/mod23.stderr b/testsuite/tests/module/mod23.stderr
index 4387fb737a..e0d8ef994b 100644
--- a/testsuite/tests/module/mod23.stderr
+++ b/testsuite/tests/module/mod23.stderr
@@ -1,5 +1,5 @@
-mod23.hs:3:8:
+mod23.hs:3:8: [GHC-10498]
Conflicting definitions for ‘a’
Bound at: mod23.hs:3:8
mod23.hs:3:10
diff --git a/testsuite/tests/module/mod24.stderr b/testsuite/tests/module/mod24.stderr
index efc5ad5dd0..34b393c413 100644
--- a/testsuite/tests/module/mod24.stderr
+++ b/testsuite/tests/module/mod24.stderr
@@ -1,5 +1,5 @@
-mod24.hs:3:8:
+mod24.hs:3:8: [GHC-10498]
Conflicting definitions for ‘a’
Bound at: mod24.hs:3:8
mod24.hs:3:10
diff --git a/testsuite/tests/module/mod62.stderr b/testsuite/tests/module/mod62.stderr
index eab3f938b1..94c4797e0a 100644
--- a/testsuite/tests/module/mod62.stderr
+++ b/testsuite/tests/module/mod62.stderr
@@ -1,5 +1,5 @@
-mod62.hs:3:9: error: Qualified name in binding position: M.y
+mod62.hs:3:9: error: [GHC-28329] Qualified name in binding position: M.y
mod62.hs:3:22: error: [GHC-76037]
Not in scope: ‘M.y’
diff --git a/testsuite/tests/overloadedrecflds/ghci/GHCiDRF.stdout b/testsuite/tests/overloadedrecflds/ghci/GHCiDRF.stdout
index c912c3c4ee..4d4e5817d9 100644
--- a/testsuite/tests/overloadedrecflds/ghci/GHCiDRF.stdout
+++ b/testsuite/tests/overloadedrecflds/ghci/GHCiDRF.stdout
@@ -1,6 +1,6 @@
GHCiDRF.foo :: T -> Int
-<interactive>:1:1: error:
+<interactive>:1:1: error: [GHC-87543]
Ambiguous occurrence ‘GHCiDRF.bar’
It could refer to
either the field ‘bar’ of record ‘T’, defined at GHCiDRF.hs:3:28
@@ -17,7 +17,7 @@ data U = MkU {bar :: Bool}
-- Defined at GHCiDRF.hs:4:16
GHCiDRF.foo :: GHCiDRF.T -> Int
-<interactive>:1:1: error:
+<interactive>:1:1: error: [GHC-87543]
Ambiguous occurrence ‘GHCiDRF.bar’
It could refer to
either the field ‘bar’,
@@ -37,7 +37,7 @@ type GHCiDRF.U :: *
data GHCiDRF.U = GHCiDRF.MkU {GHCiDRF.bar :: Bool}
-- Defined at GHCiDRF.hs:4:16
-<interactive>:11:1: error:
+<interactive>:11:1: error: [GHC-87543]
Ambiguous occurrence ‘GHCiDRF.bar’
It could refer to
either the field ‘bar’,
diff --git a/testsuite/tests/overloadedrecflds/ghci/duplicaterecfldsghci01.stdout b/testsuite/tests/overloadedrecflds/ghci/duplicaterecfldsghci01.stdout
index b34e509ecc..c1bb4c99f0 100644
--- a/testsuite/tests/overloadedrecflds/ghci/duplicaterecfldsghci01.stdout
+++ b/testsuite/tests/overloadedrecflds/ghci/duplicaterecfldsghci01.stdout
@@ -8,7 +8,7 @@ data T a = MkT {foo :: Bool, ...}
-- Defined at <interactive>:4:18
True
-<interactive>:1:1: error:
+<interactive>:1:1: error: [GHC-87543]
Ambiguous occurrence ‘foo’
It could refer to
either the field ‘foo’ of record ‘S’, defined at <interactive>:3:16
diff --git a/testsuite/tests/overloadedrecflds/should_compile/BootFldReexport.stderr b/testsuite/tests/overloadedrecflds/should_compile/BootFldReexport.stderr
index 0830beb7fc..29d8f451ca 100644
--- a/testsuite/tests/overloadedrecflds/should_compile/BootFldReexport.stderr
+++ b/testsuite/tests/overloadedrecflds/should_compile/BootFldReexport.stderr
@@ -1,5 +1,5 @@
-BootFldReexport.hs:8:9: error:
+BootFldReexport.hs:8:9: error: [GHC-87543]
Ambiguous occurrence ‘fld’
It could refer to
either ‘BootFldReexport_N.fld’,
diff --git a/testsuite/tests/overloadedrecflds/should_fail/DRFUnused.stderr b/testsuite/tests/overloadedrecflds/should_fail/DRFUnused.stderr
index 88e9e6537f..81029d6cd3 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/DRFUnused.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/DRFUnused.stderr
@@ -1,5 +1,5 @@
-DRFUnused.hs:18:5: error:
+DRFUnused.hs:18:5: error: [GHC-87543]
Ambiguous occurrence ‘foo’
It could refer to
either the field ‘foo’ of record ‘S’, defined at DRFUnused.hs:10:16
diff --git a/testsuite/tests/overloadedrecflds/should_fail/NoFieldSelectorsFail.stderr b/testsuite/tests/overloadedrecflds/should_fail/NoFieldSelectorsFail.stderr
index 301b6bc4b8..4eb98f3778 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/NoFieldSelectorsFail.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/NoFieldSelectorsFail.stderr
@@ -1,5 +1,5 @@
-NoFieldSelectorsFail.hs:9:14: error:
+NoFieldSelectorsFail.hs:9:14: error: [GHC-87543]
Ambiguous occurrence ‘foo’
It could refer to
either the field ‘foo’ of record ‘Foo’,
diff --git a/testsuite/tests/overloadedrecflds/should_fail/T11167_ambiguous_fixity.stderr b/testsuite/tests/overloadedrecflds/should_fail/T11167_ambiguous_fixity.stderr
index 277a5bd0ac..8a1691ac22 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/T11167_ambiguous_fixity.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/T11167_ambiguous_fixity.stderr
@@ -2,7 +2,7 @@
[2 of 3] Compiling T11167_ambiguous_fixity_B ( T11167_ambiguous_fixity_B.hs, T11167_ambiguous_fixity_B.o )
[3 of 3] Compiling T11167_ambiguous_fixity ( T11167_ambiguous_fixity.hs, T11167_ambiguous_fixity.o )
-T11167_ambiguous_fixity.hs:6:16: error:
+T11167_ambiguous_fixity.hs:6:16: error: [GHC-87543]
Ambiguous occurrence ‘foo’
It could refer to
either the field ‘foo’ of record ‘A’,
diff --git a/testsuite/tests/overloadedrecflds/should_fail/T13132_duplicaterecflds.stderr b/testsuite/tests/overloadedrecflds/should_fail/T13132_duplicaterecflds.stderr
index 11374466ec..00fbe0899b 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/T13132_duplicaterecflds.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/T13132_duplicaterecflds.stderr
@@ -1,5 +1,5 @@
-T13132_duplicaterecflds.hs:7:16: error:
+T13132_duplicaterecflds.hs:7:16: error: [GHC-87543]
Ambiguous occurrence ‘runContT’
It could refer to
either the field ‘runContT’ of record ‘ContT’,
@@ -13,7 +13,7 @@ T13132_duplicaterecflds.hs:9:11: error: [GHC-46878]
namely ‘y’ [infixl 9]
in the section: ‘`runContT` x `y` x’
-T13132_duplicaterecflds.hs:9:12: error:
+T13132_duplicaterecflds.hs:9:12: error: [GHC-87543]
Ambiguous occurrence ‘runContT’
It could refer to
either the field ‘runContT’ of record ‘ContT’,
diff --git a/testsuite/tests/overloadedrecflds/should_fail/T16745.stderr b/testsuite/tests/overloadedrecflds/should_fail/T16745.stderr
index 5969a540e0..b4515b8a19 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/T16745.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/T16745.stderr
@@ -3,7 +3,7 @@
[3 of 4] Compiling T16745D ( T16745D.hs, T16745D.o )
[4 of 4] Compiling T16745A ( T16745A.hs, T16745A.o )
-T16745A.hs:8:9: error:
+T16745A.hs:8:9: error: [GHC-87543]
Ambiguous occurrence ‘field’
It could refer to
either ‘T16745B.field’,
diff --git a/testsuite/tests/overloadedrecflds/should_fail/T17420.stderr b/testsuite/tests/overloadedrecflds/should_fail/T17420.stderr
index e1db5fa195..3a94cd5639 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/T17420.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/T17420.stderr
@@ -1,7 +1,7 @@
[1 of 2] Compiling T17420A ( T17420A.hs, T17420A.o )
[2 of 2] Compiling T17420 ( T17420.hs, T17420.o )
-T17420.hs:6:17: error:
+T17420.hs:6:17: error: [GHC-87543]
Ambiguous occurrence ‘name’
It could refer to
either the field ‘name’ of record ‘Dog’,
diff --git a/testsuite/tests/overloadedrecflds/should_fail/T17469.stderr b/testsuite/tests/overloadedrecflds/should_fail/T17469.stderr
index 5d93f46489..2f97d231cd 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/T17469.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/T17469.stderr
@@ -1,5 +1,5 @@
[1 of 3] Compiling T17469A ( T17469A.hs, T17469A.o )
[2 of 3] Compiling Main ( T17469.hs, T17469.o )
-T17469.hs:6:32: error:
+T17469.hs:6:32: error: [GHC-53822]
Constructor ‘MkFoo’ does not have field ‘bar’
diff --git a/testsuite/tests/overloadedrecflds/should_fail/T18999_NoDisambiguateRecordFields.stderr b/testsuite/tests/overloadedrecflds/should_fail/T18999_NoDisambiguateRecordFields.stderr
index f462dcb187..7e7939e028 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/T18999_NoDisambiguateRecordFields.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/T18999_NoDisambiguateRecordFields.stderr
@@ -1,5 +1,5 @@
-T18999_NoDisambiguateRecordFields.hs:6:13: error:
+T18999_NoDisambiguateRecordFields.hs:6:13: error: [GHC-87543]
Ambiguous occurrence ‘not’
It could refer to
either ‘Prelude.not’,
diff --git a/testsuite/tests/overloadedrecflds/should_fail/T23010_fail.stderr b/testsuite/tests/overloadedrecflds/should_fail/T23010_fail.stderr
index 61e93b95bb..6a1b76dae9 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/T23010_fail.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/T23010_fail.stderr
@@ -1,5 +1,5 @@
-T23010_fail.hs-boot:7:1: error:
+T23010_fail.hs-boot:7:1: error: [GHC-87543]
Ambiguous occurrence ‘T23010_fail.fld’
It could refer to
either the field ‘fld’ of record ‘A’,
diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail02.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail02.stderr
index 6a27569776..aaf57bd710 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail02.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail02.stderr
@@ -1,5 +1,5 @@
-overloadedrecfldsfail02.hs:8:18: error:
+overloadedrecfldsfail02.hs:8:18: error: [GHC-87543]
Ambiguous occurrence ‘x’
It could refer to
either the field ‘x’ of record ‘R’,
diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail04.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail04.stderr
index 6aa4669729..d319ae53f6 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail04.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail04.stderr
@@ -1,7 +1,7 @@
[1 of 3] Compiling OverloadedRecFldsFail04_A ( OverloadedRecFldsFail04_A.hs, OverloadedRecFldsFail04_A.o )
[2 of 3] Compiling Main ( overloadedrecfldsfail04.hs, overloadedrecfldsfail04.o )
-overloadedrecfldsfail04.hs:9:6: error:
+overloadedrecfldsfail04.hs:9:6: error: [GHC-87543]
Ambiguous occurrence ‘I.x’
It could refer to
either the field ‘x’ of record ‘V’,
diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail05.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail05.stderr
index bff9bd544f..5e887e33cf 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail05.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail05.stderr
@@ -1,3 +1,3 @@
-overloadedrecfldsfail05.hs:7:16: error: [-Wunused-top-binds (in -Wextra, -Wunused-binds), Werror=unused-top-binds]
+overloadedrecfldsfail05.hs:7:16: error: [GHC-40910] [-Wunused-top-binds (in -Wextra, -Wunused-binds), Werror=unused-top-binds]
Defined but not used: record field of MkT ‘foo’
diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail06.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail06.stderr
index f1b59db83f..d584430456 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail06.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail06.stderr
@@ -1,12 +1,12 @@
[1 of 3] Compiling OverloadedRecFldsFail06_A ( OverloadedRecFldsFail06_A.hs, OverloadedRecFldsFail06_A.o )
-OverloadedRecFldsFail06_A.hs:9:15: warning: [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
+OverloadedRecFldsFail06_A.hs:9:15: warning: [GHC-40910] [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
Defined but not used: data constructor ‘MkUnused’
-OverloadedRecFldsFail06_A.hs:9:42: warning: [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
+OverloadedRecFldsFail06_A.hs:9:42: warning: [GHC-40910] [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
Defined but not used: record field of MkUnused ‘unused2’
-OverloadedRecFldsFail06_A.hs:9:59: warning: [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
+OverloadedRecFldsFail06_A.hs:9:59: warning: [GHC-40910] [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
Defined but not used: record field of MkUnused ‘used_locally’
[2 of 3] Compiling Main ( overloadedrecfldsfail06.hs, overloadedrecfldsfail06.o )
diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail11.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail11.stderr
index 54472f4293..423472841c 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail11.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail11.stderr
@@ -1,7 +1,7 @@
[1 of 3] Compiling OverloadedRecFldsFail11_A ( OverloadedRecFldsFail11_A.hs, OverloadedRecFldsFail11_A.o )
[2 of 3] Compiling Main ( overloadedrecfldsfail11.hs, overloadedrecfldsfail11.o )
-overloadedrecfldsfail11.hs:5:15: error:
+overloadedrecfldsfail11.hs:5:15: error: [GHC-87543]
Ambiguous occurrence ‘foo’
It could refer to
either the field ‘foo’ of record ‘S’,
diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail12.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail12.stderr
index 28ebc96009..a6abb29b19 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail12.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail12.stderr
@@ -1,7 +1,7 @@
[1 of 3] Compiling OverloadedRecFldsFail12_A ( OverloadedRecFldsFail12_A.hs, OverloadedRecFldsFail12_A.o )
[2 of 3] Compiling Main ( overloadedrecfldsfail12.hs, overloadedrecfldsfail12.o )
-overloadedrecfldsfail12.hs:13:5: error:
+overloadedrecfldsfail12.hs:13:5: error: [GHC-87543]
Ambiguous occurrence ‘foo’
It could refer to
either the field ‘foo’ of record ‘T’,
@@ -10,7 +10,7 @@ overloadedrecfldsfail12.hs:13:5: error:
or the field ‘foo’ of record ‘S’,
defined at overloadedrecfldsfail12.hs:6:16
-overloadedrecfldsfail12.hs:16:5: error:
+overloadedrecfldsfail12.hs:16:5: error: [GHC-87543]
Ambiguous occurrence ‘foo’
It could refer to
either the field ‘foo’ of record ‘T’,
diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail13.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail13.stderr
index 4fb285b327..cf9a7a5678 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail13.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail13.stderr
@@ -1,5 +1,5 @@
-overloadedrecfldsfail13.hs:10:5: error:
+overloadedrecfldsfail13.hs:10:5: error: [GHC-87543]
Ambiguous occurrence ‘x’
It could refer to
either the field ‘x’ of record ‘S’,
@@ -7,7 +7,7 @@ overloadedrecfldsfail13.hs:10:5: error:
or the field ‘x’ of record ‘T’,
defined at overloadedrecfldsfail13.hs:7:16
-overloadedrecfldsfail13.hs:12:5: error:
+overloadedrecfldsfail13.hs:12:5: error: [GHC-87543]
Ambiguous occurrence ‘x’
It could refer to
either the field ‘x’ of record ‘S’,
@@ -15,7 +15,7 @@ overloadedrecfldsfail13.hs:12:5: error:
or the field ‘x’ of record ‘T’,
defined at overloadedrecfldsfail13.hs:7:16
-overloadedrecfldsfail13.hs:15:5: error:
+overloadedrecfldsfail13.hs:15:5: error: [GHC-87543]
Ambiguous occurrence ‘x’
It could refer to
either the field ‘x’ of record ‘S’,
@@ -23,7 +23,7 @@ overloadedrecfldsfail13.hs:15:5: error:
or the field ‘x’ of record ‘T’,
defined at overloadedrecfldsfail13.hs:7:16
-overloadedrecfldsfail13.hs:18:5: error:
+overloadedrecfldsfail13.hs:18:5: error: [GHC-87543]
Ambiguous occurrence ‘x’
It could refer to
either the field ‘x’ of record ‘S’,
diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldswasrunnowfail06.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldswasrunnowfail06.stderr
index c5f1e431c9..2b90b16f97 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldswasrunnowfail06.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldswasrunnowfail06.stderr
@@ -1,5 +1,5 @@
-overloadedrecfldswasrunnowfail06.hs:11:11: error:
+overloadedrecfldswasrunnowfail06.hs:11:11: error: [GHC-87543]
Ambiguous occurrence ‘x’
It could refer to
either the field ‘x’ of record ‘S’,
@@ -9,7 +9,7 @@ overloadedrecfldswasrunnowfail06.hs:11:11: error:
or the field ‘x’ of record ‘U’,
defined at overloadedrecfldswasrunnowfail06.hs:8:18
-overloadedrecfldswasrunnowfail06.hs:13:11: error:
+overloadedrecfldswasrunnowfail06.hs:13:11: error: [GHC-87543]
Ambiguous occurrence ‘x’
It could refer to
either the field ‘x’ of record ‘S’,
@@ -19,7 +19,7 @@ overloadedrecfldswasrunnowfail06.hs:13:11: error:
or the field ‘x’ of record ‘U’,
defined at overloadedrecfldswasrunnowfail06.hs:8:18
-overloadedrecfldswasrunnowfail06.hs:15:13: error:
+overloadedrecfldswasrunnowfail06.hs:15:13: error: [GHC-87543]
Ambiguous occurrence ‘x’
It could refer to
either the field ‘x’ of record ‘S’,
@@ -29,7 +29,7 @@ overloadedrecfldswasrunnowfail06.hs:15:13: error:
or the field ‘x’ of record ‘U’,
defined at overloadedrecfldswasrunnowfail06.hs:8:18
-overloadedrecfldswasrunnowfail06.hs:21:20: error:
+overloadedrecfldswasrunnowfail06.hs:21:20: error: [GHC-87543]
Ambiguous occurrence ‘x’
It could refer to
either the field ‘x’ of record ‘S’,
diff --git a/testsuite/tests/parser/should_compile/read014.stderr b/testsuite/tests/parser/should_compile/read014.stderr
index 88ba43d65d..3187d4d32a 100644
--- a/testsuite/tests/parser/should_compile/read014.stderr
+++ b/testsuite/tests/parser/should_compile/read014.stderr
@@ -3,7 +3,7 @@ read014.hs:4:1: warning: [GHC-38417] [-Wmissing-signatures (in -Wall)]
Top-level binding with no type signature:
ng1 :: Num a => p -> a -> a
-read014.hs:4:5: warning: [-Wunused-matches (in -Wextra)]
+read014.hs:4:5: warning: [GHC-40910] [-Wunused-matches (in -Wextra)]
Defined but not used: ‘x’
read014.hs:6:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
@@ -11,5 +11,5 @@ read014.hs:6:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)]
‘+’, ‘*’, ‘abs’, ‘signum’, and ‘fromInteger’
• In the instance declaration for ‘Num (a, b)’
-read014.hs:8:53: warning: [-Wunused-matches (in -Wextra)]
+read014.hs:8:53: warning: [GHC-40910] [-Wunused-matches (in -Wextra)]
Defined but not used: ‘x’
diff --git a/testsuite/tests/parser/should_fail/T12446.stderr b/testsuite/tests/parser/should_fail/T12446.stderr
index 99a6f65e0b..6ebcbd79cb 100644
--- a/testsuite/tests/parser/should_fail/T12446.stderr
+++ b/testsuite/tests/parser/should_fail/T12446.stderr
@@ -1,4 +1,4 @@
-T12446.hs:4:5: error:
+T12446.hs:4:5: error: [GHC-23482]
Illegal visible type application ‘@(_ ~ _)’
- Perhaps you intended to use TypeApplications
+ Suggested fix: Perhaps you intended to use TypeApplications
diff --git a/testsuite/tests/parser/should_fail/T18251c.stderr b/testsuite/tests/parser/should_fail/T18251c.stderr
index b4f667d5dd..ab6c5296d3 100644
--- a/testsuite/tests/parser/should_fail/T18251c.stderr
+++ b/testsuite/tests/parser/should_fail/T18251c.stderr
@@ -1,4 +1,4 @@
-T18251c.hs:4:5: error:
+T18251c.hs:4:5: error: [GHC-23482]
Illegal visible type application ‘@Int’
- Perhaps you intended to use TypeApplications
+ Suggested fix: Perhaps you intended to use TypeApplications
diff --git a/testsuite/tests/patsyn/should_fail/T14114.stderr b/testsuite/tests/patsyn/should_fail/T14114.stderr
index a93b51e8f4..5b08c9b939 100644
--- a/testsuite/tests/patsyn/should_fail/T14114.stderr
+++ b/testsuite/tests/patsyn/should_fail/T14114.stderr
@@ -1,17 +1,17 @@
-T14114.hs:4:20: error:
+T14114.hs:4:20: error: [GHC-10498]
• Conflicting definitions for ‘a’
Bound at: T14114.hs:4:20
T14114.hs:4:22
• In a pattern synonym declaration
-T14114.hs:5:20: error:
+T14114.hs:5:20: error: [GHC-10498]
• Conflicting definitions for ‘a’
Bound at: T14114.hs:5:20
T14114.hs:5:22
• In a pattern synonym declaration
-T14114.hs:6:20: error:
+T14114.hs:6:20: error: [GHC-10498]
• Conflicting definitions for ‘a’
Bound at: T14114.hs:6:20
T14114.hs:6:22
diff --git a/testsuite/tests/polykinds/T10451.stderr b/testsuite/tests/polykinds/T10451.stderr
index b8c17be28d..4c8835e48e 100644
--- a/testsuite/tests/polykinds/T10451.stderr
+++ b/testsuite/tests/polykinds/T10451.stderr
@@ -1,5 +1,5 @@
-T10451.hs:22:12: error:
+T10451.hs:22:12: error: [GHC-89347]
• Constraint tuple arity too large: 66 (max arity = 64)
Instead, use a nested tuple
• In the type ‘(Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a,
diff --git a/testsuite/tests/quasiquotation/qq006/qq006.stderr b/testsuite/tests/quasiquotation/qq006/qq006.stderr
index 3fd0d019e3..c3a231705d 100644
--- a/testsuite/tests/quasiquotation/qq006/qq006.stderr
+++ b/testsuite/tests/quasiquotation/qq006/qq006.stderr
@@ -1,5 +1,5 @@
-Main.hs:8:20: error:
+Main.hs:8:20: error: [GHC-10498]
• Conflicting definitions for ‘x’
Bound at: Main.hs:8:20-28
Main.hs:8:20-28
diff --git a/testsuite/tests/rename/should_compile/T13839.stdout b/testsuite/tests/rename/should_compile/T13839.stdout
index a700b1441c..0752cb6286 100644
--- a/testsuite/tests/rename/should_compile/T13839.stdout
+++ b/testsuite/tests/rename/should_compile/T13839.stdout
@@ -1,5 +1,5 @@
-T13839a.hs:10:1: warning: [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
+T13839a.hs:10:1: warning: [GHC-40910] [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
Defined but not used: ‘nonUsed’
nonUsed :: ()
nonUsed :: ()
diff --git a/testsuite/tests/rename/should_compile/T13839a.stderr b/testsuite/tests/rename/should_compile/T13839a.stderr
index 84b987364a..6a5348c28d 100644
--- a/testsuite/tests/rename/should_compile/T13839a.stderr
+++ b/testsuite/tests/rename/should_compile/T13839a.stderr
@@ -1,3 +1,3 @@
-T13839a.hs:10:1: warning: [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
+T13839a.hs:10:1: warning: [GHC-40910] [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
Defined but not used: ‘nonUsed’
diff --git a/testsuite/tests/rename/should_compile/T17a.stderr b/testsuite/tests/rename/should_compile/T17a.stderr
index 4e88e2e440..9503d1578a 100644
--- a/testsuite/tests/rename/should_compile/T17a.stderr
+++ b/testsuite/tests/rename/should_compile/T17a.stderr
@@ -1,3 +1,3 @@
-T17a.hs:8:1: warning: [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
+T17a.hs:8:1: warning: [GHC-40910] [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
Defined but not used: ‘top’
diff --git a/testsuite/tests/rename/should_compile/T17b.stderr b/testsuite/tests/rename/should_compile/T17b.stderr
index c94b869401..d78dc0bb53 100644
--- a/testsuite/tests/rename/should_compile/T17b.stderr
+++ b/testsuite/tests/rename/should_compile/T17b.stderr
@@ -1,3 +1,3 @@
-T17b.hs:17:12: warning: [-Wunused-local-binds (in -Wextra, -Wunused-binds)]
+T17b.hs:17:12: warning: [GHC-40910] [-Wunused-local-binds (in -Wextra, -Wunused-binds)]
Defined but not used: ‘local’
diff --git a/testsuite/tests/rename/should_compile/T17d.stderr b/testsuite/tests/rename/should_compile/T17d.stderr
index 4fbc9ab8a2..1452d3dd1f 100644
--- a/testsuite/tests/rename/should_compile/T17d.stderr
+++ b/testsuite/tests/rename/should_compile/T17d.stderr
@@ -1,3 +1,3 @@
-T17d.hs:14:5: warning: [-Wunused-matches (in -Wextra)]
+T17d.hs:14:5: warning: [GHC-40910] [-Wunused-matches (in -Wextra)]
Defined but not used: ‘match’
diff --git a/testsuite/tests/rename/should_compile/T17e.stderr b/testsuite/tests/rename/should_compile/T17e.stderr
index 3e691426ea..9ec33c8464 100644
--- a/testsuite/tests/rename/should_compile/T17e.stderr
+++ b/testsuite/tests/rename/should_compile/T17e.stderr
@@ -1,9 +1,9 @@
-T17e.hs:8:1: warning: [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
+T17e.hs:8:1: warning: [GHC-40910] [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
Defined but not used: ‘top’
T17e.hs:11:11: warning: [GHC-61367] [-Wunused-pattern-binds (in -Wextra, -Wunused-binds)]
This pattern-binding binds no variables: True = True
-T17e.hs:17:12: warning: [-Wunused-local-binds (in -Wextra, -Wunused-binds)]
+T17e.hs:17:12: warning: [GHC-40910] [-Wunused-local-binds (in -Wextra, -Wunused-binds)]
Defined but not used: ‘local’
diff --git a/testsuite/tests/rename/should_compile/T1972.stderr b/testsuite/tests/rename/should_compile/T1972.stderr
index d3d92a213a..f2f183d2a7 100644
--- a/testsuite/tests/rename/should_compile/T1972.stderr
+++ b/testsuite/tests/rename/should_compile/T1972.stderr
@@ -9,5 +9,5 @@ T1972.hs:15:3: warning: [GHC-63397] [-Wname-shadowing (in -Wall)]
(and originally defined in ‘Data.Traversable’)
defined at T1972.hs:17:1
-T1972.hs:21:10: warning: [-Wunused-local-binds (in -Wextra, -Wunused-binds)]
+T1972.hs:21:10: warning: [GHC-40910] [-Wunused-local-binds (in -Wextra, -Wunused-binds)]
Defined but not used: ‘c’
diff --git a/testsuite/tests/rename/should_compile/T3371.stderr b/testsuite/tests/rename/should_compile/T3371.stderr
index b563291965..3ccdac6fbc 100644
--- a/testsuite/tests/rename/should_compile/T3371.stderr
+++ b/testsuite/tests/rename/should_compile/T3371.stderr
@@ -1,3 +1,3 @@
-T3371.hs:10:14: warning: [-Wunused-matches (in -Wextra)]
+T3371.hs:10:14: warning: [GHC-40910] [-Wunused-matches (in -Wextra)]
Defined but not used: ‘a’
diff --git a/testsuite/tests/rename/should_compile/T3449.stderr b/testsuite/tests/rename/should_compile/T3449.stderr
index afc8d92515..a53e01af2d 100644
--- a/testsuite/tests/rename/should_compile/T3449.stderr
+++ b/testsuite/tests/rename/should_compile/T3449.stderr
@@ -1,3 +1,3 @@
-T3449.hs-boot:8:1: warning: [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
+T3449.hs-boot:8:1: warning: [GHC-40910] [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
Defined but not used: ‘unused’
diff --git a/testsuite/tests/rename/should_compile/T7145b.stderr b/testsuite/tests/rename/should_compile/T7145b.stderr
index 013d93174d..4d68c95387 100644
--- a/testsuite/tests/rename/should_compile/T7145b.stderr
+++ b/testsuite/tests/rename/should_compile/T7145b.stderr
@@ -1,3 +1,3 @@
-T7145b.hs:7:1: warning: [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
+T7145b.hs:7:1: warning: [GHC-40910] [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
Defined but not used: ‘pure’
diff --git a/testsuite/tests/rename/should_compile/mc10.stderr b/testsuite/tests/rename/should_compile/mc10.stderr
index 285bd34aeb..f70a1571c1 100644
--- a/testsuite/tests/rename/should_compile/mc10.stderr
+++ b/testsuite/tests/rename/should_compile/mc10.stderr
@@ -1,3 +1,3 @@
-mc10.hs:14:11: warning: [-Wunused-matches (in -Wextra)]
+mc10.hs:14:11: warning: [GHC-40910] [-Wunused-matches (in -Wextra)]
Defined but not used: ‘y’
diff --git a/testsuite/tests/rename/should_compile/rn040.stderr b/testsuite/tests/rename/should_compile/rn040.stderr
index 01d6a10e16..735ad91edd 100644
--- a/testsuite/tests/rename/should_compile/rn040.stderr
+++ b/testsuite/tests/rename/should_compile/rn040.stderr
@@ -1,6 +1,6 @@
-rn040.hs:6:12: warning: [-Wunused-matches (in -Wextra)]
+rn040.hs:6:12: warning: [GHC-40910] [-Wunused-matches (in -Wextra)]
Defined but not used: ‘y’
-rn040.hs:8:8: warning: [-Wunused-matches (in -Wextra)]
+rn040.hs:8:8: warning: [GHC-40910] [-Wunused-matches (in -Wextra)]
Defined but not used: ‘w’
diff --git a/testsuite/tests/rename/should_compile/rn041.stderr b/testsuite/tests/rename/should_compile/rn041.stderr
index 559da82a98..bc0817b451 100644
--- a/testsuite/tests/rename/should_compile/rn041.stderr
+++ b/testsuite/tests/rename/should_compile/rn041.stderr
@@ -1,9 +1,9 @@
-rn041.hs:7:1: warning: [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
+rn041.hs:7:1: warning: [GHC-40910] [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
Defined but not used: ‘f’
-rn041.hs:9:1: warning: [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
+rn041.hs:9:1: warning: [GHC-40910] [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
Defined but not used: ‘g’
-rn041.hs:10:1: warning: [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
+rn041.hs:10:1: warning: [GHC-40910] [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
Defined but not used: ‘h’
diff --git a/testsuite/tests/rename/should_compile/rn047.stderr b/testsuite/tests/rename/should_compile/rn047.stderr
index 17f59a1c24..9c733ed027 100644
--- a/testsuite/tests/rename/should_compile/rn047.stderr
+++ b/testsuite/tests/rename/should_compile/rn047.stderr
@@ -1,3 +1,3 @@
-rn047.hs:12:11: warning: [-Wunused-matches (in -Wextra)]
+rn047.hs:12:11: warning: [GHC-40910] [-Wunused-matches (in -Wextra)]
Defined but not used: ‘y’
diff --git a/testsuite/tests/rename/should_compile/rn063.stderr b/testsuite/tests/rename/should_compile/rn063.stderr
index ff4d409b36..a0bb647c36 100644
--- a/testsuite/tests/rename/should_compile/rn063.stderr
+++ b/testsuite/tests/rename/should_compile/rn063.stderr
@@ -1,6 +1,6 @@
-rn063.hs:10:9: warning: [-Wunused-local-binds (in -Wextra, -Wunused-binds)]
+rn063.hs:10:9: warning: [GHC-40910] [-Wunused-local-binds (in -Wextra, -Wunused-binds)]
Defined but not used: ‘x’
-rn063.hs:13:9: warning: [-Wunused-local-binds (in -Wextra, -Wunused-binds)]
+rn063.hs:13:9: warning: [GHC-40910] [-Wunused-local-binds (in -Wextra, -Wunused-binds)]
Defined but not used: ‘y’
diff --git a/testsuite/tests/rename/should_compile/unused_haddock.stderr b/testsuite/tests/rename/should_compile/unused_haddock.stderr
index b705fed36b..0b25f06381 100644
--- a/testsuite/tests/rename/should_compile/unused_haddock.stderr
+++ b/testsuite/tests/rename/should_compile/unused_haddock.stderr
@@ -1,3 +1,3 @@
-unused_haddock.hs:4:1: warning: [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
+unused_haddock.hs:4:1: warning: [GHC-40910] [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
Defined but not used: ‘foo’
diff --git a/testsuite/tests/rename/should_fail/T11167_ambig.stderr b/testsuite/tests/rename/should_fail/T11167_ambig.stderr
index 74c7064414..f23a644772 100644
--- a/testsuite/tests/rename/should_fail/T11167_ambig.stderr
+++ b/testsuite/tests/rename/should_fail/T11167_ambig.stderr
@@ -1,5 +1,5 @@
-T11167_ambig.hs:10:13: error:
+T11167_ambig.hs:10:13: error: [GHC-87543]
Ambiguous occurrence ‘runContT’
It could refer to
either the field ‘runContT’ of record ‘ContT’,
@@ -7,7 +7,7 @@ T11167_ambig.hs:10:13: error:
or the field ‘runContT’ of record ‘ContT'’,
defined at T11167_ambig.hs:7:32
-T11167_ambig.hs:17:9: error:
+T11167_ambig.hs:17:9: error: [GHC-87543]
Ambiguous occurrence ‘runContT’
It could refer to
either the field ‘runContT’ of record ‘ContT’,
diff --git a/testsuite/tests/rename/should_fail/T13644.stderr b/testsuite/tests/rename/should_fail/T13644.stderr
index 8443993fd1..64f9abac00 100644
--- a/testsuite/tests/rename/should_fail/T13644.stderr
+++ b/testsuite/tests/rename/should_fail/T13644.stderr
@@ -1,5 +1,5 @@
-T13644.hs:6:24: error:
+T13644.hs:6:24: error: [GHC-53822]
• Constructor ‘FuncId’ does not have field ‘name’
• In the pattern: FuncId {name = nm}
In an equation for ‘baseENDECfuncs’:
diff --git a/testsuite/tests/rename/should_fail/T13847.stderr b/testsuite/tests/rename/should_fail/T13847.stderr
index 52edbf5acf..8d8dff5f8a 100644
--- a/testsuite/tests/rename/should_fail/T13847.stderr
+++ b/testsuite/tests/rename/should_fail/T13847.stderr
@@ -1,5 +1,5 @@
-T13847.hs:4:24: error:
+T13847.hs:4:24: error: [GHC-53822]
• Constructor ‘A.A’ does not have field ‘foo’
• In the second argument of ‘($)’, namely ‘A.A {foo = ()}’
In the second argument of ‘($)’, namely ‘A.foo $ A.A {foo = ()}’
diff --git a/testsuite/tests/rename/should_fail/T15487.stderr b/testsuite/tests/rename/should_fail/T15487.stderr
index bb25939f4b..a02cbe40c2 100644
--- a/testsuite/tests/rename/should_fail/T15487.stderr
+++ b/testsuite/tests/rename/should_fail/T15487.stderr
@@ -1,5 +1,5 @@
-T15487.hs:7:9: error:
+T15487.hs:7:9: error: [GHC-87543]
Ambiguous occurrence ‘null’
It could refer to
either ‘Prelude.null’,
diff --git a/testsuite/tests/rename/should_fail/T15957_Fail.stderr b/testsuite/tests/rename/should_fail/T15957_Fail.stderr
index 4032c32814..71d9b47036 100644
--- a/testsuite/tests/rename/should_fail/T15957_Fail.stderr
+++ b/testsuite/tests/rename/should_fail/T15957_Fail.stderr
@@ -1,36 +1,36 @@
-T15957_Fail.hs:7:6: error: [-Wunused-record-wildcards (in -Wall), Werror=unused-record-wildcards]
+T15957_Fail.hs:7:6: error: [GHC-83475] [-Wunused-record-wildcards (in -Wall), Werror=unused-record-wildcards]
No variables bound in the record wildcard match are used
- Possible fix: omit the ‘..’
+ Suggested fix: Omit the ‘..’
-T15957_Fail.hs:8:9: error: [-Wunused-record-wildcards (in -Wall), Werror=unused-record-wildcards]
+T15957_Fail.hs:8:9: error: [GHC-83475] [-Wunused-record-wildcards (in -Wall), Werror=unused-record-wildcards]
No variables bound in the record wildcard match are used
- Possible fix: omit the ‘..’
+ Suggested fix: Omit the ‘..’
-T15957_Fail.hs:9:12: error: [-Wredundant-record-wildcards (in -Wall), Werror=redundant-record-wildcards]
+T15957_Fail.hs:9:12: error: [GHC-15932] [-Wredundant-record-wildcards (in -Wall), Werror=redundant-record-wildcards]
Record wildcard does not bind any new variables
- Possible fix: omit the ‘..’
+ Suggested fix: Omit the ‘..’
-T15957_Fail.hs:11:11: error: [-Wunused-record-wildcards (in -Wall), Werror=unused-record-wildcards]
+T15957_Fail.hs:11:11: error: [GHC-83475] [-Wunused-record-wildcards (in -Wall), Werror=unused-record-wildcards]
No variables bound in the record wildcard match are used
- Possible fix: omit the ‘..’
+ Suggested fix: Omit the ‘..’
-T15957_Fail.hs:12:16: error: [-Wredundant-record-wildcards (in -Wall), Werror=redundant-record-wildcards]
+T15957_Fail.hs:12:16: error: [GHC-15932] [-Wredundant-record-wildcards (in -Wall), Werror=redundant-record-wildcards]
Record wildcard does not bind any new variables
- Possible fix: omit the ‘..’
+ Suggested fix: Omit the ‘..’
-T15957_Fail.hs:13:15: error: [-Wredundant-record-wildcards (in -Wall), Werror=redundant-record-wildcards]
+T15957_Fail.hs:13:15: error: [GHC-15932] [-Wredundant-record-wildcards (in -Wall), Werror=redundant-record-wildcards]
Record wildcard does not bind any new variables
- Possible fix: omit the ‘..’
+ Suggested fix: Omit the ‘..’
-T15957_Fail.hs:20:9: error: [-Wunused-record-wildcards (in -Wall), Werror=unused-record-wildcards]
+T15957_Fail.hs:20:9: error: [GHC-83475] [-Wunused-record-wildcards (in -Wall), Werror=unused-record-wildcards]
No variables bound in the record wildcard match are used
- Possible fix: omit the ‘..’
+ Suggested fix: Omit the ‘..’
-T15957_Fail.hs:25:9: error: [-Wunused-record-wildcards (in -Wall), Werror=unused-record-wildcards]
+T15957_Fail.hs:25:9: error: [GHC-83475] [-Wunused-record-wildcards (in -Wall), Werror=unused-record-wildcards]
No variables bound in the record wildcard match are used
- Possible fix: omit the ‘..’
+ Suggested fix: Omit the ‘..’
-T15957_Fail.hs:31:18: error: [-Wunused-record-wildcards (in -Wall), Werror=unused-record-wildcards]
+T15957_Fail.hs:31:18: error: [GHC-83475] [-Wunused-record-wildcards (in -Wall), Werror=unused-record-wildcards]
No variables bound in the record wildcard match are used
- Possible fix: omit the ‘..’
+ Suggested fix: Omit the ‘..’
diff --git a/testsuite/tests/rename/should_fail/T16114.stderr b/testsuite/tests/rename/should_fail/T16114.stderr
index adbaffc0ef..8ed4db8192 100644
--- a/testsuite/tests/rename/should_fail/T16114.stderr
+++ b/testsuite/tests/rename/should_fail/T16114.stderr
@@ -1,4 +1,4 @@
-T16114.hs:4:18: error:
+T16114.hs:4:18: error: [GHC-71492]
Instance head cannot contain nested ‘forall’s or contexts
In an instance declaration
diff --git a/testsuite/tests/rename/should_fail/T18240a.stderr b/testsuite/tests/rename/should_fail/T18240a.stderr
index 165ede31c6..09132691fd 100644
--- a/testsuite/tests/rename/should_fail/T18240a.stderr
+++ b/testsuite/tests/rename/should_fail/T18240a.stderr
@@ -1,30 +1,30 @@
-T18240a.hs:11:11: error:
+T18240a.hs:11:11: error: [GHC-71492]
• Instance head cannot contain nested ‘forall’s or contexts
• In an instance declaration
T18240a.hs:12:15: error: [GHC-76037]
Not in scope: type variable ‘a’
-T18240a.hs:14:11: error:
+T18240a.hs:14:11: error: [GHC-71492]
• Instance head cannot contain nested ‘forall’s or contexts
• In an instance declaration
-T18240a.hs:17:11: error:
+T18240a.hs:17:11: error: [GHC-71492]
• Instance head cannot contain nested ‘forall’s or contexts
• In an instance declaration
T18240a.hs:18:22: error: [GHC-76037]
Not in scope: type variable ‘a’
-T18240a.hs:20:21: error:
+T18240a.hs:20:21: error: [GHC-71492]
• Instance head cannot contain nested ‘forall’s or contexts
• In an instance declaration
T18240a.hs:21:24: error: [GHC-76037]
Not in scope: type variable ‘b’
-T18240a.hs:23:19: error:
+T18240a.hs:23:19: error: [GHC-71492]
• Instance head cannot contain nested ‘forall’s or contexts
• In an instance declaration
diff --git a/testsuite/tests/rename/should_fail/T18240b.stderr b/testsuite/tests/rename/should_fail/T18240b.stderr
index 330e5cc72f..062f0b2343 100644
--- a/testsuite/tests/rename/should_fail/T18240b.stderr
+++ b/testsuite/tests/rename/should_fail/T18240b.stderr
@@ -1,24 +1,24 @@
-T18240b.hs:17:15: error:
+T18240b.hs:17:15: error: [GHC-71492]
‘via’ type cannot contain nested ‘forall’s or contexts
In a deriving declaration
-T18240b.hs:18:24: error:
+T18240b.hs:18:24: error: [GHC-71492]
‘via’ type cannot contain nested ‘forall’s or contexts
In a deriving declaration
-T18240b.hs:19:25: error:
+T18240b.hs:19:25: error: [GHC-71492]
‘via’ type cannot contain nested ‘forall’s or contexts
In a deriving declaration
-T18240b.hs:26:24: error:
+T18240b.hs:26:24: error: [GHC-71492]
Derived class type cannot contain nested ‘forall’s or contexts
In the data type declaration for ‘Bar’
-T18240b.hs:27:33: error:
+T18240b.hs:27:33: error: [GHC-71492]
Derived class type cannot contain nested ‘forall’s or contexts
In the data type declaration for ‘Bar’
-T18240b.hs:28:34: error:
+T18240b.hs:28:34: error: [GHC-71492]
Derived class type cannot contain nested ‘forall’s or contexts
In the data type declaration for ‘Bar’
diff --git a/testsuite/tests/rename/should_fail/T5951.stderr b/testsuite/tests/rename/should_fail/T5951.stderr
index f98fb501ed..19d849c8f7 100644
--- a/testsuite/tests/rename/should_fail/T5951.stderr
+++ b/testsuite/tests/rename/should_fail/T5951.stderr
@@ -1,4 +1,4 @@
-T5951.hs:9:8: error:
+T5951.hs:9:8: error: [GHC-71492]
Instance head cannot contain nested ‘forall’s or contexts
In an instance declaration
diff --git a/testsuite/tests/rename/should_fail/T6148a.stderr b/testsuite/tests/rename/should_fail/T6148a.stderr
index e287636d4d..6160fbf3df 100644
--- a/testsuite/tests/rename/should_fail/T6148a.stderr
+++ b/testsuite/tests/rename/should_fail/T6148a.stderr
@@ -1,5 +1,5 @@
-T6148a.hs:3:5: error:
+T6148a.hs:3:5: error: [GHC-94803]
• A 65-tuple is too large for GHC
(max size is 64)
Workaround: use nested tuples or define a data type
diff --git a/testsuite/tests/rename/should_fail/T6148b.stderr b/testsuite/tests/rename/should_fail/T6148b.stderr
index 3c5afcd085..29d79e8179 100644
--- a/testsuite/tests/rename/should_fail/T6148b.stderr
+++ b/testsuite/tests/rename/should_fail/T6148b.stderr
@@ -1,5 +1,5 @@
-T6148b.hs:3:5: error:
+T6148b.hs:3:5: error: [GHC-94803]
A 65-tuple is too large for GHC
(max size is 64)
Workaround: use nested tuples or define a data type
diff --git a/testsuite/tests/rename/should_fail/T6148c.stderr b/testsuite/tests/rename/should_fail/T6148c.stderr
index a11d23ccac..8a2bad5559 100644
--- a/testsuite/tests/rename/should_fail/T6148c.stderr
+++ b/testsuite/tests/rename/should_fail/T6148c.stderr
@@ -1,5 +1,5 @@
-T6148c.hs:5:6: error:
+T6148c.hs:5:6: error: [GHC-94803]
A 65-tuple is too large for GHC
(max size is 64)
Workaround: use nested tuples or define a data type
diff --git a/testsuite/tests/rename/should_fail/T6148d.stderr b/testsuite/tests/rename/should_fail/T6148d.stderr
index 774c96e540..f7f132bf28 100644
--- a/testsuite/tests/rename/should_fail/T6148d.stderr
+++ b/testsuite/tests/rename/should_fail/T6148d.stderr
@@ -1,26 +1,26 @@
-T6148d.hs:5:6: error:
+T6148d.hs:5:6: error: [GHC-94803]
• A 65-tuple is too large for GHC
(max size is 64)
Workaround: use nested tuples or define a data type
• In the Template Haskell quotation
''(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,)
-T6148d.hs:6:6: error:
+T6148d.hs:6:6: error: [GHC-94803]
• A 65-tuple is too large for GHC
(max size is 64)
Workaround: use nested tuples or define a data type
• In the Template Haskell quotation
'(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,)
-T6148d.hs:7:6: error:
+T6148d.hs:7:6: error: [GHC-94803]
• A 65-tuple is too large for GHC
(max size is 64)
Workaround: use nested tuples or define a data type
• In the Template Haskell quotation
''(#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#)
-T6148d.hs:8:6: error:
+T6148d.hs:8:6: error: [GHC-94803]
• A 65-tuple is too large for GHC
(max size is 64)
Workaround: use nested tuples or define a data type
diff --git a/testsuite/tests/rename/should_fail/T8448.stderr b/testsuite/tests/rename/should_fail/T8448.stderr
index 1b3ee56f47..1201817853 100644
--- a/testsuite/tests/rename/should_fail/T8448.stderr
+++ b/testsuite/tests/rename/should_fail/T8448.stderr
@@ -1,2 +1,3 @@
-T8448.hs:5:21: error: Constructor ‘[]’ does not have field ‘r’
+T8448.hs:5:21: error: [GHC-53822]
+ Constructor ‘[]’ does not have field ‘r’
diff --git a/testsuite/tests/rename/should_fail/rnfail001.stderr b/testsuite/tests/rename/should_fail/rnfail001.stderr
index 3046ff10a1..a27ef00de3 100644
--- a/testsuite/tests/rename/should_fail/rnfail001.stderr
+++ b/testsuite/tests/rename/should_fail/rnfail001.stderr
@@ -1,5 +1,5 @@
-rnfail001.hs:3:3:
+rnfail001.hs:3:3: [GHC-10498]
Conflicting definitions for ‘x’
Bound at: rnfail001.hs:3:3
rnfail001.hs:3:5
diff --git a/testsuite/tests/rename/should_fail/rnfail004.stderr b/testsuite/tests/rename/should_fail/rnfail004.stderr
index 6e9a61f6ea..93322679a5 100644
--- a/testsuite/tests/rename/should_fail/rnfail004.stderr
+++ b/testsuite/tests/rename/should_fail/rnfail004.stderr
@@ -1,10 +1,10 @@
-rnfail004.hs:6:5:
+rnfail004.hs:6:5: [GHC-10498]
Conflicting definitions for ‘a’
Bound at: rnfail004.hs:6:5
rnfail004.hs:7:10
-rnfail004.hs:7:6:
+rnfail004.hs:7:6: [GHC-10498]
Conflicting definitions for ‘b’
Bound at: rnfail004.hs:7:6
rnfail004.hs:8:8
diff --git a/testsuite/tests/rename/should_fail/rnfail021.stderr b/testsuite/tests/rename/should_fail/rnfail021.stderr
index 1cf26eca36..5cb2e4ac13 100644
--- a/testsuite/tests/rename/should_fail/rnfail021.stderr
+++ b/testsuite/tests/rename/should_fail/rnfail021.stderr
@@ -1,2 +1,2 @@
-rnfail021.hs:5:2: Qualified name in binding position: Baz.f
+rnfail021.hs:5:2: [GHC-28329] Qualified name in binding position: Baz.f
diff --git a/testsuite/tests/rename/should_fail/rnfail034.stderr b/testsuite/tests/rename/should_fail/rnfail034.stderr
index f385539f79..4c7113f20c 100644
--- a/testsuite/tests/rename/should_fail/rnfail034.stderr
+++ b/testsuite/tests/rename/should_fail/rnfail034.stderr
@@ -1,5 +1,5 @@
-rnfail034.hs:4:11: error: Qualified name in binding position: M.y
+rnfail034.hs:4:11: error: [GHC-28329] Qualified name in binding position: M.y
rnfail034.hs:4:26: error: [GHC-76037]
Not in scope: ‘M.y’
diff --git a/testsuite/tests/rename/should_fail/rnfail039.stderr b/testsuite/tests/rename/should_fail/rnfail039.stderr
index 6283dccd33..31001fccab 100644
--- a/testsuite/tests/rename/should_fail/rnfail039.stderr
+++ b/testsuite/tests/rename/should_fail/rnfail039.stderr
@@ -1,2 +1,2 @@
-rnfail039.hs:11:15: Qualified name in binding position: P.==
+rnfail039.hs:11:15: [GHC-28329] Qualified name in binding position: P.==
diff --git a/testsuite/tests/rename/should_fail/rnfail044.stderr b/testsuite/tests/rename/should_fail/rnfail044.stderr
index 39f7b77056..795cee0dfa 100644
--- a/testsuite/tests/rename/should_fail/rnfail044.stderr
+++ b/testsuite/tests/rename/should_fail/rnfail044.stderr
@@ -1,5 +1,5 @@
-rnfail044.hs:5:12: error:
+rnfail044.hs:5:12: error: [GHC-87543]
Ambiguous occurrence ‘splitAt’
It could refer to
either ‘Prelude.splitAt’,
diff --git a/testsuite/tests/rename/should_fail/rnfail046.stderr b/testsuite/tests/rename/should_fail/rnfail046.stderr
index 49cfe356f4..b298acc610 100644
--- a/testsuite/tests/rename/should_fail/rnfail046.stderr
+++ b/testsuite/tests/rename/should_fail/rnfail046.stderr
@@ -1,2 +1,2 @@
-rnfail046.hs:4:13: Qualified name in binding position: Map.Map
+rnfail046.hs:4:13: [GHC-28329] Qualified name in binding position: Map.Map
diff --git a/testsuite/tests/runghc/T17171b.stderr b/testsuite/tests/runghc/T17171b.stderr
index 088a4eca00..78095c52bf 100644
--- a/testsuite/tests/runghc/T17171b.stderr
+++ b/testsuite/tests/runghc/T17171b.stderr
@@ -1,5 +1,5 @@
-T17171b.hs:4:1: warning: [-Wunused-top-binds]
+T17171b.hs:4:1: warning: [GHC-40910] [-Wunused-top-binds]
Defined but not used: ‘main’
|
4 | main = putStrLn "NoMain"
diff --git a/testsuite/tests/th/T12411.stderr b/testsuite/tests/th/T12411.stderr
index be5f843ee2..4f1f9861a9 100644
--- a/testsuite/tests/th/T12411.stderr
+++ b/testsuite/tests/th/T12411.stderr
@@ -1,7 +1,7 @@
-T12411.hs:5:1: error:
+T12411.hs:5:1: error: [GHC-23482]
Illegal visible type application ‘@Q’
- Perhaps you intended to use TypeApplications
+ Suggested fix: Perhaps you intended to use TypeApplications
T12411.hs:5:7: error: [GHC-76037]
Not in scope: type constructor or class ‘Q’
diff --git a/testsuite/tests/th/T16133.stderr b/testsuite/tests/th/T16133.stderr
index 840f9f066f..f9e0e5326b 100644
--- a/testsuite/tests/th/T16133.stderr
+++ b/testsuite/tests/th/T16133.stderr
@@ -1,8 +1,8 @@
-T16133.hs:11:2: error:
+T16133.hs:11:2: error: [GHC-23482]
Illegal visible type application ‘@Int’
- Perhaps you intended to use TypeApplications
+ Suggested fix: Perhaps you intended to use TypeApplications
-T16133.hs:11:2: error:
+T16133.hs:11:2: error: [GHC-23482]
Illegal visible kind application ‘@Type’
- Perhaps you intended to use TypeApplications
+ Suggested fix: Perhaps you intended to use TypeApplications
diff --git a/testsuite/tests/th/TH_recover_warns.stderr b/testsuite/tests/th/TH_recover_warns.stderr
index 848f1b1380..a9a7c39a65 100644
--- a/testsuite/tests/th/TH_recover_warns.stderr
+++ b/testsuite/tests/th/TH_recover_warns.stderr
@@ -4,10 +4,10 @@ TH_recover_warns.hs:(9,18)-(10,64): Splicing expression
======>
let x = "a" in let x = "b" in x
-TH_recover_warns.hs:9:18: warning: [-Wunused-local-binds (in -Wextra, -Wunused-binds)]
+TH_recover_warns.hs:9:18: warning: [GHC-40910] [-Wunused-local-binds (in -Wextra, -Wunused-binds)]
Defined but not used: ‘x’
-TH_recover_warns.hs:10:34: warning: [-Wunused-local-binds (in -Wextra, -Wunused-binds)]
+TH_recover_warns.hs:10:34: warning: [GHC-40910] [-Wunused-local-binds (in -Wextra, -Wunused-binds)]
Defined but not used: ‘x’
TH_recover_warns.hs:10:49: warning: [GHC-63397] [-Wname-shadowing (in -Wall)]
diff --git a/testsuite/tests/th/TH_spliceD1.stderr b/testsuite/tests/th/TH_spliceD1.stderr
index 77ae873562..041f573a4b 100644
--- a/testsuite/tests/th/TH_spliceD1.stderr
+++ b/testsuite/tests/th/TH_spliceD1.stderr
@@ -1,5 +1,5 @@
-TH_spliceD1.hs:10:2: error:
+TH_spliceD1.hs:10:2: error: [GHC-10498]
• Conflicting definitions for ‘c’
Bound at: TH_spliceD1.hs:10:2-6
TH_spliceD1.hs:10:2-6
diff --git a/testsuite/tests/typecheck/should_compile/T18470.stderr b/testsuite/tests/typecheck/should_compile/T18470.stderr
index ffefb020d3..7d43e3c1c1 100644
--- a/testsuite/tests/typecheck/should_compile/T18470.stderr
+++ b/testsuite/tests/typecheck/should_compile/T18470.stderr
@@ -1,3 +1,3 @@
-T18470.hs:6:1: warning: [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
+T18470.hs:6:1: warning: [GHC-40910] [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
Defined but not used: type constructor or class ‘Closed’
diff --git a/testsuite/tests/typecheck/should_compile/T2497.stderr b/testsuite/tests/typecheck/should_compile/T2497.stderr
index 581008128b..43ed0fa72f 100644
--- a/testsuite/tests/typecheck/should_compile/T2497.stderr
+++ b/testsuite/tests/typecheck/should_compile/T2497.stderr
@@ -1,3 +1,3 @@
-T2497.hs:22:1: warning: [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
+T2497.hs:22:1: warning: [GHC-40910] [-Wunused-top-binds (in -Wextra, -Wunused-binds)]
Defined but not used: ‘beq’
diff --git a/testsuite/tests/typecheck/should_fail/ExplicitSpecificity5.stderr b/testsuite/tests/typecheck/should_fail/ExplicitSpecificity5.stderr
index c8fa860a57..270a1561c6 100644
--- a/testsuite/tests/typecheck/should_fail/ExplicitSpecificity5.stderr
+++ b/testsuite/tests/typecheck/should_fail/ExplicitSpecificity5.stderr
@@ -1,4 +1,4 @@
-ExplicitSpecificity5.hs:7:1: error:
+ExplicitSpecificity5.hs:7:1: error: [GHC-54832]
Inferred type variables are not allowed
In an instance declaration
diff --git a/testsuite/tests/typecheck/should_fail/ExplicitSpecificity6.stderr b/testsuite/tests/typecheck/should_fail/ExplicitSpecificity6.stderr
index 326c9b2ae9..db62abcb4b 100644
--- a/testsuite/tests/typecheck/should_fail/ExplicitSpecificity6.stderr
+++ b/testsuite/tests/typecheck/should_fail/ExplicitSpecificity6.stderr
@@ -1,8 +1,8 @@
-ExplicitSpecificity6.hs:8:1: error:
+ExplicitSpecificity6.hs:8:1: error: [GHC-54832]
Inferred type variables are not allowed
In an instance declaration
-ExplicitSpecificity6.hs:9:3: error:
+ExplicitSpecificity6.hs:9:3: error: [GHC-54832]
Inferred type variables are not allowed
In a SPECIALISE instance pragma
diff --git a/testsuite/tests/typecheck/should_fail/ExplicitSpecificity9.stderr b/testsuite/tests/typecheck/should_fail/ExplicitSpecificity9.stderr
index 59bb56cf66..d61d6eeef0 100644
--- a/testsuite/tests/typecheck/should_fail/ExplicitSpecificity9.stderr
+++ b/testsuite/tests/typecheck/should_fail/ExplicitSpecificity9.stderr
@@ -1,4 +1,4 @@
-ExplicitSpecificity9.hs:6:1: error:
+ExplicitSpecificity9.hs:6:1: error: [GHC-54832]
Inferred type variables are not allowed
In a deriving declaration
diff --git a/testsuite/tests/typecheck/should_fail/T15527.stderr b/testsuite/tests/typecheck/should_fail/T15527.stderr
index 6729c26bd5..a71f82583a 100644
--- a/testsuite/tests/typecheck/should_fail/T15527.stderr
+++ b/testsuite/tests/typecheck/should_fail/T15527.stderr
@@ -1,4 +1,4 @@
-T15527.hs:5:6: error:
+T15527.hs:5:6: error: [GHC-23482]
Illegal visible type application ‘@Int’
- Perhaps you intended to use TypeApplications
+ Suggested fix: Perhaps you intended to use TypeApplications
diff --git a/testsuite/tests/typecheck/should_fail/T16394.stderr b/testsuite/tests/typecheck/should_fail/T16394.stderr
index 74e5c25ef5..af8384ccfe 100644
--- a/testsuite/tests/typecheck/should_fail/T16394.stderr
+++ b/testsuite/tests/typecheck/should_fail/T16394.stderr
@@ -1,4 +1,4 @@
-T16394.hs:6:17: error:
+T16394.hs:6:17: error: [GHC-71492]
Instance head cannot contain nested ‘forall’s or contexts
In an instance declaration
diff --git a/testsuite/tests/typecheck/should_fail/T18455.stderr b/testsuite/tests/typecheck/should_fail/T18455.stderr
index 15d02d1902..909388c0cc 100644
--- a/testsuite/tests/typecheck/should_fail/T18455.stderr
+++ b/testsuite/tests/typecheck/should_fail/T18455.stderr
@@ -1,4 +1,4 @@
-T18455.hs:7:37: error:
+T18455.hs:7:37: error: [GHC-71492]
SPECIALISE instance type cannot contain nested ‘forall’s or contexts
In a SPECIALISE instance pragma
diff --git a/testsuite/tests/typecheck/should_fail/T18723a.stderr b/testsuite/tests/typecheck/should_fail/T18723a.stderr
index cb599b3737..4a46a5b84d 100644
--- a/testsuite/tests/typecheck/should_fail/T18723a.stderr
+++ b/testsuite/tests/typecheck/should_fail/T18723a.stderr
@@ -1,5 +1,5 @@
-T18723a.hs:4:3: error:
+T18723a.hs:4:3: error: [GHC-94803]
• A 65-tuple is too large for GHC
(max size is 64)
Workaround: use nested tuples or define a data type
diff --git a/testsuite/tests/typecheck/should_fail/T18723b.stderr b/testsuite/tests/typecheck/should_fail/T18723b.stderr
index f0f8936b5d..0b0f62743e 100644
--- a/testsuite/tests/typecheck/should_fail/T18723b.stderr
+++ b/testsuite/tests/typecheck/should_fail/T18723b.stderr
@@ -1,5 +1,5 @@
-T18723b.hs:7:2: error:
+T18723b.hs:7:2: error: [GHC-94803]
• A 65-tuple is too large for GHC
(max size is 64)
Workaround: use nested tuples or define a data type
diff --git a/testsuite/tests/typecheck/should_fail/T18723c.stderr b/testsuite/tests/typecheck/should_fail/T18723c.stderr
index d1245b7758..2b9fd76759 100644
--- a/testsuite/tests/typecheck/should_fail/T18723c.stderr
+++ b/testsuite/tests/typecheck/should_fail/T18723c.stderr
@@ -1,5 +1,5 @@
-T18723c.hs:5:2: error:
+T18723c.hs:5:2: error: [GHC-94803]
• A 65-tuple is too large for GHC
(max size is 64)
Workaround: use nested tuples or define a data type
diff --git a/testsuite/tests/typecheck/should_fail/T19397E1.stderr b/testsuite/tests/typecheck/should_fail/T19397E1.stderr
index 00c13f2eca..066b8f1da4 100644
--- a/testsuite/tests/typecheck/should_fail/T19397E1.stderr
+++ b/testsuite/tests/typecheck/should_fail/T19397E1.stderr
@@ -1,5 +1,5 @@
-T19397E1.hs:1:14: error:
+T19397E1.hs:1:14: error: [GHC-87543]
Ambiguous occurrence ‘main’
It could refer to
either ‘T19397S.main’,
diff --git a/testsuite/tests/typecheck/should_fail/T19397E2.stderr b/testsuite/tests/typecheck/should_fail/T19397E2.stderr
index 4fc5073310..a66e6170ca 100644
--- a/testsuite/tests/typecheck/should_fail/T19397E2.stderr
+++ b/testsuite/tests/typecheck/should_fail/T19397E2.stderr
@@ -1,5 +1,5 @@
-T19397E2.hs:1:1: error:
+T19397E2.hs:1:1: error: [GHC-87543]
Ambiguous occurrence ‘main’
It could refer to
either ‘T19397S.main’,
diff --git a/testsuite/tests/typecheck/should_fail/T8570.stderr b/testsuite/tests/typecheck/should_fail/T8570.stderr
index 183001b577..d8227507e5 100644
--- a/testsuite/tests/typecheck/should_fail/T8570.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8570.stderr
@@ -1,5 +1,5 @@
-T8570.hs:6:18: error:
+T8570.hs:6:18: error: [GHC-53822]
• Constructor ‘Image’ does not have field ‘filepath’
• In the pattern: Image {filepath = x}
In a pattern binding: Image {filepath = x} = logo
diff --git a/testsuite/tests/typecheck/should_fail/tcfail037.stderr b/testsuite/tests/typecheck/should_fail/tcfail037.stderr
index efe7445573..60432d8626 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail037.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail037.stderr
@@ -1,5 +1,5 @@
-tcfail037.hs:7:11: error:
+tcfail037.hs:7:11: error: [GHC-87543]
Ambiguous occurrence ‘+’
It could refer to either ‘Prelude.+’,
imported from ‘Prelude’ at tcfail037.hs:3:8-17
diff --git a/testsuite/tests/typecheck/should_fail/tcfail038.stderr b/testsuite/tests/typecheck/should_fail/tcfail038.stderr
index 2d3e9e5bc9..72911531d8 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail038.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail038.stderr
@@ -1,10 +1,10 @@
-tcfail038.hs:7:11:
+tcfail038.hs:7:11: [GHC-10498]
Conflicting definitions for ‘==’
Bound at: tcfail038.hs:7:11-12
tcfail038.hs:9:11-12
-tcfail038.hs:8:11:
+tcfail038.hs:8:11: [GHC-10498]
Conflicting definitions for ‘/=’
Bound at: tcfail038.hs:8:11-12
tcfail038.hs:10:11-12
diff --git a/testsuite/tests/typecheck/should_fail/tcfail083.stderr b/testsuite/tests/typecheck/should_fail/tcfail083.stderr
index badd43909d..843fbc47c1 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail083.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail083.stderr
@@ -1,5 +1,5 @@
-tcfail083.hs:8:39:
+tcfail083.hs:8:39: [GHC-53822]
Constructor ‘Bar’ does not have field ‘baz’
In the pattern: Bar {flag = f, baz = b}
In the pattern: State {bar = Bar {flag = f, baz = b}}
diff --git a/testsuite/tests/typecheck/should_fail/tcfail084.stderr b/testsuite/tests/typecheck/should_fail/tcfail084.stderr
index df09cd91be..44ec1169b1 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail084.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail084.stderr
@@ -1,5 +1,5 @@
-tcfail084.hs:10:5:
+tcfail084.hs:10:5: [GHC-53822]
Constructor ‘F’ does not have field ‘y’
In the expression: F {y = 2}
In an equation for ‘z’: z = F {y = 2}
diff --git a/testsuite/tests/warnings/should_fail/WarningGroups.stderr b/testsuite/tests/warnings/should_fail/WarningGroups.stderr
index 8e9cedb07e..bebbf547a3 100644
--- a/testsuite/tests/warnings/should_fail/WarningGroups.stderr
+++ b/testsuite/tests/warnings/should_fail/WarningGroups.stderr
@@ -2,8 +2,8 @@
WarningGroups.hs:4:1: warning: [GHC-38417] [-Wmissing-signatures (in -Wall)]
Top-level binding with no type signature: unused :: ()
-WarningGroups.hs:4:1: error: [-Wunused-top-binds (in -Wextra, -Wunused-binds), Werror=unused-top-binds]
+WarningGroups.hs:4:1: error: [GHC-40910] [-Wunused-top-binds (in -Wextra, -Wunused-binds), Werror=unused-top-binds]
Defined but not used: ‘unused’
-WarningGroups.hs:4:14: error: [-Wunused-local-binds (in -Wextra, -Wunused-binds), Werror=unused-local-binds]
+WarningGroups.hs:4:14: error: [GHC-40910] [-Wunused-local-binds (in -Wextra, -Wunused-binds), Werror=unused-local-binds]
Defined but not used: ‘useless’