[Haskell-cafe] ANNOUNCE: vector-bytestring-0.0.0.0

Ertugrul Soeylemez es at ertes.de
Fri Oct 14 14:09:17 CEST 2011


Max Rabkin <max.rabkin at gmail.com> wrote:

> > Though I would argue that unless you're trying to actually use for
> > Show/Read for serialisation, does it really matter what the
> > Show/Read instances for Bytestring are?
>
> Convenient debugging and REPL interaction certainly matter!

On the other hand, having a separate Show instance for Vector Word8
would require either writing all Show instances explicitly or keeping
two separate packages.  I would prefer to have the two packages merged
into one.

But since I find a useful Show instance for ByteString useful, too, I
would go with the first variant of providing a few default instances
instead of a generic Show a => Show (Vector a) instance.  That way you
can write nicer instances for some other element types, too.  For
example I can imagine how a much nicer Vector Bool instance would look
like:

    fromBoolString "1.1..111..1"


Greets,
Ertugrul


-- 
nightmare = unsafePerformIO (getWrongWife >>= sex)
http://ertes.de/





More information about the Haskell-Cafe mailing list