Pretty-printing and text formatting

The libraries in this subsection are as follows:

  • wl-pprint-* packages: Pretty-printers based on Wadler/Leijen pretty-printers. Multiple implementations with different features are found in similarly named libraries.
  • text-format: High-performance text formatting.
  • interpolateInterpolate: Simple string interpolation using Template Haskell.
  • here: Docs for Haskell using Template Haskell.

Pretty-printing is the process of turning data into user-friendly text format. Think, for instance, of printing a long string with appropriate line breaks, or printing Haskell values in a friendly way, in other words, commas at the beginning of lines and so on.

The Wadler/Leijen pretty-printer is a simple but powerful interface that has ...

Get Haskell High Performance Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.