At the time it was originally written I didn't know about Daan Leijen's
pretty printing module based on the same paper. I have since incorporated
many of his improvements. This module is geared towards pretty printing
source code; its main advantages over other libraries are a Pretty class
that handles precedence and the ability to automatically track the source
locations associated with pretty printed values and output appropriate
#line pragmas.

The document encloseSep l r p ds separates ds with the punctuation p
and encloses the result using l and r. When wrapped, punctuation appears
at the end of the line. The enclosed portion of the document is aligned one
column to the right of the opening document.