README.md 2.12 KB
Newer Older
1
2
# Pretty : A Haskell Pretty-printer library

David Terei's avatar
David Terei committed
3
4
[![Hackage](https://img.shields.io/hackage/v/pretty.svg?style=flat)](https://hackage.haskell.org/package/pretty)
[![Hackage Dependencies](https://img.shields.io/hackage-deps/v/pretty.svg?style=flat)](http://packdeps.haskellers.com/reverse/pretty)
David Terei's avatar
David Terei committed
5
[![BSD3 License](http://img.shields.io/badge/license-BSD3-brightgreen.svg?style=flat)][tl;dr Legal: BSD3]
David Terei's avatar
David Terei committed
6
7
8
9
10
[![Build](https://img.shields.io/travis/haskell/pretty.svg?style=flat)](https://travis-ci.org/haskell/pretty)

[tl;dr Legal: BSD3]:
  https://tldrlegal.com/license/bsd-3-clause-license-(revised)
  "BSD3 License"
David Terei's avatar
David Terei committed
11

12
13
14
15
16
Pretty is a pretty-printing library, a set of API's that provides a
way to easily print out text in a consistent format of your choosing.
This is useful for compilers and related tools.

It is based on the pretty-printer outlined in the  paper 'The Design
David Terei's avatar
David Terei committed
17
18
19
20
of a Pretty-printing Library' by John Hughes in Advanced Functional
Programming, 1995. It can be found
[here](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.38.8777).

21
## Licensing
dterei's avatar
dterei committed
22

23
This library is BSD-licensed.
dterei's avatar
dterei committed
24

25
26
27
## Building

The library uses the Cabal build system, so building is simply a
28
matter of running:
29
30

```
31
32
33
cabal sandbox init
cabal install "QuickCheck >= 2.5 && < 3"
cabal install --only-dependencies
34
35
cabal configure --enable-tests
cabal build
36
cabal test
37
38
```

39
40
41
We have to install `QuickCheck` manually as otherwise Cabal currently
throws an error due to the cyclic dependency between `pretty` and
`QuickCheck`.
42

43
44
45
46
47
*If `cabal test` freezes*, then run
`cabal test --show-details=streaming` instead. This is due to a
[bug](https://github.com/haskell/cabal/issues/1810) in certain
versions of Cabal.

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
## Get involved!

We are happy to receive bug reports, fixes, documentation enhancements,
and other improvements.

Please report bugs via the
[github issue tracker](http://github.com/haskell/pretty/issues).

Master [git repository](http://github.com/haskell/pretty):

* `git clone git://github.com/haskell/pretty.git`

## Authors

This library is maintained by David Terei, <code@davidterei.com>. It
was originally designed by John Hughes's and since heavily modified by
Simon Peyton Jones.