Remove unused imports from base
authorsimonpj@microsoft.com <unknown>
Mon, 6 Jul 2009 11:18:42 +0000 (11:18 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 6 Jul 2009 11:18:42 +0000 (11:18 +0000)
These unused imports are detected by the new unused-import code

43 files changed:
Control/Applicative.hs
Control/Arrow.hs
Control/Category.hs
Control/Exception.hs
Control/Exception/Base.hs
Control/Monad/ST.hs
Control/Monad/ST/Lazy.hs
Control/Monad/ST/Strict.hs
Control/OldException.hs
Data/Data.hs
Data/Dynamic.hs
Data/IORef.hs
Data/Ix.hs
Data/STRef/Strict.hs
Data/Typeable.hs
Foreign/ForeignPtr.hs
Foreign/Marshal/Error.hs
Foreign/Ptr.hs
Foreign/Storable.hs
GHC/Conc.lhs
GHC/Desugar.hs
GHC/Exts.hs
GHC/ForeignPtr.hs
GHC/IO/Buffer.hs
GHC/IO/BufferedIO.hs
GHC/IO/Encoding.hs
GHC/IO/Encoding/Latin1.hs
GHC/IO/Encoding/Types.hs
GHC/IO/Encoding/UTF16.hs
GHC/IO/Encoding/UTF32.hs
GHC/IO/Encoding/UTF8.hs
GHC/IO/FD.hs
GHC/IO/Handle/FD.hs
GHC/IO/Handle/Internals.hs
GHC/MVar.hs
GHC/Pack.lhs
GHC/Stable.lhs
GHC/Weak.lhs
Prelude.hs
System/Environment.hs
System/IO.hs
System/Posix/Internals.hs
System/Posix/Types.hs

index d289916..1d62e0a 100644 (file)
@@ -36,7 +36,6 @@ module Control.Applicative (
         ) where
 
 import Prelude hiding (id,(.))
-import qualified Prelude
 
 import Control.Category
 import Control.Arrow
index 4606b4d..f3c1de2 100644 (file)
@@ -39,7 +39,6 @@ module Control.Arrow (
         ) where
 
 import Prelude hiding (id,(.))
-import qualified Prelude
 
 import Control.Monad
 import Control.Monad.Fix
index 770d850..fa73cff 100644 (file)
@@ -12,7 +12,6 @@
 
 module Control.Category where
 
-import Prelude hiding (id,(.))
 import qualified Prelude
 
 infixr 9 .
index 6430c9a..9824fb0 100644 (file)
@@ -138,7 +138,7 @@ import Control.Exception.Base
 
 #ifdef __GLASGOW_HASKELL__
 import GHC.Base
-import GHC.IO hiding ( onException, finally )
+-- import GHC.IO hiding ( onException, finally )
 import Data.Maybe
 #else
 import Prelude hiding (catch)
index f32b2f7..d5cac44 100644 (file)
@@ -110,7 +110,7 @@ import GHC.IO hiding (finally,onException)
 import GHC.IO.Exception
 import GHC.Exception
 import GHC.Show
-import GHC.Exception hiding ( Exception )
+-- import GHC.Exception hiding ( Exception )
 import GHC.Conc
 #endif
 
index cae255f..4260d0e 100644 (file)
@@ -32,8 +32,6 @@ module Control.Monad.ST
         unsafeSTToIO            -- :: ST s a -> IO a
       ) where
 
-import Prelude
-
 import Control.Monad.Fix
 
 #include "Typeable.h"
index 00aa4f0..657752e 100644 (file)
@@ -36,13 +36,11 @@ import Prelude
 
 import Control.Monad.Fix
 
-import Control.Monad.ST (RealWorld)
 import qualified Control.Monad.ST as ST
 
 #ifdef __GLASGOW_HASKELL__
 import qualified GHC.ST
 import GHC.Base
-import Control.Monad
 #endif
 
 #ifdef __HUGS__
index a899616..d8692f8 100644 (file)
@@ -16,5 +16,4 @@ module Control.Monad.ST.Strict (
         module Control.Monad.ST
   ) where
 
-import Prelude
 import Control.Monad.ST
