From 2c6ff024ff27acf667cf4ccb7be686453f4e428b Mon Sep 17 00:00:00 2001 From: ross Date: Tue, 21 Jan 2003 16:33:20 +0000 Subject: [PATCH] [project @ 2003-01-21 16:33:20 by ross] add local definitions of unsafeIOToST and stToIO --- Control/Monad/ST/Lazy.hs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Control/Monad/ST/Lazy.hs b/Control/Monad/ST/Lazy.hs index ffbb1af..60ff1be 100644 --- a/Control/Monad/ST/Lazy.hs +++ b/Control/Monad/ST/Lazy.hs @@ -22,11 +22,11 @@ module Control.Monad.ST.Lazy ( -- * Unsafe operations unsafeInterleaveST, - ST.unsafeIOToST, + unsafeIOToST, -- * Converting 'ST' To 'IO' RealWorld, - ST.stToIO, + stToIO, #ifndef __HUGS__ -- * Converting between strict and lazy 'ST' @@ -46,7 +46,7 @@ import Control.Monad #endif #ifdef __HUGS__ -import Hugs.LazyST as ST +import Hugs.LazyST #endif #ifdef __GLASGOW_HASKELL__ @@ -118,4 +118,10 @@ lazyToStrictST (ST m) = GHC.ST.ST $ \s -> unsafeInterleaveST :: ST s a -> ST s a unsafeInterleaveST = strictToLazyST . ST.unsafeInterleaveST . lazyToStrictST + +unsafeIOToST :: IO a -> ST s a +unsafeIOToST = strictToLazyST . ST.unsafeIOToST + +stToIO :: ST RealWorld a -> IO a +stToIO = ST.stToIO . lazyToStrictST #endif -- 1.7.10.4