on master help sign in
Use Continue instead of Partial in noErrorUnsafeSplitWith
9cdb82cHarendra Kumar
src/Streamly/Internal/Data/Parser/ParserD/Type.hs+2−2
@@ -424,7 +424,7 @@ noErrorUnsafeSplitWith func (Parser stepL initialL extractL)
424 -- Assume that the first parser can never fail, therefore we do not
424 -- Assume that the first parser can never fail, therefore we do not
425 -- need to keep the input for backtracking.
425 -- need to keep the input for backtracking.
426 Partial n s -> return $ Partial n (SeqParseL s)
426 Partial n s -> return $ Partial n (SeqParseL s)
427− Continue n s -> return $ Partial n (SeqParseL s)
427+ Continue n s -> return $ Continue n (SeqParseL s)
428 Done n b -> do
428 Done n b -> do
429 res <- initialR
429 res <- initialR
430 return
430 return
@@ -438,7 +438,7 @@ noErrorUnsafeSplitWith func (Parser stepL initialL extractL)
438 r <- stepR st a
438 r <- stepR st a
439 return $ case r of
439 return $ case r of
440 Partial n s -> Partial n (SeqParseR f s)
440 Partial n s -> Partial n (SeqParseR f s)
441− Continue n s -> Partial n (SeqParseR f s)
441+ Continue n s -> Continue n (SeqParseR f s)
442 Done n b -> Done n (f b)
442 Done n b -> Done n (f b)
443 Error err -> Error err
443 Error err -> Error err
444
444