index ae25fdc..936d03e 100644 (file)
@@ -134,7 +134,7 @@ module Control.OldException (
 import GHC.Base
 import GHC.Num
 import GHC.Show
-import GHC.IO ( IO )
+-- import GHC.IO ( IO )
 import GHC.IO.Handle.FD ( stdout )
 import qualified GHC.IO as New
 import qualified GHC.IO.Exception as New
index 8c746dd..646249e 100644 (file)
@@ -114,7 +114,6 @@ import Data.Maybe
 import Control.Monad
 
 -- Imports for the instances
-import Data.Typeable
 import Data.Int              -- So we can give Data instance for Int8, ...
 import Data.Word             -- So we can give Data instance for Word8, ...
 #ifdef __GLASGOW_HASKELL__
index 7466897..12bf1c4 100644 (file)
@@ -47,7 +47,6 @@ import Unsafe.Coerce
 #ifdef __GLASGOW_HASKELL__
 import GHC.Base
 import GHC.Show
-import GHC.Err
 import GHC.Num
 #endif
 
index 44e5de1..f885751 100644 (file)
@@ -35,7 +35,7 @@ import Hugs.IORef
 #ifdef __GLASGOW_HASKELL__
 import GHC.Base
 import GHC.STRef
-import GHC.IO
+-- import GHC.IO
 import GHC.IORef hiding (atomicModifyIORef)
 import qualified GHC.IORef
 #if !defined(__PARALLEL_HASKELL__)
index 7205a01..fda6d58 100644 (file)
@@ -60,7 +60,7 @@ module Data.Ix
 
     ) where
 
-import Prelude
+-- import Prelude
 
 #ifdef __GLASGOW_HASKELL__
 import GHC.Arr
index 61ac9b8..9eb54a5 100644 (file)
@@ -16,5 +16,4 @@ module Data.STRef.Strict (
         module Data.STRef
   ) where
 
-import Prelude
 import Data.STRef
index c400710..f34800c 100644 (file)
@@ -96,7 +96,7 @@ import GHC.Err          (undefined)
 import GHC.Num          (Integer, fromInteger, (+))
 import GHC.Real         ( rem, Ratio )
 import GHC.IORef        (IORef,newIORef)
-import GHC.IO           (IO, unsafePerformIO,block)
+import GHC.IO           (unsafePerformIO,block)
 
 -- These imports are so we can define Typeable instances
 -- It'd be better to give Typeable instances in the modules themselves
index 9edd436..7fe096e 100644 (file)
@@ -78,7 +78,7 @@ import Foreign.Storable ( Storable(sizeOf) )
 
 #ifdef __GLASGOW_HASKELL__
 import GHC.Base
-import GHC.IO
+-- import GHC.IO
 import GHC.Num
 import GHC.Err          ( undefined )
 import GHC.ForeignPtr
index 5bc2f34..b018f2a 100644 (file)
@@ -37,7 +37,7 @@ import System.IO.Error
 #endif
 import GHC.Base
 import GHC.Num
-import GHC.IO
+-- import GHC.IO
 import GHC.IO.Exception
 #endif
 
index 564bb1c..7ada44c 100644 (file)
@@ -58,7 +58,7 @@ import GHC.Show
 import GHC.Enum
 import GHC.Word         ( Word(..) )
 
-import Data.Int
+-- import Data.Int
 import Data.Word
 #else
 import Control.Monad    ( liftM )
index 832efb3..0b0ad0c 100644 (file)
@@ -42,6 +42,7 @@ import Control.Monad            ( liftM )
 #ifdef __GLASGOW_HASKELL__
 import GHC.Storable
 import GHC.Stable       ( StablePtr )
+import GHC.IO()                -- Instance Monad IO
 import GHC.Num
 import GHC.Int
 import GHC.Word
index 4010c85..4318825 100644 (file)
@@ -126,7 +126,7 @@ import GHC.Arr          ( inRange )
 #endif
 #ifdef mingw32_HOST_OS
 import GHC.Real         ( div )
-import GHC.Ptr          ( plusPtr, FunPtr(..) )
+import GHC.Ptr          ( FunPtr(..) )
 #endif
 #ifdef mingw32_HOST_OS
 import GHC.Read         ( Read )
index 7422cd7..eaa15dc 100644 (file)
@@ -18,7 +18,6 @@ module GHC.Desugar ((>>>), AnnotationWrapper(..), toAnnotationWrapper) where
 import Control.Arrow    (Arrow(..))
 import Control.Category ((.))
 import Data.Data        (Data)
