diff options
author | James Foster <ratherforky@gmail.com> | 2019-08-15 01:00:17 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-08-15 12:01:43 -0400 |
commit | ca71d5514626dbfd74a3d9931c2ecbd02b5343bc (patch) | |
tree | fb55fdc11fa471cf5b8c95d9923f45f6ffc2ccf1 /compiler | |
parent | 6329c70a36242849540c93b34903f6188b0ed477 (diff) | |
download | haskell-ca71d5514626dbfd74a3d9931c2ecbd02b5343bc.tar.gz |
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.
Diffstat (limited to 'compiler')
32 files changed, 13 insertions, 37 deletions
diff --git a/compiler/cmm/CmmBuildInfoTables.hs b/compiler/cmm/CmmBuildInfoTables.hs index 90d15aeea7..9c05a8fe29 100644 --- a/compiler/cmm/CmmBuildInfoTables.hs +++ b/compiler/cmm/CmmBuildInfoTables.hs @@ -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 diff --git a/compiler/cmm/CmmCallConv.hs b/compiler/cmm/CmmCallConv.hs index 4e6a9d293a..df1eaad005 100644 --- a/compiler/cmm/CmmCallConv.hs +++ b/compiler/cmm/CmmCallConv.hs @@ -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 diff --git a/compiler/cmm/CmmCommonBlockElim.hs b/compiler/cmm/CmmCommonBlockElim.hs index b43d68970f..cbf7d83d36 100644 --- a/compiler/cmm/CmmCommonBlockElim.hs +++ b/compiler/cmm/CmmCommonBlockElim.hs @@ -13,7 +13,6 @@ import Cmm import CmmUtils import CmmSwitch (eqSwitchTargetWith) import CmmContFlowOpt --- import PprCmm () import Hoopl.Block import Hoopl.Graph diff --git a/compiler/cmm/CmmLint.hs b/compiler/cmm/CmmLint.hs index d5c3f84443..3ad65bd536 100644 --- a/compiler/cmm/CmmLint.hs +++ b/compiler/cmm/CmmLint.hs @@ -21,7 +21,7 @@ import Cmm import CmmUtils import CmmLive import CmmSwitch (switchTargetsToList) -import PprCmm () +import PprCmm () -- For Outputable instances import Outputable import DynFlags diff --git a/compiler/cmm/CmmLive.hs b/compiler/cmm/CmmLive.hs index f340c32c8a..ca474ef61c 100644 --- a/compiler/cmm/CmmLive.hs +++ b/compiler/cmm/CmmLive.hs @@ -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 diff --git a/compiler/cmm/CmmProcPoint.hs b/compiler/cmm/CmmProcPoint.hs index 528337c57e..746a175cfe 100644 --- a/compiler/cmm/CmmProcPoint.hs +++ b/compiler/cmm/CmmProcPoint.hs @@ -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 diff --git a/compiler/cmm/CmmSink.hs b/compiler/cmm/CmmSink.hs index 409cd0fbf2..8a6b120377 100644 --- a/compiler/cmm/CmmSink.hs +++ b/compiler/cmm/CmmSink.hs @@ -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) diff --git a/compiler/cmm/Debug.hs b/compiler/cmm/Debug.hs index da37495530..4aec63fad6 100644 --- a/compiler/cmm/Debug.hs +++ b/compiler/cmm/Debug.hs @@ -32,7 +32,6 @@ import CoreSyn import FastString ( nilFS, mkFastString ) import Module import Outputable -import PprCore () import PprCmmExpr ( pprExpr ) import SrcLoc import Util ( seqList ) diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs index 7227edd57e..d412969ca7 100644 --- a/compiler/cmm/PprC.hs +++ b/compiler/cmm/PprC.hs @@ -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 diff --git a/compiler/cmm/PprCmm.hs b/compiler/cmm/PprCmm.hs index 90f26e4247..397a666022 100644 --- a/compiler/cmm/PprCmm.hs +++ b/compiler/cmm/PprCmm.hs @@ -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 diff --git a/compiler/codeGen/StgCmmClosure.hs b/compiler/codeGen/StgCmmClosure.hs index 74de2d8756..437219bf45 100644 --- a/compiler/codeGen/StgCmmClosure.hs +++ b/compiler/codeGen/StgCmmClosure.hs @@ -71,7 +71,7 @@ import GhcPrelude import StgSyn import SMRep import Cmm -import PprCmmExpr() +import PprCmmExpr() -- For Outputable instances import CostCentre import BlockId diff --git a/compiler/coreSyn/CoreSubst.hs b/compiler/coreSyn/CoreSubst.hs index 695c7a2f9d..2e3a0087f1 100644 --- a/compiler/coreSyn/CoreSubst.hs +++ b/compiler/coreSyn/CoreSubst.hs @@ -61,7 +61,6 @@ import UniqSupply import Maybes import Util import Outputable -import PprCore () -- Instances import Data.List diff --git a/compiler/coreSyn/CoreUnfold.hs b/compiler/coreSyn/CoreUnfold.hs index 4570d7a8aa..8a51e587ad 100644 --- a/compiler/coreSyn/CoreUnfold.hs +++ b/compiler/coreSyn/CoreUnfold.hs @@ -46,7 +46,6 @@ import GhcPrelude import DynFlags import CoreSyn -import PprCore () -- Instances import OccurAnal ( occurAnalyseExpr_NoBinderSwap ) import CoreOpt import CoreArity ( manifestArity ) diff --git a/compiler/hsSyn/HsBinds.hs b/compiler/hsSyn/HsBinds.hs index c5fadc0b4a..4be761e3ac 100644 --- a/compiler/hsSyn/HsBinds.hs +++ b/compiler/hsSyn/HsBinds.hs @@ -28,7 +28,6 @@ import {-# SOURCE #-} HsPat ( LPat ) import HsExtension import HsTypes -import PprCore () import CoreSyn import TcEvidence import Type diff --git a/compiler/hsSyn/HsSyn.hs b/compiler/hsSyn/HsSyn.hs index e04abbf70f..622f1b9c77 100644 --- a/compiler/hsSyn/HsSyn.hs +++ b/compiler/hsSyn/HsSyn.hs @@ -50,7 +50,7 @@ import HsTypes import BasicTypes ( Fixity, WarningTxt ) import HsUtils import HsDoc -import HsInstances () +import HsInstances () -- For Data instances -- others: import Outputable diff --git a/compiler/hsSyn/HsTypes.hs b/compiler/hsSyn/HsTypes.hs index 08b8eade7d..ad9c186c76 100644 --- a/compiler/hsSyn/HsTypes.hs +++ b/compiler/hsSyn/HsTypes.hs @@ -77,7 +77,6 @@ import GhcPrelude import {-# SOURCE #-} HsExpr ( HsSplice, pprSplice ) import HsExtension -import HsLit () -- for instances import Id ( Id ) import Name( Name ) diff --git a/compiler/iface/FlagChecker.hs b/compiler/iface/FlagChecker.hs index a9ab4c97d7..34b55e9fef 100644 --- a/compiler/iface/FlagChecker.hs +++ b/compiler/iface/FlagChecker.hs @@ -11,7 +11,6 @@ module FlagChecker ( import GhcPrelude import Binary -import BinIface () import DynFlags import HscTypes import Module diff --git a/compiler/iface/IfaceSyn.hs b/compiler/iface/IfaceSyn.hs index 3da0c63174..688998f96d 100644 --- a/compiler/iface/IfaceSyn.hs +++ b/compiler/iface/IfaceSyn.hs @@ -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 diff --git a/compiler/main/HeaderInfo.hs b/compiler/main/HeaderInfo.hs index c7557922bc..0d7e6fd702 100644 --- a/compiler/main/HeaderInfo.hs +++ b/compiler/main/HeaderInfo.hs @@ -35,7 +35,6 @@ import DynFlags import ErrUtils import Util import Outputable -import Pretty () import Maybes import Bag ( emptyBag, listToBag, unitBag ) import MonadUtils diff --git a/compiler/nativeGen/BlockLayout.hs b/compiler/nativeGen/BlockLayout.hs index 8904b4113b..3755ed5db6 100644 --- a/compiler/nativeGen/BlockLayout.hs +++ b/compiler/nativeGen/BlockLayout.hs @@ -37,7 +37,6 @@ import Maybes --import Debug --import Debug.Trace import ListSetOps (removeDups) -import PprCmm () import OrdList import Data.List diff --git a/compiler/nativeGen/CFG.hs b/compiler/nativeGen/CFG.hs index af0c6da455..44ddecd216 100644 --- a/compiler/nativeGen/CFG.hs +++ b/compiler/nativeGen/CFG.hs @@ -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 diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs index 4254f23122..0c3aaccda2 100644 --- a/compiler/nativeGen/PPC/Ppr.hs +++ b/compiler/nativeGen/PPC/Ppr.hs @@ -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 diff --git a/compiler/nativeGen/RegAlloc/Graph/Stats.hs b/compiler/nativeGen/RegAlloc/Graph/Stats.hs index 487e3ee03a..f765224072 100644 --- a/compiler/nativeGen/RegAlloc/Graph/Stats.hs +++ b/compiler/nativeGen/RegAlloc/Graph/Stats.hs @@ -28,7 +28,6 @@ import RegClass import Reg import TargetReg -import PprCmm() import Outputable import UniqFM import UniqSet diff --git a/compiler/nativeGen/RegAlloc/Liveness.hs b/compiler/nativeGen/RegAlloc/Liveness.hs index bbb7976a75..3f160ea678 100644 --- a/compiler/nativeGen/RegAlloc/Liveness.hs +++ b/compiler/nativeGen/RegAlloc/Liveness.hs @@ -45,7 +45,6 @@ import CFG import Hoopl.Collections import Hoopl.Label import Cmm hiding (RegSet, emptyRegSet) -import PprCmm() import Digraph import DynFlags diff --git a/compiler/nativeGen/SPARC/CodeGen.hs b/compiler/nativeGen/SPARC/CodeGen.hs index 056d0c6fbf..bb8bbe16b6 100644 --- a/compiler/nativeGen/SPARC/CodeGen.hs +++ b/compiler/nativeGen/SPARC/CodeGen.hs @@ -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 diff --git a/compiler/nativeGen/SPARC/CodeGen/Base.hs b/compiler/nativeGen/SPARC/CodeGen/Base.hs index e64af0c44e..97c54a9364 100644 --- a/compiler/nativeGen/SPARC/CodeGen/Base.hs +++ b/compiler/nativeGen/SPARC/CodeGen/Base.hs @@ -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 diff --git a/compiler/nativeGen/SPARC/CodeGen/Expand.hs b/compiler/nativeGen/SPARC/CodeGen/Expand.hs index 0b318740db..a29c24dcd4 100644 --- a/compiler/nativeGen/SPARC/CodeGen/Expand.hs +++ b/compiler/nativeGen/SPARC/CodeGen/Expand.hs @@ -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 diff --git a/compiler/nativeGen/SPARC/CodeGen/Gen64.hs b/compiler/nativeGen/SPARC/CodeGen/Gen64.hs index 6fa7482f9b..18df9e19a3 100644 --- a/compiler/nativeGen/SPARC/CodeGen/Gen64.hs +++ b/compiler/nativeGen/SPARC/CodeGen/Gen64.hs @@ -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 diff --git a/compiler/nativeGen/SPARC/CodeGen/Sanity.hs b/compiler/nativeGen/SPARC/CodeGen/Sanity.hs index fcf5b65bde..7f9bfed229 100644 --- a/compiler/nativeGen/SPARC/CodeGen/Sanity.hs +++ b/compiler/nativeGen/SPARC/CodeGen/Sanity.hs @@ -9,7 +9,7 @@ where import GhcPrelude import SPARC.Instr -import SPARC.Ppr () +import SPARC.Ppr () -- For Outputable instances import Instruction import Cmm diff --git a/compiler/nativeGen/SPARC/Ppr.hs b/compiler/nativeGen/SPARC/Ppr.hs index fc67f77541..2bec7ec01f 100644 --- a/compiler/nativeGen/SPARC/Ppr.hs +++ b/compiler/nativeGen/SPARC/Ppr.hs @@ -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 diff --git a/compiler/nativeGen/X86/CodeGen.hs b/compiler/nativeGen/X86/CodeGen.hs index 13662f6807..4aeb4eb635 100644 --- a/compiler/nativeGen/X86/CodeGen.hs +++ b/compiler/nativeGen/X86/CodeGen.hs @@ -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 diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs index d16be28773..5a7924017d 100644 --- a/compiler/typecheck/TcSimplify.hs +++ b/compiler/typecheck/TcSimplify.hs @@ -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 ) |