A Pretty Printer, based on Philip Wadler's "A prettier printer".    But heavily modified to be efficient in a strict language.