Skip to content

Commit 7930b4b

Browse files
committed
lazy find and index are actually subject to fusion.
1 parent 1a52e9a commit 7930b4b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Data/Text/Lazy.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1659,7 +1659,7 @@ filter p t = unstream (S.filter p (stream t))
16591659

16601660
-- | /O(n)/ The 'find' function takes a predicate and a 'Text', and
16611661
-- returns the first element in matching the predicate, or 'Nothing'
1662-
-- if there is no such element.
1662+
-- if there is no such element. Subject to fusion.
16631663
find :: (Char -> Bool) -> Text -> Maybe Char
16641664
find p t = S.findBy p (stream t)
16651665
{-# INLINE find #-}
@@ -1674,6 +1674,7 @@ partition p t = (filter p t, filter (not . p) t)
16741674
{-# INLINE partition #-}
16751675

16761676
-- | /O(n)/ 'Text' index (subscript) operator, starting from 0.
1677+
-- Subject to fusion.
16771678
index :: Text -> Int64 -> Char
16781679
index t n = S.index (stream t) n
16791680
{-# INLINE index #-}

0 commit comments

Comments
 (0)