[Haskell-cafe] How do I use ByteString?

Ketil Malde ketil at malde.org
Tue Apr 6 09:29:53 EDT 2010


Mads Lindstrøm <mads_lindstroem at yahoo.dk> writes:

> It may seem unfair that I put byte-strings and char-strings in the
> same bucket, but libraries do use byte-strings to contain
> characters. For example, Parsec has a [Char] and a bytestring
> interface. 

It bears noting that Data.ByteString and Data.ByteString.Char8 are just
different interfaces to the same data type (same goes for the .Lazy
versions).

Once upon a time I forked bytestring to use a phantom type tag to
separate different encodings (including many other 8-bit encodings than
the Char8 one), but although I still think this is a good idea, the code
is long dead and gone now.

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants


More information about the Haskell-Cafe mailing list