-noIfaceErr filename sty
- = hcat [ptext SLIT("Could not find valid interface file "), quotes (pprModule sty filename)]
--- , text " in"]) 4 (vcat (map text dirs))
-
-cannaeReadFile file err sty
- = hcat [ptext SLIT("Failed in reading file: "), text file, ptext SLIT("; error="), text (show err)]
-
-getDeclErr name sty
- = sep [ptext SLIT("Failed to find interface decl for"), ppr sty name]
+noIfaceErr filename
+ = hcat [ptext SLIT("Could not find valid interface file "),
+ quotes (pprModule filename)]
+
+cannaeReadFile file err
+ = hcat [ptext SLIT("Failed in reading file: "),
+ text file,
+ ptext SLIT("; error="),
+ text (show err)]
+
+getDeclErr name loc
+ = sep [ptext SLIT("Failed to find interface decl for"),
+ quotes (ppr name), ptext SLIT("needed at"), ppr loc]
+
+getDeclWarn name loc
+ = sep [ptext SLIT("Failed to find (optional) interface decl for"),
+ quotes (ppr name), ptext SLIT("desired at"), ppr loc]
+
+importDeclWarn mod name loc
+ = sep [ptext SLIT("Compiler tried to import decl from interface file with same name as module."),
+ ptext SLIT("(possible cause: module name clashes with interface file already in scope.)")
+ ] $$
+ hsep [ptext SLIT("Interface:"), quotes (pprModule mod), comma, ptext SLIT("name:"), quotes (ppr name),
+ comma, ptext SLIT("desired at:"), ppr loc
+ ]