[m-dev.] Contribution: Pretty Printing Library

Ralph Becket rbeck at microsoft.com
Thu Apr 6 21:01:09 AEST 2000


I've knocked up a pretty printing library based on Philip Wadler's
paper "A Prettier Printer", which is optimal (doesn't overrun line
widths where possible), bounded* (the pp only needs to look ahead
k characters to make a formatting decision) and the composition
algebra is much simpler than Hughes'.  Note that Hughes' pp is
optimal, but not bounded.

This library is released under the LGPL.

Ralph

* Run-time would be too if the implementation were lazy - I'm waiting 
for Tyson to deliver that for us :)  I haven't noticed any performance
problems in practice...

--
Ralph Becket      |      MSR Cambridge      |      rbeck at microsoft.com 
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list