on master help sign in
When unstreaming, we know the first chunk is not empty
fd92012Bryan O'Sullivan
Data/Text/Lazy/Fusion.hs+1−1
@@ -61,7 +61,7 @@ unstreamChunks !chunkSize (Stream next s0 len0)
61 case next s of
61 case next s of
62 Done -> Empty
62 Done -> Empty
63 Skip s' -> outer s'
63 Skip s' -> outer s'
64− Yield x s' -> t `chunk` outer s''
64+ Yield x s' -> t `Chunk` outer s''
65 where UC t s'' = runST fill
65 where UC t s'' = runST fill
66 fill = do a <- A.new unknownLength
66 fill = do a <- A.new unknownLength
67 unsafeWrite a 0 x >>= inner a unknownLength s'
67 unsafeWrite a 0 x >>= inner a unknownLength s'