X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Frename%2FRnNames.lhs;fp=compiler%2Frename%2FRnNames.lhs;h=b5ed7d08c77f4a1420b691c8cc546c44024669e2;hp=e8490ac63f6f02a0c1e2f24c6bffb05d4eab59cd;hb=d3541e298dbc79f6cc689cd72a3a3db9707e9d25;hpb=17ff3689c6926ffe029dad933d51d9fed20f1568 diff --git a/compiler/rename/RnNames.lhs b/compiler/rename/RnNames.lhs index e8490ac..b5ed7d0 100644 --- a/compiler/rename/RnNames.lhs +++ b/compiler/rename/RnNames.lhs @@ -1064,12 +1064,10 @@ check_occs ie occs names | name == name' -- Duplicate export -- But we don't want to warn if the same thing is exported -- by two different module exports. See ticket #4478. - -> if diffModules ie ie' - then return occs - else do - { warn_dup_exports <- doptM Opt_WarnDuplicateExports ; - warnIf warn_dup_exports (dupExportWarn name_occ ie ie') ; - return occs } + -> do unless (diffModules ie ie') $ do + warn_dup_exports <- doptM Opt_WarnDuplicateExports + warnIf warn_dup_exports (dupExportWarn name_occ ie ie') + return occs | otherwise -- Same occ name but different names: an error -> do { global_env <- getGlobalRdrEnv ;