Custom rendering for syntax highlighting or structured output.
Use Pretty.pretty for plain text. Use this module to:
Renders a document using a custom Renderer.
pretty 80 htmlRenderer docPretty prints with both page width and ribbon width constraints.
The ribbon width limits non-indentation characters per line. At indentation
level i, the effective width is min(pageWidth, i + ribbonWidth).
Accumulator-based renderer, similar to
foldl.init: Starting accumulator valuetagged: Handle tagged text (for syntax highlighting)untagged: Handle untagged text and indentationnewline: Handle line breaks (add\nhere if needed)outer: Transform final accumulator to output typeText is processed left-to-right; reverse lists if accumulating in order.