Commit ff833e2f authored by qrczak's avatar qrczak

[project @ 2000-08-18 06:03:26 by qrczak]

Never say:
"Warning: Module `Prelude' is imported, but nothing from it is used"
parent 2d70172d
......@@ -36,6 +36,7 @@ import OccName ( OccName,
import TysWiredIn ( listTyCon )
import Type ( funTyCon )
import Module ( ModuleName, mkThisModule, moduleName, mkVanillaModule, pprModuleName )
import PrelInfo ( pRELUDE_Name )
import FiniteMap
import UniqSupply
import SrcLoc ( SrcLoc, noSrcLoc )
......@@ -708,7 +709,8 @@ mapFvRn f xs = mapRn f xs `thenRn` \ stuff ->
warnUnusedModules :: [Module] -> RnM d ()
warnUnusedModules mods
| not opt_WarnUnusedImports = returnRn ()
| otherwise = mapRn_ (addWarnRn . unused_mod . moduleName) mods
| otherwise = mapRn_ (addWarnRn . unused_mod) $
filter (/= pRELUDE_Name) (map moduleName mods)
where
unused_mod m = vcat [ptext SLIT("Module") <+> quotes (pprModuleName m) <+>
text "is imported, but nothing from it is used",
......
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