diff --git a/core/src/Streamly/Internal/Data/Array.hs b/core/src/Streamly/Internal/Data/Array.hs index 4764a11f62..94204e5ed1 100644 --- a/core/src/Streamly/Internal/Data/Array.hs +++ b/core/src/Streamly/Internal/Data/Array.hs @@ -976,7 +976,7 @@ parseBreakChunksK (Parser pstep initial extract) stream = do let n = Prelude.length backBuf arr0 = fromListN n (Prelude.reverse backBuf) arr1 = Array contents cur end - str = StreamK.cons arr0 (StreamK.cons arr1 stream) + str = StreamK.cons arr0 (StreamK.fromPure arr1) return (Left (ParseError err), str) -- This is a simplified goExtract diff --git a/test/Streamly/Test/Data/Parser.hs b/test/Streamly/Test/Data/Parser.hs index 10e494a223..cf25d4b435 100644 --- a/test/Streamly/Test/Data/Parser.hs +++ b/test/Streamly/Test/Data/Parser.hs @@ -1436,6 +1436,13 @@ parserSanityTests desc testRunner = , Custom (P.Continue 10 ()) , Custom (P.Done 5 ()) ] + Prelude.mapM_ testRunner $ + createPaths + [ Consume tapeLen + , Custom (P.Continue 0 ()) + , Custom (P.Continue 10 ()) + , Custom (P.Error "Message3") + ] {- TODO: