prettyclass-1.0.0.0: Pretty printing class similar to Show.
Safe HaskellSafe-Inferred
LanguageHaskell98

Text.PrettyPrint.HughesPJClass

Description

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

Synopsis

Documentation

class Pretty a where Source #

Pretty printing class. The precedence level is used in a similar way as in the Show class. Minimal complete definition is either pPrintPrec or pPrint.

Minimal complete definition

Nothing

Instances

Instances details
Pretty Ordering Source # 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty Integer Source # 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty () Source # 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty Bool Source # 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty Char Source # 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty Double Source # 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty Float Source # 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty Int Source # 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty a => Pretty (Maybe a) Source # 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty a => Pretty [a] Source # 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> [a] -> Doc Source #

pPrint :: [a] -> Doc Source #

pPrintList :: PrettyLevel -> [[a]] -> Doc Source #

(Pretty a, Pretty b) => Pretty (Either a b) Source # 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

(Pretty a, Pretty b) => Pretty (a, b) Source # 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> (a, b) -> Doc Source #

pPrint :: (a, b) -> Doc Source #

pPrintList :: PrettyLevel -> [(a, b)] -> Doc Source #

(Pretty a, Pretty b, Pretty c) => Pretty (a, b, c) Source # 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> (a, b, c) -> Doc Source #

pPrint :: (a, b, c) -> Doc Source #

pPrintList :: PrettyLevel -> [(a, b, c)] -> Doc Source #

(Pretty a, Pretty b, Pretty c, Pretty d) => Pretty (a, b, c, d) Source # 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> (a, b, c, d) -> Doc Source #

pPrint :: (a, b, c, d) -> Doc Source #

pPrintList :: PrettyLevel -> [(a, b, c, d)] -> Doc Source #

(Pretty a, Pretty b, Pretty c, Pretty d, Pretty e) => Pretty (a, b, c, d, e) Source # 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> (a, b, c, d, e) -> Doc Source #

pPrint :: (a, b, c, d, e) -> Doc Source #

pPrintList :: PrettyLevel -> [(a, b, c, d, e)] -> Doc Source #

(Pretty a, Pretty b, Pretty c, Pretty d, Pretty e, Pretty f) => Pretty (a, b, c, d, e, f) Source # 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> (a, b, c, d, e, f) -> Doc Source #

pPrint :: (a, b, c, d, e, f) -> Doc Source #

pPrintList :: PrettyLevel -> [(a, b, c, d, e, f)] -> Doc Source #

(Pretty a, Pretty b, Pretty c, Pretty d, Pretty e, Pretty f, Pretty g) => Pretty (a, b, c, d, e, f, g) Source # 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> (a, b, c, d, e, f, g) -> Doc Source #

pPrint :: (a, b, c, d, e, f, g) -> Doc Source #

pPrintList :: PrettyLevel -> [(a, b, c, d, e, f, g)] -> Doc Source #

(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) Source # 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> (a, b, c, d, e, f, g, h) -> Doc Source #

pPrint :: (a, b, c, d, e, f, g, h) -> Doc Source #

pPrintList :: PrettyLevel -> [(a, b, c, d, e, f, g, h)] -> Doc Source #

prettyShow :: Pretty a => a -> String Source #

Pretty print a value with the prettyNormal level.

prettyParen :: Bool -> Doc -> Doc Source #

Parenthesize an value if the boolean is true.