Copyright | (c) Trevor Elliott <revor@galois.com> 2015 |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | David Terei <code@davidterei.com> |
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 ann Source
pPrintList :: PrettyLevel -> [a] -> Doc ann 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.Annotated.HughesPJClass Methods(==) :: PrettyLevel -> PrettyLevel -> Bool Source (/=) :: PrettyLevel -> PrettyLevel -> Bool Source | |
Ord PrettyLevel | |
Defined in Text.PrettyPrint.Annotated.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.Annotated.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 ann -> Doc ann Source
Deprecated: Please use maybeParens
instead
Parenthesize an value if the boolean is true.
© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/8.6.1/docs/html/libraries/pretty-1.1.3.6/Text-PrettyPrint-Annotated-HughesPJClass.html