on master help sign in
Fix comments.
fd4a35cBryan O'Sullivan
Data/Text.hs+4−4
@@ -366,8 +366,8 @@ length t = S.length (stream t)
366
366
367-- -----------------------------------------------------------------------------
367-- -----------------------------------------------------------------------------
368-- * Transformations
368-- * Transformations
369−-- | /O(n)/ 'map' @f @xs is the 'Text' obtained by applying @f@ to
369+-- | /O(n)/ 'map' @f @t@ is the 'Text' obtained by applying @f@ to
370−-- each element of @xs@. Subject to array fusion.
370+-- each element of @t@. Subject to array fusion.
371map :: (Char -> Char) -> Text -> Text
371map :: (Char -> Char) -> Text -> Text
372map f t = unstream (S.map f (stream t))
372map f t = unstream (S.map f (stream t))
373{-# INLINE [1] map #-}
373{-# INLINE [1] map #-}
@@ -692,8 +692,8 @@ takeWhile p t@(Text arr off len) = loop 0
692 unstream (S.takeWhile p (stream t)) = takeWhile p t
692 unstream (S.takeWhile p (stream t)) = takeWhile p t
693 #-}
693 #-}
694
694
695−-- | /O(n)/ 'dropWhile' @p@ @xs@ returns the suffix remaining after
695+-- | /O(n)/ 'dropWhile' @p@ @t@ returns the suffix remaining after
696−-- 'takeWhile' @p@ @xs@. This function is subject to array fusion.
696+-- 'takeWhile' @p@ @t@. This function is subject to array fusion.
697dropWhile :: (Char -> Bool) -> Text -> Text
697dropWhile :: (Char -> Bool) -> Text -> Text
698dropWhile p t@(Text arr off len) = loop 0 0
698dropWhile p t@(Text arr off len) = loop 0 0
699 where loop !i !l | l >= len = empty
699 where loop !i !l | l >= len = empty
Data/Text/Lazy.hs+4−4
@@ -339,8 +339,8 @@ length = foldlChunks go 0
339 S.length (stream t) = length t
339 S.length (stream t) = length t
340 #-}
340 #-}
341
341
342−-- | /O(n)/ 'map' @f @xs is the 'Text' obtained by applying @f@ to
342+-- | /O(n)/ 'map' @f @t@ is the 'Text' obtained by applying @f@ to
343−-- each element of @xs@. Subject to array fusion.
343+-- each element of @t@. Subject to array fusion.
344map :: (Char -> Char) -> Text -> Text
344map :: (Char -> Char) -> Text -> Text
345map f t = unstream (S.map f (stream t))
345map f t = unstream (S.map f (stream t))
346{-# INLINE [1] map #-}
346{-# INLINE [1] map #-}
@@ -644,8 +644,8 @@ takeWhile p t0 = takeWhile' t0
644 unstream (S.takeWhile p (stream t)) = takeWhile p t
644 unstream (S.takeWhile p (stream t)) = takeWhile p t
645 #-}
645 #-}
646
646
647−-- | /O(n)/ 'dropWhile' @p@ @xs@ returns the suffix remaining after
647+-- | /O(n)/ 'dropWhile' @p@ @t@ returns the suffix remaining after
648−-- 'takeWhile' @p@ @xs@. This function is subject to array fusion.
648+-- 'takeWhile' @p@ @t@. This function is subject to array fusion.
649dropWhile :: (Char -> Bool) -> Text -> Text
649dropWhile :: (Char -> Bool) -> Text -> Text
650dropWhile p t0 = dropWhile' t0
650dropWhile p t0 = dropWhile' t0
651 where dropWhile' Empty = Empty
651 where dropWhile' Empty = Empty