projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2005-04-29 23:39:12 by simonpj]
[ghc-hetmet.git]
/
ghc
/
compiler
/
basicTypes
/
SrcLoc.lhs
diff --git
a/ghc/compiler/basicTypes/SrcLoc.lhs
b/ghc/compiler/basicTypes/SrcLoc.lhs
index
1fc1172
..
a8d037c
100644
(file)
--- a/
ghc/compiler/basicTypes/SrcLoc.lhs
+++ b/
ghc/compiler/basicTypes/SrcLoc.lhs
@@
-23,7
+23,7
@@
module SrcLoc (
srcLocFile, -- return the file name part
srcLocLine, -- return the line part
srcLocCol, -- return the column part
srcLocFile, -- return the file name part
srcLocLine, -- return the line part
srcLocCol, -- return the column part
-
+ pprDefnLoc,
SrcSpan, -- Abstract
noSrcSpan,
SrcSpan, -- Abstract
noSrcSpan,
@@
-304,6
+304,12
@@
combineSrcSpans start end
col2 = srcSpanEndCol end
file = srcSpanFile start
col2 = srcSpanEndCol end
file = srcSpanFile start
+pprDefnLoc :: SrcLoc -> SDoc
+-- "defined at ..." or "imported from ..."
+pprDefnLoc loc
+ | isGoodSrcLoc loc = ptext SLIT("Defined at") <+> ppr loc
+ | otherwise = ppr loc
+
instance Outputable SrcSpan where
ppr span
= getPprStyle $ \ sty ->
instance Outputable SrcSpan where
ppr span
= getPprStyle $ \ sty ->