From 1a7cf0963e3511864013bbadfd1f01aaae16df80 Mon Sep 17 00:00:00 2001 From: Sylvain Henry Date: Mon, 21 Mar 2022 10:49:31 +0100 Subject: Avoid redundant imports of GHC.Driver.Session Remove GHC.Driver.Session imports that weren't considered as redundant because of the reexport of PlatformConstants. Also remove this reexport as modules using this datatype should import GHC.Platform instead. --- compiler/GHC/ByteCode/InfoTable.hs | 2 -- compiler/GHC/Cmm/CLabel.hs | 1 - compiler/GHC/Cmm/CallConv.hs | 1 - compiler/GHC/Driver/Session.hs | 1 - compiler/GHC/Runtime/Heap/Layout.hs | 4 ++-- compiler/GHC/StgToCmm/Ticky.hs | 2 -- 6 files changed, 2 insertions(+), 9 deletions(-) diff --git a/compiler/GHC/ByteCode/InfoTable.hs b/compiler/GHC/ByteCode/InfoTable.hs index 4f17b2aa12..4a11ee4b56 100644 --- a/compiler/GHC/ByteCode/InfoTable.hs +++ b/compiler/GHC/ByteCode/InfoTable.hs @@ -10,8 +10,6 @@ module GHC.ByteCode.InfoTable ( mkITbls ) where import GHC.Prelude -import GHC.Driver.Session - import GHC.Platform import GHC.Platform.Profile diff --git a/compiler/GHC/Cmm/CLabel.hs b/compiler/GHC/Cmm/CLabel.hs index 933151a679..c6f29ece0b 100644 --- a/compiler/GHC/Cmm/CLabel.hs +++ b/compiler/GHC/Cmm/CLabel.hs @@ -145,7 +145,6 @@ import GHC.Utils.Outputable import GHC.Utils.Panic import GHC.Utils.Panic.Plain import GHC.Data.FastString -import GHC.Driver.Session import GHC.Platform import GHC.Types.Unique.Set import GHC.Utils.Misc diff --git a/compiler/GHC/Cmm/CallConv.hs b/compiler/GHC/Cmm/CallConv.hs index f376e598bf..ecee8d902d 100644 --- a/compiler/GHC/Cmm/CallConv.hs +++ b/compiler/GHC/Cmm/CallConv.hs @@ -14,7 +14,6 @@ import GHC.Runtime.Heap.Layout import GHC.Cmm (Convention(..)) import GHC.Cmm.Ppr () -- For Outputable instances -import GHC.Driver.Session import GHC.Platform import GHC.Platform.Profile import GHC.Utils.Outputable diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs index d62660c519..0be53034f3 100644 --- a/compiler/GHC/Driver/Session.hs +++ b/compiler/GHC/Driver/Session.hs @@ -24,7 +24,6 @@ module GHC.Driver.Session ( GeneralFlag(..), WarningFlag(..), DiagnosticReason(..), Language(..), - PlatformConstants(..), FatalMessager, FlushOut(..), ProfAuto(..), glasgowExtsFlags, diff --git a/compiler/GHC/Runtime/Heap/Layout.hs b/compiler/GHC/Runtime/Heap/Layout.hs index 3e6f6ed405..db114a6eae 100644 --- a/compiler/GHC/Runtime/Heap/Layout.hs +++ b/compiler/GHC/Runtime/Heap/Layout.hs @@ -47,11 +47,11 @@ module GHC.Runtime.Heap.Layout ( import GHC.Prelude +import GHC.StgToCmm.Types + import GHC.Types.Basic( ConTagZ ) -import GHC.Driver.Session import GHC.Platform import GHC.Platform.Profile -import GHC.StgToCmm.Types import GHC.Utils.Outputable import GHC.Utils.Panic diff --git a/compiler/GHC/StgToCmm/Ticky.hs b/compiler/GHC/StgToCmm/Ticky.hs index a538ff2f4d..c322e99a0f 100644 --- a/compiler/GHC/StgToCmm/Ticky.hs +++ b/compiler/GHC/StgToCmm/Ticky.hs @@ -115,8 +115,6 @@ module GHC.StgToCmm.Ticky ( import GHC.Prelude -import GHC.Driver.Session - import GHC.Platform import GHC.Platform.Profile -- cgit v1.2.1