X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Flib%2Fstd%2FPrelArrExtra.lhs;h=85292d8d21471555babd36c2f20cf55b6eff0942;hb=225d251337438e2f7870f0ec2781b1c616ef7462;hp=d13b7045c7fcf34544992acd30c961f1454522aa;hpb=b274a9d699c02a7e06769156304f442a3976810e;p=ghc-hetmet.git diff --git a/ghc/lib/std/PrelArrExtra.lhs b/ghc/lib/std/PrelArrExtra.lhs index d13b704..85292d8d 100644 --- a/ghc/lib/std/PrelArrExtra.lhs +++ b/ghc/lib/std/PrelArrExtra.lhs @@ -1,5 +1,5 @@ % ----------------------------------------------------------------------------- -% $Id: PrelArrExtra.lhs,v 1.11 2000/08/29 16:36:23 simonpj Exp $ +% $Id: PrelArrExtra.lhs,v 1.12 2000/12/12 12:19:58 simonmar Exp $ % % (c) The University of Glasgow, 1994-2000 % @@ -38,7 +38,7 @@ freezeByteArray :: Ix ix => MutableByteArray s ix -> ST s (ByteArray ix) -- only modifies its destination operand, which is already MutableByteArray. freezeByteArray (MutableByteArray l u arr) = ST $ \ s -> let n = sizeofMutableByteArray# arr in - case (newCharArray# n s) of { (# s, newarr #) -> + case (newByteArray# n s) of { (# s, newarr #) -> case ((unsafeCoerce# memcpy) newarr arr n s) of { (# s, () #) -> case unsafeFreezeByteArray# newarr s of { (# s, frozen #) -> (# s, ByteArray l u frozen #) }}}