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


-- | Pretty printing class similar to Show.
--   
--   Pretty printing class similar to Show, based on the HughesPJ pretty
--   printing library. Provides the pretty printing class and instances for
--   the Prelude types.
@package prettyclass
@version 1.0.0.0


-- | Pretty printing class, simlar to <a>Show</a> but nicer looking. Note
--   that the precedence level is a <a>Rational</a> so there is an
--   unlimited number of levels. Based on <a>Text.PrettyPrint.HughesPJ</a>,
--   which is re-exported.
module Text.PrettyPrint.HughesPJClass

-- | Pretty printing class. The precedence level is used in a similar way
--   as in the <a>Show</a> class. Minimal complete definition is either
--   <a>pPrintPrec</a> or <a>pPrint</a>.
class Pretty a where pPrintPrec _ _ = pPrint pPrint = pPrintPrec prettyNormal 0 pPrintList l = brackets . fsep . punctuate comma . map (pPrintPrec l 0)
pPrintPrec :: Pretty a => PrettyLevel -> Rational -> a -> Doc
pPrint :: Pretty a => a -> Doc
pPrintList :: Pretty a => PrettyLevel -> [a] -> Doc

-- | Level of detail in the pretty printed output. Level 0 is the least
--   detail.
newtype PrettyLevel
PrettyLevel :: Int -> PrettyLevel
prettyNormal :: PrettyLevel

-- | Pretty print a value with the <a>prettyNormal</a> level.
prettyShow :: Pretty a => a -> String

-- | Parenthesize an value if the boolean is true.
prettyParen :: Bool -> Doc -> Doc
instance Eq PrettyLevel
instance Ord PrettyLevel
instance Show PrettyLevel
instance (Pretty a, Pretty b, Pretty c, Pretty d, Pretty e, Pretty f, Pretty g, Pretty h) => Pretty (a, b, c, d, e, f, g, h)
instance (Pretty a, Pretty b, Pretty c, Pretty d, Pretty e, Pretty f, Pretty g) => Pretty (a, b, c, d, e, f, g)
instance (Pretty a, Pretty b, Pretty c, Pretty d, Pretty e, Pretty f) => Pretty (a, b, c, d, e, f)
instance (Pretty a, Pretty b, Pretty c, Pretty d, Pretty e) => Pretty (a, b, c, d, e)
instance (Pretty a, Pretty b, Pretty c, Pretty d) => Pretty (a, b, c, d)
instance (Pretty a, Pretty b, Pretty c) => Pretty (a, b, c)
instance (Pretty a, Pretty b) => Pretty (a, b)
instance Pretty a => Pretty [a]
instance (Pretty a, Pretty b) => Pretty (Either a b)
instance Pretty a => Pretty (Maybe a)
instance Pretty Char
instance Pretty Ordering
instance Pretty Bool
instance Pretty ()
instance Pretty Double
instance Pretty Float
instance Pretty Integer
instance Pretty Int
