Remove unused imports
authorIan Lynagh <igloo@earth.li>
Fri, 1 Aug 2008 23:00:59 +0000 (23:00 +0000)
committerIan Lynagh <igloo@earth.li>
Fri, 1 Aug 2008 23:00:59 +0000 (23:00 +0000)
15 files changed:
Control/OldException.hs
Data/Either.hs
Foreign/C/Error.hs
Foreign/Marshal/Alloc.hs
Foreign/Marshal/Array.hs
GHC/Conc.lhs
GHC/Dotnet.hs
GHC/Err.lhs
GHC/Exts.hs
GHC/Handle.hs
GHC/IOBase.lhs
GHC/PArr.hs
GHC/Unicode.hs
Prelude.hs
System/IO/Error.hs

index 6014e1c..1b392d8 100644 (file)
@@ -138,7 +138,6 @@ import GHC.IOBase ( IO )
 import GHC.IOBase (block, unblock, evaluate, catchException, throwIO)
 import qualified GHC.IOBase as ExceptionBase
 import qualified GHC.IOBase as New
 import GHC.IOBase (block, unblock, evaluate, catchException, throwIO)
 import qualified GHC.IOBase as ExceptionBase
 import qualified GHC.IOBase as New
-import GHC.Exception hiding ( Exception )
 import GHC.Conc hiding (setUncaughtExceptionHandler,
                         getUncaughtExceptionHandler)
 import Data.IORef       ( IORef, newIORef, readIORef, writeIORef )
 import GHC.Conc hiding (setUncaughtExceptionHandler,
                         getUncaughtExceptionHandler)
 import Data.IORef       ( IORef, newIORef, readIORef, writeIORef )
@@ -151,6 +150,7 @@ import Hugs.Exception   as ExceptionBase
 #endif
 
 import qualified Control.Exception as New
 #endif
 
 import qualified Control.Exception as New
+import           Control.Exception ( throw, SomeException )
 import System.IO.Error  hiding ( catch, try )
 import System.IO.Unsafe (unsafePerformIO)
 import Data.Dynamic
 import System.IO.Error  hiding ( catch, try )
 import System.IO.Unsafe (unsafePerformIO)
 import Data.Dynamic
@@ -721,7 +721,7 @@ data Exception
 INSTANCE_TYPEABLE0(Exception,exceptionTc,"Exception")
 
 nonTermination :: SomeException
 INSTANCE_TYPEABLE0(Exception,exceptionTc,"Exception")
 
 nonTermination :: SomeException
-nonTermination = toException NonTermination
+nonTermination = New.toException NonTermination
 
 -- For now at least, make the monolithic Exception type an instance of
 -- the Exception class
 
 -- For now at least, make the monolithic Exception type an instance of
 -- the Exception class
index d22e91c..0bed290 100644 (file)
@@ -21,7 +21,7 @@ module Data.Either (
    partitionEithers, -- :: [Either a b] -> ([a],[b])
  ) where
 
    partitionEithers, -- :: [Either a b] -> ([a],[b])
  ) where
 
-import Data.Tuple
+import Data.Tuple ()
 
 #ifdef __GLASGOW_HASKELL__
 import GHC.Base
 
 #ifdef __GLASGOW_HASKELL__
 import GHC.Base
index 0a4c90f..77d2738 100644 (file)
@@ -101,20 +101,6 @@ module Foreign.C.Error (
 #include "HsBaseConfig.h"
 #endif
 
 #include "HsBaseConfig.h"
 #endif
 
--- system dependent imports
--- ------------------------
-
--- GHC allows us to get at the guts inside IO errors/exceptions
---
-#if __GLASGOW_HASKELL__
-import GHC.IOBase (IOException(..), IOErrorType(..))
-#endif /* __GLASGOW_HASKELL__ */
-
-
--- regular imports
--- ---------------
-
-import Foreign.Storable
 import Foreign.Ptr
 import Foreign.C.Types
 import Foreign.C.String
 import Foreign.Ptr
 import Foreign.C.Types
 import Foreign.C.String
index c5ae6a9..220d02b 100644 (file)
@@ -31,10 +31,13 @@ module Foreign.Marshal.Alloc (
 ) where
 
 import Data.Maybe
 ) where
 
 import Data.Maybe
-import Foreign.Ptr              ( Ptr, nullPtr, FunPtr )
 import Foreign.C.Types          ( CSize )
 import Foreign.Storable         ( Storable(sizeOf) )
 
 import Foreign.C.Types          ( CSize )
 import Foreign.Storable         ( Storable(sizeOf) )
 
