Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fsep and fcat are confusing as well. Does anyone know what "Paragraph fill" mean in this context? #60

Open
jwaldmann opened this issue Feb 16, 2022 · 1 comment

Comments

@jwaldmann
Copy link

fsep and fcat are confusing as well. Does anyone know what "Paragraph fill" mean in this context?

"Paragraph fill" version of sep.
"Paragraph fill" version of cat.

Originally posted by @banacorn in #48 (comment)

@jwaldmann
Copy link
Author

I agree this is under-documented. There is no mention of "paragraph fill" in the original paper? http://belle.sourceforge.net/doc/hughes95design.pdf

From experimentation, the semantics of fcat/fsep seems to be

  • if each element is one-line: fill up current line (with hcat or hsep) until ribbon width, then insert line break and repeat
  • else, vcat

There's a specification in the code https://hackage.haskell.org/package/pretty-1.1.3.6/docs/src/Text.PrettyPrint.Annotated.HughesPJ.html#fsep

Perhaps something (from that spec, or from my comment here) could be lifted to API doc.

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

No branches or pull requests

1 participant