Skip to content

Commit 007b507

Browse files
author
pranaysashank
committed
Use new ParserD.Step constructors.
1 parent 6a96389 commit 007b507

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

src/Streamly/Internal/Data/Parser/ParserD.hs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -476,27 +476,27 @@ sepBy (Fold fstep finitial fextract) (Parser pstep pinitial pextract)
476476
step (SepParseA cnt fst pst) a = do
477477
ps <- pstep pst a
478478
case ps of
479-
Yield n s -> return $ Yield n (SepParseA 0 fst s)
480-
Skip n s -> return $ Skip n (SepParseA (cnt + 1 - n) fst s)
481-
Stop n b -> do
479+
Partial n s -> return $ Partial n (SepParseA 0 fst s)
480+
Continue n s -> return $ Continue n (SepParseA (cnt + 1 - n) fst s)
481+
Done n b -> do
482482
pseps <- psepinitial
483483
fs <- fstep fst b
484-
return $ Skip n (SepParseSep 0 fs pseps)
484+
return $ Continue n (SepParseSep 0 fs pseps)
485485
Error _ -> do
486486
c <- fextract fst
487-
return $ Stop (cnt + 1) c
487+
return $ Done (cnt + 1) c
488488

489489
step (SepParseSep cnt fst psepst) a = do
490490
pseps <- psepstep psepst a
491491
case pseps of
492-
Yield n s -> return $ Skip n (SepParseSep (cnt + 1 - n) fst s)
493-
Skip n s -> return $ Skip n (SepParseSep (cnt + 1 - n) fst s)
494-
Stop n _ -> do
492+
Partial n s -> return $ Continue n (SepParseSep (cnt + 1 - n) fst s)
493+
Continue n s -> return $ Continue n (SepParseSep (cnt + 1 - n) fst s)
494+
Done n _ -> do
495495
ps <- pinitial
496-
return $ Skip n (SepParseA (cnt + 1) fst ps)
496+
return $ Continue n (SepParseA (cnt + 1) fst ps)
497497
Error _ -> do
498498
c <- fextract fst
499-
return $ Stop (cnt + 1) c
499+
return $ Done (cnt + 1) c
500500

501501
extract (SepParseA _ fs sa) = do
502502
r <- try $ pextract sa

0 commit comments

Comments
 (0)