haskell-prettyprinter / haskell-prettyprinter/prettyprinter

Ribbon width…

Open
#142 6 comments 0 reactions 0 assignees View on GitHub
Bug Documentation Question or comment
Dominant language
Haskell
Stars
309
Forks
43
Avg merge
21h 25m
Merged PRs (30d)
1

Description

This blob could use some documentation:

https://github.com/quchen/prettyprinter/blob/111ce3780eef8c96dadebc9e443a0ea3c13a3528/prettyprinter/src/Data/Text/Prettyprint/Doc/Internal.hs#L1824-L1830

The haddocks on `AvailablePerLine` try to explain what the "ribbon width" is. A visualization would be nice. I also don't really understand why it's tracked separately from the number of columns / page width.

https://github.com/quchen/prettyprinter/blob/111ce3780eef8c96dadebc9e443a0ea3c13a3528/prettyprinter/src/Data/Text/Prettyprint/Doc/Internal.hs#L1628-L1637

In `layoutSmart`, why doesn't the computation of the width for the subsequent lines take the ribbon width into account?

https://github.com/quchen/prettyprinter/blob/111ce3780eef8c96dadebc9e443a0ea3c13a3528/prettyprinter/src/Data/Text/Prettyprint/Doc/Internal.hs#L1759-L1761

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.