/paiges

an implementation of Wadler's a prettier printer

Primary LanguageScalaApache License 2.0Apache-2.0

Paiges

An implementation of Wadler's "A Prettier Printer". This code is a direct port of the code in section 7 of this paper, with an attempt to be idiomatic in scala.

The name is a reference to the Paige compositor and the fact that it helps you layout pages.

The main utilities or this code:

  1. not have to go crazy dealing with indentation when producing text documents, and to do so a clean way.
  2. support cases where whitespace and newlines might be interchangable.