Skip to content

Prettyprinter#1263

Merged
robdockins merged 4 commits intomasterfrom
prettyprinter
Aug 9, 2021
Merged

Prettyprinter#1263
robdockins merged 4 commits intomasterfrom
prettyprinter

Conversation

@robdockins
Copy link
Contributor

Swap out the pretty printing library for prettyprinter. This is a precursor to better pretty printer integration with the rest of our tools.

This required a fair amount of fixup to the pretty-printing code,
as some of the primitives have semantics that differ in subtle ways
from the old package.  The output now is mostly the same as before,
although some improvements have been made here and there.

The one somewhat negative outcome of this change is that the
"line fill" algorithm in `prettyprinter` works a bit different
and makes choices about where to break lines that are arguably
less desirable than before. When laying out structures nested inside
sequences, it is more likely to break a line inside a substructure,
whereas the old algorithm prefered to break lines between elements
of the outer sequence.  There are also appear to be some minor
differences regarding how ribbon width is calculated.
@robdockins robdockins requested a review from yav August 6, 2021 21:23
Copy link
Member

@yav yav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't had time to look at this but I am on PTO and I can't imagine there's anything interesting I'd have to say, so feel free to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants