Commit 0f859f0e authored by Ian Lynagh's avatar Ian Lynagh
Browse files

The IO type has moved to GHC.Types in ghc-prim

parent 5abf6bce
......@@ -99,7 +99,6 @@ import Data.Word
import GHC.List
import GHC.Real
import GHC.Num
import GHC.IO
import GHC.Base
#else
import Data.Char ( chr, ord )
......
......@@ -40,7 +40,6 @@ import Foreign.Ptr ( Ptr, nullPtr, FunPtr )
#ifdef __GLASGOW_HASKELL__
import Foreign.ForeignPtr ( FinalizerPtr )
import GHC.IO
import GHC.IO.Exception
import GHC.Real
import GHC.Ptr
......
......@@ -68,7 +68,6 @@ import Foreign.Marshal.Alloc (mallocBytes, allocaBytes, reallocBytes)
import Foreign.Marshal.Utils (copyBytes, moveBytes)
#ifdef __GLASGOW_HASKELL__
import GHC.IO
import GHC.Num
import GHC.List
import GHC.Err
......
......@@ -53,7 +53,6 @@ import Foreign.C.Types ( CSize )
import Foreign.Marshal.Alloc ( malloc, alloca )
#ifdef __GLASGOW_HASKELL__
import GHC.IO
import GHC.Real ( fromIntegral )
import GHC.Num
import GHC.Base
......
......@@ -50,7 +50,6 @@ module Foreign.Ptr (
#ifdef __GLASGOW_HASKELL__
import GHC.Ptr
import GHC.IO
import GHC.Base
import GHC.Num
import GHC.Read
......
......@@ -47,7 +47,6 @@ import GHC.Int
import GHC.Word
import GHC.Ptr
import GHC.Err
import GHC.IO
import GHC.Base
#else
import Data.Int
......
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_GHC -fno-implicit-prelude -funbox-strict-fields #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
......@@ -64,21 +65,6 @@ Libraries - parts of hslibs/lang.
--SDM
-}
{-|
A value of type @'IO' a@ is a computation which, when performed,
does some I\/O before returning a value of type @a@.
There is really only one way to \"perform\" an I\/O action: bind it to
@Main.main@ in your program. When your program is run, the I\/O will
be performed. It isn't possible to perform I\/O from an arbitrary
function, unless that function is itself in the 'IO' monad and called
at some point, directly or indirectly, from @Main.main@.
'IO' is a monad, so 'IO' actions can be combined using either the do-notation
or the '>>' and '>>=' operations from the 'Monad' class.
-}
newtype IO a = IO (State# RealWorld -> (# State# RealWorld, a #))
unIO :: IO a -> (State# RealWorld -> (# State# RealWorld, a #))
unIO (IO a) = a
......
......@@ -55,7 +55,6 @@ import GHC.Stable ( StablePtr(..) )
import GHC.Int
import GHC.Word
import GHC.Ptr
import GHC.IO
import GHC.Base
\end{code}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment