uulib-0.9.10: Haskell Utrecht Tools LibrarySource codeContentsIndex
UU.PPrint
Description
Synopsis
data Doc
class Pretty a where
pretty :: a -> Doc
show :: Show a => a -> String
putDoc :: Doc -> IO ()
hPutDoc :: Handle -> Doc -> IO ()
(<>) :: Doc -> Doc -> Doc
(<+>) :: Doc -> Doc -> Doc
(</>) :: Doc -> Doc -> Doc
(<//>) :: Doc -> Doc -> Doc
(<$>) :: Doc -> Doc -> Doc
(<$$>) :: Doc -> Doc -> Doc
sep :: [Doc] -> Doc
fillSep :: [Doc] -> Doc
hsep :: [Doc] -> Doc
vsep :: [Doc] -> Doc
cat :: [Doc] -> Doc
fillCat :: [Doc] -> Doc
hcat :: [Doc] -> Doc
vcat :: [Doc] -> Doc
punctuate :: Doc -> [Doc] -> [Doc]
align :: Doc -> Doc
hang :: Int -> Doc -> Doc
indent :: Int -> Doc -> Doc
fill :: Int -> Doc -> Doc
fillBreak :: Int -> Doc -> Doc
list :: [Doc] -> Doc
tupled :: [Doc] -> Doc
semiBraces :: [Doc] -> Doc
encloseSep :: Doc -> Doc -> Doc -> [Doc] -> Doc
angles :: Doc -> Doc
langle :: Doc
rangle :: Doc
parens :: Doc -> Doc
lparen :: Doc
rparen :: Doc
braces :: Doc -> Doc
lbrace :: Doc
rbrace :: Doc
brackets :: Doc -> Doc
lbracket :: Doc
rbracket :: Doc
dquotes :: Doc -> Doc
dquote :: Doc
squotes :: Doc -> Doc
squote :: Doc
comma :: Doc
space :: Doc
dot :: Doc
backslash :: Doc
semi :: Doc
colon :: Doc
equals :: Doc
string :: [Char] -> Doc
bool :: Bool -> Doc
int :: Int -> Doc
integer :: Integer -> Doc
float :: Float -> Doc
double :: Double -> Doc
rational :: Rational -> Doc
softline :: Doc
softbreak :: Doc
empty :: Doc
char :: Char -> Doc
text :: [Char] -> Doc
line :: Doc
linebreak :: Doc
nest :: Int -> Doc -> Doc
group :: Doc -> Doc
column :: (Int -> Doc) -> Doc
nesting :: (Int -> Doc) -> Doc
width :: Doc -> (Int -> Doc) -> Doc
data SimpleDoc
= SEmpty
| SChar Char SimpleDoc
| SText !Int String SimpleDoc
| SLine !Int SimpleDoc
renderPretty :: Float -> Int -> Doc -> SimpleDoc
renderCompact :: Doc -> SimpleDoc
displayS :: SimpleDoc -> ShowS
displayIO :: Handle -> SimpleDoc -> IO ()
Documentation
data Doc Source
class Pretty a whereSource
Methods
pretty :: a -> DocSource
show :: Show a => a -> StringSource
A specialised variant of showsPrec, using precedence context zero, and returning an ordinary String.
putDoc :: Doc -> IO ()Source
hPutDoc :: Handle -> Doc -> IO ()Source
(<>) :: Doc -> Doc -> DocSource
(<+>) :: Doc -> Doc -> DocSource
(</>) :: Doc -> Doc -> DocSource
(<//>) :: Doc -> Doc -> DocSource
(<$>) :: Doc -> Doc -> DocSource
(<$$>) :: Doc -> Doc -> DocSource
sep :: [Doc] -> DocSource
fillSep :: [Doc] -> DocSource
hsep :: [Doc] -> DocSource
vsep :: [Doc] -> DocSource
cat :: [Doc] -> DocSource
fillCat :: [Doc] -> DocSource
hcat :: [Doc] -> DocSource
vcat :: [Doc] -> DocSource
punctuate :: Doc -> [Doc] -> [Doc]Source
align :: Doc -> DocSource
hang :: Int -> Doc -> DocSource
indent :: Int -> Doc -> DocSource
fill :: Int -> Doc -> DocSource
fillBreak :: Int -> Doc -> DocSource
list :: [Doc] -> DocSource
tupled :: [Doc] -> DocSource
semiBraces :: [Doc] -> DocSource
encloseSep :: Doc -> Doc -> Doc -> [Doc] -> DocSource
angles :: Doc -> DocSource
langle :: DocSource
rangle :: DocSource
parens :: Doc -> DocSource
lparen :: DocSource
rparen :: DocSource
braces :: Doc -> DocSource
lbrace :: DocSource
rbrace :: DocSource
brackets :: Doc -> DocSource
lbracket :: DocSource
rbracket :: DocSource
dquotes :: Doc -> DocSource
dquote :: DocSource
squotes :: Doc -> DocSource
squote :: DocSource
comma :: DocSource
space :: DocSource
dot :: DocSource
backslash :: DocSource
semi :: DocSource
colon :: DocSource
equals :: DocSource
string :: [Char] -> DocSource
bool :: Bool -> DocSource
int :: Int -> DocSource
integer :: Integer -> DocSource
float :: Float -> DocSource
double :: Double -> DocSource
rational :: Rational -> DocSource
softline :: DocSource
softbreak :: DocSource
empty :: DocSource
char :: Char -> DocSource
text :: [Char] -> DocSource
line :: DocSource
linebreak :: DocSource
nest :: Int -> Doc -> DocSource
group :: Doc -> DocSource
column :: (Int -> Doc) -> DocSource
nesting :: (Int -> Doc) -> DocSource
width :: Doc -> (Int -> Doc) -> DocSource
data SimpleDoc Source
Constructors
SEmpty
SChar Char SimpleDoc
SText !Int String SimpleDoc
SLine !Int SimpleDoc
renderPretty :: Float -> Int -> Doc -> SimpleDocSource
renderCompact :: Doc -> SimpleDocSource
displayS :: SimpleDoc -> ShowSSource
displayIO :: Handle -> SimpleDoc -> IO ()Source
Produced by Haddock version 2.6.0