[vector] #64: Define specific Show and Read instances for vectors of Chars and Word8s that show and read like Strings
vector
vector at projects.haskell.org
Fri Oct 14 14:55:39 BST 2011
#64: Define specific Show and Read instances for vectors of Chars and Word8s
that show and read like Strings
------------------------+---------------------------------------------------
Reporter: basvandijk | Owner:
Type: enhancement | Status: new
Priority: major | Milestone:
Version: | Keywords:
------------------------+---------------------------------------------------
When working with vectors of `Chars` and `Word8s` (think `ByteStrings`) it
is very handy for debugging and working in a REPL if they are shown and
read as `Strings`. Note that traditional `ByteStrings` also have this
behavior.
As a reaction to my `vector-bytestring` package a few people on reddit and
on the haskell-cafe mailinglist proposed turning the `ByteString` type
synonym into a newtype with the desired `Show` and `Read` instance. I
don't really like this but I agree with the need for a specific instance.
The attached patch adds the specific instances to vector.
--
Ticket URL: <http://trac.haskell.org/vector/ticket/64>
vector <http://trac.haskell.org/vector>
Package vector
More information about the vector
mailing list