Safe Haskell | None |
---|---|
Language | Haskell2010 |
- sentence :: Doc -> Doc
- formatText :: Int -> [String] -> String
- formatParas :: Int -> [String] -> [String]
- formatPara :: Int -> [[a]] -> [[[a]]]
- chompTrailingNewline :: String -> String
- breakCommand :: String -> (String, [String])
- quote :: String -> String
- pathlist :: [FilePath] -> Doc
- showCommandLine :: [String] -> String
Text construction.
Text formatting.
formatText :: Int -> [String] -> String Source #
Take a list of paragraphs and format them to the given line length, with a blank line between paragraphs.
formatPara :: Int -> [[a]] -> [[[a]]] Source #
Take a list of words and split it up so that each chunk fits into the specified width when spaces are included. Any words longer than the specified width end up in a chunk of their own.
chompTrailingNewline :: String -> String Source #
Text processing
pathlist :: [FilePath] -> Doc Source #
Format a list of FilePath
s as quoted text. It deliberately refuses to
use English.andClauses but rather separates the quoted strings only with a
space, because this makes it usable for copy and paste e.g. as arguments to
another shell command.
showCommandLine :: [String] -> String Source #
Produce a String composed by the elements of [String] each enclosed in double quotes.