X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Flib%2Fghc%2FIOBase.lhs;fp=ghc%2Flib%2Fghc%2FIOBase.lhs;h=807dba22a84a85205fde1a89c5cc7eee9befd2cf;hb=9dd6e1c216993624a2cd74b62ca0f0569c02c26b;hp=39fe2542c3bb939ba34011c89bd98f4baf9525c0;hpb=ff14742cc328f19b9bf7c04d9a69408e641cf64a;p=ghc-hetmet.git diff --git a/ghc/lib/ghc/IOBase.lhs b/ghc/lib/ghc/IOBase.lhs index 39fe254..807dba2 100644 --- a/ghc/lib/ghc/IOBase.lhs +++ b/ghc/lib/ghc/IOBase.lhs @@ -98,10 +98,9 @@ instance Show (IO a) where \begin{code} stToIO :: ST RealWorld a -> IO a -ioToST :: IO a -> ST RealWorld a - stToIO (ST m) = IO $ \ s -> case (m s) of STret new_s r -> IOok new_s r +ioToST :: IO a -> ST RealWorld a ioToST (IO io) = ST $ \ s -> case (io s) of IOok new_s a -> STret new_s a @@ -122,8 +121,8 @@ fputs :: Addr{-FILE*-} -> String -> IO Bool fputs stream [] = return True fputs stream (c : cs) - = _ccall_ stg_putc c stream >> -- stg_putc expands to putc - fputs stream cs -- (just does some casting stream) + = _ccall_ stg_putc c stream >> -- stg_putc expands to putc + fputs stream cs -- (just does some casting stream) \end{code} @@ -307,9 +306,9 @@ data MVar a = MVar (SynchVar# RealWorld a) data ForeignObj = ForeignObj ForeignObj# -- another one #if defined(__CONCURRENT_HASKELL__) -type Handle = MVar Handle__ +newtype Handle = Handle (MVar Handle__) #else -type Handle = MutableVar RealWorld Handle__ +newtype Handle = Handle (MutableVar RealWorld Handle__) #endif data Handle__