Commit 8c847440 authored by simonpj's avatar simonpj
Browse files

[project @ 2000-05-24 13:36:10 by simonpj]

Only report shadowed names in source files (merge with 4.07)
parent 83a26483
......@@ -260,16 +260,16 @@ bindLocatedLocalsRn :: SDoc -- Documentation string for error message
bindLocatedLocalsRn doc_str rdr_names_w_loc enclosed_scope
= checkDupOrQualNames doc_str rdr_names_w_loc `thenRn_`
getModeRn `thenRn` \ mode ->
getLocalNameEnv `thenRn` \ name_env ->
(if opt_WarnNameShadowing
then
mapRn_ (check_shadow name_env) rdr_names_w_loc
else
returnRn ()
-- Warn about shadowing, but only in source modules
(case mode of
SourceMode | opt_WarnNameShadowing -> mapRn_ (check_shadow name_env) rdr_names_w_loc
other -> returnRn ()
) `thenRn_`
getNameSupplyRn `thenRn` \ (us, inst_ns, cache, ipcache) ->
getModeRn `thenRn` \ mode ->
let
n = length rdr_names_w_loc
(us', us1) = splitUniqSupply us
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment