[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
Sat Oct 15 10:40:58 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:               |   Resolution:     
Keywords:               |  
------------------------+---------------------------------------------------

Comment(by basvandijk):

 I also attached a patch which adds `IsString` instances for `Vectors` of
 `Chars`. If you enable the `OverloadedStrings` language extension you can
 construct vectors using:

 {{{
 > :set -XOverloadedStrings
 > import Data.Vector
 > "Hello World!!!" :: Vector Char
 "Hello World!!!"
 }}}

 Note that this patch goes nicely with the previous patch which adds
 specific Show instances for `Vectors` of `Chars`.

-- 
Ticket URL: <http://trac.haskell.org/vector/ticket/64#comment:1>
vector <http://trac.haskell.org/vector>
Package vector


More information about the vector mailing list