From: sof Date: Thu, 25 Sep 1997 00:11:46 +0000 (+0000) Subject: [project @ 1997-09-25 00:11:46 by sof] X-Git-Tag: Approx_2487_patches~1465 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=65b2f18672e2cc4e3cf5706543f73148b90744f5;p=ghc-hetmet.git [project @ 1997-09-25 00:11:46 by sof] freeze{Float,Double}Array: state token not threaded properly --- diff --git a/ghc/lib/ghc/ArrBase.lhs b/ghc/lib/ghc/ArrBase.lhs index 0a65a3c..cee229d 100644 --- a/ghc/lib/ghc/ArrBase.lhs +++ b/ghc/lib/ghc/ArrBase.lhs @@ -561,7 +561,7 @@ freezeFloatArray (MutableByteArray ixs arr#) = ST $ \ (S# s#) -> | otherwise = case (readFloatArray# from# cur# s#) of { StateAndFloat# s1# ele -> case (writeFloatArray# to# cur# ele s1#) of { s2# -> - copy (cur# +# 1#) from# to# s1# + copy (cur# +# 1#) from# to# s2# }} freezeDoubleArray (MutableByteArray ixs arr#) = ST $ \ (S# s#) -> @@ -591,7 +591,7 @@ freezeDoubleArray (MutableByteArray ixs arr#) = ST $ \ (S# s#) -> | otherwise = case (readDoubleArray# from# cur# s#) of { StateAndDouble# s1# ele -> case (writeDoubleArray# to# cur# ele s1#) of { s2# -> - copy (cur# +# 1#) end# from# to# s1# + copy (cur# +# 1#) end# from# to# s2# }} unsafeFreezeArray :: Ix ix => MutableArray s ix elt -> ST s (Array ix elt)