bytestring 0.9.0.4

Don Stewart dons at galois.com
Sat Jan 5 15:19:33 EST 2008


dave:
>    On Jan 5, 2008 12:37 AM, Don Stewart <[1]dons at galois.com> wrote:
> 
>      The most notable change is the instance IsString for strict and
>      lazy bytestrings, enabling bytestrings to be written as direct string
>      literals, without needing 'pack'.
> 
>      That is, the following is valid:
> 
>         import Data.ByteString.Char8
> 
>         main = print ("abcdef" :: ByteString)
> 
>    What encoding is used?

The 'Data.ByteString.Char8' encodin:

    --               ... these byte strings are taken to be in the
    -- subset of Unicode covered by code points 0-255. This covers
    -- Unicode Basic Latin, Latin-1 Supplement and C0+C1 Controls.

You'll need to import Data.ByteString.Char8 to get the instance, so the
encoding should be clear in this case.

-- Don


More information about the Libraries mailing list