The GenericPretty package

[Tags: bsd3, library]

GenericPretty is a Haskell library that supports automatic derivation of pretty printing functions on user defined data types.

The form of geenrics used is based on that introduced in the paper: Magalhaes, Dijkstra, Jeuring, and Loh, A Generic Deriving Mechanism for Haskell, 3'rd ACM Symposium on Haskell, pp. 37-48, September 2010, Changes from the original paper in the GHC implementation are described here:

This package requires the use of the new GHC.Generics features, present from GHC 7.2. Use of these features is indicated by the DeriveGeneric pragma. or the flag -XDeriveGeneric.

Pretty printing produces values of type Pretty.Doc, using the Pretty library

The Pretty library plans to incorporate a Style datatype to control details of printing (such as line length). The library MyPretty is provided as a thin wrapper around the Pretty library, to support Style related features. Once the Pretty library supports Style, MyPretty will become obsolete and be replaced by Pretty.

The output provided is a pretty printed version of that provided by That is, rendering the document provided by this pretty printer yields an output identical to that of, except for extra whitespace.

For information about the functions exported by the package please see the API linked further down this page. For examples of usage, both basic and more complex see the README file and the haskell source code files in the TestSuite folder, both included in the package. Finally for installation instructions also see the README file or this page:


Versions0.1.0, 0.1.1, 0.1.2, 0.1.3, 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.1.7, 1.1.8, 1.1.9, 1.2.0, 1.2.1
Change logNone available
Dependenciesbase (>=3 && <5), ghc (>=7.2), ghc-prim
AuthorRazvan Ranca
CategoryText, Generics, Pretty Printer
Home page
Source repositoryhead: git clone
UploadedSat Aug 13 16:25:57 UTC 2011 by RazvanRanca
DistributionsLTSHaskell:1.2.1, NixOS:1.2.1, Stackage:1.2.1
Downloads4183 total (300 in last 30 days)
StatusDocs not available [build log]
Last success reported on 2015-05-21 [all 2 reports]



Maintainers' corner

For package maintainers and hackage trustees