Skip to content
Snippets Groups Projects
Commit 6c01550d authored by Simon Marlow's avatar Simon Marlow
Browse files

[project @ 1998-02-25 14:35:37 by simonm]

Don't use lazy unboxed bindings in strictToLazyST.  Write out what we
want explicity using case expressions.
parent d60d7500
No related branches found
No related tags found
No related merge requests found
......@@ -106,10 +106,11 @@ unsafeFreezeSTArray (STArray arr) = strictToLazyST (unsafeFreezeArray arr)
strictToLazyST :: PrelST.ST s a -> ST s a
strictToLazyST (PrelST.ST m) = ST $ \s ->
let
PrelST.S# s# = s
PrelST.STret s2# r = m s#
pr = case s of { PrelST.S# s# -> m s# }
r = case pr of { PrelST.STret s2# r -> r }
s' = case pr of { PrelST.STret s2# r -> PrelST.S# s2# }
in
(r, PrelST.S# s2#)
(r, s')
lazyToStrictST :: ST s a -> PrelST.ST s a
lazyToStrictST (ST m) = PrelST.ST $ \s ->
......
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