projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5ea409b
)
[project @ 1999-09-16 17:09:54 by sof]
author
sof
<unknown>
Thu, 16 Sep 1999 17:09:54 +0000
(17:09 +0000)
committer
sof
<unknown>
Thu, 16 Sep 1999 17:09:54 +0000
(17:09 +0000)
minor readIface tidyup
ghc/compiler/rename/RnIfaces.lhs
patch
|
blob
|
history
diff --git
a/ghc/compiler/rename/RnIfaces.lhs
b/ghc/compiler/rename/RnIfaces.lhs
index
011d4fc
..
26bb665
100644
(file)
--- a/
ghc/compiler/rename/RnIfaces.lhs
+++ b/
ghc/compiler/rename/RnIfaces.lhs
@@
-66,6
+66,7
@@
import Outputable
import Unique ( Unique )
import StringBuffer ( StringBuffer, hGetStringBuffer )
import FastString ( mkFastString )
import Unique ( Unique )
import StringBuffer ( StringBuffer, hGetStringBuffer )
import FastString ( mkFastString )
+import ErrUtils ( Message )
import Lex
import Outputable
import Lex
import Outputable
@@
-936,12
+937,8
@@
readIface the_mod file_path
PFailed err -> failWithRn Nothing err
POk _ (PIface mod_nm iface) ->
warnCheckRn (mod_nm == moduleName the_mod)
PFailed err -> failWithRn Nothing err
POk _ (PIface mod_nm iface) ->
warnCheckRn (mod_nm == moduleName the_mod)
- (hsep [ ptext SLIT("Something is amiss; requested module name")
- , pprModule the_mod
- , ptext SLIT("differs from name found in the interface file ")
- , pprModuleName mod_nm
- ])
- `thenRn_` returnRn (Just (the_mod, iface))
+ (hiModuleNameMismatchWarn the_mod mod_nm) `thenRn_`
+ returnRn (Just (the_mod, iface))
Left err
| isDoesNotExistError err -> returnRn Nothing
Left err
| isDoesNotExistError err -> returnRn Nothing
@@
-986,4
+983,13
@@
importDeclWarn name
warnRedundantSourceImport mod_name
= ptext SLIT("Unnecessary {- SOURCE -} in the import of module")
<+> quotes (pprModuleName mod_name)
warnRedundantSourceImport mod_name
= ptext SLIT("Unnecessary {- SOURCE -} in the import of module")
<+> quotes (pprModuleName mod_name)
+
+hiModuleNameMismatchWarn :: Module -> ModuleName -> Message
+hiModuleNameMismatchWarn requested_mod mod_nm =
+ hsep [ ptext SLIT("Something is amiss; requested module name")
+ , pprModule requested_mod
+ , ptext SLIT("differs from name found in the interface file ")
+ , pprModuleName mod_nm
+ ]
+
\end{code}
\end{code}