Skip to content
Snippets Groups Projects
Commit 65b2f186 authored by sof's avatar sof
Browse files

[project @ 1997-09-25 00:11:46 by sof]

freeze{Float,Double}Array: state token not threaded properly
parent 2fa7ebd4
No related merge requests found
...@@ -561,7 +561,7 @@ freezeFloatArray (MutableByteArray ixs arr#) = ST $ \ (S# s#) -> ...@@ -561,7 +561,7 @@ freezeFloatArray (MutableByteArray ixs arr#) = ST $ \ (S# s#) ->
| otherwise | otherwise
= case (readFloatArray# from# cur# s#) of { StateAndFloat# s1# ele -> = case (readFloatArray# from# cur# s#) of { StateAndFloat# s1# ele ->
case (writeFloatArray# to# cur# ele s1#) of { s2# -> 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#) -> freezeDoubleArray (MutableByteArray ixs arr#) = ST $ \ (S# s#) ->
...@@ -591,7 +591,7 @@ freezeDoubleArray (MutableByteArray ixs arr#) = ST $ \ (S# s#) -> ...@@ -591,7 +591,7 @@ freezeDoubleArray (MutableByteArray ixs arr#) = ST $ \ (S# s#) ->
| otherwise | otherwise
= case (readDoubleArray# from# cur# s#) of { StateAndDouble# s1# ele -> = case (readDoubleArray# from# cur# s#) of { StateAndDouble# s1# ele ->
case (writeDoubleArray# to# cur# ele s1#) of { s2# -> 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) unsafeFreezeArray :: Ix ix => MutableArray s ix elt -> ST s (Array ix elt)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment