summaryrefslogtreecommitdiff
path: root/compiler/GHC/Rename
diff options
context:
space:
mode:
authorAlfredo Di Napoli <alfredo@well-typed.com>2021-07-06 09:56:45 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-07-09 08:46:44 -0400
commit558724237b978ab2293a62ee48fe2b2f603a6791 (patch)
tree4d8c615cf09af0de214f26ffed88f55593c98ed6 /compiler/GHC/Rename
parent573012c7be49e24ec09a88e078fd22f62f9a4b1d (diff)
downloadhaskell-558724237b978ab2293a62ee48fe2b2f603a6791.tar.gz
Add the TcRnDuplicateWarningDecls to TcRnMessage
Diffstat (limited to 'compiler/GHC/Rename')
-rw-r--r--compiler/GHC/Rename/Module.hs9
1 files changed, 1 insertions, 8 deletions
diff --git a/compiler/GHC/Rename/Module.hs b/compiler/GHC/Rename/Module.hs
index ef9769c5a7..c99098963b 100644
--- a/compiler/GHC/Rename/Module.hs
+++ b/compiler/GHC/Rename/Module.hs
@@ -270,7 +270,7 @@ rnSrcWarnDecls _ []
rnSrcWarnDecls bndr_set decls'
= do { -- check for duplicates
; mapM_ (\ dups -> let ((L loc rdr) :| (lrdr':_)) = dups
- in addErrAt (locA loc) (dupWarnDecl lrdr' rdr))
+ in addErrAt (locA loc) (TcRnDuplicateWarningDecls lrdr' rdr))
warn_rdr_dups
; pairs_s <- mapM (addLocMA rn_deprec) decls
; return (WarnSome ((concat pairs_s))) }
@@ -297,13 +297,6 @@ findDupRdrNames = findDupsEq (\ x -> \ y -> rdrNameOcc (unLoc x) == rdrNameOcc (
-- we check that the names are defined above
-- invt: the lists returned by findDupsEq always have at least two elements
-dupWarnDecl :: LocatedN RdrName -> RdrName -> TcRnMessage
--- Located RdrName -> DeprecDecl RdrName -> SDoc
-dupWarnDecl d rdr_name
- = TcRnUnknownMessage $ mkPlainError noHints $
- vcat [text "Multiple warning declarations for" <+> quotes (ppr rdr_name),
- text "also at " <+> ppr (getLocA d)]
-
{-
*********************************************************
* *