#include "HsVersions.h"
-import {-# SOURCE #-} Name( Name )
+import {-# SOURCE #-} Module( ModuleName )
+import {-# SOURCE #-} OccName( OccName )
import CmdLineOpts ( opt_PprStyle_Debug, opt_PprUserLength )
import FastString
| PartWay Int -- 0 => stop
-type PrintUnqualified = Name -> Bool
+type PrintUnqualified = ModuleName -> OccName -> Bool
-- This function tells when it's ok to print
-- a (Global) name unqualified
alwaysQualify,neverQualify :: PrintUnqualified
-alwaysQualify n = False
-neverQualify n = True
+alwaysQualify m n = False
+neverQualify m n = True
defaultUserStyle = mkUserStyle alwaysQualify AllTheWay
\end{code}
\begin{code}
-unqualStyle :: PprStyle -> Name -> Bool
-unqualStyle (PprUser unqual _) n = unqual n
-unqualStyle other n = False
+unqualStyle :: PprStyle -> PrintUnqualified
+unqualStyle (PprUser unqual _) m n = unqual m n
+unqualStyle other m n = False
codeStyle :: PprStyle -> Bool
codeStyle (PprCode _) = True
pprWithCommas pp xs = fsep (punctuate comma (map pp xs))
interppSP :: Outputable a => [a] -> SDoc
-interppSP xs = hsep (map ppr xs)
+interppSP xs = sep (map ppr xs)
interpp'SP :: Outputable a => [a] -> SDoc
-interpp'SP xs = hsep (punctuate comma (map ppr xs))
+interpp'SP xs = sep (punctuate comma (map ppr xs))
pprQuotedList :: Outputable a => [a] -> SDoc
-- [x,y,z] ==> `x', `y', `z'