[m-dev.] Contribution: Pretty Printing Library

Mark Anthony BROWN dougl at cs.mu.OZ.AU
Mon Apr 10 17:46:13 AEST 2000


Hi Ralph,

I have briefly looked over the code; it looks great!
A pretty printer is sorely needed (by the mdb browser, atleast).
I'll review the code in the next couple of days---this is to
let you know that a review is on the way.

Cheers,
Mark.

Ralph Becket writes:
> 
> 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...
> 

-- 
Mark Brown, PhD student            )O+  |  "Another of Fortran's breakthroughs
(m.brown at cs.mu.oz.au)                   |  was the GOTO statement, which was...
Dept. of Computer Science and Software  |  uniquely simple and understandable"
Engineering, University of Melbourne    |              -- IEEE, 1994
--------------------------------------------------------------------------
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