[Haskell-cafe] String vs ByteString

Johan Tibell johan.tibell at gmail.com
Fri Aug 13 07:53:20 EDT 2010


On Fri, Aug 13, 2010 at 1:47 PM, Michael Snoyman <michael at snoyman.com>wrote:

> Use qualified imports, like so:
>>
>> import qualified Data.ByteString as B
>>
>
> main = B.putStrLn $ B.pack "test"
>>
>> If you want to pack a String into a ByteString, you'll need to import
> Data.ByteString.Char8 instead.
>
>
Very true. That's what I get for using a random example without testing it
first.

-- Johan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100813/20e88d4c/attachment.html


More information about the Haskell-Cafe mailing list