From: simonm Date: Wed, 25 Feb 1998 14:35:37 +0000 (+0000) Subject: [project @ 1998-02-25 14:35:37 by simonm] X-Git-Tag: Approx_2487_patches~917 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=6c01550d031fb7c96efa368f241c3291811f208e;p=ghc-hetmet.git [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. --- diff --git a/ghc/lib/exts/LazyST.lhs b/ghc/lib/exts/LazyST.lhs index 51fb06a..1d9cf60 100644 --- a/ghc/lib/exts/LazyST.lhs +++ b/ghc/lib/exts/LazyST.lhs @@ -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 ->