@@ -92,7 +92,7 @@ module Streamly.Internal.Data.Parser.ParserD
93 -- Matching strings
93 -- Matching strings
94 , listEqBy
94 , listEqBy
95− , eqBy
95+ , streamEqBy
96 -- , prefixOf -- match any prefix of a given string
96 -- , prefixOf -- match any prefix of a given string
97 -- , suffixOf -- match any suffix of a given string
97 -- , suffixOf -- match any suffix of a given string
98 -- , infixOf -- match any substring of a given string
98 -- , infixOf -- match any substring of a given string
@@ -1469,7 +1469,7 @@ groupByRollingEither
1469-- XXX custom combinators for matching list, array and stream?
1469-- XXX custom combinators for matching list, array and stream?
1470-- XXX rename to listBy?
1470-- XXX rename to listBy?
1472−-- | See 'Streamly.Internal.Data.Parser.eqBy'.
1472+-- | See 'Streamly.Internal.Data.Parser.streamEqBy'.
1474-- /Pre-release/
1474-- /Pre-release/
@@ -1503,9 +1503,9 @@ listEqBy cmp str = Parser step initial extract
1503 ++ show (length xs) ++ " elements"
1503 ++ show (length xs) ++ " elements"
1505-- | Like 'listEqBy' but uses a stream instead of a list
1505-- | Like 'listEqBy' but uses a stream instead of a list
1506−{-# INLINE eqBy #-}
1506+{-# INLINE streamEqBy #-}
1507−eqBy :: Monad m => (a -> a -> Bool) -> D.Stream m a -> Parser a m ()
1507+streamEqBy :: Monad m => (a -> a -> Bool) -> D.Stream m a -> Parser a m ()
1508−eqBy cmp (D.Stream sstep state) = Parser step initial extract
1508+streamEqBy cmp (D.Stream sstep state) = Parser step initial extract
@@ -1526,7 +1526,7 @@ eqBy cmp (D.Stream sstep state) = Parser step initial extract
1526 D.Yield x1 s -> Continue 0 (Just' x1, s)
1526 D.Yield x1 s -> Continue 0 (Just' x1, s)
1527 D.Stop -> Done 0 ()
1527 D.Stop -> Done 0 ()
1528 D.Skip s -> Continue 1 (Nothing', s)
1528 D.Skip s -> Continue 1 (Nothing', s)
1529− else return $ Error "eqBy: mismtach occurred"
1529+ else return $ Error "streamEqBy: mismtach occurred"
1530 step (Nothing', st) a = do
1530 step (Nothing', st) a = do
1531 r <- sstep defState st
1531 r <- sstep defState st
@@ -1534,11 +1534,11 @@ eqBy cmp (D.Stream sstep state) = Parser step initial extract
1534 D.Yield x s -> do
1534 D.Yield x s -> do
1535 if x `cmp` a
1535 if x `cmp` a
1536 then Continue 0 (Nothing', s)
1536 then Continue 0 (Nothing', s)
1537− else Error "eqBy: mismatch occurred"
1537+ else Error "streamEqBy: mismatch occurred"
1538 D.Stop -> Done 1 ()
1538 D.Stop -> Done 1 ()
1539 D.Skip s -> Continue 1 (Nothing', s)
1539 D.Skip s -> Continue 1 (Nothing', s)
1541− extract _ = return $ Error "eqBy: end of input"
1541+ extract _ = return $ Error "streamEqBy: end of input"
1543-------------------------------------------------------------------------------
1543-------------------------------------------------------------------------------
1544-- Transformations on input
1544-- Transformations on input