pretty
pretty copied to clipboard
Haskell Pretty-printer library
Hey @dterei ! As the title suggests, this is yet another attempt to generalise `pretty` to support alternative textual representations, such that it would pave the way for #1 ....
should be a straightforward `pPrint = id`. I'm wondering if there is a particular reason behind not implementing this instance?
GHC has an internal copy of pretty. I've gone and merged any improvements from GHC into pretty, so we can be safe that the code in pretty is the best...
http://hackage.haskell.org/package/prettyclass-1.0.0.0
As title suggest. Could also consider supporting Text.
Try this: ``` import Text.PrettyPrint import System.Environment main = do [ s ] fsep [ text "a" , x text "b" ] ) empty !! read s ``` on my...
The pretty source code currently contains two TODOs: ``` -- XXX: TODO: PRETTY: Used to use True here (but GHC used False...) nilAboveNest False k (reduceDoc (vcat ys)) ``` ```...
It's hard to iterate on Pretty as it's a fairly performance critical library but there is no benchmark suite for it. Add one. There is some code in the branch...
This API has `comma`, `colon`, `semi`, but not `dot`, unlike the `prettyprinter` library: https://hackage.haskell.org/package/prettyprinter-1.7.1/docs/Prettyprinter.html#v:dot
When you click on https://hackage.haskell.org/package/pretty-1.1.3.6/docs/Text-PrettyPrint-Annotated.html#v:HughesPJ you are not getting to this module but stay in the `Annotated` module. The source is here: https://github.com/haskell/pretty/blob/d7e3278e8a0d039c5d2fdca422dd3ed679108adf/src/Text/PrettyPrint/Annotated.hs#L18-L19