@@ -172,11 +172,10 @@ unsafeWriteWord MArray{..} i@(I# i#) (W# e#) = ST $ \s1# ->
172{-# INLINE unsafeWriteWord #-}
172{-# INLINE unsafeWriteWord #-}
174-- | Convert an immutable array to a list.
174-- | Convert an immutable array to a list.
175−toList :: Array -> [Word16]
175+toList :: Array -> Int -> Int -> [Word16]
176−toList a = loop 0
176+toList ary off len = loop 0
177− where loop i | i < len = unsafeIndex a i : loop (i+1)
177+ where loop i | i < len = unsafeIndex ary (off+i) : loop (i+1)
178 | otherwise = []
178 | otherwise = []
181-- | An empty immutable array.
180-- | An empty immutable array.
182empty :: Array
181empty :: Array