X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FbasicTypes%2FName.lhs;h=c6e7d25aca33187fe2f932ebe4b41bebeebc5c2c;hb=b6d08641e2757898470a10dfa906084ade8ab835;hp=e2f272370b5b3a0c612d40c1f9744e36b528c72f;hpb=3b1438a9757639d7f37f10e1237e2369ca0ebe4a;p=ghc-hetmet.git diff --git a/compiler/basicTypes/Name.lhs b/compiler/basicTypes/Name.lhs index e2f2723..c6e7d25 100644 --- a/compiler/basicTypes/Name.lhs +++ b/compiler/basicTypes/Name.lhs @@ -402,10 +402,13 @@ ppr_occ_name occ = ftext (occNameFS occ) -- cached behind the scenes in the FastString implementation. ppr_z_occ_name occ = ftext (zEncodeFS (occNameFS occ)) --- Prints "Defined at " or "Defined in " information for a Name. +-- Prints (if mod information is available) "Defined at " or +-- "Defined in " information for a Name. pprNameLoc :: Name -> SDoc pprNameLoc name | isGoodSrcSpan loc = pprDefnLoc loc + | isInternalName name || isSystemName name + = ptext SLIT("") | otherwise = ptext SLIT("Defined in ") <> ppr (nameModule name) where loc = nameSrcSpan name \end{code}