summaryrefslogtreecommitdiff
path: root/compiler/nativeGen
diff options
context:
space:
mode:
authorJames Foster <ratherforky@gmail.com>2019-08-15 01:00:17 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-08-15 12:01:43 -0400
commitca71d5514626dbfd74a3d9931c2ecbd02b5343bc (patch)
treefb55fdc11fa471cf5b8c95d9923f45f6ffc2ccf1 /compiler/nativeGen
parent6329c70a36242849540c93b34903f6188b0ed477 (diff)
downloadhaskell-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/nativeGen')
-rw-r--r--compiler/nativeGen/BlockLayout.hs1
-rw-r--r--compiler/nativeGen/CFG.hs2
-rw-r--r--compiler/nativeGen/PPC/Ppr.hs2
-rw-r--r--compiler/nativeGen/RegAlloc/Graph/Stats.hs1
-rw-r--r--compiler/nativeGen/RegAlloc/Liveness.hs1
-rw-r--r--compiler/nativeGen/SPARC/CodeGen.hs1
-rw-r--r--compiler/nativeGen/SPARC/CodeGen/Base.hs2
-rw-r--r--compiler/nativeGen/SPARC/CodeGen/Expand.hs1
-rw-r--r--compiler/nativeGen/SPARC/CodeGen/Gen64.hs2
-rw-r--r--compiler/nativeGen/SPARC/CodeGen/Sanity.hs2
-rw-r--r--compiler/nativeGen/SPARC/Ppr.hs2
-rw-r--r--compiler/nativeGen/X86/CodeGen.hs4
12 files changed, 6 insertions, 15 deletions
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