On Wed, May 25, 2011 at 2:01 PM, Ivan Lazar Miljenovic
<[email protected]> wrote:
> With my wl-pprint-text package, Jason Dagit suggested to me on
> #haskell that it would make sense to make such a pretty-printer be
> class-based so that the same API could be used for String, ByteString,
> Text, etc.

I'm a bit skeptical of using type classes to abstract over Unicode
string types and byte sequence types. The only API shared by the two
kind of types is that of a sequence. Things like dot , spaces, etc.
don't make much sense on binary data. You must assume that the
ByteString contains text in some encoding to make sense of such
concepts.

Johan

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to