on master help sign in
Twiddle append
6ec2765Bryan O'Sullivan
Data/Text/Lazy.hs+3−2
@@ -222,10 +222,11 @@ snoc t c = foldrChunks Chunk (singleton c) t
222 unstream (S.snoc (stream t) c) = snoc t c
222 unstream (S.snoc (stream t) c) = snoc t c
223 #-}
223 #-}
224
224
225−-- | /O(n\/c)/ Append two 'Text's
225+-- | /O(n\/c)/ Appends one 'Text' to another. Subject to array
226+-- fusion.
226append :: Text -> Text -> Text
227append :: Text -> Text -> Text
227append xs ys = foldrChunks Chunk ys xs
228append xs ys = foldrChunks Chunk ys xs
228−{-# INLINE append #-}
229+{-# INLINE [1] append #-}
229
230
230{-# RULES
231{-# RULES
231"LAZY TEXT append -> fused" [~1] forall t1 t2.
232"LAZY TEXT append -> fused" [~1] forall t1 t2.