From: Ian Lynagh Date: Sat, 20 Jun 2009 15:52:08 +0000 (+0000) Subject: The IO type has moved to GHC.Types in ghc-prim X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=1a2d88a60a8e2c8be84879d79f148d4c6ceb348e;p=ghc-base.git The IO type has moved to GHC.Types in ghc-prim --- diff --git a/Foreign/C/String.hs b/Foreign/C/String.hs index 6d46a9e..2fb14d0 100644 --- a/Foreign/C/String.hs +++ b/Foreign/C/String.hs @@ -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 ) diff --git a/Foreign/Marshal/Alloc.hs b/Foreign/Marshal/Alloc.hs index 574e6a4..108058a 100644 --- a/Foreign/Marshal/Alloc.hs +++ b/Foreign/Marshal/Alloc.hs @@ -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 diff --git a/Foreign/Marshal/Array.hs b/Foreign/Marshal/Array.hs index bac13cd..89859d4 100644 --- a/Foreign/Marshal/Array.hs +++ b/Foreign/Marshal/Array.hs @@ -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 diff --git a/Foreign/Marshal/Utils.hs b/Foreign/Marshal/Utils.hs index 85d802e..d800afe 100644 --- a/Foreign/Marshal/Utils.hs +++ b/Foreign/Marshal/Utils.hs @@ -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 diff --git a/Foreign/Ptr.hs b/Foreign/Ptr.hs index f6fac7d..564bb1c 100644 --- a/Foreign/Ptr.hs +++ b/Foreign/Ptr.hs @@ -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 diff --git a/Foreign/Storable.hs b/Foreign/Storable.hs index 65b4193..832efb3 100644 --- a/Foreign/Storable.hs +++ b/Foreign/Storable.hs @@ -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 diff --git a/GHC/IO.hs b/GHC/IO.hs index fef57da..865a09c 100644 --- a/GHC/IO.hs +++ b/GHC/IO.hs @@ -1,3 +1,4 @@ +{-# 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 diff --git a/GHC/Storable.lhs b/GHC/Storable.lhs index 5aecb5e..982230c 100644 --- a/GHC/Storable.lhs +++ b/GHC/Storable.lhs @@ -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}