summaryrefslogtreecommitdiff
path: root/compiler/rename/RnNames.lhs
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2010-12-19 19:40:32 +0000
committerIan Lynagh <igloo@earth.li>2010-12-19 19:40:32 +0000
commitd3541e298dbc79f6cc689cd72a3a3db9707e9d25 (patch)
tree4c3eb1655da99b4a2c95788b86ac4f4999e6ae47 /compiler/rename/RnNames.lhs
parent17ff3689c6926ffe029dad933d51d9fed20f1568 (diff)
downloadhaskell-d3541e298dbc79f6cc689cd72a3a3db9707e9d25.tar.gz
Small refactoring
Diffstat (limited to 'compiler/rename/RnNames.lhs')
-rw-r--r--compiler/rename/RnNames.lhs10
1 files changed, 4 insertions, 6 deletions
diff --git a/compiler/rename/RnNames.lhs b/compiler/rename/RnNames.lhs
index e8490ac63f..b5ed7d08c7 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 ;