Commits

Bryan O'Sullivan  committed 59975c2

Small haddock edits

  • Participants
  • Parent commits 5c898a1

Comments (0)

Files changed (2)

File Data/Text.hs

 {-# INLINE reverse #-}
 
 -- | /O(m+n)/ Replace every occurrence of one substring with another.
+--
+-- In (unlikely) bad cases, this function's time complexity degrades
+-- towards /O(n*m)/.
 replace :: Text                 -- ^ Text to search for
         -> Text                 -- ^ Replacement text
         -> Text                 -- ^ Input text

File Data/Text/Lazy.hs

 -- This module is intended to be imported @qualified@, to avoid name
 -- clashes with "Prelude" functions.  eg.
 --
--- > import qualified Data.Text.Lazy as B
+-- > import qualified Data.Text.Lazy as L
 
 module Data.Text.Lazy
     (
         rev a (Chunk t ts) = rev (Chunk (T.reverse t) a) ts
 
 -- | /O(m+n)/ Replace every occurrence of one substring with another.
+--
+-- In (unlikely) bad cases, this function's time complexity degrades
+-- towards /O(n*m)/.
 replace :: Text                 -- ^ Text to search for
         -> Text                 -- ^ Replacement text
         -> Text                 -- ^ Input text