-import Prelude hiding ((.))
 
 -- A version of Control.Category.>>> overloaded on Arrow
 #ifndef __HADDOCK__
index 9bdf128..668d30a 100644 (file)
@@ -51,7 +51,7 @@ import GHC.Prim
 import GHC.Base
 import GHC.Word
 import GHC.Int
-import GHC.Float
+-- import GHC.Float
 import GHC.Ptr
 import Data.String
 import Data.List
index f3601ba..ed6c075 100644 (file)
@@ -42,7 +42,7 @@ import Data.Typeable
 import GHC.Show
 import GHC.List         ( null )
 import GHC.Base
-import GHC.IO
+-- import GHC.IO
 import GHC.IORef
 import GHC.STRef        ( STRef(..) )
 import GHC.Ptr          ( Ptr(..), FunPtr(..) )
index bcdaabd..4cd13a6 100644 (file)
@@ -60,7 +60,7 @@ module GHC.IO.Buffer (
  ) where
 
 import GHC.Base
-import GHC.IO
+-- import GHC.IO
 import GHC.Num
 import GHC.Ptr
 import GHC.Word
index a70b1d9..160b1a1 100644 (file)
@@ -25,7 +25,7 @@ import Data.Word
 import GHC.Num
 import GHC.Real
 import Data.Maybe
-import GHC.IO
+-- import GHC.IO
 import GHC.IO.Device as IODevice
 import GHC.IO.Device as RawIO
 import GHC.IO.Buffer
index cf1584e..bb976e3 100644 (file)
@@ -24,7 +24,7 @@ module GHC.IO.Encoding (
   ) where
 
 import GHC.Base
-import GHC.IO
+--import GHC.IO
 import GHC.IO.Buffer
 import GHC.IO.Encoding.Types
 import GHC.Word
