Commit d436c70d authored by simonpj@microsoft.com's avatar simonpj@microsoft.com

Trim unused imports detected by new unused-import code

parent 0bde1150
......@@ -51,7 +51,6 @@ import Outputable
import Unique
import ListSetOps
import Util
import Maybes
import FastString
import Module
......
......@@ -126,7 +126,6 @@ import Module
import Class
import PrimOp
import ForeignCall
import OccName
import Maybes
import SrcLoc
import Outputable
......
......@@ -102,8 +102,6 @@ import FastString
import FastTypes
import Outputable
import Binary
import GHC.Exts
import Data.Char
\end{code}
......
......@@ -30,7 +30,6 @@ import FastTypes
import MonadUtils
import Control.Monad
import Control.Monad.Fix
#if __GLASGOW_HASKELL__ >= 611
import GHC.IO (unsafeDupableInterleaveIO)
#else
......
......@@ -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()
......
......@@ -49,10 +49,7 @@ import CLabel
import Constants
import FastString
import FiniteMap
import Maybes
import Monad
import Outputable
import Panic
import Unique
import UniqSet
......
......@@ -5,7 +5,6 @@ module CmmProcPointZ
)
where
import qualified Prelude as P
import Prelude hiding (zip, unzip, last)
import BlockId
......
......@@ -5,7 +5,6 @@ module CmmStackLayout
where
import Constants
import qualified Prelude as P
import Prelude hiding (zip, unzip, last)
import BlockId
......
......@@ -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
......
......@@ -44,7 +44,6 @@ import CmmExpr ( UserOfLocalRegs(..) )
import PprCmm()
import Outputable hiding (empty)
import Panic
import Maybe
import Prelude hiding (zip, unzip, last)
......
......@@ -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
......
......@@ -72,7 +72,6 @@ import Id
import IdInfo
import DataCon
import Name
import OccName
import Type
import TypeRep
import TcType
......
......@@ -74,8 +74,6 @@ import Maybes
import Util
import Data.Word
import Data.Bits
import GHC.Exts -- For `xori`
\end{code}
......
......@@ -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,
......
......@@ -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
......
......@@ -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
......
......@@ -16,7 +16,7 @@ module LibFFI (
import TyCon
import ForeignCall
import Panic
import Outputable
-- import Outputable
import Constants
import Foreign
......
......@@ -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(..) )
......
......@@ -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
---------------------------------------------
......
......@@ -41,9 +41,6 @@ import Outputable
import FastString
import Module
import Data.List
import Data.Maybe
infixl 3 &&&
\end{code}
......
......@@ -22,7 +22,6 @@ import LazyUniqFM
import Serialized
import Unique
import Control.Monad
import Data.Typeable
import Data.Maybe
import Data.Word ( Word8 )
......
......@@ -31,7 +31,6 @@ import GHC.IO ( IO(..) )
#else
import GHC.IOBase ( IO(..) )
#endif
import GHC.Word
import Constants
data BreakArray = BA (MutableByteArray# RealWorld)
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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"
......
......@@ -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
-- -----------------------------------------------------------------------------
......
......@@ -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
......
......@@ -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
......
......@@ -13,7 +13,7 @@ import FastBool
import Data.Word
import Data.Bits
import Data.List
-- import Data.List
--------------------------------------------------------------------------------
......
......@@ -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 )
......
......@@ -65,7 +65,6 @@ import Cmm
import CLabel ( CLabel )
import Pretty
import Outputable ( panic )
import qualified Outputable
import FastTypes
import FastBool
......
......@@ -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 )
......
......@@ -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,
......
......@@ -20,8 +20,6 @@ import TcExpr
import {-# SOURCE #-} TcSplice ( runAnnotation )
import FastString
#endif
import Control.Monad
\end{code}
\begin{code}
......
......@@ -27,7 +27,6 @@ import Name
import TysWiredIn
import VarSet
import TysPrim
import Type
import SrcLoc
import Outputable
......
......@@ -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
......
......@@ -35,7 +35,6 @@ import Type
import SMRep
#endif
import Name
import OccName
import TcType
import DynFlags
import Outputable
......
......@@ -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}
......
......@@ -29,7 +29,6 @@ import TcSimplify
import Type
import Coercion
import TyCon
import TypeRep
import DataCon
import Class
import Var
......
......@@ -45,6 +45,7 @@ import Util
import System.IO
import Data.IORef
import qualified Data.Set as Set
import Control.Monad
\end{code}
......
......@@ -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}
......
......@@ -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}
......
......@@ -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
......
......@@ -53,7 +53,6 @@ import {-# SOURCE #-} DataCon( DataCon, dataConName )
-- friends:
import Var
import Name
import OccName
import BasicTypes
import TyCon
import Class
......
......@@ -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(..) )
......
......@@ -31,7 +31,6 @@ module Encoding (
import Foreign
import Data.Char
import Numeric
import Data.Bits
import GHC.Ptr ( Ptr(..) )
import GHC.Base
......
......@@ -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
......
......@@ -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(..),
......
......@@ -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
......
......@@ -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
......
......@@ -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