+---------------------
+checkDupAndShadowedRdrNames :: [Located RdrName] -> RnM ()
+checkDupAndShadowedRdrNames loc_rdr_names
+ = do { checkDupRdrNames loc_rdr_names
+ ; envs <- getRdrEnvs
+ ; checkShadowedOccs envs loc_occs }
+ where
+ loc_occs = [(loc,rdrNameOcc rdr) | L loc rdr <- loc_rdr_names]
+
+checkDupAndShadowedNames :: (GlobalRdrEnv, LocalRdrEnv) -> [Name] -> RnM ()
+checkDupAndShadowedNames envs names
+ = do { checkDupNames names
+ ; checkShadowedOccs envs loc_occs }
+ where
+ loc_occs = [(nameSrcSpan name, nameOccName name) | name <- names]
+