- | debugStyle sty = ppr mod <> dot <> ppr_occ_name occ
- <> braces (hsep [if is_wired then ptext (sLit "(w)") else empty,
- pprNameSpaceBrief (occNameSpace occ),
- pprUnique uniq])
- | BuiltInSyntax <- is_builtin = ppr_occ_name occ
- -- never qualify builtin syntax
- | NameQual modname <- qual_name = ppr modname <> dot <> ppr_occ_name occ
- -- see HscTypes.mkPrintUnqualified and Outputable.QualifyName:
- | NameNotInScope1 <- qual_name = ppr mod <> dot <> ppr_occ_name occ
- | NameNotInScope2 <- qual_name = ppr (modulePackageId mod) <> char ':' <>
- ppr (moduleName mod) <> dot <> ppr_occ_name occ
- | otherwise = ppr_occ_name occ
- where qual_name = qualName sty mod occ
+ | debugStyle sty = ppr mod <> dot <> ppr_occ_name occ
+ <> braces (hsep [if is_wired then ptext (sLit "(w)") else empty,
+ pprNameSpaceBrief (occNameSpace occ),
+ pprUnique uniq])
+ | BuiltInSyntax <- is_builtin = ppr_occ_name occ -- Never qualify builtin syntax
+ | otherwise = pprModulePrefix sty mod occ <> ppr_occ_name occ