Skip to content
Snippets Groups Projects
Commit ec459c23 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

[project @ 2000-07-07 12:13:22 by simonpj]

Improve comments
parent 23cb37fa
No related branches found
No related tags found
No related merge requests found
...@@ -712,12 +712,19 @@ reportUnusedNames mod_name direct_import_mods ...@@ -712,12 +712,19 @@ reportUnusedNames mod_name direct_import_mods
-- inst_mods are directly-imported modules that -- inst_mods are directly-imported modules that
-- contain instance decl(s) that the renamer decided to suck in -- contain instance decl(s) that the renamer decided to suck in
-- It's not necessarily redundant to import such modules. -- It's not necessarily redundant to import such modules.
-- NOTE: import M () is not necessarily redundant, even if --
-- NOTE: Consider
-- module This
-- import M ()
--
-- The import M() is not *necessarily* redundant, even if
-- we suck in no instance decls from M (e.g. it contains -- we suck in no instance decls from M (e.g. it contains
-- no instance decls). It may be that we import M solely to -- no instance decls, or This contains no code). It may be
-- ensure that M's orphan instance decls (or those in its imports) -- that we import M solely to ensure that M's orphan instance
-- are visible to people who import this module. Sigh. There's -- decls (or those in its imports) are visible to people who
-- really no good way to detect this, so the error message is weakened -- import This. Sigh.
-- There's really no good way to detect this, so the error message
-- in RnEnv.warnUnusedModules is weakened instead
inst_mods = [m | InstD (InstDecl _ _ _ dfun _) <- imported_decls, inst_mods = [m | InstD (InstDecl _ _ _ dfun _) <- imported_decls,
let m = moduleName (nameModule dfun), let m = moduleName (nameModule dfun),
m `elem` direct_import_mods m `elem` direct_import_mods
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment