@@ -193,7 +193,7 @@ module Data.Text
193import Prelude (Char, Bool(..), Int, Maybe(..), String,
193import Prelude (Char, Bool(..), Int, Maybe(..), String,
194 Eq(..), Ord(..), Ordering(..), (++),
194 Eq(..), Ord(..), Ordering(..), (++),
195 Read(..), Show(..),
195 Read(..), Show(..),
196− (&&), (||), (+), (-), (.), ($), ($!), (>>), (*),
196+ (&&), (||), (+), (-), (.), ($), ($!), (>>),
197 maxBound, not, return, otherwise, quot)
197 maxBound, not, return, otherwise, quot)
198#if defined(HAVE_DEEPSEQ)
198#if defined(HAVE_DEEPSEQ)
199import Control.DeepSeq (NFData)
199import Control.DeepSeq (NFData)
@@ -962,10 +962,9 @@ replicate n t@(Text a o l)
962 | n <= 0 || l <= 0 = empty
962 | n <= 0 || l <= 0 = empty
963 | n == 1 = t
963 | n == 1 = t
964 | isSingleton t = replicateChar n (unsafeHead t)
964 | isSingleton t = replicateChar n (unsafeHead t)
965− | n <= maxBound `quot` l = Text (A.run x) 0 len
965+ | otherwise = Text (A.run x) 0 len
966− | otherwise = overflowError "replicate"
968− len = l * n
967+ len = l `mul` n
970 arr <- A.new len
969 arr <- A.new len
971 let loop !d !i | i >= n = return arr
970 let loop !d !i | i >= n = return arr