| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Patat.PrettyPrint.Internal
Description
This is a small pretty-printing library.
Synopsis
- data Control
- data Chunk
- type Chunks = [Chunk]
- chunkToString :: Chunk -> String
- chunkLines :: Chunks -> [Chunks]
- data DocE d
- chunkToDocE :: Chunk -> DocE Doc
- data Indentation a = Indentation Int a
- newtype Doc = Doc {}
- docToChunks :: Doc -> Chunks
- toString :: Doc -> String
- dimensions :: Doc -> (Int, Int)
- null :: Doc -> Bool
- hPutDoc :: Handle -> Doc -> IO ()
- putDoc :: Doc -> IO ()
- mkDoc :: DocE Doc -> Doc
- string :: String -> Doc
Documentation
Control actions for the terminal.
Constructors
| ClearScreenControl | |
| GoToLineControl Int |
A simple chunk of text. All ANSI codes are "reset" after printing.
Constructors
| StringChunk [SGR] String | |
| NewlineChunk | |
| ControlChunk Control |
chunkToString :: Chunk -> String Source #
chunkLines :: Chunks -> [Chunks] Source #
Constructors
| String String | |
| Softspace | |
| Hardspace | |
| Softline | |
| Hardline | |
| WrapAt | |
| Ansi | |
| Indent | |
Fields
| |
| Control Control | |
data Indentation a Source #
Constructors
| Indentation Int a |
Instances
docToChunks :: Doc -> Chunks Source #