@@ -183,7 +183,7 @@ module Streamly.Internal.Data.Parser.ParserD.Type
183183
184184 , fromPure
185185 , fromEffect
186− , serialWith
186+ , splitWith
187187 , split_
188188
189189 , die
@@ -671,9 +671,9 @@ fromEffect b = Parser undefined (IDone <$> b) undefined
671671{-# ANN type SeqParseState Fuse #-}
672672data SeqParseState sl f sr = SeqParseL sl | SeqParseR f sr
673673
674−-- | See 'Streamly.Internal.Data.Parser.serialWith'.
674+-- | See 'Streamly.Internal.Data.Parser.splitWith'.
675675--
676−-- Note: this implementation of serialWith is fast because of stream fusion but
676+-- Note: this implementation of splitWith is fast because of stream fusion but
677677-- has quadratic time complexity, because each composition adds a new branch
678678-- that each subsequent parse's input element has to go through, therefore, it
679679-- cannot scale to a large number of compositions. After around 100
@@ -682,10 +682,10 @@ data SeqParseState sl f sr = SeqParseL sl | SeqParseR f sr
682682--
683683-- /Pre-release/
684684--
685−{-# INLINE serialWith #-}
686−serialWith :: Monad m
685+{-# INLINE splitWith #-}
686+splitWith :: Monad m
687687 => (a -> b -> c) -> Parser x m a -> Parser x m b -> Parser x m c
688−serialWith func (Parser stepL initialL extractL)
688+splitWith func (Parser stepL initialL extractL)
689689 (Parser stepR initialR extractR) =
690690 Parser step initial extract
691691
@@ -748,7 +748,7 @@ serialWith func (Parser stepL initialL extractL)
748748 IDone bR -> return $ Done n $ func bL bR
749749 IError err -> return $ Error err
750750 Error err -> return $ Error err
751− Partial _ _ -> error "Bug: serialWith extract 'Partial'"
751+ Partial _ _ -> error "Bug: splitWith extract 'Partial'"
752752 Continue n s -> return $ Continue n (SeqParseL s)
753753
754754-------------------------------------------------------------------------------
@@ -827,7 +827,7 @@ noErrorUnsafeSplitWith func (Parser stepL initialL extractL)
827827{-# ANN type SeqAState Fuse #-}
828828data SeqAState sl sr = SeqAL sl | SeqAR sr
829829
830−-- This turns out to be slightly faster than serialWith
830+-- This turns out to be slightly faster than splitWith
831831-- | See 'Streamly.Internal.Data.Parser.split_'.
832832--
833833-- /Pre-release/
@@ -940,13 +940,13 @@ noErrorUnsafeSplit_
940940 Partial _ _ -> error "split_: Partial"
941941 Continue n s -> return $ Continue n (SeqAL s)
942942
943−-- | 'Applicative' form of 'serialWith'.
943+-- | 'Applicative' form of 'splitWith'.
944944instance Monad m => Applicative (Parser a m) where
945945 {-# INLINE pure #-}
946946 pure = fromPure
947947
948948 {-# INLINE (<*>) #-}
949− (<*>) = serialWith id
949+ (<*>) = splitWith id
950950
951951 {-# INLINE (*>) #-}
952952 (*>) = split_