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

[project @ 1997-12-04 14:55:29 by simonm]

lazify strictToLazyST a bit.
parent 2caf4c69
No related merge requests found
......@@ -100,8 +100,11 @@ unsafeFreezeSTArray (STArray arr) = strictToLazyST (unsafeFreezeArray arr)
strictToLazyST :: STBase.ST s a -> ST s a
strictToLazyST (STBase.ST m) = ST $ \s ->
let STBase.S# s# = s in
case m s# of { STBase.STret s2# r -> (r, STBase.S# s2#) }
let
STBase.S# s# = s
STBase.STret s2# r = m s#
in
(r, STBase.S# s2#)
lazyToStrictST :: ST s a -> STBase.ST s a
lazyToStrictST (ST m) = STBase.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