Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
alexbiehl-gc
GHC
Commits
bfce9573
Commit
bfce9573
authored
26 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1998-07-20 16:15:28 by sof]
importDecl: Improved warning message for (attempted) reflexive import
parent
228cc70f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/compiler/rename/RnIfaces.lhs
+12
-2
12 additions, 2 deletions
ghc/compiler/rename/RnIfaces.lhs
with
12 additions
and
2 deletions
ghc/compiler/rename/RnIfaces.lhs
+
12
−
2
View file @
bfce9573
...
@@ -419,7 +419,8 @@ importDecl (name, loc) mode
...
@@ -419,7 +419,8 @@ importDecl (name, loc) mode
mod = nameModule name
mod = nameModule name
in
in
if mod == this_mod then -- Don't bring in decls from
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
returnRn Nothing -- the renamed module's own interface file
--
--
else
else
...
@@ -1075,6 +1076,15 @@ getDeclErr name loc
...
@@ -1075,6 +1076,15 @@ getDeclErr name loc
quotes (ppr name), ptext SLIT("needed at"), ppr loc]
quotes (ppr name), ptext SLIT("needed at"), ppr loc]
getDeclWarn name 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]
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}
\end{code}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment