@@ -130,7 +130,7 @@ module Data.Text.Lazy
131 , splitTimes
131 , splitTimes
132 , splitTimesEnd
132 , splitTimesEnd
133− , splitWith
133+ , splitBy
134 , chunksOf
134 , chunksOf
135 -- , breakSubstring
135 -- , breakSubstring
@@ -881,13 +881,13 @@ tails ts@(Chunk t ts')
883-- > intercalate s . split s == id
883-- > intercalate s . split s == id
884−-- > split (singleton c) == splitWith (==c)
884+-- > split (singleton c) == splitBy (==c)
885split :: Text -- ^ Text to split on
885split :: Text -- ^ Text to split on
886 -> Text -- ^ Input text
886 -> Text -- ^ Input text
887 -> [Text]
887 -> [Text]
888split pat src0
888split pat src0
889 | l == 0 = emptyError "split"
889 | l == 0 = emptyError "split"
890− | l == 1 = splitWith (== (head pat)) src0
890+ | l == 1 = splitBy (== (head pat)) src0
891 | otherwise = go src0
891 | otherwise = go src0
893 l = length pat
893 l = length pat
@@ -900,8 +900,8 @@ split pat src0
900{-# INLINE [1] split #-}
900{-# INLINE [1] split #-}
903−"LAZY TEXT split/singleton -> splitWith/==" [~1] forall c t.
903+"LAZY TEXT split/singleton -> splitBy/==" [~1] forall c t.
904− split (singleton c) t = splitWith (==c) t
904+ split (singleton c) t = splitBy (==c) t
907-- | /O(m)*O(n)/ Break a 'Text' into pieces at most @k@ times,
907-- | /O(m)*O(n)/ Break a 'Text' into pieces at most @k@ times,
@@ -960,16 +960,16 @@ splitTimesEnd k pat src =
960-- resulting components do not contain the separators. Two adjacent
960-- resulting components do not contain the separators. Two adjacent
961-- separators result in an empty component in the output. eg.
961-- separators result in an empty component in the output. eg.
963−-- > splitWith (=='a') "aabbaca" == ["","","bb","c",""]
963+-- > splitBy (=='a') "aabbaca" == ["","","bb","c",""]
964−-- > splitWith (=='a') [] == [""]
964+-- > splitBy (=='a') [] == [""]
965−splitWith :: (Char -> Bool) -> Text -> [Text]
965+splitBy :: (Char -> Bool) -> Text -> [Text]
966−splitWith _ Empty = [Empty]
966+splitBy _ Empty = [Empty]
967−splitWith p (Chunk t0 ts0) = comb [] (T.splitWith p t0) ts0
967+splitBy p (Chunk t0 ts0) = comb [] (T.splitBy p t0) ts0
968 where comb acc (s:[]) Empty = revChunks (s:acc) : []
968 where comb acc (s:[]) Empty = revChunks (s:acc) : []
969− comb acc (s:[]) (Chunk t ts) = comb (s:acc) (T.splitWith p t) ts
969+ comb acc (s:[]) (Chunk t ts) = comb (s:acc) (T.splitBy p t) ts
970 comb acc (s:ss) ts = revChunks (s:acc) : comb [] ss ts
970 comb acc (s:ss) ts = revChunks (s:acc) : comb [] ss ts
971− comb _ [] _ = impossibleError "splitWith"
971+ comb _ [] _ = impossibleError "splitBy"
972−{-# INLINE splitWith #-}
972+{-# INLINE splitBy #-}
974-- | /O(n)/ Splits a 'Text' into components of length @k@. The last
974-- | /O(n)/ Splits a 'Text' into components of length @k@. The last
975-- element may be shorter than the other chunks, depending on the
975-- element may be shorter than the other chunks, depending on the
@@ -996,7 +996,7 @@ lines t = let (l,t') = break ((==) '\n') t
996-- | /O(n)/ Breaks a 'Text' up into a list of words, delimited by 'Char's
996-- | /O(n)/ Breaks a 'Text' up into a list of words, delimited by 'Char's
997-- representing white space.
997-- representing white space.
998words :: Text -> [Text]
998words :: Text -> [Text]
999−words = L.filter (not . null) . splitWith isSpace
999+words = L.filter (not . null) . splitBy isSpace
1000{-# INLINE words #-}
1000{-# INLINE words #-}
1002-- | /O(n)/ Joins lines, after appending a terminating newline to
1002-- | /O(n)/ Joins lines, after appending a terminating newline to