on master help sign in
Make concat and concatMap inline-friendly.

--HG-- extra : convert_revision : 2ca7a5b597cec302e11148bd765d1fc80a0dca01

commite91c82718e235ee18baae1576bf56211cc3a497a authorBryan O'Sullivan <bos@serpentine.com> dateMon 30 Nov 2009, 06:47 (17 years ago) parent0b0c021
1 file changed+2
Data/Text/Fusion/Common.hs+2
Data/Text/Fusion/Common.hs+2
@@ -481,11 +481,13 @@ intercalate s = concat . (L.intersperse s)
481481-- | /O(n)/ Concatenate a list of streams. Subject to array fusion.
482482concat :: [Stream Char] -> Stream Char
483483concat = L.foldr append empty
484+{-# INLINE [0] concat #-}
484485
485486-- | Map a function over a stream that results in a stream and concatenate the
486487-- results.
487488concatMap :: (Char -> Stream Char) -> Stream Char -> Stream Char
488489concatMap f = foldr (append . f) empty
490+{-# INLINE [0] concatMap #-}
489491
490492-- | /O(n)/ any @p @xs determines if any character in the stream
491493-- @xs@ satisifes the predicate @p@.