Safe Haskell | None |
---|---|
Language | Haskell2010 |
A re-export of the prettyprinting library, along with some convenience functions.
Synopsis
- data Doc
- parens :: Doc -> Doc
- space :: Doc
- text :: String -> Doc
- lparen :: Doc
- rparen :: Doc
- semi :: Doc
- softline :: Doc
- folddoc :: (Doc -> Doc -> Doc) -> [Doc] -> Doc
- (<+>) :: Doc -> Doc -> Doc
- (<+/>) :: Doc -> Doc -> Doc
- string :: String -> Doc
- flatten :: Doc -> Doc
- lbrace :: Doc
- (</>) :: Doc -> Doc -> Doc
- colon :: Doc
- lbracket :: Doc
- rbracket :: Doc
- dot :: Doc
- punctuate :: Doc -> [Doc] -> [Doc]
- comma :: Doc
- softbreak :: Doc
- langle :: Doc
- rangle :: Doc
- rbrace :: Doc
- (<//>) :: Doc -> Doc -> Doc
- (<|>) :: Doc -> Doc -> Doc
- align :: Doc -> Doc
- angles :: Doc -> Doc
- backquote :: Doc
- backquotes :: Doc -> Doc
- bool :: Bool -> Doc
- braces :: Doc -> Doc
- brackets :: Doc -> Doc
- cat :: [Doc] -> Doc
- char :: Char -> Doc
- column :: (Int -> Doc) -> Doc
- commasep :: [Doc] -> Doc
- displayLazyText :: RDoc -> Text
- displayPragmaLazyText :: RDoc -> Text
- displayPragmaS :: RDoc -> ShowS
- displayS :: RDoc -> ShowS
- double :: Double -> Doc
- dquote :: Doc
- dquotes :: Doc -> Doc
- empty :: Doc
- enclose :: Doc -> Doc -> Doc -> Doc
- enclosesep :: Doc -> Doc -> Doc -> [Doc] -> Doc
- equals :: Doc
- errordoc :: Doc -> a
- faildoc :: MonadFail m => Doc -> m a
- fill :: Int -> Doc -> Doc
- fillbreak :: Int -> Doc -> Doc
- float :: Float -> Doc
- group :: Doc -> Doc
- hPutDoc :: Handle -> Doc -> IO ()
- hPutDocLn :: Handle -> Doc -> IO ()
- hang :: Int -> Doc -> Doc
- indent :: Int -> Doc -> Doc
- int :: Int -> Doc
- integer :: Integer -> Doc
- lazyText :: Text -> Doc
- line :: Doc
- list :: [Doc] -> Doc
- nest :: Int -> Doc -> Doc
- nesting :: (Int -> Doc) -> Doc
- parensIf :: Bool -> Doc -> Doc
- prettyCompact :: Doc -> String
- prettyCompactS :: Doc -> ShowS
- prettyLazyText :: Int -> Doc -> Text
- prettyPragma :: Int -> Doc -> String
- prettyPragmaLazyText :: Int -> Doc -> Text
- prettyPragmaS :: Int -> Doc -> ShowS
- prettyS :: Int -> Doc -> ShowS
- putDoc :: Doc -> IO ()
- putDocLn :: Doc -> IO ()
- rational :: Rational -> Doc
- render :: Int -> Doc -> RDoc
- renderCompact :: Doc -> RDoc
- semisep :: [Doc] -> Doc
- sep :: [Doc] -> Doc
- spaces :: Int -> Doc
- spread :: [Doc] -> Doc
- squote :: Doc
- squotes :: Doc -> Doc
- srcloc :: Located a => a -> Doc
- stack :: [Doc] -> Doc
- star :: Doc
- strictText :: Text -> Doc
- tuple :: [Doc] -> Doc
- width :: Doc -> (Int -> Doc) -> Doc
- data RDoc
- pretty :: Pretty a => a -> String
- prettyDoc :: Int -> Doc -> String
- prettyTuple :: Pretty a => [a] -> String
- prettyText :: Pretty a => a -> Text
- prettyOneLine :: Pretty a => a -> String
- apply :: [Doc] -> Doc
- oneLine :: Doc -> Doc
- annot :: [Doc] -> Doc -> Doc
- nestedBlock :: String -> String -> Doc -> Doc
- textwrap :: String -> Doc
- shorten :: Pretty a => a -> Doc
- color :: [SGR] -> String -> String
- inRed :: String -> String
- inGreen :: String -> String
Documentation
backquotes :: Doc -> Doc #
displayLazyText :: RDoc -> Text #
displayPragmaLazyText :: RDoc -> Text #
displayPragmaS :: RDoc -> ShowS #
prettyCompact :: Doc -> String #
prettyCompactS :: Doc -> ShowS #
prettyLazyText :: Int -> Doc -> Text #
prettyPragma :: Int -> Doc -> String #
prettyPragmaLazyText :: Int -> Doc -> Text #
prettyPragmaS :: Int -> Doc -> ShowS #
renderCompact :: Doc -> RDoc #
strictText :: Text -> Doc #
prettyTuple :: Pretty a => [a] -> String Source #
Prettyprint a list enclosed in curly braces.
prettyText :: Pretty a => a -> Text Source #
Prettyprint a value to a Text
, wrapped to 80 characters.
prettyOneLine :: Pretty a => a -> String Source #
Prettyprint a value without any width restriction.
apply :: [Doc] -> Doc Source #
The document
separates apply
dsds
with commas and encloses them with
parentheses.
nestedBlock :: String -> String -> Doc -> Doc Source #
Surround the given document with enclosers and add linebreaks and indents.
textwrap :: String -> Doc Source #
Like text
, but splits the string into words and permits line breaks between all of them.