- unused_imp_mods = [m | m <- direct_import_mods,
- isNothing (lookupFM minimal_imports1 m),
- m /= pRELUDE_Name,
- not (hasEmptyImpList m)]
- -- hasEmptyImpList arranges not to complain about
+ unused_imp_mods = [(mod_name,loc) | (mod,imp,loc) <- direct_import_mods,
+ let mod_name = moduleName mod,
+ not (mod_name `elemFM` minimal_imports1),
+ mod_name /= pRELUDE_Name,
+ imp /= Just False]
+ -- The Just False part is not to complain about