Re: [Haskell-cafe] How do I use ByteString?

2010-04-06 Thread Mads Lindstrøm
Hi Don Stewart wrote: gue.schmidt: Hi all, I've never found an easy way to deal with ByteStrings. I'm using the RSA library and it en- and decodes Data.ByteString.Lazy.ByteString. I initially start with Strings, ie. [Char], but there is no function to convert the 2 back and

Re: [Haskell-cafe] How do I use ByteString?

2010-04-06 Thread Ketil Malde
Mads Lindstrøm mads_lindstr...@yahoo.dk writes: It may seem unfair that I put byte-strings and char-strings in the same bucket, but libraries do use byte-strings to contain characters. For example, Parsec has a [Char] and a bytestring interface. It bears noting that Data.ByteString and

[Haskell-cafe] How do I use ByteString?

2010-04-05 Thread Günther Schmidt
Hi all, I've never found an easy way to deal with ByteStrings. I'm using the RSA library and it en- and decodes Data.ByteString.Lazy.ByteString. I initially start with Strings, ie. [Char], but there is no function to convert the 2 back and forth. There is however a function which takes

Re: [Haskell-cafe] How do I use ByteString?

2010-04-05 Thread Ivan Miljenovic
2010/4/6 Günther Schmidt gue.schm...@web.de: I initially start with Strings, ie. [Char], but there is no function to convert the 2 back and forth. There is however a function which takes [Word8] to BytesString and back. The problem is one of encoding. If you use the Char8 Bytestring variants,

Re: [Haskell-cafe] How do I use ByteString?

2010-04-05 Thread Gregory Crosswhite
Look in Data.ByteString.Char8 Cheers, Greg On Apr 5, 2010, at 6:27 PM, Günther Schmidt wrote: Hi all, I've never found an easy way to deal with ByteStrings. I'm using the RSA library and it en- and decodes Data.ByteString.Lazy.ByteString. I initially start with Strings, ie. [Char],

Re: [Haskell-cafe] How do I use ByteString?

2010-04-05 Thread Don Stewart
gue.schmidt: Hi all, I've never found an easy way to deal with ByteStrings. I'm using the RSA library and it en- and decodes Data.ByteString.Lazy.ByteString. I initially start with Strings, ie. [Char], but there is no function to convert the 2 back and forth. There is however a