batterseapower / ansi-wl-pprint

The Wadler/Leijen Pretty Printer for colored ANSI terminal output
http://batterseapower.github.com/ansi-wl-pprint
Other
30 stars 15 forks source link

Added `columns`. #3

Closed ekmett closed 11 years ago

ekmett commented 11 years ago

When rendering some non-classically pretty printed items (such as the clang-style diagnostics used by trifecta) it is helpful to know the width the document is being formatted to. I had this functionality in wl-pprint-terminfo, and its fairly trivial to add to ansi-wl-pprint.

I've attached a patch that adds this functionality to the 'undocumented' function set.

batterseapower commented 11 years ago

Seems solid. Thanks! Released it.

ekmett commented 11 years ago

Thanks!