Document
Represents a pretty printed document.
More specifically, a Document represents a non-empty set of possible layouts of a document. The print functions select one of these possibilities, taking into account things like the width of the output document.
Documents are created using the invoke functions, but the main interface is through PrettyPrintable.
Types
Functions
Renders the document as a String.
Returns this object.
Extensions
Like joined but using commas as separators and enclosed in /*
and */
.
Convenience method. See plus.
Tries laying out this document into a single line by removing the contained Document.lineBreaks (and replacing them with spaces); if this does not fit the page, the document is laid out without any changes. This function is the key to layouts that adapt to available space nicely.
Returns a new document that is this with the nesting level (indentation after newlines) increased by indentationChange. Negative values for indentationChange are allowed, and decrease the nesting level accordingly.
Convenience method. See plus.