PprStyle, CodeStyle(..), PrintUnqualified, alwaysQualify,
getPprStyle, withPprStyle, withPprStyleDoc, pprDeeper,
- codeStyle, ifaceStyle, userStyle, debugStyle, asmStyle,
+ codeStyle, userStyle, debugStyle, asmStyle,
ifPprDebug, unqualStyle,
SDoc, -- Abstract
speakNth, speakNTimes,
printSDoc, printErrs, printDump,
- printForC, printForAsm, printForIface, printForUser,
+ printForC, printForAsm, printForUser,
pprCode, mkCodeStyle,
- showSDoc, showSDocForUser, showSDocDebug, showSDocIface,
+ showSDoc, showSDocForUser, showSDocDebug,
showSDocUnqual, showsPrecSDoc,
pprHsChar, pprHsString,
asmStyle (PprCode AsmStyle) = True
asmStyle other = False
-ifaceStyle :: PprStyle -> Bool
-ifaceStyle (PprInterface _) = True
-ifaceStyle other = False
-
debugStyle :: PprStyle -> Bool
debugStyle PprDebug = True
debugStyle other = False
printForUser handle unqual doc
= Pretty.printDoc PageMode handle (doc (mkUserStyle unqual AllTheWay))
--- printForIface prints all on one line for interface files.
--- It's called repeatedly for successive lines
-printForIface :: Handle -> PrintUnqualified -> SDoc -> IO ()
-printForIface handle unqual doc
- = Pretty.printDoc LeftMode handle (doc (PprInterface unqual))
-
-- printForC, printForAsm do what they sound like
printForC :: Handle -> SDoc -> IO ()
printForC handle doc = Pretty.printDoc LeftMode handle (doc (PprCode CStyle))
showsPrecSDoc :: Int -> SDoc -> ShowS
showsPrecSDoc p d = showsPrec p (d defaultUserStyle)
-showSDocIface :: SDoc -> String
-showSDocIface doc = showDocWith OneLineMode (doc (PprInterface alwaysQualify))
-
showSDocDebug :: SDoc -> String
showSDocDebug d = show (d PprDebug)
\end{code}