on master help sign in
specialize the "Skip 0" case in "parse"
commitab541b4888f6b34d1562837516cd251c77c5b2df authorHarendra Kumar <harendra@composewell.com> dateSat 28 Mar 2020, 17:35 (7 years ago) parentf1eb9a1
1 file changed+2−2
src/Streamly/Internal/Data/Stream/StreamD.hs+2−2
src/Streamly/Internal/Data/Stream/StreamD.hs+2−2
@@ -996,7 +996,7 @@ parselMx' pstep initial extract (Stream step state) = do
996996 PR.Yield n pst1 -> do
997997 assert (n <= length (x:buf)) (return ())
998998 go SPEC s (Prelude.take n (x:buf)) pst1
999− -- PR.Skip 0 pst1 -> go SPEC s (x:buf) pst1
999+ PR.Skip 0 pst1 -> go SPEC s (x:buf) pst1
10001000 PR.Skip n pst1 -> do
10011001 assert (n <= length (x:buf)) (return ())
10021002 let (src0, buf1) = splitAt n (x:buf)
@@ -1014,7 +1014,7 @@ parselMx' pstep initial extract (Stream step state) = do
10141014 PR.Yield n pst1 -> do
10151015 assert (n <= length (x:buf)) (return ())
10161016 gobuf SPEC s (Prelude.take n (x:buf)) xs pst1
1017− -- PR.Skip 0 pst1 -> gobuf SPEC s (x:buf) xs pst1
1017+ PR.Skip 0 pst1 -> gobuf SPEC s (x:buf) xs pst1
10181018 PR.Skip n pst1 -> do
10191019 assert (n <= length (x:buf)) (return ())
10201020 let (src0, buf1) = splitAt n (x:buf)