summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/basicTypes/DataCon.lhs1
-rw-r--r--compiler/basicTypes/Id.lhs1
-rw-r--r--compiler/basicTypes/OccName.lhs2
-rw-r--r--compiler/basicTypes/UniqSupply.lhs1
-rw-r--r--compiler/cmm/CmmCvt.hs1
-rw-r--r--compiler/cmm/CmmExpr.hs3
-rw-r--r--compiler/cmm/CmmProcPointZ.hs1
-rw-r--r--compiler/cmm/CmmStackLayout.hs1
-rw-r--r--compiler/cmm/StackColor.hs2
-rw-r--r--compiler/cmm/ZipCfg.hs1
-rw-r--r--compiler/cmm/ZipCfgCmmRep.hs2
-rw-r--r--compiler/codeGen/ClosureInfo.lhs1
-rw-r--r--compiler/coreSyn/CoreUtils.lhs2
-rw-r--r--compiler/deSugar/DsMeta.hs8
-rw-r--r--compiler/ghci/ByteCodeGen.lhs6
-rw-r--r--compiler/ghci/Debugger.hs8
-rw-r--r--compiler/ghci/LibFFI.hsc2
-rw-r--r--compiler/ghci/ObjLink.lhs2
-rw-r--r--compiler/ghci/RtClosureInspect.hs5
-rw-r--r--compiler/iface/IfaceSyn.lhs3
-rw-r--r--compiler/main/Annotations.lhs1
-rw-r--r--compiler/main/BreakArray.hs1
-rw-r--r--compiler/main/DriverMkDepend.hs4
-rw-r--r--compiler/main/DriverPipeline.hs6
-rw-r--r--compiler/main/GHC.hs6
-rw-r--r--compiler/main/HscMain.lhs4
-rw-r--r--compiler/main/InteractiveEval.hs2
-rw-r--r--compiler/main/Packages.lhs2
-rw-r--r--compiler/nativeGen/RegAlloc/Linear/PPC/FreeRegs.hs2
-rw-r--r--compiler/nativeGen/RegAlloc/Linear/SPARC/FreeRegs.hs2
-rw-r--r--compiler/nativeGen/SPARC/CodeGen.hs1
-rw-r--r--compiler/nativeGen/X86/Regs.hs1
-rw-r--r--compiler/prelude/TysPrim.lhs3
-rw-r--r--compiler/prelude/TysWiredIn.lhs2
-rw-r--r--compiler/typecheck/TcAnnotations.lhs2
-rw-r--r--compiler/typecheck/TcArrows.lhs1
-rw-r--r--compiler/typecheck/TcClassDcl.lhs3
-rw-r--r--compiler/typecheck/TcForeign.lhs1
-rw-r--r--compiler/typecheck/TcGenDeriv.lhs3
-rw-r--r--compiler/typecheck/TcInstDcls.lhs1
-rw-r--r--compiler/typecheck/TcRnMonad.lhs1
-rw-r--r--compiler/typecheck/TcTyClsDecls.lhs3
-rw-r--r--compiler/typecheck/TcType.lhs2
-rw-r--r--compiler/types/Coercion.lhs2
-rw-r--r--compiler/types/TypeRep.lhs1
-rw-r--r--compiler/utils/Binary.hs4
-rw-r--r--compiler/utils/Encoding.hs1
-rw-r--r--compiler/utils/FastMutInt.lhs2
-rw-r--r--compiler/utils/Outputable.lhs6
-rw-r--r--compiler/utils/Util.lhs3
-rw-r--r--ghc/GhciMonad.hs6
-rw-r--r--ghc/InteractiveUI.hs7
-rw-r--r--ghc/Main.hs8
53 files changed, 42 insertions, 105 deletions
diff --git a/compiler/basicTypes/DataCon.lhs b/compiler/basicTypes/DataCon.lhs
index 0558daeff2..8f09078055 100644
--- a/compiler/basicTypes/DataCon.lhs
+++ b/compiler/basicTypes/DataCon.lhs
@@ -51,7 +51,6 @@ import Outputable
import Unique
import ListSetOps
import Util
-import Maybes
import FastString
import Module
diff --git a/compiler/basicTypes/Id.lhs b/compiler/basicTypes/Id.lhs
index 2f5e93c428..9b595fa2ff 100644
--- a/compiler/basicTypes/Id.lhs
+++ b/compiler/basicTypes/Id.lhs
@@ -126,7 +126,6 @@ import Module
import Class
import PrimOp
import ForeignCall
-import OccName
import Maybes
import SrcLoc
import Outputable
diff --git a/compiler/basicTypes/OccName.lhs b/compiler/basicTypes/OccName.lhs
index 10cf91eb79..e54c858158 100644
--- a/compiler/basicTypes/OccName.lhs
+++ b/compiler/basicTypes/OccName.lhs
@@ -102,8 +102,6 @@ import FastString
import FastTypes
import Outputable
import Binary
-
-import GHC.Exts
import Data.Char
\end{code}
diff --git a/compiler/basicTypes/UniqSupply.lhs b/compiler/basicTypes/UniqSupply.lhs
index 9a5e80358f..87f3deed47 100644
--- a/compiler/basicTypes/UniqSupply.lhs
+++ b/compiler/basicTypes/UniqSupply.lhs
@@ -30,7 +30,6 @@ import FastTypes
import MonadUtils
import Control.Monad
-import Control.Monad.Fix
#if __GLASGOW_HASKELL__ >= 611
import GHC.IO (unsafeDupableInterleaveIO)
#else
diff --git a/compiler/cmm/CmmCvt.hs b/compiler/cmm/CmmCvt.hs
index 9f8279e87e..da770636b4 100644
--- a/compiler/cmm/CmmCvt.hs
+++ b/compiler/cmm/CmmCvt.hs
@@ -8,7 +8,6 @@ import BlockId
import Cmm
import CmmExpr
import MkZipCfgCmm hiding (CmmGraph)
-import ZipCfg -- imported for reverse conversion
import ZipCfgCmmRep -- imported for reverse conversion
import CmmZipUtil
import PprCmm()
diff --git a/compiler/cmm/CmmExpr.hs b/compiler/cmm/CmmExpr.hs
index 7ea1c4760a..d09be34b6a 100644
--- a/compiler/cmm/CmmExpr.hs
+++ b/compiler/cmm/CmmExpr.hs
@@ -49,10 +49,7 @@ import CLabel
import Constants
import FastString
import FiniteMap
-import Maybes
-import Monad
import Outputable
-import Panic
import Unique
import UniqSet
diff --git a/compiler/cmm/CmmProcPointZ.hs b/compiler/cmm/CmmProcPointZ.hs
index 12997dd49f..b477f4c233 100644
--- a/compiler/cmm/CmmProcPointZ.hs
+++ b/compiler/cmm/CmmProcPointZ.hs
@@ -5,7 +5,6 @@ module CmmProcPointZ
)
where
-import qualified Prelude as P
import Prelude hiding (zip, unzip, last)
import BlockId
diff --git a/compiler/cmm/CmmStackLayout.hs b/compiler/cmm/CmmStackLayout.hs
index 6c47043781..ab00100bfe 100644
--- a/compiler/cmm/CmmStackLayout.hs
+++ b/compiler/cmm/CmmStackLayout.hs
@@ -5,7 +5,6 @@ module CmmStackLayout
where
import Constants
-import qualified Prelude as P
import Prelude hiding (zip, unzip, last)
import BlockId
diff --git a/compiler/cmm/StackColor.hs b/compiler/cmm/StackColor.hs
index 3bb131741c..bf5f9a0fda 100644
--- a/compiler/cmm/StackColor.hs
+++ b/compiler/cmm/StackColor.hs
@@ -16,7 +16,7 @@ import Maybes
import Panic
import UniqSet
-import Data.List
+-- import Data.List
fold_edge_facts_b ::
LastNode l => (DualLive -> a -> a) -> BackwardTransfers m l DualLive -> LGraph m l
diff --git a/compiler/cmm/ZipCfg.hs b/compiler/cmm/ZipCfg.hs
index 1e04f90ae5..3a5932cadd 100644
--- a/compiler/cmm/ZipCfg.hs
+++ b/compiler/cmm/ZipCfg.hs
@@ -44,7 +44,6 @@ import CmmExpr ( UserOfLocalRegs(..) )
import PprCmm()
import Outputable hiding (empty)
-import Panic
import Maybe
import Prelude hiding (zip, unzip, last)
diff --git a/compiler/cmm/ZipCfgCmmRep.hs b/compiler/cmm/ZipCfgCmmRep.hs
index d821b03b14..f99a7eb387 100644
--- a/compiler/cmm/ZipCfgCmmRep.hs
+++ b/compiler/cmm/ZipCfgCmmRep.hs
@@ -29,7 +29,6 @@ import CmmTx
import CLabel
import FastString
import ForeignCall
-import qualified ZipCfg as Z
import qualified ZipDataflow as DF
import ZipCfg
import MkZipCfg
@@ -40,7 +39,6 @@ import Maybes
import Monad
import Outputable
import Prelude hiding (zip, unzip, last)
-import qualified Data.List as L
import SMRep (ByteOff)
import UniqSupply
diff --git a/compiler/codeGen/ClosureInfo.lhs b/compiler/codeGen/ClosureInfo.lhs
index 8c36ab2e9f..18734e13aa 100644
--- a/compiler/codeGen/ClosureInfo.lhs
+++ b/compiler/codeGen/ClosureInfo.lhs
@@ -72,7 +72,6 @@ import Id
import IdInfo
import DataCon
import Name
-import OccName
import Type
import TypeRep
import TcType
diff --git a/compiler/coreSyn/CoreUtils.lhs b/compiler/coreSyn/CoreUtils.lhs
index 22bb89d1bd..95f35afbac 100644
--- a/compiler/coreSyn/CoreUtils.lhs
+++ b/compiler/coreSyn/CoreUtils.lhs
@@ -74,8 +74,6 @@ import Maybes
import Util
import Data.Word
import Data.Bits
-
-import GHC.Exts -- For `xori`
\end{code}
diff --git a/compiler/deSugar/DsMeta.hs b/compiler/deSugar/DsMeta.hs
index 3518aaf87f..87afbbe6a3 100644
--- a/compiler/deSugar/DsMeta.hs
+++ b/compiler/deSugar/DsMeta.hs
@@ -13,14 +13,6 @@
-- a Royal Pain (triggers other recompilation).
-----------------------------------------------------------------------------
-{-# OPTIONS -fno-warn-unused-imports #-}
--- The above warning supression flag is a temporary kludge.
--- While working on this module you are encouraged to remove it and fix
--- any warnings in the module. See
--- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
--- for details
--- The kludge is only needed in this module because of trac #2267.
-
module DsMeta( dsBracket,
templateHaskellNames, qTyConName, nameTyConName,
liftName, liftStringName, expQTyConName, patQTyConName, decQTyConName, typeQTyConName,
diff --git a/compiler/ghci/ByteCodeGen.lhs b/compiler/ghci/ByteCodeGen.lhs
index 888aeec739..0df09d63d3 100644
--- a/compiler/ghci/ByteCodeGen.lhs
+++ b/compiler/ghci/ByteCodeGen.lhs
@@ -31,9 +31,9 @@ import CoreFVs
import Type
import DataCon
import TyCon
-import Type
+-- import Type
import Util
-import DataCon
+-- import DataCon
import Var
import VarSet
import TysPrim
@@ -51,7 +51,7 @@ import Data.List
import Foreign
import Foreign.C
-import GHC.Exts ( Int(..), ByteArray# )
+-- import GHC.Exts ( Int(..) )
import Control.Monad ( when )
import Data.Char
diff --git a/compiler/ghci/Debugger.hs b/compiler/ghci/Debugger.hs
index 98517ae15b..504dc1dfbd 100644
--- a/compiler/ghci/Debugger.hs
+++ b/compiler/ghci/Debugger.hs
@@ -20,18 +20,18 @@ import Id
import Name
import Var hiding ( varName )
import VarSet
-import Name
+-- import Name
import UniqSupply
import TcType
import GHC
-import DynFlags
+-- import DynFlags
import InteractiveEval
import Outputable
-import SrcLoc
+-- import SrcLoc
import PprTyThing
import MonadUtils
-import Exception
+-- import Exception
import Control.Monad
import Data.List
import Data.Maybe
diff --git a/compiler/ghci/LibFFI.hsc b/compiler/ghci/LibFFI.hsc
index e73b023958..9dd2a24021 100644
--- a/compiler/ghci/LibFFI.hsc
+++ b/compiler/ghci/LibFFI.hsc
@@ -16,7 +16,7 @@ module LibFFI (
import TyCon
import ForeignCall
import Panic
-import Outputable
+-- import Outputable
import Constants
import Foreign
diff --git a/compiler/ghci/ObjLink.lhs b/compiler/ghci/ObjLink.lhs
index 1dbf0cfa73..7981c8208c 100644
--- a/compiler/ghci/ObjLink.lhs
+++ b/compiler/ghci/ObjLink.lhs
@@ -28,7 +28,7 @@ import Config ( cLeadingUnderscore )
import Control.Monad ( when )
import Foreign.C
import Foreign ( nullPtr )
-import GHC.Exts ( Ptr(..), unsafeCoerce# )
+import GHC.Exts ( Ptr(..) )
diff --git a/compiler/ghci/RtClosureInspect.hs b/compiler/ghci/RtClosureInspect.hs
index 84bdfecf78..76ef9be1f7 100644
--- a/compiler/ghci/RtClosureInspect.hs
+++ b/compiler/ghci/RtClosureInspect.hs
@@ -54,7 +54,7 @@ import TysWiredIn
import DynFlags
import Outputable
import FastString
-import Panic
+-- import Panic
import Constants ( wORD_SIZE )
@@ -76,9 +76,8 @@ import qualified Data.Sequence as Seq
import Data.Monoid
import Data.Sequence hiding (null, length, index, take, drop, splitAt, reverse)
import Foreign
-import System.IO.Unsafe
+-- import System.IO.Unsafe
-import System.IO
---------------------------------------------
-- * A representation of semi evaluated Terms
---------------------------------------------
diff --git a/compiler/iface/IfaceSyn.lhs b/compiler/iface/IfaceSyn.lhs
index 02bf543a77..470a5ea06d 100644
--- a/compiler/iface/IfaceSyn.lhs
+++ b/compiler/iface/IfaceSyn.lhs
@@ -41,9 +41,6 @@ import Outputable
import FastString
import Module
-import Data.List
-import Data.Maybe
-
infixl 3 &&&
\end{code}
diff --git a/compiler/main/Annotations.lhs b/compiler/main/Annotations.lhs
index 4cb7785d48..335ce31461 100644
--- a/compiler/main/Annotations.lhs
+++ b/compiler/main/Annotations.lhs
@@ -22,7 +22,6 @@ import LazyUniqFM
import Serialized
import Unique
-import Control.Monad
import Data.Typeable
import Data.Maybe
import Data.Word ( Word8 )
diff --git a/compiler/main/BreakArray.hs b/compiler/main/BreakArray.hs
index f7154c1089..2d1a4d491f 100644
--- a/compiler/main/BreakArray.hs
+++ b/compiler/main/BreakArray.hs
@@ -31,7 +31,6 @@ import GHC.IO ( IO(..) )
#else
import GHC.IOBase ( IO(..) )
#endif
-import GHC.Word
import Constants
data BreakArray = BA (MutableByteArray# RealWorld)
diff --git a/compiler/main/DriverMkDepend.hs b/compiler/main/DriverMkDepend.hs
index 2aa1aa2ea9..f1f4770623 100644
--- a/compiler/main/DriverMkDepend.hs
+++ b/compiler/main/DriverMkDepend.hs
@@ -16,7 +16,7 @@ module DriverMkDepend (
#include "HsVersions.h"
import qualified GHC
-import GHC ( ModSummary(..), GhcMonad )
+-- import GHC ( ModSummary(..), GhcMonad )
import HsSyn ( ImportDecl(..) )
import PrelNames
import DynFlags
@@ -35,7 +35,7 @@ import FastString
import Exception
import ErrUtils
-import MonadUtils ( liftIO )
+-- import MonadUtils ( liftIO )
import System.Directory
import System.FilePath
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index d120f18d53..1849c6b91e 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -48,12 +48,12 @@ import Maybes ( expectJust )
import ParserCoreUtils ( getCoreModuleName )
import SrcLoc
import FastString
-import MonadUtils
+-- import MonadUtils
-import Data.Either
+-- import Data.Either
import Exception
import Data.IORef ( readIORef )
-import GHC.Exts ( Int(..) )
+-- import GHC.Exts ( Int(..) )
import System.Directory
import System.FilePath
import System.IO
diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs
index 76bbeb2760..8cf16666e5 100644
--- a/compiler/main/GHC.hs
+++ b/compiler/main/GHC.hs
@@ -265,10 +265,10 @@ import Var
import TysPrim ( alphaTyVars )
import TyCon
import Class
-import FunDeps
+-- import FunDeps
import DataCon
import Name hiding ( varName )
-import OccName ( parenSymOcc )
+-- import OccName ( parenSymOcc )
import InstEnv ( Instance, instanceDFunId, pprInstance, pprInstanceHdr,
emptyInstEnv )
import FamInstEnv ( emptyFamInstEnv )
@@ -276,7 +276,7 @@ import SrcLoc
--import CoreSyn
import TidyPgm
import DriverPipeline
-import DriverPhases ( HscSource(..), Phase(..), isHaskellSrcFilename, startPhase )
+import DriverPhases ( Phase(..), isHaskellSrcFilename, startPhase )
import HeaderInfo
import Finder
import HscMain
diff --git a/compiler/main/HscMain.lhs b/compiler/main/HscMain.lhs
index 34e459386d..ba9e151590 100644
--- a/compiler/main/HscMain.lhs
+++ b/compiler/main/HscMain.lhs
@@ -112,10 +112,10 @@ import LazyUniqFM ( emptyUFM )
import UniqSupply ( initUs_ )
import Bag ( unitBag )
import Exception
-import MonadUtils
+-- import MonadUtils
import Control.Monad
-import System.IO
+-- import System.IO
import Data.IORef
\end{code}
#include "HsVersions.h"
diff --git a/compiler/main/InteractiveEval.hs b/compiler/main/InteractiveEval.hs
index 44972d5d36..33227a8cd8 100644
--- a/compiler/main/InteractiveEval.hs
+++ b/compiler/main/InteractiveEval.hs
@@ -82,7 +82,7 @@ import Data.Array
import Exception
import Control.Concurrent
import Data.List (sortBy)
-import Foreign.StablePtr
+-- import Foreign.StablePtr
import System.IO
-- -----------------------------------------------------------------------------
diff --git a/compiler/main/Packages.lhs b/compiler/main/Packages.lhs
index 86b4693a55..505a797c72 100644
--- a/compiler/main/Packages.lhs
+++ b/compiler/main/Packages.lhs
@@ -51,8 +51,6 @@ import Outputable
import System.Environment ( getEnv )
import Distribution.InstalledPackageInfo hiding (depends)
import Distribution.Package hiding (depends, PackageId)
-import Distribution.Text
-import Distribution.Version
import FastString
import ErrUtils ( debugTraceMsg, putMsg, Message )
import Exception
diff --git a/compiler/nativeGen/RegAlloc/Linear/PPC/FreeRegs.hs b/compiler/nativeGen/RegAlloc/Linear/PPC/FreeRegs.hs
index 4310c5e5a1..aa6822c091 100644
--- a/compiler/nativeGen/RegAlloc/Linear/PPC/FreeRegs.hs
+++ b/compiler/nativeGen/RegAlloc/Linear/PPC/FreeRegs.hs
@@ -11,7 +11,7 @@ import Outputable
import Data.Word
import Data.Bits
-import Data.List
+-- import Data.List
-- The PowerPC has 32 integer and 32 floating point registers.
-- This is 32bit PowerPC, so Word64 is inefficient - two Word32s are much
diff --git a/compiler/nativeGen/RegAlloc/Linear/SPARC/FreeRegs.hs b/compiler/nativeGen/RegAlloc/Linear/SPARC/FreeRegs.hs
index d828347433..f48a893c09 100644
--- a/compiler/nativeGen/RegAlloc/Linear/SPARC/FreeRegs.hs
+++ b/compiler/nativeGen/RegAlloc/Linear/SPARC/FreeRegs.hs
@@ -13,7 +13,7 @@ import FastBool
import Data.Word
import Data.Bits
-import Data.List
+-- import Data.List
--------------------------------------------------------------------------------
diff --git a/compiler/nativeGen/SPARC/CodeGen.hs b/compiler/nativeGen/SPARC/CodeGen.hs
index 6a3455745c..39ab5ebdef 100644
--- a/compiler/nativeGen/SPARC/CodeGen.hs
+++ b/compiler/nativeGen/SPARC/CodeGen.hs
@@ -42,7 +42,6 @@ import CLabel
-- The rest:
import StaticFlags ( opt_PIC )
import OrdList
-import qualified Outputable as O
import Outputable
import Control.Monad ( mapAndUnzipM )
diff --git a/compiler/nativeGen/X86/Regs.hs b/compiler/nativeGen/X86/Regs.hs
index ad32ebac2f..3a1d93883d 100644
--- a/compiler/nativeGen/X86/Regs.hs
+++ b/compiler/nativeGen/X86/Regs.hs
@@ -65,7 +65,6 @@ import Cmm
import CLabel ( CLabel )
import Pretty
import Outputable ( panic )
-import qualified Outputable
import FastTypes
import FastBool
diff --git a/compiler/prelude/TysPrim.lhs b/compiler/prelude/TysPrim.lhs
index 6fc79bda11..6e74fd987d 100644
--- a/compiler/prelude/TysPrim.lhs
+++ b/compiler/prelude/TysPrim.lhs
@@ -49,8 +49,7 @@ module TysPrim(
import Var ( TyVar, mkTyVar )
import Name ( Name, BuiltInSyntax(..), mkInternalName, mkWiredInName )
import OccName ( mkTyVarOccFS, mkTcOccFS )
-import TyCon ( TyCon, mkPrimTyCon, mkLiftedPrimTyCon,
- PrimRep(..) )
+import TyCon ( TyCon, mkPrimTyCon, mkLiftedPrimTyCon )
import Type
import SrcLoc
import Unique ( mkAlphaTyVarUnique, pprUnique )
diff --git a/compiler/prelude/TysWiredIn.lhs b/compiler/prelude/TysWiredIn.lhs
index a279b4b689..ed37945929 100644
--- a/compiler/prelude/TysWiredIn.lhs
+++ b/compiler/prelude/TysWiredIn.lhs
@@ -69,8 +69,6 @@ import Constants ( mAX_TUPLE_SIZE )
import Module ( Module )
import RdrName
import Name
-import OccName ( mkTcOccFS, mkDataOccFS, mkTupleOcc, mkDataConWorkerOcc,
- tcName, dataName )
import DataCon ( DataCon, mkDataCon, dataConWorkId, dataConSourceArity )
import Var
import TyCon ( TyCon, AlgTyConRhs(DataTyCon), tyConDataCons,
diff --git a/compiler/typecheck/TcAnnotations.lhs b/compiler/typecheck/TcAnnotations.lhs
index 17ebbb13ea..186e93f095 100644
--- a/compiler/typecheck/TcAnnotations.lhs
+++ b/compiler/typecheck/TcAnnotations.lhs
@@ -20,8 +20,6 @@ import TcExpr
import {-# SOURCE #-} TcSplice ( runAnnotation )
import FastString
#endif
-
-import Control.Monad
\end{code}
\begin{code}
diff --git a/compiler/typecheck/TcArrows.lhs b/compiler/typecheck/TcArrows.lhs
index ee14eb85ed..9fede384a7 100644
--- a/compiler/typecheck/TcArrows.lhs
+++ b/compiler/typecheck/TcArrows.lhs
@@ -27,7 +27,6 @@ import Name
import TysWiredIn
import VarSet
import TysPrim
-import Type
import SrcLoc
import Outputable
diff --git a/compiler/typecheck/TcClassDcl.lhs b/compiler/typecheck/TcClassDcl.lhs
index 4f1f32c0f9..04a9f2b263 100644
--- a/compiler/typecheck/TcClassDcl.lhs
+++ b/compiler/typecheck/TcClassDcl.lhs
@@ -30,21 +30,18 @@ import TcRnMonad
import Generics
import Class
import TyCon
-import Type
import MkId
import Id
import Name
import Var
import NameEnv
import NameSet
-import OccName
import RdrName
import Outputable
import PrelNames
import DynFlags
import ErrUtils
import Util
-import Unique
import ListSetOps
import SrcLoc
import Maybes
diff --git a/compiler/typecheck/TcForeign.lhs b/compiler/typecheck/TcForeign.lhs
index f51000d72a..df3f1ef581 100644
--- a/compiler/typecheck/TcForeign.lhs
+++ b/compiler/typecheck/TcForeign.lhs
@@ -35,7 +35,6 @@ import Type
import SMRep
#endif
import Name
-import OccName
import TcType
import DynFlags
import Outputable
diff --git a/compiler/typecheck/TcGenDeriv.lhs b/compiler/typecheck/TcGenDeriv.lhs
index 7cee738da6..5ae17d72fc 100644
--- a/compiler/typecheck/TcGenDeriv.lhs
+++ b/compiler/typecheck/TcGenDeriv.lhs
@@ -42,7 +42,6 @@ import Name
import HscTypes
import PrelInfo
import PrelNames
-import MkId
import PrimOp
import SrcLoc
import TyCon
@@ -58,9 +57,7 @@ import Util
import MonadUtils
import Outputable
import FastString
-import OccName
import Bag
-
import Data.List ( partition, intersperse )
\end{code}
diff --git a/compiler/typecheck/TcInstDcls.lhs b/compiler/typecheck/TcInstDcls.lhs
index cf03e7116b..3272f96862 100644
--- a/compiler/typecheck/TcInstDcls.lhs
+++ b/compiler/typecheck/TcInstDcls.lhs
@@ -29,7 +29,6 @@ import TcSimplify
import Type
import Coercion
import TyCon
-import TypeRep
import DataCon
import Class
import Var
diff --git a/compiler/typecheck/TcRnMonad.lhs b/compiler/typecheck/TcRnMonad.lhs
index 88de1ca8fd..1de7404a7c 100644
--- a/compiler/typecheck/TcRnMonad.lhs
+++ b/compiler/typecheck/TcRnMonad.lhs
@@ -45,6 +45,7 @@ import Util
import System.IO
import Data.IORef
+import qualified Data.Set as Set
import Control.Monad
\end{code}
diff --git a/compiler/typecheck/TcTyClsDecls.lhs b/compiler/typecheck/TcTyClsDecls.lhs
index f854b137b5..738d36f6bd 100644
--- a/compiler/typecheck/TcTyClsDecls.lhs
+++ b/compiler/typecheck/TcTyClsDecls.lhs
@@ -13,7 +13,6 @@ module TcTyClsDecls (
#include "HsVersions.h"
import HsSyn
-import HsTypes
import HscTypes
import BuildTyCl
import TcUnify
@@ -36,7 +35,6 @@ import IdInfo
import Var
import VarSet
import Name
-import OccName
import Outputable
import Maybes
import Monad
@@ -52,7 +50,6 @@ import BasicTypes
import Bag
import Data.List
-import Control.Monad ( mplus )
\end{code}
diff --git a/compiler/typecheck/TcType.lhs b/compiler/typecheck/TcType.lhs
index f50b9b085c..ce42def248 100644
--- a/compiler/typecheck/TcType.lhs
+++ b/compiler/typecheck/TcType.lhs
@@ -153,7 +153,6 @@ import DynFlags
import Name
import NameSet
import VarEnv
-import OccName
import PrelNames
import TysWiredIn
import BasicTypes
@@ -163,7 +162,6 @@ import ListSetOps
import Outputable
import FastString
-import Data.List
import Data.IORef
\end{code}
diff --git a/compiler/types/Coercion.lhs b/compiler/types/Coercion.lhs
index a51ea266bb..b49b35612d 100644
--- a/compiler/types/Coercion.lhs
+++ b/compiler/types/Coercion.lhs
@@ -63,10 +63,8 @@ import TyCon
import Class
import Var
import Name
-import OccName
import PrelNames
import Util
-import Unique
import BasicTypes
import Outputable
import FastString
diff --git a/compiler/types/TypeRep.lhs b/compiler/types/TypeRep.lhs
index 600b731928..146c0814aa 100644
--- a/compiler/types/TypeRep.lhs
+++ b/compiler/types/TypeRep.lhs
@@ -53,7 +53,6 @@ import {-# SOURCE #-} DataCon( DataCon, dataConName )
-- friends:
import Var
import Name
-import OccName
import BasicTypes
import TyCon
import Class
diff --git a/compiler/utils/Binary.hs b/compiler/utils/Binary.hs
index 11f3b12317..3577f9173d 100644
--- a/compiler/utils/Binary.hs
+++ b/compiler/utils/Binary.hs
@@ -71,9 +71,6 @@ import BasicTypes
import Foreign
import Data.Array
-import Data.Bits
-import Data.Int
-import Data.Word
import Data.IORef
import Data.Char ( ord, chr )
import Data.Typeable
@@ -84,7 +81,6 @@ import System.IO.Error ( mkIOError, eofErrorType )
import GHC.Real ( Ratio(..) )
import GHC.Exts
import GHC.Word ( Word8(..) )
-import System.IO ( openBinaryFile )
#if __GLASGOW_HASKELL__ >= 611
import GHC.IO ( IO(..) )
diff --git a/compiler/utils/Encoding.hs b/compiler/utils/Encoding.hs
index e14f1e749a..336d9f0474 100644
--- a/compiler/utils/Encoding.hs
+++ b/compiler/utils/Encoding.hs
@@ -31,7 +31,6 @@ module Encoding (
import Foreign
import Data.Char
import Numeric
-import Data.Bits
import GHC.Ptr ( Ptr(..) )
import GHC.Base
diff --git a/compiler/utils/FastMutInt.lhs b/compiler/utils/FastMutInt.lhs
index dfa188ed2a..1b2b05eb9f 100644
--- a/compiler/utils/FastMutInt.lhs
+++ b/compiler/utils/FastMutInt.lhs
@@ -28,7 +28,7 @@ import GHC.Base
import GHC.Ptr
#if __GLASGOW_HASKELL__ >= 611
-import GHC.IO ( IO(..) )
+-- import GHC.IO ( IO(..) )
#else
import GHC.IOBase ( IO(..) )
#endif
diff --git a/compiler/utils/Outputable.lhs b/compiler/utils/Outputable.lhs
index ed47609d10..bdad4d3eb1 100644
--- a/compiler/utils/Outputable.lhs
+++ b/compiler/utils/Outputable.lhs
@@ -37,13 +37,13 @@ module Outputable (
printForC, printForAsm, printForUser, printForUserPartWay,
pprCode, mkCodeStyle,
showSDoc, showSDocOneLine,
- showSDocForUser, showSDocDebug, showSDocDump, showSDocDumpOneLine,
- showPpr,
+ showSDocForUser, showSDocDebug, showSDocDump, showSDocDumpOneLine,
+ showPpr,
showSDocUnqual, showsPrecSDoc,
pprInfixVar, pprPrefixVar,
pprHsChar, pprHsString, pprHsInfix, pprHsVar,
- pprFastFilePath,
+ pprFastFilePath,
-- * Controlling the style in which output is printed
BindingSite(..),
diff --git a/compiler/utils/Util.lhs b/compiler/utils/Util.lhs
index af81110476..62ab5f9fa5 100644
--- a/compiler/utils/Util.lhs
+++ b/compiler/utils/Util.lhs
@@ -84,9 +84,8 @@ import System.IO.Unsafe ( unsafePerformIO )
import Data.IORef ( readIORef, writeIORef )
import Data.List hiding (group)
-import qualified Data.List as List ( elem )
#ifdef DEBUG
-import qualified Data.List as List ( notElem )
+import qualified Data.List as List ( elem, notElem )
import FastTypes
#endif
diff --git a/ghc/GhciMonad.hs b/ghc/GhciMonad.hs
index fb76d4765a..e0653871b8 100644
--- a/ghc/GhciMonad.hs
+++ b/ghc/GhciMonad.hs
@@ -30,13 +30,13 @@ import qualified MonadUtils
import qualified ErrUtils
import Exception
-import Data.Maybe
+-- import Data.Maybe
import Numeric
import Data.Array
-import Data.Char
+-- import Data.Char
import Data.Int ( Int64 )
import Data.IORef
-import Data.List
+-- import Data.List
import System.CPUTime
import System.Environment
import System.IO
diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs
index 1c84846477..5acb36e57d 100644
--- a/ghc/InteractiveUI.hs
+++ b/ghc/InteractiveUI.hs
@@ -23,14 +23,14 @@ import Debugger
-- The GHC interface
import qualified GHC hiding (resume, runStmt)
import GHC ( LoadHowMuch(..), Target(..), TargetId(..),
- Module, ModuleName, TyThing(..), Phase,
- BreakIndex, SrcSpan, Resume, SingleStep,
+ TyThing(..), Phase,
+ BreakIndex, Resume, SingleStep,
Ghc, handleSourceError )
import PprTyThing
import DynFlags
import Packages
-import PackageConfig
+-- import PackageConfig
import UniqFM
import HscTypes ( implicitTyThings, handleFlagWarnings )
@@ -68,7 +68,6 @@ import Control.Monad.Trans
--import SystemExts
import Exception hiding (catch, block, unblock)
-import qualified Exception
-- import Control.Concurrent
diff --git a/ghc/Main.hs b/ghc/Main.hs
index c078cdb389..8bd9c8b5ea 100644
--- a/ghc/Main.hs
+++ b/ghc/Main.hs
@@ -12,9 +12,9 @@ module Main (main) where
-- The official GHC API
import qualified GHC
-import GHC ( DynFlags(..), HscTarget(..),
- GhcMode(..), GhcLink(..),
- LoadHowMuch(..), dopt, DynFlag(..),
+import GHC ( -- DynFlags(..), HscTarget(..),
+ -- GhcMode(..), GhcLink(..),
+ LoadHowMuch(..), -- dopt, DynFlag(..),
defaultCallbacks )
import CmdLineParser
@@ -43,7 +43,7 @@ import Outputable
import SrcLoc
import Util
import Panic
-import MonadUtils ( liftIO )
+-- import MonadUtils ( liftIO )
-- Standard Haskell libraries
import System.IO