package pprint

  1. Overview
  2. Docs

Module PPrint.ToFormatterSource

This renderer sends its output into a formatter channel.

Sourcetype channel = Format.formatter

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.

OCaml

Innovation. Community. Security.