| CARVIEW |
Select Language
HTTP/1.1 200 OK
Connection: keep-alive
Server: nginx/1.24.0 (Ubuntu)
Content-Type: text/html; charset=utf-8
Cache-Control: public, max-age=300
Content-Encoding: gzip
Via: 1.1 varnish, 1.1 varnish
Accept-Ranges: bytes
Age: 0
Date: Sun, 18 Jan 2026 05:29:51 GMT
X-Served-By: cache-dfw-kdal2120134-DFW, cache-bom-vanm7210054-BOM
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1768714191.007963,VS0,VE758
Vary: Accept, Accept-Encoding
transfer-encoding: chunked
prettyprinter-combinators: Some useful combinators for the prettyprinter package
[Skip to Readme]
prettyprinter-combinators: Some useful combinators for the prettyprinter package
Various utilities that make writing Pretty instances easier.
Notable utilites include automatic deriving of Pretty instance via Generic, Data, or Show instance.
[Skip to Readme]
Modules
[Index] [Quick Jump]
Flags
Manual Flags
| Name | Description | Default |
|---|---|---|
| enummapset | Depend on enummapset package to provide instances and functions for it | Enabled |
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
Downloads
- prettyprinter-combinators-0.1.3.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
| Versions [RSS] | 0.1, 0.1.0.1, 0.1.1, 0.1.1.1, 0.1.2, 0.1.3 |
|---|---|
| Change log | Changelog.md |
| Dependencies | base (>=4.16 && <5), bimap, bytestring, containers, dlist, enummapset, pretty-show (>=1.6), prettyprinter (>=1.7), syb, template-haskell (>=2.18), text, unordered-containers, vector [details] |
| Tested with | ghc ==9.2.8, ghc ==9.4.7, ghc ==9.6.3, ghc ==9.8.1, ghc ==9.10.1 |
| License | Apache-2.0 |
| Author | Sergey Vinokurov |
| Maintainer | Sergey Vinokurov <serg.foo@gmail.com> |
| Uploaded | by SergeyVinokurov at 2024-05-12T15:22:16Z |
| Category | User Interfaces, Text |
| Home page | https://github.com/sergv/prettyprinter-combinators |
| Source repo | head: git clone https://github.com/sergv/prettyprinter-combinators.git |
| Distributions | LTSHaskell:0.1.3, NixOS:0.1.3, Stackage:0.1.3 |
| Reverse Dependencies | 3 direct, 1 indirect [details] |
| Downloads | 758 total (17 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs uploaded by user Build status unknown [no reports yet] |
Readme for prettyprinter-combinators-0.1.3
[back to package description]This is a set of utilities for the Haskell prettyrinter package.
Most notable is automatic deriving of Pretty instance from the
Generic instance, e.g.
{-# LANGUAGE DeriveGeneric #-}
import Prettyprinter.Generics
data Foo a b = Bar Int | Baz a b
deriving (Generic)
instance (Pretty a, Pretty b) => Pretty (Foo a b) where
pretty = ppGeneric
printed :: Doc ann
printed = pretty $ Baz (Bar 10 :: Foo () ()) [1..22]
which would put following into printed:
Baz
Bar 10
[ 1
, 2
, 3
, 4
, 5
, 6
, 7
, 8
, 9
, 10
, 11
, 12
, 13
, 14
, 15
, 16
, 17
, 18
, 19
, 20
, 21
, 22 ]