@@ -30,7 +30,6 @@ module Data.Text.Array
3030 , MArray
3131
3232 -- * Functions
33− , copy
3433 , partialCopyM
3534 , partialCopyI
3635 , empty
@@ -205,25 +204,6 @@ wordFactor = SIZEOF_HSWORD `shiftR` 1
205204wordAligned :: Int -> Bool
206205wordAligned i = i .&. (wordFactor - 1) == 0
207206
208−-- | Copy an array in its entirety. The destination array must be at
209−-- least as big as the source.
210−copy :: MArray s -- ^ source array
211− -> MArray s -- ^ destination array
212− -> ST s ()
213−copy dest@(MArray _ dlen) src@(MArray _ slen)
214− | dlen >= slen = fast_loop 0
215− | otherwise = fail "Data.Text.Array.copy: array too small"
216− where
217− nwds = slen `div` wordFactor
218− fast_loop !i
219− | i >= nwds = copy_loop (i * wordFactor)
220− | otherwise = do unsafeReadWord src i >>= unsafeWriteWord dest i
221− fast_loop (i+1)
222− copy_loop !i
223− | i >= slen = return ()
224− | otherwise = do unsafeRead src i >>= unsafeWrite dest i
225− copy_loop (i+1)
226−
227207-- | Copy some elements of a mutable array.
228208partialCopyM :: MArray s -- ^ Destination
229209 -> Int -- ^ Destination offset