Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
371cd67e
Commit
371cd67e
authored
Aug 11, 2006
by
simonpj@microsoft.com
Browse files
Improve error message (imported from Prelude at Implicit import declaration)
parent
a985eb21
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/basicTypes/RdrName.lhs
View file @
371cd67e
...
...
@@ -45,7 +45,7 @@ import Module ( ModuleName, mkModuleNameFS, Module, moduleName )
import Name ( Name, NamedThing(getName), nameModule, nameParent_maybe,
nameOccName, isExternalName, nameSrcLoc )
import Maybes ( mapCatMaybes )
import SrcLoc ( isGoodSrcLoc, SrcSpan )
import SrcLoc ( isGoodSrcLoc,
isGoodSrcSpan,
SrcSpan )
import FastString ( FastString )
import Outputable
import Util ( thenCmp )
...
...
@@ -538,7 +538,10 @@ ppr_defn loc | isGoodSrcLoc loc = parens (ptext SLIT("defined at") <+> ppr loc)
| otherwise = empty
instance Outputable ImportSpec where
ppr imp_spec@(ImpSpec imp_decl _)
= ptext SLIT("imported from") <+> ppr (is_mod imp_decl)
<+> ptext SLIT("at") <+> ppr (importSpecLoc imp_spec)
ppr imp_spec
= ptext SLIT("imported from") <+> ppr (importSpecModule imp_spec)
<+> if isGoodSrcSpan loc then ptext SLIT("at") <+> ppr loc
else empty
where
loc = importSpecLoc imp_spec
\end{code}
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment