Pretty-printing: An exercise in functional programming

  • John Hughes
Invited Lectures
Part of the Lecture Notes in Computer Science book series (LNCS, volume 669)


We designed a very small library (around one page) defining five combinators for pretty-printing. Despite, or perhaps because of their simplicity, these combinators have proved sufficiently efficient and expressive for quite extensive practical use. The combinators are simple to specify and enjoy many algebraic properties. The algebra is useful for reasoning about pretty-printers that use the library, and played an important role in deriving its implementations.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 1993

Authors and Affiliations

  • John Hughes
    • 1
    • 2
  1. 1.Department of Computing ScienceUniversity of GlasgowGlasgowScotland
  2. 2.Chalmers Tekniska HögskolaGöteborgSweden

Personalised recommendations