@@ -118,7 +118,7 @@ module Streamly.Internal.Data.Parser.ParserD.Types
118118
119119 , yield
120120 , yieldM
121− , splitWith
121+ , serialWith
122122 , split_
123123
124124 , die
@@ -325,9 +325,9 @@ yieldM b = Parser undefined (IDone <$> b) undefined
325325{-# ANN type SeqParseState Fuse #-}
326326data SeqParseState sl f sr = SeqParseL sl | SeqParseR f sr
327327
328−-- | See 'Streamly.Internal.Data.Parser.splitWith'.
328+-- | See 'Streamly.Internal.Data.Parser.serialWith'.
329329--
330−-- Note: this implementation of splitWith is fast because of stream fusion but
330+-- Note: this implementation of serialWith is fast because of stream fusion but
331331-- has quadratic time complexity, because each composition adds a new branch
332332-- that each subsequent parse's input element has to go through, therefore, it
333333-- cannot scale to a large number of compositions. After around 100
@@ -336,10 +336,10 @@ data SeqParseState sl f sr = SeqParseL sl | SeqParseR f sr
336336--
337337-- /Pre-release/
338338--
339−{-# INLINE splitWith #-}
340−splitWith :: MonadThrow m
339+{-# INLINE serialWith #-}
340+serialWith :: MonadThrow m
341341 => (a -> b -> c) -> Parser m x a -> Parser m x b -> Parser m x c
342−splitWith func (Parser stepL initialL extractL)
342+serialWith func (Parser stepL initialL extractL)
343343 (Parser stepR initialR extractR) =
344344 Parser step initial extract
345345
@@ -457,7 +457,7 @@ noErrorUnsafeSplitWith func (Parser stepL initialL extractL)
457457{-# ANN type SeqAState Fuse #-}
458458data SeqAState sl sr = SeqAL sl | SeqAR sr
459459
460−-- This turns out to be slightly faster than splitWith
460+-- This turns out to be slightly faster than serialWith
461461-- | See 'Streamly.Internal.Data.Parser.split_'.
462462--
463463-- /Pre-release/
@@ -513,13 +513,13 @@ split_ (Parser stepL initialL extractL) (Parser stepR initialR extractR) =
513513 IDone rR -> return rR
514514 IError err -> throwM $ ParseError err
515515
516−-- | 'Applicative' form of 'splitWith'.
516+-- | 'Applicative' form of 'serialWith'.
517517instance MonadThrow m => Applicative (Parser m a) where
518518 {-# INLINE pure #-}
519519 pure = yield
520520
521521 {-# INLINE (<*>) #-}
522− (<*>) = splitWith id
522+ (<*>) = serialWith id
523523
524524 {-# INLINE (*>) #-}
525525 (*>) = split_