@@ -231,7 +231,7 @@ import qualified Data.Text.Internal.Fusion.Common as S
231
231
import Data.Text.Encoding (decodeUtf8' , encodeUtf8 )
232
232
import Data.Text.Internal.Fusion (stream , reverseStream , unstream )
233
233
import Data.Text.Internal.Private (span_ )
234
- import Data.Text.Internal (Text (.. ), empty , firstf , mul , safe , text )
234
+ import Data.Text.Internal (Text (.. ), empty , firstf , mul , safe , text , append )
235
235
import Data.Text.Internal.Unsafe.Char (unsafeWrite , unsafeChr8 )
236
236
import Data.Text.Show (singleton , unpack , unpackCString #)
237
237
import qualified Prelude as P
@@ -446,24 +446,6 @@ snoc :: Text -> Char -> Text
446
446
snoc t c = unstream (S. snoc (stream t) (safe c))
447
447
{-# INLINE snoc #-}
448
448
449
- -- | /O(n)/ Appends one 'Text' to the other by copying both of them
450
- -- into a new 'Text'.
451
- append :: Text -> Text -> Text
452
- append a@ (Text arr1 off1 len1) b@ (Text arr2 off2 len2)
453
- | len1 == 0 = b
454
- | len2 == 0 = a
455
- | len > 0 = Text (A. run x) 0 len
456
- | otherwise = overflowError " append"
457
- where
458
- len = len1+ len2
459
- x :: ST s (A. MArray s )
460
- x = do
461
- arr <- A. new len
462
- A. copyI len1 arr 0 arr1 off1
463
- A. copyI len2 arr len1 arr2 off2
464
- return arr
465
- {-# NOINLINE append #-}
466
-
467
449
-- | /O(1)/ Returns the first character of a 'Text', which must be
468
450
-- non-empty.
469
451
head :: Text -> Char
0 commit comments