From 8afc9fecd586d3c4f7ef9c69fb1686a79e5f441d Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Mon, 6 Jul 2009 11:18:42 +0000 Subject: [PATCH] Remove unused imports from base These unused imports are detected by the new unused-import code --- Control/Applicative.hs | 1 - Control/Arrow.hs | 1 - Control/Category.hs | 1 - Control/Exception.hs | 2 +- Control/Exception/Base.hs | 2 +- Control/Monad/ST.hs | 2 -- Control/Monad/ST/Lazy.hs | 2 -- Control/Monad/ST/Strict.hs | 1 - Control/OldException.hs | 2 +- Data/Data.hs | 1 - Data/Dynamic.hs | 1 - Data/IORef.hs | 2 +- Data/Ix.hs | 2 +- Data/STRef/Strict.hs | 1 - Data/Typeable.hs | 2 +- Foreign/ForeignPtr.hs | 2 +- Foreign/Marshal/Error.hs | 2 +- Foreign/Ptr.hs | 2 +- Foreign/Storable.hs | 1 + GHC/Conc.lhs | 2 +- GHC/Desugar.hs | 1 - GHC/Exts.hs | 2 +- GHC/ForeignPtr.hs | 2 +- GHC/IO/Buffer.hs | 2 +- GHC/IO/BufferedIO.hs | 2 +- GHC/IO/Encoding.hs | 2 +- GHC/IO/Encoding/Latin1.hs | 2 +- GHC/IO/Encoding/Types.hs | 2 +- GHC/IO/Encoding/UTF16.hs | 2 +- GHC/IO/Encoding/UTF32.hs | 2 +- GHC/IO/Encoding/UTF8.hs | 2 +- GHC/IO/FD.hs | 4 ++-- GHC/IO/Handle/FD.hs | 4 ++-- GHC/IO/Handle/Internals.hs | 4 +--- GHC/MVar.hs | 2 +- GHC/Pack.lhs | 1 - GHC/Stable.lhs | 2 +- GHC/Weak.lhs | 2 +- Prelude.hs | 6 +++--- System/Environment.hs | 2 +- System/IO.hs | 2 +- System/Posix/Internals.hs | 2 +- System/Posix/Types.hs | 4 ++-- 43 files changed, 37 insertions(+), 51 deletions(-) diff --git a/Control/Applicative.hs b/Control/Applicative.hs index d289916..1d62e0a 100644 --- a/Control/Applicative.hs +++ b/Control/Applicative.hs @@ -36,7 +36,6 @@ module Control.Applicative ( ) where import Prelude hiding (id,(.)) -import qualified Prelude import Control.Category import Control.Arrow diff --git a/Control/Arrow.hs b/Control/Arrow.hs index 4606b4d..f3c1de2 100644 --- a/Control/Arrow.hs +++ b/Control/Arrow.hs @@ -39,7 +39,6 @@ module Control.Arrow ( ) where import Prelude hiding (id,(.)) -import qualified Prelude import Control.Monad import Control.Monad.Fix diff --git a/Control/Category.hs b/Control/Category.hs index 770d850..fa73cff 100644 --- a/Control/Category.hs +++ b/Control/Category.hs @@ -12,7 +12,6 @@ module Control.Category where -import Prelude hiding (id,(.)) import qualified Prelude infixr 9 . diff --git a/Control/Exception.hs b/Control/Exception.hs index 6430c9a..9824fb0 100644 --- a/Control/Exception.hs +++ b/Control/Exception.hs @@ -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) diff --git a/Control/Exception/Base.hs b/Control/Exception/Base.hs index f32b2f7..d5cac44 100644 --- a/Control/Exception/Base.hs +++ b/Control/Exception/Base.hs @@ -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 diff --git a/Control/Monad/ST.hs b/Control/Monad/ST.hs index cae255f..4260d0e 100644 --- a/Control/Monad/ST.hs +++ b/Control/Monad/ST.hs @@ -32,8 +32,6 @@ module Control.Monad.ST unsafeSTToIO -- :: ST s a -> IO a ) where -import Prelude - import Control.Monad.Fix #include "Typeable.h" diff --git a/Control/Monad/ST/Lazy.hs b/Control/Monad/ST/Lazy.hs index 00aa4f0..657752e 100644 --- a/Control/Monad/ST/Lazy.hs +++ b/Control/Monad/ST/Lazy.hs @@ -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__ diff --git a/Control/Monad/ST/Strict.hs b/Control/Monad/ST/Strict.hs index a899616..d8692f8 100644 --- a/Control/Monad/ST/Strict.hs +++ b/Control/Monad/ST/Strict.hs @@ -16,5 +16,4 @@ module Control.Monad.ST.Strict ( module Control.Monad.ST ) where -import Prelude import Control.Monad.ST diff --git a/Control/OldException.hs b/Control/OldException.hs index ae25fdc..936d03e 100644 --- a/Control/OldException.hs +++ b/Control/OldException.hs @@ -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 diff --git a/Data/Data.hs b/Data/Data.hs index 8c746dd..646249e 100644 --- a/Data/Data.hs +++ b/Data/Data.hs @@ -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__ diff --git a/Data/Dynamic.hs b/Data/Dynamic.hs index 7466897..12bf1c4 100644 --- a/Data/Dynamic.hs +++ b/Data/Dynamic.hs @@ -47,7 +47,6 @@ import Unsafe.Coerce #ifdef __GLASGOW_HASKELL__ import GHC.Base import GHC.Show -import GHC.Err import GHC.Num #endif diff --git a/Data/IORef.hs b/Data/IORef.hs index 44e5de1..f885751 100644 --- a/Data/IORef.hs +++ b/Data/IORef.hs @@ -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__) diff --git a/Data/Ix.hs b/Data/Ix.hs index 7205a01..fda6d58 100644 --- a/Data/Ix.hs +++ b/Data/Ix.hs @@ -60,7 +60,7 @@ module Data.Ix ) where -import Prelude +-- import Prelude #ifdef __GLASGOW_HASKELL__ import GHC.Arr diff --git a/Data/STRef/Strict.hs b/Data/STRef/Strict.hs index 61ac9b8..9eb54a5 100644 --- a/Data/STRef/Strict.hs +++ b/Data/STRef/Strict.hs @@ -16,5 +16,4 @@ module Data.STRef.Strict ( module Data.STRef ) where -import Prelude import Data.STRef diff --git a/Data/Typeable.hs b/Data/Typeable.hs index c400710..f34800c 100644 --- a/Data/Typeable.hs +++ b/Data/Typeable.hs @@ -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 diff --git a/Foreign/ForeignPtr.hs b/Foreign/ForeignPtr.hs index 9edd436..7fe096e 100644 --- a/Foreign/ForeignPtr.hs +++ b/Foreign/ForeignPtr.hs @@ -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 diff --git a/Foreign/Marshal/Error.hs b/Foreign/Marshal/Error.hs index 5bc2f34..b018f2a 100644 --- a/Foreign/Marshal/Error.hs +++ b/Foreign/Marshal/Error.hs @@ -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 diff --git a/Foreign/Ptr.hs b/Foreign/Ptr.hs index 564bb1c..7ada44c 100644 --- a/Foreign/Ptr.hs +++ b/Foreign/Ptr.hs @@ -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 ) diff --git a/Foreign/Storable.hs b/Foreign/Storable.hs index 832efb3..0b0ad0c 100644 --- a/Foreign/Storable.hs +++ b/Foreign/Storable.hs @@ -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 diff --git a/GHC/Conc.lhs b/GHC/Conc.lhs index 4010c85..4318825 100644 --- a/GHC/Conc.lhs +++ b/GHC/Conc.lhs @@ -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 ) diff --git a/GHC/Desugar.hs b/GHC/Desugar.hs index 7422cd7..eaa15dc 100644 --- a/GHC/Desugar.hs +++ b/GHC/Desugar.hs @@ -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__ diff --git a/GHC/Exts.hs b/GHC/Exts.hs index 9bdf128..668d30a 100644 --- a/GHC/Exts.hs +++ b/GHC/Exts.hs @@ -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 diff --git a/GHC/ForeignPtr.hs b/GHC/ForeignPtr.hs index f3601ba..ed6c075 100644 --- a/GHC/ForeignPtr.hs +++ b/GHC/ForeignPtr.hs @@ -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(..) ) diff --git a/GHC/IO/Buffer.hs b/GHC/IO/Buffer.hs index bcdaabd..4cd13a6 100644 --- a/GHC/IO/Buffer.hs +++ b/GHC/IO/Buffer.hs @@ -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 diff --git a/GHC/IO/BufferedIO.hs b/GHC/IO/BufferedIO.hs index a70b1d9..160b1a1 100644 --- a/GHC/IO/BufferedIO.hs +++ b/GHC/IO/BufferedIO.hs @@ -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 diff --git a/GHC/IO/Encoding.hs b/GHC/IO/Encoding.hs index cf1584e..bb976e3 100644 --- a/GHC/IO/Encoding.hs +++ b/GHC/IO/Encoding.hs @@ -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 diff --git a/GHC/IO/Encoding/Latin1.hs b/GHC/IO/Encoding/Latin1.hs index 504f4dc..99b2af3 100644 --- a/GHC/IO/Encoding/Latin1.hs +++ b/GHC/IO/Encoding/Latin1.hs @@ -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 diff --git a/GHC/IO/Encoding/Types.hs b/GHC/IO/Encoding/Types.hs index 4d267aa..bac4af2 100644 --- a/GHC/IO/Encoding/Types.hs +++ b/GHC/IO/Encoding/Types.hs @@ -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 -- ----------------------------------------------------------------------------- diff --git a/GHC/IO/Encoding/UTF16.hs b/GHC/IO/Encoding/UTF16.hs index f7d7cb0..c824319 100644 --- a/GHC/IO/Encoding/UTF16.hs +++ b/GHC/IO/Encoding/UTF16.hs @@ -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 diff --git a/GHC/IO/Encoding/UTF32.hs b/GHC/IO/Encoding/UTF32.hs index a7c3054..9549cf0 100644 --- a/GHC/IO/Encoding/UTF32.hs +++ b/GHC/IO/Encoding/UTF32.hs @@ -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 diff --git a/GHC/IO/Encoding/UTF8.hs b/GHC/IO/Encoding/UTF8.hs index 34cca18..5912525 100644 --- a/GHC/IO/Encoding/UTF8.hs +++ b/GHC/IO/Encoding/UTF8.hs @@ -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 diff --git a/GHC/IO/FD.hs b/GHC/IO/FD.hs index 32f4e9b..bf7c619 100644 --- a/GHC/IO/FD.hs +++ b/GHC/IO/FD.hs @@ -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 diff --git a/GHC/IO/Handle/FD.hs b/GHC/IO/Handle/FD.hs index ec215ec..deedb7f 100644 --- a/GHC/IO/Handle/FD.hs +++ b/GHC/IO/Handle/FD.hs @@ -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 diff --git a/GHC/IO/Handle/Internals.hs b/GHC/IO/Handle/Internals.hs index ed32eaa..fc9fbde 100644 --- a/GHC/IO/Handle/Internals.hs +++ b/GHC/IO/Handle/Internals.hs @@ -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 diff --git a/GHC/MVar.hs b/GHC/MVar.hs index 98ecd45..67fa7c6 100644 --- a/GHC/MVar.hs +++ b/GHC/MVar.hs @@ -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) diff --git a/GHC/Pack.lhs b/GHC/Pack.lhs index 47e602b..47c10ec 100644 --- a/GHC/Pack.lhs +++ b/GHC/Pack.lhs @@ -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 diff --git a/GHC/Stable.lhs b/GHC/Stable.lhs index 29db0bb..6bac7d1 100644 --- a/GHC/Stable.lhs +++ b/GHC/Stable.lhs @@ -27,7 +27,7 @@ module GHC.Stable import GHC.Ptr import GHC.Base -import GHC.IO +-- import GHC.IO ----------------------------------------------------------------------------- -- Stable Pointers diff --git a/GHC/Weak.lhs b/GHC/Weak.lhs index 8608727..23a3b01 100644 --- a/GHC/Weak.lhs +++ b/GHC/Weak.lhs @@ -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 {-| diff --git a/Prelude.hs b/Prelude.hs index bb83068..1006bdc 100644 --- a/Prelude.hs +++ b/Prelude.hs @@ -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__ diff --git a/System/Environment.hs b/System/Environment.hs index 4f0ab96..247a905 100644 --- a/System/Environment.hs +++ b/System/Environment.hs @@ -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 diff --git a/System/IO.hs b/System/IO.hs index 87025c3..dfa589d 100644 --- a/System/IO.hs +++ b/System/IO.hs @@ -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 diff --git a/System/Posix/Internals.hs b/System/Posix/Internals.hs index 85e716c..d5d6ca2 100644 --- a/System/Posix/Internals.hs +++ b/System/Posix/Internals.hs @@ -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) diff --git a/System/Posix/Types.hs b/System/Posix/Types.hs index 1935179..bd286f4 100644 --- a/System/Posix/Types.hs +++ b/System/Posix/Types.hs @@ -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 -- 1.7.10.4