+#ifndef __GLASGOW_HASKELL__
+import Foreign.Ptr              ( Ptr, nullPtr, FunPtr )
+#endif
+
 #ifdef __GLASGOW_HASKELL__
 import Foreign.ForeignPtr       ( FinalizerPtr )
 import GHC.IOBase
 #ifdef __GLASGOW_HASKELL__
 import Foreign.ForeignPtr       ( FinalizerPtr )
 import GHC.IOBase
index fa23be9..a3d9d16 100644 (file)
@@ -62,7 +62,6 @@ module Foreign.Marshal.Array (
   advancePtr,     -- :: Storable a => Ptr a -> Int -> Ptr a
 ) where
 
   advancePtr,     -- :: Storable a => Ptr a -> Int -> Ptr a
 ) where
 
-import Control.Monad
 import Foreign.Ptr      (Ptr, plusPtr)
 import Foreign.Storable (Storable(sizeOf,peekElemOff,pokeElemOff))
 import Foreign.Marshal.Alloc (mallocBytes, allocaBytes, reallocBytes)
 import Foreign.Ptr      (Ptr, plusPtr)
 import Foreign.Storable (Storable(sizeOf,peekElemOff,pokeElemOff))
 import Foreign.Marshal.Alloc (mallocBytes, allocaBytes, reallocBytes)
