Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This is a small pretty-printing library.
Synopsis
- data Doc
- toString :: Doc -> String
- dimensions :: Doc -> (Int, Int)
- null :: Doc -> Bool
- hPutDoc :: Handle -> Doc -> IO ()
- putDoc :: Doc -> IO ()
- char :: Char -> Doc
- string :: String -> Doc
- text :: Text -> Doc
- space :: Doc
- spaces :: Int -> Doc
- softline :: Doc
- hardline :: Doc
- wrapAt :: Maybe Int -> Doc -> Doc
- data Indentation a = Indentation Int a
- indent :: Indentation Doc -> Indentation Doc -> Doc -> Doc
- deindent :: Doc -> Doc
- ansi :: [SGR] -> Doc -> Doc
- (<+>) :: Doc -> Doc -> Doc
- (<$$>) :: Doc -> Doc -> Doc
- vcat :: [Doc] -> Doc
- intersperse :: Doc -> [Doc] -> Doc
- data Alignment
- align :: Int -> Alignment -> Doc -> Doc
- paste :: [Doc] -> Doc
- removeControls :: Doc -> Doc
- clearScreen :: Doc
- goToLine :: Int -> Doc
Documentation
dimensions :: Doc -> (Int, Int) Source #
Returns the rows and columns necessary to render this document
data Indentation a Source #
Instances
indent :: Indentation Doc -> Indentation Doc -> Doc -> Doc Source #
Exotic combinators
Control codes
removeControls :: Doc -> Doc Source #
clearScreen :: Doc Source #