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
jberryman
GHC
Commits
026f6c38
Commit
026f6c38
authored
May 06, 2004
by
simonpj
Browse files
[project @ 2004-05-06 12:23:58 by simonpj]
Comments
parent
b44a2c87
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/basicTypes/RdrName.lhs
View file @
026f6c38
...
...
@@ -476,11 +476,13 @@ pprNameProvenance (GRE {gre_name = name, gre_prov = LocalDef _})
pprNameProvenance (GRE {gre_name = name, gre_prov = Imported (why:whys) _})
= sep [ppr why, nest 2 (ppr_defn (nameSrcLoc name))]
-- If we know the exact definition point (which we may do with GHCi)
-- then show that too. But not if it's just "imported from X".
ppr_defn loc | isGoodSrcLoc loc = parens (ptext SLIT("defined at") <+> ppr loc)
| otherwise = empty
instance Outputable ImportSpec where
ppr imp_spec
= ptext SLIT("imported from") <+> ppr (is_mod imp_spec)
<+> ptext SLIT("at") <+> ppr (is_loc imp_spec)
ppr_defn loc | isGoodSrcLoc loc = parens (ptext SLIT("defined at") <+> ppr loc)
| otherwise = empty
\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