portray: Rendering to pseudo-Haskell syntax

[ apache, library, text ] [ Propose Tags ]

This provides a single place to describe how a type should be formatted as pseudo-Haskell syntax, independently of the actual pretty-printing library (e.g. "pretty", "ansi-wl-pprint", or "prettyprinter") that will ultimately be used to render it. This means packages can cheaply provide integration with all pretty-printers by providing an instance of this class, without needing to depend on any of them (or their layout algorithms).

Of course, this comes at the cost of targeting a predeclared set of formatting choices. If there are any egregious omissions, we can always add more constructors.

This library is explicitly not intended to provide a way to express all documents; only a particular flavor of pseudo-Haskell syntax representing values and types.


[Index] [Quick Jump]


Maintainer's Corner

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS], 0.1.1, 0.2.0, 0.3.0
Change log CHANGELOG.md
Dependencies base (>=4.12 && <4.17), bytestring (>=0.9 && <0.12), containers (>=0.6 && <0.7), text (>=0.1 && <2.1), wrapped (>=0.1 && <0.2) [details]
License Apache-2.0
Copyright 2020-2021 Google LLC; 2022 Andrew Pritchard
Author Andrew Pritchard <awpritchard@gmail.com>
Maintainer Andrew Pritchard <awpritchard@gmail.com>
Category Text
Home page https://github.com/awpr/portray#readme
Bug tracker https://github.com/awpr/portray/issues
Source repo head: git clone https://github.com/awpr/portray(portray)
Uploaded by AndrewPritchard at 2022-09-25T04:28:07Z
Distributions NixOS:0.3.0
Downloads 407 total (22 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-09-25 [all 1 reports]