Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
bfce9573
Commit
bfce9573
authored
Jul 20, 1998
by
sof
Browse files
[project @ 1998-07-20 16:15:28 by sof]
importDecl: Improved warning message for (attempted) reflexive import
parent
228cc70f
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/rename/RnIfaces.lhs
View file @
bfce9573
...
...
@@ -419,7 +419,8 @@ importDecl (name, loc) mode
mod = nameModule name
in
if mod == this_mod then -- Don't bring in decls from
pprTrace "importDecl wierdness:" (ppr name) $
addWarnRn (importDeclWarn mod name loc) `thenRn_`
-- pprTrace "importDecl wierdness:" (ppr name) $
returnRn Nothing -- the renamed module's own interface file
--
else
...
...
@@ -1075,6 +1076,15 @@ getDeclErr name loc
quotes (ppr name), ptext SLIT("needed at"), ppr loc]
getDeclWarn name loc
= sep [ptext SLIT("
Warning: f
ailed to find (optional) interface decl for"),
= sep [ptext SLIT("
F
ailed 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), ptext SLIT(", name:"), quotes (ppr name),
ptext SLIT(", desired at:"), ppr loc
]
\end{code}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment