@@ -267,7 +267,7 @@ module Streamly.Prelude.Internal
267 -- , splitOnPrefix
267 -- , splitOnPrefix
269 -- , splitBy
269 -- , splitBy
270− , splitBySuffix
270+ , splitWithSuffix
271 -- , splitByPrefix
271 -- , splitByPrefix
272 , wordsBy -- stripAndCompactBy
272 , wordsBy -- stripAndCompactBy
@@ -278,7 +278,7 @@ module Streamly.Prelude.Internal
279 -- Keeping the delimiters
279 -- Keeping the delimiters
280 , splitBySeq
280 , splitBySeq
281− , splitBySuffixSeq
281+ , splitWithSuffixSeq
282 -- , splitByPrefixSeq
282 -- , splitByPrefixSeq
283 -- , wordsBySeq
283 -- , wordsBySeq
@@ -2249,7 +2249,7 @@ intervalsOf
2249 :: (IsStream t, MonadAsync m)
2249 :: (IsStream t, MonadAsync m)
2250 => Double -> Fold m a b -> t m a -> t m b
2250 => Double -> Fold m a b -> t m a -> t m b
2251intervalsOf n f xs =
2251intervalsOf n f xs =
2252− splitBySuffix isNothing (FL.lcatMaybes f)
2252+ splitWithSuffix isNothing (FL.lcatMaybes f)
2253 (intersperseByTime n (return Nothing) (Serial.map Just xs))
2253 (intersperseByTime n (return Nothing) (Serial.map Just xs))
2255------------------------------------------------------------------------------
2255------------------------------------------------------------------------------
@@ -2609,30 +2609,30 @@ wordsBy predicate f m =
2609-- | Like 'splitOnSuffix' but keeps the suffix attached to the resulting
2609-- | Like 'splitOnSuffix' but keeps the suffix attached to the resulting
2610-- splits.
2610-- splits.
2612−-- > splitBySuffix' p xs = S.toList $ S.splitBySuffix p (FL.toList) (S.fromList xs)
2612+-- > splitWithSuffix' p xs = S.toList $ S.splitWithSuffix p (FL.toList) (S.fromList xs)
2614−-- >>> splitBySuffix' (== '.') ""
2614+-- >>> splitWithSuffix' (== '.') ""
2617−-- >>> splitBySuffix' (== '.') "."
2617+-- >>> splitWithSuffix' (== '.') "."
2620−-- >>> splitBySuffix' (== '.') "a"
2620+-- >>> splitWithSuffix' (== '.') "a"
2623−-- >>> splitBySuffix' (== '.') ".a"
2623+-- >>> splitWithSuffix' (== '.') ".a"
2624-- > [".","a"]
2624-- > [".","a"]
2626−-- >>> splitBySuffix' (== '.') "a."
2626+-- >>> splitWithSuffix' (== '.') "a."
2627-- > ["a."]
2627-- > ["a."]
2629−-- >>> splitBySuffix' (== '.') "a.b"
2629+-- >>> splitWithSuffix' (== '.') "a.b"
2630-- > ["a.","b"]
2630-- > ["a.","b"]
2632−-- >>> splitBySuffix' (== '.') "a.b."
2632+-- >>> splitWithSuffix' (== '.') "a.b."
2633-- > ["a.","b."]
2633-- > ["a.","b."]
2635−-- >>> splitBySuffix' (== '.') "a..b.."
2635+-- >>> splitWithSuffix' (== '.') "a..b.."
2636-- > ["a.",".","b.","."]
2636-- > ["a.",".","b.","."]
2638-- @since 0.7.0
2638-- @since 0.7.0
@@ -2640,11 +2640,11 @@ wordsBy predicate f m =
2640-- This can be considered as an n-fold version of 'breakPost' where we apply
2640-- This can be considered as an n-fold version of 'breakPost' where we apply
2641-- 'breakPost' successively on the input stream.
2641-- 'breakPost' successively on the input stream.
2643−{-# INLINE splitBySuffix #-}
2643+{-# INLINE splitWithSuffix #-}
2644−splitBySuffix
2644+splitWithSuffix
2645 :: (IsStream t, Monad m)
2645 :: (IsStream t, Monad m)
2646 => (a -> Bool) -> Fold m a b -> t m a -> t m b
2646 => (a -> Bool) -> Fold m a b -> t m a -> t m b
2647−splitBySuffix predicate f m =
2647+splitWithSuffix predicate f m =
2648 D.fromStreamD $ D.splitSuffixBy' predicate f (D.toStreamD m)
2648 D.fromStreamD $ D.splitSuffixBy' predicate f (D.toStreamD m)
2650------------------------------------------------------------------------------
2650------------------------------------------------------------------------------
@@ -2863,11 +2863,11 @@ splitBySeq patt f m = intersperseM (runFold f (A.read patt)) $ splitOnSeq patt f
2863-- > ["a.",".","b.","."]
2863-- > ["a.",".","b.","."]
2865-- @since 0.7.0
2865-- @since 0.7.0
2866−{-# INLINE splitBySuffixSeq #-}
2866+{-# INLINE splitWithSuffixSeq #-}
2867−splitBySuffixSeq
2867+splitWithSuffixSeq
2868 :: (IsStream t, MonadIO m, Storable a, Enum a, Eq a)
2868 :: (IsStream t, MonadIO m, Storable a, Enum a, Eq a)
2869 => Array a -> Fold m a b -> t m a -> t m b
2869 => Array a -> Fold m a b -> t m a -> t m b
2870−splitBySuffixSeq patt f m =
2870+splitWithSuffixSeq patt f m =
2871 D.fromStreamD $ D.splitSuffixOn True patt f (D.toStreamD m)
2871 D.fromStreamD $ D.splitSuffixOn True patt f (D.toStreamD m)