summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/TyCl/Instance.hs
diff options
context:
space:
mode:
authorGiles Anderson <agander@gmail.com>2022-07-09 21:25:35 +0200
committerGiles Anderson <agander@gmail.com>2022-08-29 00:01:35 +0200
commit68e6786f3d1bde5d044a649462cdf2b6034a2df8 (patch)
treebfed2de821fe4432480081ff0203b5e518dc0ebb /compiler/GHC/Tc/TyCl/Instance.hs
parent161a6f1fd62e797e978e7808a5f567fefa123f16 (diff)
downloadhaskell-68e6786f3d1bde5d044a649462cdf2b6034a2df8.tar.gz
Use TcRnDiagnostic in GHC.Tc.TyCl.Class (#20117)
The following `TcRnDiagnostic` messages have been introduced: TcRnIllegalHsigDefaultMethods TcRnBadGenericMethod TcRnWarningMinimalDefIncomplete TcRnDefaultMethodForPragmaLacksBinding TcRnIgnoreSpecialisePragmaOnDefMethod TcRnBadMethodErr TcRnNoExplicitAssocTypeOrDefaultDeclaration
Diffstat (limited to 'compiler/GHC/Tc/TyCl/Instance.hs')
-rw-r--r--compiler/GHC/Tc/TyCl/Instance.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/GHC/Tc/TyCl/Instance.hs b/compiler/GHC/Tc/TyCl/Instance.hs
index cc7dc750d5..da85cd0881 100644
--- a/compiler/GHC/Tc/TyCl/Instance.hs
+++ b/compiler/GHC/Tc/TyCl/Instance.hs
@@ -27,8 +27,8 @@ import GHC.Tc.Gen.Bind
import GHC.Tc.TyCl
import GHC.Tc.TyCl.Utils ( addTyConsToGblEnv )
import GHC.Tc.TyCl.Class ( tcClassDecl2, tcATDefault,
- HsSigFun, mkHsSigFun, badMethodErr,
- findMethodBind, instantiateMethod )
+ HsSigFun, mkHsSigFun, findMethodBind,
+ instantiateMethod )
import GHC.Tc.Solver( pushLevelAndSolveEqualitiesX, reportUnsolvedEqualities )
import GHC.Tc.Gen.Sig
import GHC.Tc.Utils.Monad
@@ -1800,7 +1800,7 @@ tcMethods dfun_id clas tyvars dfun_ev_vars inst_tys
-- Check if any method bindings do not correspond to the class.
-- See Note [Mismatched class methods and associated type families].
checkMethBindMembership
- = mapM_ (addErrTc . badMethodErr clas) mismatched_meths
+ = mapM_ (addErrTc . TcRnBadMethodErr (className clas)) mismatched_meths
where
bind_nms = map unLoc $ collectMethodBinders binds
cls_meth_nms = map (idName . fst) op_items