Safe Haskell | None |
---|---|
Language | Haskell2010 |
Pretty-printing of terms and assorted other values.
- prettyPrint :: Pretty a => a -> IO ()
- pPrintParen :: Bool -> Doc -> Doc
- pPrintTuple :: [Doc] -> Doc
- pPrintSet :: [Doc] -> Doc
- supply :: [String] -> [String]
- class Pretty f => PrettyTerm f where
- newtype TermStyle = TermStyle {
- pPrintTerm :: forall a. Pretty a => PrettyLevel -> Rational -> Doc -> [a] -> Doc
- invisible :: TermStyle
- curried :: TermStyle
- uncurried :: TermStyle
- prefix :: TermStyle
- postfix :: TermStyle
- fixedArity :: Int -> TermStyle -> TermStyle
- implicitArguments :: Int -> TermStyle -> TermStyle
- infixStyle :: Int -> TermStyle
- tupleStyle :: TermStyle
- module Text.PrettyPrint.HughesPJClass
- class Pretty a where
Miscellaneous Pretty
instances and utilities.
prettyPrint :: Pretty a => a -> IO () Source #
pPrintTuple :: [Doc] -> Doc Source #
Pretty-printing of terms.
class Pretty f => PrettyTerm f where Source #
A class for customising the printing of function symbols.
PrettyTerm f => PrettyTerm (Extended f) Source # | |
Defines how to print out a function symbol.
TermStyle | |
|
fixedArity :: Int -> TermStyle -> TermStyle Source #
A helper function that deals with under- and oversaturated applications.
implicitArguments :: Int -> TermStyle -> TermStyle Source #
A helper function that drops a certain number of arguments.
infixStyle :: Int -> TermStyle Source #
For infix operators.
tupleStyle :: TermStyle Source #
For tuples.
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 #
pPrintList :: PrettyLevel -> [a] -> Doc #
Orphan instances
Pretty Doc Source # | |
Pretty Var Source # | |
(Eq a, Integral a, Pretty a) => Pretty (Ratio a) Source # | |
Pretty a => Pretty (Set a) Source # | |
(Numbered f, Pretty f) => Pretty (Fun f) Source # | |
(Numbered f, PrettyTerm f) => Pretty (Term f) Source # | |
(Numbered f, PrettyTerm f) => Pretty (TermList f) Source # | |
(Numbered f, PrettyTerm f) => Pretty (Subst f) Source # | |
(Pretty k, Pretty v) => Pretty (Map k v) Source # | |