[Haskell-beginners] Problems with Internal.ByteString

Pauline Gomér pauline.gomer at gmail.com
Fri Jul 17 16:57:33 EDT 2009


Hello,

I'm trying to upgrade a library from 6.6 to 6.10, but has run into a problem
where a Internal.ByteString is returned instead of a normal ByteString. The
library uses bRead in BEncode library, but that function's input type has
changed from ByteString to Internal.ByteString. I think the cause of the
problem is the functions in ByteString that uses functions in
ByteString.Internal.

Data.BEncode.bRead                         uses Data.BEncode.Lexer.lexer
Data.BEncode.Lexer.lexer                  uses
Data.ByteString.Lazy.Char8.toChunks
Data.ByteString.Lazy.Char8.toChunks uses
Data.ByteString.Lazy.Internal.foldrChunk

foldrChunk :: (Internal.ByteString -> a -> a) -> Internal.ByteString -> a

Is there any way to avoid getting a Internal.ByteString or convert it to a
normal ByteString?

Pauline
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20090717/821615ba/attachment.html


More information about the Beginners mailing list