Copyright | (c) Lennart Augustsson 2014 |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | David Terei <[email protected]> |
Stability | stable |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell98 |
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. This module re-exports HughesPJ
.
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
.
pPrintPrec :: PrettyLevel -> Rational -> a -> Doc Source
pPrintList :: PrettyLevel -> [a] -> Doc Source
newtype PrettyLevel Source
Level of detail in the pretty printed output. Level 0 is the least detail.
PrettyLevel Int |
Eq PrettyLevel | |
Defined in Text.PrettyPrint.HughesPJClass Methods(==) :: PrettyLevel -> PrettyLevel -> Bool Source (/=) :: PrettyLevel -> PrettyLevel -> Bool Source | |
Ord PrettyLevel | |
Defined in Text.PrettyPrint.HughesPJClass Methodscompare :: PrettyLevel -> PrettyLevel -> Ordering Source (<) :: PrettyLevel -> PrettyLevel -> Bool Source (<=) :: PrettyLevel -> PrettyLevel -> Bool Source (>) :: PrettyLevel -> PrettyLevel -> Bool Source (>=) :: PrettyLevel -> PrettyLevel -> Bool Source max :: PrettyLevel -> PrettyLevel -> PrettyLevel Source min :: PrettyLevel -> PrettyLevel -> PrettyLevel Source | |
Show PrettyLevel | |
Defined in Text.PrettyPrint.HughesPJClass MethodsshowsPrec :: Int -> PrettyLevel -> ShowS Source show :: PrettyLevel -> String Source showList :: [PrettyLevel] -> ShowS Source |
prettyNormal :: PrettyLevel Source
The "normal" (Level 0) of detail.
prettyShow :: Pretty a => a -> String Source
Pretty print a value with the prettyNormal
level.
prettyParen :: Bool -> Doc -> Doc Source
Deprecated: Please use maybeParens
instead
Parenthesize an value if the boolean is true.
module Text.PrettyPrint.HughesPJ
© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/8.8.3/docs/html/libraries/pretty-1.1.3.6/Text-PrettyPrint-HughesPJClass.html