From: simonmar Date: Fri, 29 Jun 2001 09:41:37 +0000 (+0000) Subject: [project @ 2001-06-29 09:41:37 by simonmar] X-Git-Tag: nhc98-1-18-release~1232 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=77af63d30b55fd40254d0674feff81b01bc85585;p=haskell-directory.git [project @ 2001-06-29 09:41:37 by simonmar] merge fptools/hslibs/lang/ST.lhs rev. 1.4 --- 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 -- ---------------------------------------------------------------------------