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 ()
- string :: String -> Doc
- text :: Text -> Doc
- space :: Doc
- spaces :: Int -> Doc
- softline :: Doc
- hardline :: Doc
- wrapAt :: Maybe Int -> Doc -> Doc
- data Trimmable a
- = NotTrimmable !a
- | Trimmable !a
- indent :: Trimmable Doc -> Trimmable Doc -> 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
NotTrimmable !a | |
Trimmable !a |
Instances
Foldable Trimmable Source # | |
Defined in Patat.PrettyPrint fold :: Monoid m => Trimmable m -> m # foldMap :: Monoid m => (a -> m) -> Trimmable a -> m # foldMap' :: Monoid m => (a -> m) -> Trimmable a -> m # foldr :: (a -> b -> b) -> b -> Trimmable a -> b # foldr' :: (a -> b -> b) -> b -> Trimmable a -> b # foldl :: (b -> a -> b) -> b -> Trimmable a -> b # foldl' :: (b -> a -> b) -> b -> Trimmable a -> b # foldr1 :: (a -> a -> a) -> Trimmable a -> a # foldl1 :: (a -> a -> a) -> Trimmable a -> a # toList :: Trimmable a -> [a] # length :: Trimmable a -> Int # elem :: Eq a => a -> Trimmable a -> Bool # maximum :: Ord a => Trimmable a -> a # minimum :: Ord a => Trimmable a -> a # | |
Traversable Trimmable Source # | |
Functor Trimmable Source # | |
Exotic combinators
Control codes
removeControls :: Doc -> Doc Source #
clearScreen :: Doc Source #