GenericPretty-1.1.5: A generic, derivable, haskell pretty printer.



MyPretty is a library that can be used in conjuncture with Text.PrettyPrint.GenericPretty.

This library is a thin wrapper around the Pretty library and implements only Style related features. These features are planned to be added to the Pretty library itself. When that happens MyPretty will become obsolete and will be replaced by Pretty.

This library can be imported if the user wants to make custom pretty printing definitions for his types or define a custom printing Style. The syntax used is that of Pretty and Text.PrettyPrint.HughesPJ.

For an example of a custom definition for a data type and usage of a custom Style see the README file included in the package. |



module Pretty

data Style Source

A rendering style




mode :: Mode

The rendering mode

lineLength :: Int

Length of line, in chars

ribbonsPerLine :: Float

Ratio of ribbon length to line length

renderStyle :: Style -> Doc -> StringSource

Render a document using a particular style internally calls fullRender

style :: StyleSource

The default Style used for Text.PrettyPrint.GenericPretty (mode=PageMode, lineLength=80, ribbonsPerLine=1.5)