Restructure code base.
[packages/pretty.git] / src / Text / PrettyPrint.hs
1 #if __GLASGOW_HASKELL__ >= 701
2 {-# LANGUAGE Safe #-}
3 #endif
4 -----------------------------------------------------------------------------
5 -- |
6 -- Module : Text.PrettyPrint
7 -- Copyright : (c) The University of Glasgow 2001
8 -- License : BSD-style (see the file LICENSE)
9 --
10 -- Maintainer : David Terei <dave.terei@gmail.com>
11 -- Stability : stable
12 -- Portability : portable
13 --
14 -- The default interface to the pretty-printing library. Provides a collection
15 -- of pretty printer combinators.
16 --
17 -- This module should be used as opposed to the "Text.PrettyPrint.HughesPJ"
18 -- module. Both are equivalent though as this module simply re-exports the
19 -- other.
20 --
21 -----------------------------------------------------------------------------
22
23 module Text.PrettyPrint (
24
25 -- * The document type
26 Doc,
27
28 -- * Constructing documents
29
30 -- ** Converting values into documents
31 char, text, ptext, sizedText, zeroWidthText,
32 int, integer, float, double, rational,
33
34 -- ** Simple derived documents
35 semi, comma, colon, space, equals,
36 lparen, rparen, lbrack, rbrack, lbrace, rbrace,
37
38 -- ** Wrapping documents in delimiters
39 parens, brackets, braces, quotes, doubleQuotes,
40
41 -- ** Combining documents
42 empty,
43 (<>), (<+>), hcat, hsep,
44 ($$), ($+$), vcat,
45 sep, cat,
46 fsep, fcat,
47 nest,
48 hang, punctuate,
49
50 -- * Predicates on documents
51 isEmpty,
52
53 -- * Rendering documents
54
55 -- ** Default rendering
56 render,
57
58 -- ** Rendering with a particular style
59 Style(..),
60 style,
61 renderStyle,
62
63 -- ** General rendering
64 fullRender,
65 Mode(..), TextDetails(..)
66
67 ) where
68
69 import Text.PrettyPrint.HughesPJ
70