+
+pprModulePrefix :: PprStyle -> Module -> OccName -> SDoc
+-- Print the "M." part of a name, based on whether it's in scope or not
+-- See Note [Printing original names] in HscTypes
+pprModulePrefix sty mod occ
+ | opt_SuppressModulePrefixes = empty
+
+ | otherwise
+ = case qualName sty mod occ of -- See Outputable.QualifyName:
+ NameQual modname -> ppr modname <> dot -- Name is in scope
+ NameNotInScope1 -> ppr mod <> dot -- Not in scope
+ NameNotInScope2 -> ppr (modulePackageId mod) <> colon -- Module not in
+ <> ppr (moduleName mod) <> dot -- scope eithber
+ _otherwise -> empty
+
+ppr_underscore_unique :: Unique -> SDoc
+-- Print an underscore separating the name from its unique
+-- But suppress it if we aren't printing the uniques anyway
+ppr_underscore_unique uniq
+ | opt_SuppressUniques = empty
+ | otherwise = char '_' <> pprUnique uniq
+
+ppr_occ_name :: OccName -> SDoc