Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
A "classic" (i.e. as seen in the specification) way to pretty-print PLC entities.
Synopsis
- data PrettyConfigClassic configName = PrettyConfigClassic {
- _pccConfigName ∷ configName
- _pccDisplayAnn ∷ Bool
- type PrettyClassicBy configName = PrettyBy (PrettyConfigClassic configName)
- type PrettyClassic = PrettyClassicBy PrettyConfigName
- type PrettyParens = PrettyBy RenderContext
- juxtRenderContext ∷ RenderContext
- consAnnIf ∷ Pretty ann ⇒ PrettyConfigClassic configName → ann → [Doc dann] → [Doc dann]
- prettyConfigClassic ∷ PrettyConfigClassic PrettyConfigName
- prettyConfigClassicSimple ∷ PrettyConfigClassic PrettyConfigName
- prettyClassic ∷ PrettyClassic a ⇒ a → Doc ann
- prettyClassicSimple ∷ PrettyClassic a ⇒ a → Doc ann
Documentation
data PrettyConfigClassic configName Source #
Configuration for the classic pretty-printing.
PrettyConfigClassic | |
|
Instances
type PrettyClassicBy configName = PrettyBy (PrettyConfigClassic configName) Source #
The "classically pretty-printable" constraint.
type PrettyParens = PrettyBy RenderContext Source #
For pretty-printing a value with a minimum amount of parens.
juxtRenderContext ∷ RenderContext Source #
An initial RenderContext
.
An expression printed in this context gets enclosed in parens unless its outermost operator (if
any) binds even stronger than function application.
consAnnIf ∷ Pretty ann ⇒ PrettyConfigClassic configName → ann → [Doc dann] → [Doc dann] Source #
Add a pretty-printed annotation to a list of Doc
s if the given config enables pretty-printing
of annotations.
prettyClassic ∷ PrettyClassic a ⇒ a → Doc ann Source #
Pretty-print a value in the default mode using the classic view.
prettyClassicSimple ∷ PrettyClassic a ⇒ a → Doc ann Source #
Pretty-print a value in the simple mode using the classic view.