@@ -30,7 +30,6 @@ module Data.Text.Array
32 -- * Functions
32 -- * Functions
34 , partialCopyM
33 , partialCopyM
35 , partialCopyI
34 , partialCopyI
@@ -205,25 +204,6 @@ wordFactor = SIZEOF_HSWORD `shiftR` 1
205wordAligned :: Int -> Bool
204wordAligned :: Int -> Bool
206wordAligned i = i .&. (wordFactor - 1) == 0
205wordAligned i = i .&. (wordFactor - 1) == 0
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
213−copy dest@(MArray _ dlen) src@(MArray _ slen)
214− | dlen >= slen = fast_loop 0
215− | otherwise = fail "Data.Text.Array.copy: array too small"
217− nwds = slen `div` wordFactor
219− | i >= nwds = copy_loop (i * wordFactor)
220− | otherwise = do unsafeReadWord src i >>= unsafeWriteWord dest i
223− | i >= slen = return ()
224− | otherwise = do unsafeRead src i >>= unsafeWrite dest i
227-- | Copy some elements of a mutable array.
207-- | Copy some elements of a mutable array.
228partialCopyM :: MArray s -- ^ Destination
208partialCopyM :: MArray s -- ^ Destination
229 -> Int -- ^ Destination offset
209 -> Int -- ^ Destination offset