package pprint

  1. Overview
  2. Docs
A pretty-printing combinator library and rendering engine

Install

dune-project
 Dependency

Authors

Maintainers

Sources

20220103.tar.gz
md5=6ace8d5113f937aa65873f6c9985fea4
sha512=1c4d85e529414dc2d52602fae7e44ca036d2d35e9ce1906fd88b0f8a8d0ba1527042b0e5117fdeb51237b2311020a711065a917cc158b63e2ac932c97fa28406

doc/pprint/PPrint/ToChannel/index.html

Module PPrint.ToChannelSource

This renderer sends its output into an output channel.

Sourcetype channel = out_channel

The type of the output channel.

Sourcetype document = document

The type of documents.

Sourceval pretty : float -> int -> channel -> document -> unit

pretty rfrac width channel document pretty-prints the document document into the output channel channel. The parameter width is the maximum number of characters per line. The parameter rfrac is the ribbon width, a fraction relative to width. The ribbon width is the maximum number of non-indentation characters per line.

Sourceval compact : channel -> document -> unit

compact channel document prints the document document to the output channel channel. No indentation is used. All newline instructions are respected, that is, no groups are flattened.