-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | The Wadler/Leijen Pretty Printer for colored ANSI terminal output
--   
--   This is a pretty printing library based on Wadler's paper "A
--   Prettier Printer". It has been enhanced with support for ANSI
--   terminal colored output using the ansi-terminal package.
@package ansi-wl-pprint
@version 1.0.2

-- | This module is an extended implementation of the functional pretty
--   printer given by Philip Wadler (1997):
--   
--   
--   "A prettier printer"
--   Draft paper, April 1997, revised March 1998.
--   https://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf
--   
--   
--   In their bare essence, the combinators given by Wadler are not
--   expressive enough to describe some commonly occurring layouts. This
--   library adds new primitives to describe these layouts and works well
--   in practice.
--   
--   The library is based on a single way to concatenate documents, which
--   is associative and has both a left and right unit. This simple design
--   leads to an efficient and short implementation. The simplicity is
--   reflected in the predictable behaviour of the combinators which make
--   them easy to use in practice.
--   
--   A thorough description of the primitive combinators and their
--   implementation can be found in Philip Wadler's paper. The main
--   differences with his original paper are:
--   
--   
--   
- The nil document is called empty.
--   
- The above combinator is called <$>. The operator
--   </> is used for soft line breaks.
--   
- There are three new primitives: align, fill and
--   fillBreak. These are very useful in practice.
--   
- There are many additional useful combinators, like fillSep
--   and list.
--   
- There are two renderers: renderPretty for pretty printing,
--   and renderCompact for quickly rendered, compact output more
--   suitable for generating input to other programs.
--   
- The pretty printing algorithm used by renderPretty extends
--   the algorithm given by Wadler to take into account a "ribbon width",
--   i.e., a desired maximum number of non-indentation characters to output
--   on any one line.
--   
- There are two displayers, displayS for strings and
--   displayIO for file-based output.
--   
- There is a Pretty class.
--   
- The implementation uses optimised representations and strictness
--   annotations.
--   
- The library has been extended to allow formatting text for output
--   to ANSI style consoles. New combinators allow control of foreground
--   and background color and the ability to make parts of the text bold or
--   underlined.
--   

-- | Deprecated: Compatibility module for users of ansi-wl-pprint - use
--   Prettyprinter instead
module Text.PrettyPrint.ANSI.Leijen
type Doc = Doc AnsiStyle
empty :: Doc
char :: Char -> Doc
text :: String -> Doc
string :: String -> Doc
int :: Int -> Doc
integer :: Integer -> Doc
float :: Float -> Doc
double :: Double -> Doc
rational :: Rational -> Doc
bool :: Bool -> Doc

-- | An associative operation.
--   
--   
Examples
--   
--   
--   >>> [1,2,3] <> [4,5,6]
--   [1,2,3,4,5,6]
--   
--   
--   
--   >>> Just [1, 2, 3] <> Just [4, 5, 6]
--   Just [1,2,3,4,5,6]
--   
--   
--   
--   >>> putStr "Hello, " <> putStrLn "World!"
--   Hello, World!
--   
(<>) :: Semigroup a => a -> a -> a
infixr 6 <>
nest :: Int -> Doc -> Doc
line :: Doc
linebreak :: Doc
group :: Doc -> Doc
softline :: Doc
softbreak :: Doc
hardline :: Doc
flatAlt :: Doc -> Doc -> Doc
align :: Doc -> Doc
hang :: Int -> Doc -> Doc
indent :: Int -> Doc -> Doc
encloseSep :: Doc -> Doc -> Doc -> [Doc] -> Doc
list :: [Doc] -> Doc
tupled :: [Doc] -> Doc
semiBraces :: [Doc] -> Doc
(<+>) :: Doc -> Doc -> Doc
(<$>) :: Doc -> Doc -> Doc
(</>) :: Doc -> Doc -> Doc
(<$$>) :: Doc -> Doc -> Doc
(<//>) :: Doc -> Doc -> Doc
hsep :: [Doc] -> Doc
vsep :: [Doc] -> Doc
fillSep :: [Doc] -> Doc
sep :: [Doc] -> Doc
hcat :: [Doc] -> Doc
vcat :: [Doc] -> Doc
fillCat :: [Doc] -> Doc
cat :: [Doc] -> Doc
punctuate :: Doc -> [Doc] -> [Doc]
fill :: Int -> Doc -> Doc
fillBreak :: Int -> Doc -> Doc
enclose :: Doc -> Doc -> Doc -> Doc
squotes :: Doc -> Doc
dquotes :: Doc -> Doc
parens :: Doc -> Doc
angles :: Doc -> Doc
braces :: Doc -> Doc
brackets :: Doc -> Doc
lparen :: Doc
rparen :: Doc
langle :: Doc
rangle :: Doc
lbrace :: Doc
rbrace :: Doc
lbracket :: Doc
rbracket :: Doc
squote :: Doc
dquote :: Doc
semi :: Doc
colon :: Doc
comma :: Doc
space :: Doc
dot :: Doc
backslash :: Doc
equals :: Doc
black :: Doc -> Doc
red :: Doc -> Doc
green :: Doc -> Doc
yellow :: Doc -> Doc
blue :: Doc -> Doc
magenta :: Doc -> Doc
cyan :: Doc -> Doc
white :: Doc -> Doc
dullblack :: Doc -> Doc
dullred :: Doc -> Doc
dullgreen :: Doc -> Doc
dullyellow :: Doc -> Doc
dullblue :: Doc -> Doc
dullmagenta :: Doc -> Doc
dullcyan :: Doc -> Doc
dullwhite :: Doc -> Doc
onblack :: Doc -> Doc
onred :: Doc -> Doc
ongreen :: Doc -> Doc
onyellow :: Doc -> Doc
onblue :: Doc -> Doc
onmagenta :: Doc -> Doc
oncyan :: Doc -> Doc
onwhite :: Doc -> Doc
ondullblack :: Doc -> Doc
ondullred :: Doc -> Doc
ondullgreen :: Doc -> Doc
ondullyellow :: Doc -> Doc
ondullblue :: Doc -> Doc
ondullmagenta :: Doc -> Doc
ondullcyan :: Doc -> Doc
ondullwhite :: Doc -> Doc
bold :: Doc -> Doc
debold :: Doc -> Doc
underline :: Doc -> Doc
deunderline :: Doc -> Doc
plain :: Doc -> Doc
class () => Pretty a
pretty :: Pretty a => a -> Doc ann
prettyList :: Pretty a => [a] -> Doc ann
type SimpleDoc = SimpleDocStream AnsiStyle
renderPretty :: Float -> Int -> Doc -> SimpleDoc
renderCompact :: Doc -> SimpleDoc
renderSmart :: Float -> Int -> Doc -> SimpleDoc
displayS :: SimpleDoc -> ShowS
displayIO :: Handle -> SimpleDoc -> IO ()
putDoc :: Doc -> IO ()
hPutDoc :: Handle -> Doc -> IO ()
column :: (Int -> Doc) -> Doc
columns :: (Maybe Int -> Doc) -> Doc
nesting :: (Int -> Doc) -> Doc
width :: Doc -> (Int -> Doc) -> Doc
