prettyprinter icon indicating copy to clipboard operation
prettyprinter copied to clipboard

A modern, extensible and well-documented prettyprinter.

Results 56 prettyprinter issues
Sort by recently updated
recently updated
newest added

In https://github.com/quchen/prettyprinter/pull/116#issuecomment-577204724 I shared a profile from a `prettyprinter`-heavy `dhall` task. Multiple functions from `prettyprinter` and `prettyprinter-ansi-terminal` show up: ``` COST CENTRE MODULE SRC %time %alloc layoutWadlerLeijen Data.Text.Prettyprint.Doc.Internal src/Data/Text/Prettyprint/Doc/Internal.hs:(1775,1)-(1843,60) 5.5...

Performance

Starting with GHC 8.10, handling the first 6 constructors of `Doc` should be slightly faster than handling the other 7. See [this GHC patch](https://gitlab.haskell.org/ghc/ghc/commit/9897e8c8ef0b19a9571ef97a1d9bb050c1ee9121) for the background on this. By...

Performance

I'm quite impressed by (and a bit proud of!) the number of bugs that has been revealed through `dhall`'s usage of `prettyprinter`! I wonder how `prettyprinter` could rely less on...

putDocW is not in `Data.Text.Prettyprint.Doc` module. Relatedly, there is `putDoc` / `putDocW` convinience functions; but there should also be functions to `Doc a -> String` and `Doc a -> Text`.

Feature request

Per #39, this PR defines `Pretty1` & `Pretty2` classes, lifting `Pretty` to `* -> *` & `* -> * -> *` respectively, in the same manner as `Show1` & `Show2`....

Is there any particular reason why `prettyprinter-ansi-terminal` redefines its own versions of these types, isomorphic to the ones upstream? I often find myself needing to resolve conflicting imports due to...

Feature request

It is not possible to `git clone` this repository on Windows because it has used `aux` as the name of a directory. `AUX` is the name of a reserved device...

The example shown on the module main page, the `prettyprintType` function, is actually not type checking due to the `String` list of separators. It is rather expected a `[Doc ann]`...

Here is a minimal counterexample: ### Cabal file: counterexample.cabal: ``` cabal-version: 3.0 name: counterexample version: 0.1.0.0 license: BSD-3-Clause license-file: LICENSE author: David Binder maintainer: [email protected] build-type: Simple extra-doc-files: CHANGELOG.md common...

The bytestring library [now implements a fast algorithm](https://github.com/haskell/bytestring/pull/365). By using [`doubleDec`](https://hackage.haskell.org/package/bytestring-0.12.1.0/docs/Data-ByteString-Builder-RealFloat.html#v:doubleDec) to implement the `Pretty` instance for `Double`, it would not change the behavior and it would give better performance....