[Haskell-cafe] HughesPJ vs. Wadler-Leijen

Evan Laforge qdunkan at gmail.com
Tue Mar 20 18:12:34 CET 2012


On Tue, Mar 20, 2012 at 2:24 AM, Stephen Tetley
<stephen.tetley at gmail.com> wrote:
> A quick suggestion - does setting the ribbon_frac to something like
> 0.8 improve things?

Nope.  The ribbon (IMO both an undescriptive name and underdocumented)
only constraints the number of non-indent characters per line.  So it
makes the line breaks in different places, but the underlying problem
of it not knowing where lines should be broken remains.

> The Show instance for wl-pprint's Doc uses 0.4 which I've found too low.

It's off the subject, but I alway thought 'ribbon' was odd as the
single knob available.  I never really saw a rationale for why it's so
important.  The old Hughes-PJ paper says it looks nice to have a
"ribbon" of text snaking across the page, but I think it looks nice to
preserve vertical space by filling lines as much as possible.
Difference of opinion I guess.



More information about the Haskell-Cafe mailing list