From 77af63d30b55fd40254d0674feff81b01bc85585 Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 29 Jun 2001 09:41:37 +0000 Subject: [PATCH] [project @ 2001-06-29 09:41:37 by simonmar] merge fptools/hslibs/lang/ST.lhs rev. 1.4 --- Control/Monad/ST.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Control/Monad/ST.hs b/Control/Monad/ST.hs index 6cbae95..7817add 100644 --- a/Control/Monad/ST.hs +++ b/Control/Monad/ST.hs @@ -8,7 +8,7 @@ -- Stability : experimental -- Portability : non-portable -- --- $Id: ST.hs,v 1.1 2001/06/28 14:15:02 simonmar Exp $ +-- $Id: ST.hs,v 1.2 2001/06/29 09:41:37 simonmar Exp $ -- -- The State Transformer Monad, ST -- @@ -37,9 +37,7 @@ import GHC.Prim ( unsafeCoerce#, RealWorld ) import GHC.IOBase ( IO(..), stToIO ) unsafeIOToST :: IO a -> ST s a -unsafeIOToST (IO io) = ST $ \ s -> - case ((unsafeCoerce# io) s) of - (# new_s, a #) -> unsafeCoerce# (STret new_s a) +unsafeIOToST (IO io) = ST $ \ s -> (unsafeCoerce# io) s #endif -- --------------------------------------------------------------------------- -- 1.7.10.4