
2.5 years after the first release, bytestring 0.9.0.4 is now available on hackage, http://hackage.haskell.org/cgi-bin/hackage-scripts/package/bytestring-0.9.0.... Changes since the 0.9 release include: * support for bytestring literals (use -XOverloadedStrings) * make Data.ByteString.Lazy.Char8.lines lazier * fixes Handle resource leak in getContents/readFile * faster isSpace operations * performance improvements 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) (and the compile will even turn the pack into a no-op at compile time). Or, using the (soon to be released pcre-light package), bytestring regex literals can be written as: compile "a(.*)b" where compile :: ByteString -> Either String Regex With -XOverloadedStrings, the 'pack'for the regex is inferred. -- Don & Duncan

On Jan 5, 2008 12:37 AM, Don Stewart
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?
--
Dave Menendez

dave:
On Jan 5, 2008 12:37 AM, Don Stewart <[1]dons@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
participants (2)
-
David Menendez
-
Don Stewart