index c45d563..d47ba0b 100644 (file)
@@ -114,9 +114,10 @@ import GHC.Base
 import {-# SOURCE #-} GHC.Handle
 import GHC.IOBase
 import GHC.Num          ( Num(..) )
 import {-# SOURCE #-} GHC.Handle
 import GHC.IOBase
 import GHC.Num          ( Num(..) )
-import GHC.Real         ( fromIntegral, div )
-#ifndef mingw32_HOST_OS
-import GHC.Base         ( Int(..) )
+import GHC.Real         ( fromIntegral )
+#ifdef mingw32_HOST_OS
+import GHC.Real         ( div )
+import GHC.Ptr          ( plusPtr, FunPtr(..) )
 #endif
 #ifdef mingw32_HOST_OS
 import GHC.Read         ( Read )
 #endif
 #ifdef mingw32_HOST_OS
 import GHC.Read         ( Read )
@@ -124,7 +125,7 @@ import GHC.Enum         ( Enum )
 #endif
 import GHC.Exception    ( SomeException(..), throw )
 import GHC.Pack         ( packCString# )
 #endif
 import GHC.Exception    ( SomeException(..), throw )
 import GHC.Pack         ( packCString# )
-import GHC.Ptr          ( Ptr(..), plusPtr, FunPtr(..) )
+import GHC.Ptr          ( Ptr(..) )
 import GHC.STRef
 import GHC.Show         ( Show(..), showString )
 import Data.Typeable
 import GHC.STRef
 import GHC.Show         ( Show(..), showString )
 import Data.Typeable
index 01de3e9..1d62f72 100644 (file)
@@ -22,15 +22,11 @@ module GHC.Dotnet
         , checkResult
         ) where
 
         , checkResult
         ) where
 
-import GHC.Prim
 import GHC.Base
 import GHC.Exception
 import GHC.Base
 import GHC.Exception
-import GHC.IO
 import GHC.IOBase
 import GHC.Ptr
 import GHC.IOBase
 import GHC.Ptr
-import Foreign.Marshal.Array
 import Foreign.Marshal.Alloc
 import Foreign.Marshal.Alloc
-import Foreign.Storable
 import Foreign.C.String
 
 data Object a
 import Foreign.C.String
 
 data Object a
index 071e9b6..b2bca94 100644 (file)
@@ -35,7 +35,7 @@ module GHC.Err
 #ifndef __HADDOCK__
 import GHC.Base
 import GHC.IOBase
 #ifndef __HADDOCK__
 import GHC.Base
 import GHC.IOBase
-import GHC.List     ( span )
+import GHC.List ()
 import GHC.Exception
 #endif
 \end{code}
 import GHC.Exception
 #endif
 \end{code}
index 7dc604f..bc36771 100644 (file)
@@ -51,7 +51,6 @@ import GHC.Prim
 import GHC.Base
 import GHC.Word
 import GHC.Int
 import GHC.Base
 import GHC.Word
 import GHC.Int
-import GHC.Num
 import GHC.Float
 import GHC.Ptr
 import Data.String
 import GHC.Float
 import GHC.Ptr
 import Data.String
index c33ddab..5cb0a40 100644 (file)
@@ -58,7 +58,6 @@ module GHC.Handle (
  ) where
 
 import Control.Monad
  ) where
 
 import Control.Monad
-import Data.Bits
 import Data.Maybe
 import Foreign
 import Foreign.C
 import Data.Maybe
 import Foreign
 import Foreign.C
@@ -77,7 +76,6 @@ import GHC.Exception
 import GHC.Enum
 import GHC.Num          ( Integer(..), Num(..) )
 import GHC.Show
 import GHC.Enum
 import GHC.Num          ( Integer(..), Num(..) )
 import GHC.Show
-import GHC.Real         ( toInteger )
 #if defined(DEBUG_DUMP)
 import GHC.Pack
 #endif
 #if defined(DEBUG_DUMP)
 import GHC.Pack
 #endif
index 399d8eb..ea4abf4 100644 (file)
@@ -64,8 +64,8 @@ import Foreign.C.Types (CInt)
 import GHC.Exception
 
 #ifndef __HADDOCK__
 import GHC.Exception
 
 #ifndef __HADDOCK__
-import {-# SOURCE #-} Data.Typeable     ( Typeable, showsTypeRep )
-import {-# SOURCE #-} Data.Dynamic      ( Dynamic, dynTypeRep )
+import {-# SOURCE #-} Data.Typeable     ( Typeable )
+import {-# SOURCE #-} Data.Dynamic      ( Dynamic )
 #endif
 
 -- ---------------------------------------------------------------------------
 #endif
 
 -- ---------------------------------------------------------------------------
index 0ca8b66..9148301 100644 (file)
@@ -148,7 +148,7 @@ module GHC.PArr (
 
 import Prelude
 
 
 import Prelude
 
-import GHC.ST   ( ST(..), STRep, runST )
+import GHC.ST   ( ST(..), runST )
 import GHC.Exts ( Int#, Array#, Int(I#), MutableArray#, newArray#,
                   unsafeFreezeArray#, indexArray#, writeArray#, (<#), (>=#) )
 
 import GHC.Exts ( Int#, Array#, Int(I#), MutableArray#, newArray#,
                   unsafeFreezeArray#, indexArray#, writeArray#, (<#), (>=#) )
 
index 7c4ed9f..ceb3c91 100644 (file)
@@ -31,7 +31,6 @@ module GHC.Unicode (
 import GHC.Base
 import GHC.Real  (fromIntegral)
 import GHC.Int
 import GHC.Base
 import GHC.Real  (fromIntegral)
 import GHC.Int
-import GHC.Word
 import GHC.Num   (fromInteger)
 
 #include "HsBaseConfig.h"
 import GHC.Num   (fromInteger)
 
 #include "HsBaseConfig.h"
index 8eb912b..813d252 100644 (file)
@@ -146,21 +146,16 @@ module Prelude (
 #ifndef __HUGS__
 import Control.Monad
 import System.IO
 #ifndef __HUGS__
 import Control.Monad
 import System.IO
-import Text.Read
-import Text.Show
 import Data.List
 import Data.Either
 import Data.Maybe
 import Data.List
 import Data.Either
 import Data.Maybe
-import Data.Bool
 import Data.Tuple
 import Data.Tuple
-import Data.Eq
-import Data.Ord
 #endif
 
 #ifdef __GLASGOW_HASKELL__
 import GHC.Base
 import GHC.IOBase
 #endif
 
 #ifdef __GLASGOW_HASKELL__
 import GHC.Base
 import GHC.IOBase
-import GHC.Exception
+import GHC.Exception ( throw )
 import GHC.Read
 import GHC.Enum
 import GHC.Num
 import GHC.Read
 import GHC.Enum
 import GHC.Num
@@ -170,7 +165,7 @@ import GHC.Show
 import GHC.Err   ( error, undefined )
 #endif
 
 import GHC.Err   ( error, undefined )
 #endif
 
-import qualified Control.OldException as Old
+import qualified Control.OldException as Old hiding ( throw )
 
 #ifdef __HUGS__
 import Hugs.Prelude
 
 #ifdef __HUGS__
 import Hugs.Prelude
index 6d1f149..55b9ca4 100644 (file)
@@ -98,7 +98,6 @@ import Data.Maybe
 #ifdef __GLASGOW_HASKELL__
 import GHC.Base
 import GHC.IOBase
 #ifdef __GLASGOW_HASKELL__
 import GHC.Base
 import GHC.IOBase
-import GHC.Exception
 import Text.Show
 #endif
 
 import Text.Show
 #endif