pprInfixVar, pprPrefixVar,
pprHsChar, pprHsString, pprHsInfix, pprHsVar,
+ pprFastFilePath,
-- * Controlling the style in which output is printed
BindingSite(..),
codeStyle, userStyle, debugStyle, dumpStyle, asmStyle,
ifPprDebug, qualName, qualModule,
mkErrStyle, defaultErrStyle, defaultDumpStyle, defaultUserStyle,
- mkUserStyle,
+ mkUserStyle, Depth(..),
-- * Error handling and debugging utilities
pprPanic, assertPprPanic, pprPanicFastInt, pprPgmError,
import Data.Word ( Word32 )
import System.IO ( Handle, stderr, stdout, hFlush )
import Data.Char ( ord )
+import System.FilePath
\end{code}
neverQualifyModules :: QueryQualifyModule
neverQualifyModules _ = False
-type QueryQualifies = (QueryQualifyName, QueryQualifyModule)
-
-alwaysQualify, neverQualify :: QueryQualifies
+alwaysQualify, neverQualify :: PrintUnqualified
alwaysQualify = (alwaysQualifyNames, alwaysQualifyModules)
neverQualify = (neverQualifyNames, neverQualifyModules)
| opt_PprStyle_Debug = mkUserStyle alwaysQualify AllTheWay
| otherwise = mkUserStyle alwaysQualify (PartWay opt_PprUserLength)
-mkUserStyle :: QueryQualifies -> Depth -> PprStyle
+mkUserStyle :: PrintUnqualified -> Depth -> PprStyle
mkUserStyle unqual depth
| opt_PprStyle_Debug = PprDebug
| otherwise = PprUser unqual depth
('_':_) -> False -- Not an operator
(c:_) -> not (isAlpha c) -- Starts with non-alpha
_ -> False
+
+pprFastFilePath :: FastString -> SDoc
+pprFastFilePath path = text $ normalise $ unpackFS path
\end{code}
%************************************************************************