Commit ca71d551 authored by James Foster's avatar James Foster Committed by Marge Bot

Remove unused imports of the form 'import foo ()' (Fixes #17065)

These kinds of imports are necessary in some cases such as
importing instances of typeclasses or intentionally creating
dependencies in the build system, but '-Wunused-imports' can't
detect when they are no longer needed. This commit removes the
unused ones currently in the code base (not including test files
or submodules), with the hope that doing so may increase
parallelism in the build system by removing unnecessary
dependencies.
parent 6329c70a
......@@ -19,7 +19,6 @@ import Module
import GHC.Platform
import Digraph
import CLabel
import PprCmmDecl ()
import Cmm
import CmmUtils
import DynFlags
......@@ -30,7 +29,6 @@ import UniqSupply
import CostCentre
import StgCmmHeap
import PprCmm()
import Control.Monad
import Data.Map (Map)
import qualified Data.Map as Map
......
......@@ -10,7 +10,7 @@ import GhcPrelude
import CmmExpr
import SMRep
import Cmm (Convention(..))
import PprCmm ()
import PprCmm () -- For Outputable instances
import DynFlags
import GHC.Platform
......
......@@ -13,7 +13,6 @@ import Cmm
import CmmUtils
import CmmSwitch (eqSwitchTargetWith)
import CmmContFlowOpt
-- import PprCmm ()
import Hoopl.Block
import Hoopl.Graph
......
......@@ -21,7 +21,7 @@ import Cmm
import CmmUtils
import CmmLive
import CmmSwitch (switchTargetsToList)
import PprCmm ()
import PprCmm () -- For Outputable instances
import Outputable
import DynFlags
......
......@@ -17,7 +17,7 @@ import GhcPrelude
import DynFlags
import BlockId
import Cmm
import PprCmmExpr ()
import PprCmmExpr () -- For Outputable instances
import Hoopl.Block
import Hoopl.Collections
import Hoopl.Dataflow
......
......@@ -14,7 +14,7 @@ import DynFlags
import BlockId
import CLabel
import Cmm
import PprCmm ()
import PprCmm () -- For Outputable instances
import CmmUtils
import CmmInfo
import CmmLive
......
......@@ -19,7 +19,6 @@ import GHC.Platform (isARM, platformArch)
import DynFlags
import Unique
import UniqFM
import PprCmm ()
import qualified Data.IntSet as IntSet
import Data.List (partition)
......
......@@ -32,7 +32,6 @@ import CoreSyn
import FastString ( nilFS, mkFastString )
import Module
import Outputable
import PprCore ()
import PprCmmExpr ( pprExpr )
import SrcLoc
import Util ( seqList )
......
......@@ -32,7 +32,7 @@ import BlockId
import CLabel
import ForeignCall
import Cmm hiding (pprBBlock)
import PprCmm ()
import PprCmm () -- For Outputable instances
import Hoopl.Block
import Hoopl.Collections
import Hoopl.Graph
......
......@@ -41,7 +41,6 @@ where
import GhcPrelude hiding (succ)
import BlockId ()
import CLabel
import Cmm
import CmmUtils
......@@ -52,7 +51,6 @@ import Outputable
import PprCmmDecl
import PprCmmExpr
import Util
import PprCore ()
import BasicTypes
import Hoopl.Block
......
......@@ -71,7 +71,7 @@ import GhcPrelude
import StgSyn
import SMRep
import Cmm
import PprCmmExpr()
import PprCmmExpr() -- For Outputable instances
import CostCentre
import BlockId
......
......@@ -61,7 +61,6 @@ import UniqSupply
import Maybes
import Util
import Outputable
import PprCore () -- Instances
import Data.List
......
......@@ -46,7 +46,6 @@ import GhcPrelude
import DynFlags
import CoreSyn
import PprCore () -- Instances
import OccurAnal ( occurAnalyseExpr_NoBinderSwap )
import CoreOpt
import CoreArity ( manifestArity )
......
......@@ -28,7 +28,6 @@ import {-# SOURCE #-} HsPat ( LPat )
import HsExtension
import HsTypes
import PprCore ()
import CoreSyn
import TcEvidence
import Type
......
......@@ -50,7 +50,7 @@ import HsTypes
import BasicTypes ( Fixity, WarningTxt )
import HsUtils
import HsDoc
import HsInstances ()
import HsInstances () -- For Data instances
-- others:
import Outputable
......
......@@ -77,7 +77,6 @@ import GhcPrelude
import {-# SOURCE #-} HsExpr ( HsSplice, pprSplice )
import HsExtension
import HsLit () -- for instances
import Id ( Id )
import Name( Name )
......
......@@ -11,7 +11,6 @@ module FlagChecker (
import GhcPrelude
import Binary
import BinIface ()
import DynFlags
import HscTypes
import Module
......
......@@ -46,7 +46,6 @@ import GhcPrelude
import IfaceType
import BinFingerprint
import CoreSyn( IsOrphan, isOrphan )
import PprCore() -- Printing DFunArgs
import DynFlags( gopt, GeneralFlag (Opt_PrintAxiomIncomps) )
import Demand
import Class
......
......@@ -35,7 +35,6 @@ import DynFlags
import ErrUtils
import Util
import Outputable
import Pretty ()
import Maybes
import Bag ( emptyBag, listToBag, unitBag )
import MonadUtils
......
......@@ -37,7 +37,6 @@ import Maybes
--import Debug
--import Debug.Trace
import ListSetOps (removeDups)
import PprCmm ()
import OrdList
import Data.List
......
......@@ -56,7 +56,7 @@ import Outputable
--import Debug
--import OrdList
--import Debug.Trace
import PprCmm ()
import PprCmm () -- For Outputable instances
import qualified DynFlags as D
import Data.List
......
......@@ -27,7 +27,7 @@ import Hoopl.Label
import BlockId
import CLabel
import PprCmmExpr ()
import PprCmmExpr () -- For Outputable instances
import Unique ( pprUniqueAlways, getUnique )
import GHC.Platform
......
......@@ -28,7 +28,6 @@ import RegClass
import Reg
import TargetReg
import PprCmm()
import Outputable
import UniqFM
import UniqSet
......
......@@ -45,7 +45,6 @@ import CFG
import Hoopl.Collections
import Hoopl.Label
import Cmm hiding (RegSet, emptyRegSet)
import PprCmm()
import Digraph
import DynFlags
......
......@@ -31,7 +31,6 @@ import SPARC.CodeGen.CondCode
import SPARC.CodeGen.Gen64
import SPARC.CodeGen.Gen32
import SPARC.CodeGen.Base
import SPARC.Ppr ()
import SPARC.Instr
import SPARC.Imm
import SPARC.AddrMode
......
......@@ -25,7 +25,7 @@ import Reg
import CodeGen.Platform
import DynFlags
import Cmm
import PprCmmExpr ()
import PprCmmExpr () -- For Outputable instances
import GHC.Platform
import Outputable
......
......@@ -11,7 +11,6 @@ import SPARC.Instr
import SPARC.Imm
import SPARC.AddrMode
import SPARC.Regs
import SPARC.Ppr ()
import Instruction
import Reg
import Format
......
......@@ -16,7 +16,7 @@ import SPARC.Regs
import SPARC.AddrMode
import SPARC.Imm
import SPARC.Instr
import SPARC.Ppr()
-- import SPARC.Ppr()
import NCGMonad
import Instruction
import Format
......
......@@ -9,7 +9,7 @@ where
import GhcPrelude
import SPARC.Instr
import SPARC.Ppr ()
import SPARC.Ppr () -- For Outputable instances
import Instruction
import Cmm
......
......@@ -39,7 +39,7 @@ import Format
import PprBase
import Cmm hiding (topInfoTable)
import PprCmm()
import PprCmm() -- For Outputable instances
import BlockId
import CLabel
import Hoopl.Label
......
......@@ -38,9 +38,6 @@ import X86.Cond
import X86.Regs
import X86.RegInfo
--TODO: Remove - Just for development/debugging
import X86.Ppr()
import CodeGen.Platform
import CPrim
import Debug ( DebugBlock(..), UnwindPoint(..), UnwindTable
......@@ -60,7 +57,6 @@ import GHC.Platform
import BasicTypes
import BlockId
import Module ( primUnitId )
import PprCmm ()
import CmmUtils
import CmmSwitch
import Cmm
......
......@@ -48,7 +48,6 @@ import TcMType as TcM
import TcRnMonad as TcM
import TcSMonad as TcS
import TcType
import TrieMap () -- DV: for now
import Type
import TysWiredIn ( liftedRepTy )
import Unify ( tcMatchTyKi )
......
......@@ -23,7 +23,6 @@
-----------------------------------------------------------------------------
module GHC.Err( absentErr, error, errorWithoutStackTrace, undefined ) where
import GHC.CString ()
import GHC.Types (Char, RuntimeRep)
import GHC.Stack.Types
import GHC.Prim
......
......@@ -39,7 +39,6 @@ module GHC.Magic ( inline, noinline, lazy, oneShot, runRW# ) where
import GHC.Prim (realWorld#)
#endif
import GHC.Prim (State#, RealWorld)
import GHC.CString ()
import GHC.Types (RuntimeRep, TYPE)
-- | The call @inline f@ arranges that @f@ is inlined, regardless of
......
......@@ -25,7 +25,7 @@ module GHCi.Message
import Prelude -- See note [Why do we import Prelude here?]
import GHCi.RemoteTypes
import GHCi.FFI
import GHCi.TH.Binary ()
import GHCi.TH.Binary () -- For Binary instances
import GHCi.BreakArray
import GHC.LanguageExtensions
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment