@@ -130,7 +130,7 @@ module Data.Text
130130 -- * Indexing
131131 , index
132132 , findIndex
133− -- , findIndices
133+ , findIndices
134134 , elemIndex
135135 -- , elemIndices
136136 -- , count
@@ -823,16 +823,24 @@ index :: Text -> Int -> Char
823823index t n = S.index (stream t) n
824824{-# INLINE index #-}
825825
826−-- | The 'findIndex' function takes a predicate and a 'Text' and
827−-- returns the index of the first element in the 'Text'
828−-- satisfying the predicate.
826+-- | /O(n)/ The 'findIndex' function takes a predicate and a 'Text'
827+-- and returns the index of the first element in the 'Text' satisfying
828+-- the predicate. This function is subject to fusion.
829829findIndex :: (Char -> Bool) -> Text -> Maybe Int
830830findIndex p t = S.findIndex p (stream t)
831831{-# INLINE findIndex #-}
832832
833+-- | The 'findIndices' function extends 'findIndex', by returning the
834+-- indices of all elements satisfying the predicate, in ascending
835+-- order. This function is subject to fusion.
836+findIndices :: (Char -> Bool) -> Text -> [Int]
837+findIndices p t = S.findIndices p (stream t)
838+{-# INLINE findIndices #-}
839+
833840-- | /O(n)/ The 'elemIndex' function returns the index of the first
834841-- element in the given 'Text' which is equal to the query element, or
835−-- 'Nothing' if there is no such element.
842+-- 'Nothing' if there is no such element. This function is subject to
843+-- fusion.
836844elemIndex :: Char -> Text -> Maybe Int
837845elemIndex c t = S.elemIndex c (stream t)
838846