From: simonm Date: Thu, 4 Dec 1997 14:55:29 +0000 (+0000) Subject: [project @ 1997-12-04 14:55:29 by simonm] X-Git-Tag: Approx_2487_patches~1194 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=0db1f01c3b3c65d5c5835109fda4ac0de2a978e1;p=ghc-hetmet.git [project @ 1997-12-04 14:55:29 by simonm] lazify strictToLazyST a bit. --- diff --git a/ghc/lib/glaExts/LazyST.lhs b/ghc/lib/glaExts/LazyST.lhs index b8480df..4c44e30 100644 --- a/ghc/lib/glaExts/LazyST.lhs +++ b/ghc/lib/glaExts/LazyST.lhs @@ -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 ->