| 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: Tue, 30 Dec 2025 04:50:32 GMT
X-Served-By: cache-dfw-kdal2120076-DFW, cache-bom-vanm7210094-BOM
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1767070232.772871,VS0,VE389
Vary: Accept, Accept-Encoding
transfer-encoding: chunked
doclayout: A prettyprinting library for laying out text documents.
[Skip to Readme]
doclayout: A prettyprinting library for laying out text documents.
doclayout is a prettyprinting library for laying out text documents, with several features not present in prettyprinting libraries designed for code. It was designed for use in pandoc.
[Skip to Readme]
Downloads
- doclayout-0.5.0.1.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.2, 0.2.0.1, 0.3, 0.3.0.1, 0.3.0.2, 0.3.1, 0.3.1.1, 0.4, 0.4.0.1, 0.5, 0.5.0.1 |
|---|---|
| Change log | changelog.md |
| Dependencies | base (>=4.12 && <5), containers, emojis (>=0.1.2), mtl, safe, semigroups (>=0.18 && <0.19), text [details] |
| License | BSD-3-Clause |
| Copyright | 2016-24 John MacFarlane |
| Author | John MacFarlane |
| Maintainer | jgm@berkeley.edu |
| Category | Text |
| Home page | https://github.com/jgm/doclayout |
| Source repo | head: git clone https://github.com/jgm/doclayout |
| Uploaded | by JohnMacFarlane at 2025-09-03T17:45:56Z |
| Distributions | Arch:0.5, Debian:0.3, Fedora:0.5, LTSHaskell:0.5.0.1, NixOS:0.5.0.1, Stackage:0.5.0.1, openSUSE:0.5.0.1 |
| Reverse Dependencies | 11 direct, 172 indirect [details] |
| Downloads | 25336 total (30 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2025-09-03 [all 1 reports] |
Readme for doclayout-0.5.0.1
[back to package description]doclayout
This is a prettyprinting library designed for laying out plain-text documents. It originated in the pandoc module Text.Pandoc.Pretty, and its development has been guided by pandoc's needs in rendering wrapped textual documents.
In supports wrapping of text on breaking spaces, indentation and other line prefixes, blank lines, and tabular content.
Example:
Text.DocLayout> mydoc = hang 2 "- " (text "foo" <+> text "bar")
Text.DocLayout> putStrLn $ render (Just 20) mydoc
- foo bar
Text.DocLayout> putStrLn $ render (Just 10) (prefixed "> " (mydoc $+$ mydoc))
> - foo
> bar
>
> - foo
> bar
The Doc type may be parameterized to either String or
(strict or lazy) Text, depending on the desired render target.