index 504f4dc..99b2af3 100644 (file)
@@ -29,7 +29,7 @@ module GHC.IO.Encoding.Latin1 (
 import GHC.Base
 import GHC.Real
 import GHC.Num
-import GHC.IO
+-- import GHC.IO
 import GHC.IO.Exception
 import GHC.IO.Buffer
 import GHC.IO.Encoding.Types
index 4d267aa..bac4af2 100644 (file)
@@ -22,7 +22,7 @@ module GHC.IO.Encoding.Types (
 
 import GHC.Base
 import GHC.Word
-import GHC.IO
+-- import GHC.IO
 import GHC.IO.Buffer
 
 -- -----------------------------------------------------------------------------
index f7d7cb0..c824319 100644 (file)
@@ -35,7 +35,7 @@ module GHC.IO.Encoding.UTF16 (
 import GHC.Base
 import GHC.Real
 import GHC.Num
-import GHC.IO
+-- import GHC.IO
 import GHC.IO.Exception
 import GHC.IO.Buffer
 import GHC.IO.Encoding.Types
index a7c3054..9549cf0 100644 (file)
@@ -35,7 +35,7 @@ module GHC.IO.Encoding.UTF32 (
 import GHC.Base
 import GHC.Real
 import GHC.Num
-import GHC.IO
+-- import GHC.IO
 import GHC.IO.Exception
 import GHC.IO.Buffer
 import GHC.IO.Encoding.Types
index 34cca18..5912525 100644 (file)
@@ -27,7 +27,7 @@ module GHC.IO.Encoding.UTF8 (
 import GHC.Base
 import GHC.Real
 import GHC.Num
-import GHC.IO
+-- import GHC.IO
 import GHC.IO.Exception
 import GHC.IO.Buffer
 import GHC.IO.Encoding.Types
index 32f4e9b..bf7c619 100644 (file)
@@ -30,7 +30,7 @@ import GHC.Real
 import GHC.Show
 import GHC.Enum
 import Data.Maybe
-import Control.Monad
+-- import Control.Monad
 import Data.Typeable
 
 import GHC.IO
@@ -47,7 +47,7 @@ import Foreign.C
 import qualified System.Posix.Internals
 import System.Posix.Internals hiding (FD, setEcho, getEcho)
 import System.Posix.Types
-import GHC.Ptr
+-- import GHC.Ptr
 
 -- -----------------------------------------------------------------------------
 -- The file-descriptor IO device
index ec215ec..deedb7f 100644 (file)
@@ -25,12 +25,12 @@ import GHC.Num
 import GHC.Real
 import GHC.Show
 import Data.Maybe
-import Control.Monad
+-- import Control.Monad
 import Foreign.C.Types
 import GHC.MVar
 import GHC.IO
 import GHC.IO.Encoding
-import GHC.IO.Exception
+-- import GHC.IO.Exception
 import GHC.IO.Device as IODevice
 import GHC.IO.Exception
 import GHC.IO.IOMode
index ed32eaa..fc9fbde 100644 (file)
@@ -63,7 +63,6 @@ import qualified GHC.IO.BufferedIO as Buffered
 
 import GHC.Real
 import GHC.Base
-import GHC.List
 import GHC.Exception
 import GHC.Num          ( Num(..) )
 import GHC.Show
@@ -73,9 +72,8 @@ import Data.Typeable
 import Control.Monad
 import Data.Maybe
 import Foreign
-import System.IO.Error
+-- import System.IO.Error
 import System.Posix.Internals hiding (FD)
-import qualified System.Posix.Internals as Posix
 
 #ifdef DEBUG_DUMP
 import Foreign.C
index 98ecd45..67fa7c6 100644 (file)
@@ -29,7 +29,7 @@ module GHC.MVar (
   ) where
 
 import GHC.Base
-import GHC.IO
+import GHC.IO()   -- instance Monad IO
 import Data.Maybe
 
 data MVar a = MVar (MVar# RealWorld a)
index 47e602b..47c10ec 100644 (file)
@@ -35,7 +35,6 @@ module GHC.Pack
         where
 
 import GHC.Base
-import GHC.Err ( error )
 import GHC.List ( length )
 import GHC.ST
 import GHC.Num
index 29db0bb..6bac7d1 100644 (file)
@@ -27,7 +27,7 @@ module GHC.Stable
 
 import GHC.Ptr
 import GHC.Base
-import GHC.IO
+-- import GHC.IO
 
 -----------------------------------------------------------------------------
 -- Stable Pointers
index 8608727..23a3b01 100644 (file)
@@ -20,7 +20,7 @@ module GHC.Weak where
 
 import GHC.Base
 import Data.Maybe
-import GHC.IO          ( IO(..), unIO )
+import GHC.IO          ( unIO )
 import Data.Typeable
 
 {-|
index bb83068..1006bdc 100644 (file)
@@ -155,15 +155,15 @@ import Data.Tuple
 
 #ifdef __GLASGOW_HASKELL__
 import GHC.Base
-import GHC.IO
-import GHC.IO.Exception
+-- import GHC.IO
+-- import GHC.IO.Exception
 import Text.Read
 import GHC.Enum
 import GHC.Num
 import GHC.Real
 import GHC.Float
 import GHC.Show
-import GHC.Err   ( error, undefined )
+import GHC.Err   ( undefined )
 #endif
 
 #ifdef __HUGS__
index 4f0ab96..247a905 100644 (file)
@@ -34,7 +34,7 @@ import Foreign
 import Foreign.C
 import Control.Exception.Base   ( bracket )
 import Control.Monad
-import GHC.IO
+-- import GHC.IO
 import GHC.IO.Exception
 #endif
 
index 87025c3..dfa589d 100644 (file)
@@ -180,7 +180,7 @@ import GHC.IO.Handle.FD
 import GHC.IO.Handle
 import GHC.IORef
 import GHC.IO.Exception ( userError )
-import GHC.Exception
+-- import GHC.Exception
 import GHC.Num
 import Text.Read
 import GHC.Show
index 85e716c..d5d6ca2 100644 (file)
@@ -37,7 +37,7 @@ import System.Posix.Types
 import Foreign
 import Foreign.C
 
-import Data.Bits
+-- import Data.Bits
 import Data.Maybe
 
 #if !defined(HTYPE_TCFLAG_T)
index 1935179..bd286f4 100644 (file)
@@ -111,14 +111,14 @@ import Foreign.C
 import Foreign
 import Foreign.C
 import Data.Typeable
-import Data.Bits
+-- import Data.Bits
 
 #ifdef __GLASGOW_HASKELL__
 import GHC.Base
 import GHC.Enum
 import GHC.Num
 import GHC.Real
-import GHC.Prim
+-- import GHC.Prim
 import GHC.Read
 import GHC.Show
 #else