Safe Haskell | Safe-Infered |
---|
Monadic front-end to Text.PrettyPrint
- type Doc = PprM Doc
- data PprM a
- empty :: Doc
- semi :: Doc
- comma :: Doc
- colon :: Doc
- space :: Doc
- equals :: Doc
- arrow :: Doc
- lparen :: Doc
- rparen :: Doc
- lbrack :: Doc
- rbrack :: Doc
- lbrace :: Doc
- rbrace :: Doc
- text :: String -> Doc
- char :: Char -> Doc
- ptext :: String -> Doc
- int :: Int -> Doc
- integer :: Integer -> Doc
- float :: Float -> Doc
- double :: Double -> Doc
- rational :: Rational -> Doc
- parens :: Doc -> Doc
- brackets :: Doc -> Doc
- braces :: Doc -> Doc
- quotes :: Doc -> Doc
- doubleQuotes :: Doc -> Doc
- (<>) :: Doc -> Doc -> Doc
- (<+>) :: Doc -> Doc -> Doc
- hcat :: [Doc] -> Doc
- hsep :: [Doc] -> Doc
- ($$) :: Doc -> Doc -> Doc
- ($+$) :: Doc -> Doc -> Doc
- vcat :: [Doc] -> Doc
- sep :: [Doc] -> Doc
- cat :: [Doc] -> Doc
- fsep :: [Doc] -> Doc
- fcat :: [Doc] -> Doc
- nest :: Int -> Doc -> Doc
- hang :: Doc -> Int -> Doc -> Doc
- punctuate :: Doc -> [Doc] -> [Doc]
- isEmpty :: Doc -> PprM Bool
- to_HPJ_Doc :: Doc -> Doc
- pprName :: Name -> Doc
- pprName' :: NameIs -> Name -> Doc
The document type
Primitive Documents
Converting values into documents
Wrapping documents in delimiters
doubleQuotes :: Doc -> DocSource
Wrap document in "..."
Combining documents
punctuate :: Doc -> [Doc] -> [Doc]Source
punctuate p [d1, ... dn] = [d1 <> p, d2 <> p, ... dn-1 <> p, dn]
Predicates on documents
to_HPJ_Doc :: Doc -> DocSource