Hi all,

I'm delimiting a bytestream like this:

mkLines :: Monad m => Producer ByteString m () -> Producer ByteString m ()
mkLines = PipesGroup.concats . view PipesByteString.lines

I thought this should behave like a regular `lines` function, e.g. 
delimiting "foo,bar\nfizz,buzz\n" into [ "foo,bar", "fizz,buzz" ], 
regardless of how `hGetSome` chunks the original stream, but this isn't the 
case. For example, running `fmap length . PP.toListM . mkLines . 
PB.fromHandle` on a 25000-lines file gives 25569. 

Should I be peeking at each ByteString to break on a "\n" character myself? 
That is already what `lines` in pipes-bytestring is doing though.

Cheers,

-- 
You received this message because you are subscribed to the Google Groups 
"Haskell Pipes" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to haskell-pipes+unsubscr...@googlegroups.com.
To post to this group, send email to haskell-pipes@googlegroups.com.

Reply via email to