prettyprinter
prettyprinter copied to clipboard
A modern, extensible and well-documented prettyprinter.
Add `unsafeTextWithLength` according to #103
https://github.com/quchen/prettyprinter/blob/0dbe08f65468697b729d5e05c98c89a58a42486b/prettyprinter/src/Prettyprinter/Internal.hs#L468-L477 It seems that this function would allocate a new `Text` value in order to perform the `T.null` check on it. GHC _may_ be able to optimize this allocation away,...
Currently this usually involves the allocation of a fresh `Text` containing multiple spaces via `textSpaces`. It would probably be better to use a slice of a pre-allocated buffer. Maybe the...
## Question Why is there no `Pretty` instance for `Doc ann` which functions as the identity? On the surface, and without any detailed knowledge of the prettyprinter internals, it seems...
…should be faster than the existing renderers. See https://hackage.haskell.org/package/text-builder-linear.
Now rendering `AnsiStyle`-annotated docs generates escape sequence starting with `\ESC` code before actual text, and similar sequence applying previous style at its end. This almost always works well, but for...
Followup to (https://github.com/quchen/prettyprinter/issues/65) For background, I hope to replace the current ad-hoc style module used by Chapelure (https://hackage.haskell.org/package/chapelure-0.0.1.0/docs/Chapelure-Style.html) # Notes: * Added an `AnsiColor` type with three constructors: `Color16`, `ColorPalette`...
Why is there only support for 16 colors? The full palette would be cool! :grin: 
I have a doc that currently pretty prints as ``` S : Set (not in scope) A : Set (not in scope) B : Set (not in scope) ma :...
Surrounding means to put stuff all around. From that, I'd infer that `surround a [b, c, d]` means either `a b c d a`, or `a b a c a...