Text.PrettyPrint.HughesPJ -- has a ByteString version ever been considered?

Ryan Newton rrnewton at gmail.com
Mon Jan 24 03:01:38 CET 2011

Hello libraries [= maintainer of 'pretty' package],

I'm a happy user of the pretty printing library, with which I emit large
quantities of nicely indented C++ code.  Sometimes I append large strings
with "text x <>".

In this case performance improvements would not go unappreciated.  Has there
been any thought of a ByteString version?

I notice that the source is only 1K lines.  While I imagine that you
wouldn't want to break the interface in a backwards compatible way, would it
be possible to simple give the "TextDetails" type a parameter and then use a
StringLike class (with length, append, what else?).
Text.PrettyPrint.HughesPJ  could keep the same interface, and the generic
version could go in Text.PrettyPrint.HughesPJGeneric or
Text.PrettyPrint.HughesPJ.Generic or whatever.


P.S. I notice that other packages like mainland-pretty and ansi-wl-pprint
are similarly committed to "String".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20110123/e51e6fc8/attachment.htm>

More information about the Libraries mailing list