Skip to content

Improve the docs for layoutSmart's fitting predicate#145

Merged
sjakobi merged 4 commits intomasterfrom
136-clarify-docs
Feb 7, 2020
Merged

Improve the docs for layoutSmart's fitting predicate#145
sjakobi merged 4 commits intomasterfrom
136-clarify-docs

Conversation

@sjakobi
Copy link
Collaborator

@sjakobi sjakobi commented Feb 2, 2020

Fixes #136.

@sjakobi
Copy link
Collaborator Author

sjakobi commented Feb 3, 2020

@quchen, @1Jajen1: A review would be much appreciated! :)

I'm not very convinced of my clarity of expression, so any suggestions for improvement are welcome!

@phadej Since these comments were taken from ansi-wl-pprint (1, 2), might you be interested in reviewing (and potentially adopting) these documentation changes too?

-- 2. In that case the layout of a particular part of a document would
-- depend on the fit of completely unrelated parts of the same document.
-- See https://github.com/quchen/prettyprinter/issues/83 for a related
-- bug.
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

-- 'layoutPretty' will check only line 1, ignoring whether e.g. line 2 might
-- already be too wide.
-- By contrast, 'layoutSmart' stops only once it reaches line 4, where the @B@
-- has the same indentation as the first @A@.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is way more helpful than the original, good job!

@sjakobi sjakobi merged commit 0c32982 into master Feb 7, 2020
@sjakobi sjakobi deleted the 136-clarify-docs branch February 7, 2020 21:03
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.

Documentation for layoutSmart sounds wrong

2 participants