@@ -699,14 +699,14 @@ take i t0 = take' i t0
699-- length of the 'Text'. Subject to fusion.
699-- length of the 'Text'. Subject to fusion.
700drop :: Int64 -> Text -> Text
700drop :: Int64 -> Text -> Text
702− | i <= 0 = t0
702+ | i <= 0 = t0
703 | otherwise = drop' i t0
703 | otherwise = drop' i t0
704 where drop' 0 ts = ts
704 where drop' 0 ts = ts
705 drop' _ Empty = Empty
705 drop' _ Empty = Empty
706 drop' n (Chunk t ts)
706 drop' n (Chunk t ts)
707− | n < len = Chunk (T.drop (fromIntegral n) t) ts
707+ | n < len = Chunk (T.drop (fromIntegral n) t) ts
708 | otherwise = drop' (n - len) ts
708 | otherwise = drop' (n - len) ts
709− where len = fromIntegral (T.length t)
709+ where len = fromIntegral (T.length t)
710{-# INLINE [1] drop #-}
710{-# INLINE [1] drop #-}
@@ -860,6 +860,9 @@ splitAtWord x (Chunk c@(T.Text arr off len) cs)
860-- want to break on every instance of a substring), use 'find'
860-- want to break on every instance of a substring), use 'find'
861-- instead, as it has lower startup overhead.
861-- instead, as it has lower startup overhead.
863+-- This function is strict in its first argument, and lazy in its
863-- In (unlikely) bad cases, this function's time complexity degrades
866-- In (unlikely) bad cases, this function's time complexity degrades
864-- towards /O(n*m)/.
867-- towards /O(n*m)/.
865break :: Text -> Text -> (Text, Text)
868break :: Text -> Text -> (Text, Text)
@@ -949,6 +952,9 @@ tails ts@(Chunk t ts')
949-- > intercalate s . split s == id
952-- > intercalate s . split s == id
950-- > split (singleton c) == splitBy (==c)
953-- > split (singleton c) == splitBy (==c)
955+-- This function is strict in its first argument, and lazy in its
952-- In (unlikely) bad cases, this function's time complexity degrades
958-- In (unlikely) bad cases, this function's time complexity degrades
953-- towards /O(n*m)/.
959-- towards /O(n*m)/.
954split :: Text -- ^ Text to split on
960split :: Text -- ^ Text to split on
@@ -1059,6 +1065,9 @@ isSuffixOf x y = reverse x `isPrefixOf` reverse y
1059-- 'True' iff the first is contained, wholly and intact, anywhere
1065-- 'True' iff the first is contained, wholly and intact, anywhere
1060-- within the second.
1066-- within the second.
1068+-- This function is strict in its first argument, and lazy in its
1062-- In (unlikely) bad cases, this function's time complexity degrades
1071-- In (unlikely) bad cases, this function's time complexity degrades
1063-- towards /O(n*m)/.
1072-- towards /O(n*m)/.
1064isInfixOf :: Text -> Text -> Bool
1073isInfixOf :: Text -> Text -> Bool