summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/basicTypes/Literal.hs2
-rw-r--r--compiler/cmm/CLabel.hs2
-rw-r--r--compiler/cmm/CmmBuildInfoTables.hs2
-rw-r--r--compiler/cmm/CmmCallConv.hs2
-rw-r--r--compiler/cmm/CmmInfo.hs2
-rw-r--r--compiler/cmm/CmmOpt.hs2
-rw-r--r--compiler/cmm/CmmParse.y2
-rw-r--r--compiler/cmm/CmmPipeline.hs2
-rw-r--r--compiler/cmm/CmmProcPoint.hs2
-rw-r--r--compiler/cmm/CmmSink.hs2
-rw-r--r--compiler/cmm/PprC.hs2
-rw-r--r--compiler/cmm/SMRep.hs2
-rw-r--r--compiler/codeGen/CodeGen/Platform.hs2
-rw-r--r--compiler/codeGen/StgCmmCon.hs2
-rw-r--r--compiler/codeGen/StgCmmPrim.hs2
-rw-r--r--compiler/coreSyn/CorePrep.hs2
-rw-r--r--compiler/coreSyn/CoreUtils.hs2
-rw-r--r--compiler/deSugar/DsForeign.hs2
-rw-r--r--compiler/ghc.cabal.in1
-rw-r--r--compiler/ghci/ByteCodeAsm.hs2
-rw-r--r--compiler/ghci/ByteCodeGen.hs2
-rw-r--r--compiler/ghci/Linker.hs2
-rw-r--r--compiler/iface/BinIface.hs2
-rw-r--r--compiler/llvmGen/LlvmCodeGen/Base.hs2
-rw-r--r--compiler/llvmGen/LlvmCodeGen/CodeGen.hs2
-rw-r--r--compiler/llvmGen/LlvmCodeGen/Data.hs2
-rw-r--r--compiler/llvmGen/LlvmMangler.hs2
-rw-r--r--compiler/main/DriverPhases.hs2
-rw-r--r--compiler/main/DriverPipeline.hs2
-rw-r--r--compiler/main/DynFlags.hs2
-rw-r--r--compiler/main/DynFlags.hs-boot2
-rw-r--r--compiler/main/GHC.hs2
-rw-r--r--compiler/main/HscMain.hs2
-rw-r--r--compiler/main/HscTypes.hs2
-rw-r--r--compiler/main/Packages.hs2
-rw-r--r--compiler/main/Settings.hs2
-rw-r--r--compiler/main/StaticPtrTable.hs2
-rw-r--r--compiler/main/SysTools.hs2
-rw-r--r--compiler/main/SysTools/ExtraObj.hs2
-rw-r--r--compiler/main/SysTools/Info.hs2
-rw-r--r--compiler/main/SysTools/Tasks.hs2
-rw-r--r--compiler/nativeGen/AsmCodeGen.hs2
-rw-r--r--compiler/nativeGen/Dwarf.hs2
-rw-r--r--compiler/nativeGen/Dwarf/Constants.hs2
-rw-r--r--compiler/nativeGen/Dwarf/Types.hs2
-rw-r--r--compiler/nativeGen/Instruction.hs2
-rw-r--r--compiler/nativeGen/PIC.hs2
-rw-r--r--compiler/nativeGen/PPC/CodeGen.hs2
-rw-r--r--compiler/nativeGen/PPC/Instr.hs2
-rw-r--r--compiler/nativeGen/PPC/Ppr.hs2
-rw-r--r--compiler/nativeGen/PPC/Regs.hs2
-rw-r--r--compiler/nativeGen/PprBase.hs2
-rw-r--r--compiler/nativeGen/RegAlloc/Graph/Main.hs2
-rw-r--r--compiler/nativeGen/RegAlloc/Graph/Spill.hs2
-rw-r--r--compiler/nativeGen/RegAlloc/Graph/SpillClean.hs2
-rw-r--r--compiler/nativeGen/RegAlloc/Graph/SpillCost.hs2
-rw-r--r--compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs2
-rw-r--r--compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs2
-rw-r--r--compiler/nativeGen/RegAlloc/Linear/Main.hs2
-rw-r--r--compiler/nativeGen/RegAlloc/Linear/PPC/FreeRegs.hs2
-rw-r--r--compiler/nativeGen/RegAlloc/Linear/SPARC/FreeRegs.hs2
-rw-r--r--compiler/nativeGen/RegAlloc/Linear/X86/FreeRegs.hs2
-rw-r--r--compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs2
-rw-r--r--compiler/nativeGen/RegAlloc/Liveness.hs2
-rw-r--r--compiler/nativeGen/SPARC/CodeGen.hs2
-rw-r--r--compiler/nativeGen/SPARC/CodeGen/Base.hs2
-rw-r--r--compiler/nativeGen/SPARC/Instr.hs2
-rw-r--r--compiler/nativeGen/SPARC/Ppr.hs2
-rw-r--r--compiler/nativeGen/TargetReg.hs2
-rw-r--r--compiler/nativeGen/X86/CodeGen.hs2
-rw-r--r--compiler/nativeGen/X86/Instr.hs2
-rw-r--r--compiler/nativeGen/X86/Ppr.hs2
-rw-r--r--compiler/nativeGen/X86/RegInfo.hs2
-rw-r--r--compiler/nativeGen/X86/Regs.hs2
-rw-r--r--compiler/prelude/PrelRules.hs2
-rw-r--r--compiler/stgSyn/StgSyn.hs2
-rw-r--r--compiler/typecheck/TcForeign.hs2
-rw-r--r--compiler/utils/AsmUtils.hs2
-rw-r--r--compiler/utils/Outputable.hs2
-rw-r--r--ghc/GHCi/Leak.hs2
-rw-r--r--libraries/ghc-boot/GHC/Platform.hs (renamed from compiler/utils/Platform.hs)4
-rw-r--r--libraries/ghc-boot/ghc-boot.cabal.in1
-rw-r--r--testsuite/tests/codeGen/should_run/T13825-unit.hs2
83 files changed, 83 insertions, 83 deletions
diff --git a/compiler/basicTypes/Literal.hs b/compiler/basicTypes/Literal.hs
index 8dd6708eda..abf74a7cbd 100644
--- a/compiler/basicTypes/Literal.hs
+++ b/compiler/basicTypes/Literal.hs
@@ -61,7 +61,7 @@ import BasicTypes
import Binary
import Constants
import DynFlags
-import Platform
+import GHC.Platform
import UniqFM
import Util
diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs
index d30bd4c0f7..95f5a41a23 100644
--- a/compiler/cmm/CLabel.hs
+++ b/compiler/cmm/CLabel.hs
@@ -124,7 +124,7 @@ import CostCentre
import Outputable
import FastString
import DynFlags
-import Platform
+import GHC.Platform
import UniqSet
import Util
import PprCore ( {- instances -} )
diff --git a/compiler/cmm/CmmBuildInfoTables.hs b/compiler/cmm/CmmBuildInfoTables.hs
index be96fba7e9..04b3d70f54 100644
--- a/compiler/cmm/CmmBuildInfoTables.hs
+++ b/compiler/cmm/CmmBuildInfoTables.hs
@@ -16,7 +16,7 @@ import Hoopl.Label
import Hoopl.Collections
import Hoopl.Dataflow
import Module
-import Platform
+import GHC.Platform
import Digraph
import CLabel
import PprCmmDecl ()
diff --git a/compiler/cmm/CmmCallConv.hs b/compiler/cmm/CmmCallConv.hs
index 078390638d..4e6a9d293a 100644
--- a/compiler/cmm/CmmCallConv.hs
+++ b/compiler/cmm/CmmCallConv.hs
@@ -13,7 +13,7 @@ import Cmm (Convention(..))
import PprCmm ()
import DynFlags
-import Platform
+import GHC.Platform
import Outputable
-- Calculate the 'GlobalReg' or stack locations for function call
diff --git a/compiler/cmm/CmmInfo.hs b/compiler/cmm/CmmInfo.hs
index c374e9fd81..16ab6ed587 100644
--- a/compiler/cmm/CmmInfo.hs
+++ b/compiler/cmm/CmmInfo.hs
@@ -45,7 +45,7 @@ import Stream (Stream)
import qualified Stream
import Hoopl.Collections
-import Platform
+import GHC.Platform
import Maybes
import DynFlags
import Panic
diff --git a/compiler/cmm/CmmOpt.hs b/compiler/cmm/CmmOpt.hs
index e837d29783..ed8b386238 100644
--- a/compiler/cmm/CmmOpt.hs
+++ b/compiler/cmm/CmmOpt.hs
@@ -25,7 +25,7 @@ import DynFlags
import Util
import Outputable
-import Platform
+import GHC.Platform
import Data.Bits
import Data.Maybe
diff --git a/compiler/cmm/CmmParse.y b/compiler/cmm/CmmParse.y
index 20d12bb401..f83fb6b000 100644
--- a/compiler/cmm/CmmParse.y
+++ b/compiler/cmm/CmmParse.y
@@ -237,7 +237,7 @@ import CmmMonad
import CostCentre
import ForeignCall
import Module
-import Platform
+import GHC.Platform
import Literal
import Unique
import UniqFM
diff --git a/compiler/cmm/CmmPipeline.hs b/compiler/cmm/CmmPipeline.hs
index 7f7c111848..2f481c272a 100644
--- a/compiler/cmm/CmmPipeline.hs
+++ b/compiler/cmm/CmmPipeline.hs
@@ -26,7 +26,7 @@ import ErrUtils
import HscTypes
import Control.Monad
import Outputable
-import Platform
+import GHC.Platform
-----------------------------------------------------------------------------
-- | Top level driver for C-- pipeline
diff --git a/compiler/cmm/CmmProcPoint.hs b/compiler/cmm/CmmProcPoint.hs
index 427de3bb3d..528337c57e 100644
--- a/compiler/cmm/CmmProcPoint.hs
+++ b/compiler/cmm/CmmProcPoint.hs
@@ -23,7 +23,7 @@ import Data.List (sortBy)
import Maybes
import Control.Monad
import Outputable
-import Platform
+import GHC.Platform
import UniqSupply
import Hoopl.Block
import Hoopl.Collections
diff --git a/compiler/cmm/CmmSink.hs b/compiler/cmm/CmmSink.hs
index 26d0a6fd9a..409cd0fbf2 100644
--- a/compiler/cmm/CmmSink.hs
+++ b/compiler/cmm/CmmSink.hs
@@ -14,7 +14,7 @@ import Hoopl.Label
import Hoopl.Collections
import Hoopl.Graph
import CodeGen.Platform
-import Platform (isARM, platformArch)
+import GHC.Platform (isARM, platformArch)
import DynFlags
import Unique
diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs
index e57c409a04..f684968795 100644
--- a/compiler/cmm/PprC.hs
+++ b/compiler/cmm/PprC.hs
@@ -44,7 +44,7 @@ import CPrim
import DynFlags
import FastString
import Outputable
-import Platform
+import GHC.Platform
import UniqSet
import UniqFM
import Unique
diff --git a/compiler/cmm/SMRep.hs b/compiler/cmm/SMRep.hs
index 8cd9c3e497..57d5354cca 100644
--- a/compiler/cmm/SMRep.hs
+++ b/compiler/cmm/SMRep.hs
@@ -49,7 +49,7 @@ import GhcPrelude
import BasicTypes( ConTagZ )
import DynFlags
import Outputable
-import Platform
+import GHC.Platform
import FastString
import Data.Word
diff --git a/compiler/codeGen/CodeGen/Platform.hs b/compiler/codeGen/CodeGen/Platform.hs
index 9d9a0cf2d1..bc216758a0 100644
--- a/compiler/codeGen/CodeGen/Platform.hs
+++ b/compiler/codeGen/CodeGen/Platform.hs
@@ -6,7 +6,7 @@ module CodeGen.Platform
import GhcPrelude
import CmmExpr
-import Platform
+import GHC.Platform
import Reg
import qualified CodeGen.Platform.ARM as ARM
diff --git a/compiler/codeGen/StgCmmCon.hs b/compiler/codeGen/StgCmmCon.hs
index 258896ff1a..67a9776eac 100644
--- a/compiler/codeGen/StgCmmCon.hs
+++ b/compiler/codeGen/StgCmmCon.hs
@@ -44,7 +44,7 @@ import RepType (countConRepArgs)
import Literal
import PrelInfo
import Outputable
-import Platform
+import GHC.Platform
import Util
import MonadUtils (mapMaybeM)
diff --git a/compiler/codeGen/StgCmmPrim.hs b/compiler/codeGen/StgCmmPrim.hs
index 2d56bf41d5..c3f9d5a279 100644
--- a/compiler/codeGen/StgCmmPrim.hs
+++ b/compiler/codeGen/StgCmmPrim.hs
@@ -31,7 +31,7 @@ import StgCmmHeap
import StgCmmProf ( costCentreFrom )
import DynFlags
-import Platform
+import GHC.Platform
import BasicTypes
import BlockId
import MkGraph
diff --git a/compiler/coreSyn/CorePrep.hs b/compiler/coreSyn/CorePrep.hs
index e49ffb5973..98bffd3777 100644
--- a/compiler/coreSyn/CorePrep.hs
+++ b/compiler/coreSyn/CorePrep.hs
@@ -53,7 +53,7 @@ import DynFlags
import Util
import Pair
import Outputable
-import Platform
+import GHC.Platform
import FastString
import Name ( NamedThing(..), nameSrcSpan )
import SrcLoc ( SrcSpan(..), realSrcLocSpan, mkRealSrcLoc )
diff --git a/compiler/coreSyn/CoreUtils.hs b/compiler/coreSyn/CoreUtils.hs
index 8e298adf6a..5204d5e9f6 100644
--- a/compiler/coreSyn/CoreUtils.hs
+++ b/compiler/coreSyn/CoreUtils.hs
@@ -88,7 +88,7 @@ import FastString
import Maybes
import ListSetOps ( minusList )
import BasicTypes ( Arity, isConLike )
-import Platform
+import GHC.Platform
import Util
import Pair
import Data.ByteString ( ByteString )
diff --git a/compiler/deSugar/DsForeign.hs b/compiler/deSugar/DsForeign.hs
index dd0cc4860a..3ecd9bfead 100644
--- a/compiler/deSugar/DsForeign.hs
+++ b/compiler/deSugar/DsForeign.hs
@@ -49,7 +49,7 @@ import SrcLoc
import Outputable
import FastString
import DynFlags
-import Platform
+import GHC.Platform
import OrdList
import Pair
import Util
diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in
index d380d96707..1a235c4008 100644
--- a/compiler/ghc.cabal.in
+++ b/compiler/ghc.cabal.in
@@ -607,7 +607,6 @@ Library
Reg
RegClass
PIC
- Platform
CPrim
X86.Regs
X86.RegInfo
diff --git a/compiler/ghci/ByteCodeAsm.hs b/compiler/ghci/ByteCodeAsm.hs
index fb38ca1c02..aa556e774f 100644
--- a/compiler/ghci/ByteCodeAsm.hs
+++ b/compiler/ghci/ByteCodeAsm.hs
@@ -33,7 +33,7 @@ import StgCmmLayout ( ArgRep(..) )
import SMRep
import DynFlags
import Outputable
-import Platform
+import GHC.Platform
import Util
import Unique
import UniqDSet
diff --git a/compiler/ghci/ByteCodeGen.hs b/compiler/ghci/ByteCodeGen.hs
index 33ae172d71..8b23e08003 100644
--- a/compiler/ghci/ByteCodeGen.hs
+++ b/compiler/ghci/ByteCodeGen.hs
@@ -23,7 +23,7 @@ import GHCi.RemoteTypes
import BasicTypes
import DynFlags
import Outputable
-import Platform
+import GHC.Platform
import Name
import MkId
import Id
diff --git a/compiler/ghci/Linker.hs b/compiler/ghci/Linker.hs
index e26dcce1ee..bd74d36c56 100644
--- a/compiler/ghci/Linker.hs
+++ b/compiler/ghci/Linker.hs
@@ -50,7 +50,7 @@ import SrcLoc
import qualified Maybes
import UniqDSet
import FastString
-import Platform
+import GHC.Platform
import SysTools
import FileCleanup
diff --git a/compiler/iface/BinIface.hs b/compiler/iface/BinIface.hs
index e365a8edd4..e1ca00e8a8 100644
--- a/compiler/iface/BinIface.hs
+++ b/compiler/iface/BinIface.hs
@@ -42,7 +42,7 @@ import FastMutInt
import Unique
import Outputable
import NameCache
-import Platform
+import GHC.Platform
import FastString
import Constants
import Util
diff --git a/compiler/llvmGen/LlvmCodeGen/Base.hs b/compiler/llvmGen/LlvmCodeGen/Base.hs
index ab9695778c..b47bf6aff6 100644
--- a/compiler/llvmGen/LlvmCodeGen/Base.hs
+++ b/compiler/llvmGen/LlvmCodeGen/Base.hs
@@ -49,7 +49,7 @@ import DynFlags
import FastString
import Cmm hiding ( succ )
import Outputable as Outp
-import Platform
+import GHC.Platform
import UniqFM
import Unique
import BufWrite ( BufHandle )
diff --git a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs
index 28f38d09ec..bdf6a2642f 100644
--- a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs
+++ b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs
@@ -29,7 +29,7 @@ import FastString
import ForeignCall
import Outputable hiding (panic, pprPanic)
import qualified Outputable
-import Platform
+import GHC.Platform
import OrdList
import UniqSupply
import Unique
diff --git a/compiler/llvmGen/LlvmCodeGen/Data.hs b/compiler/llvmGen/LlvmCodeGen/Data.hs
index 3651a88cc6..70a04e6bc9 100644
--- a/compiler/llvmGen/LlvmCodeGen/Data.hs
+++ b/compiler/llvmGen/LlvmCodeGen/Data.hs
@@ -18,7 +18,7 @@ import BlockId
import CLabel
import Cmm
import DynFlags
-import Platform
+import GHC.Platform
import FastString
import Outputable
diff --git a/compiler/llvmGen/LlvmMangler.hs b/compiler/llvmGen/LlvmMangler.hs
index fe03cf21e9..114951946c 100644
--- a/compiler/llvmGen/LlvmMangler.hs
+++ b/compiler/llvmGen/LlvmMangler.hs
@@ -14,7 +14,7 @@ module LlvmMangler ( llvmFixupAsm ) where
import GhcPrelude
import DynFlags ( DynFlags, targetPlatform )
-import Platform ( platformArch, Arch(..) )
+import GHC.Platform ( platformArch, Arch(..) )
import ErrUtils ( withTiming )
import Outputable ( text )
diff --git a/compiler/main/DriverPhases.hs b/compiler/main/DriverPhases.hs
index d4392c4c37..5c88faf895 100644
--- a/compiler/main/DriverPhases.hs
+++ b/compiler/main/DriverPhases.hs
@@ -44,7 +44,7 @@ import GhcPrelude
import {-# SOURCE #-} DynFlags
import Outputable
-import Platform
+import GHC.Platform
import System.FilePath
import Binary
import Util
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index ffc11980e2..f77927f8e5 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -58,7 +58,7 @@ import Maybes ( expectJust )
import SrcLoc
import LlvmCodeGen ( llvmFixupAsm )
import MonadUtils
-import Platform
+import GHC.Platform
import TcRnTypes
import ToolSettings
import Hooks
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 76b5be6573..7a6bca6277 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -248,7 +248,7 @@ module DynFlags (
import GhcPrelude
-import Platform
+import GHC.Platform
import PlatformConstants
import Module
import PackageConfig
diff --git a/compiler/main/DynFlags.hs-boot b/compiler/main/DynFlags.hs-boot
index 823fd22854..bed4ae2fd1 100644
--- a/compiler/main/DynFlags.hs-boot
+++ b/compiler/main/DynFlags.hs-boot
@@ -1,7 +1,7 @@
module DynFlags where
import GhcPrelude
-import Platform
+import GHC.Platform
data DynFlags
data DumpFlag
diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs
index d89ccf8dea..41e59850c0 100644
--- a/compiler/main/GHC.hs
+++ b/compiler/main/GHC.hs
@@ -338,7 +338,7 @@ import SysTools.BaseDir
import Annotations
import Module
import Panic
-import Platform
+import GHC.Platform
import Bag ( listToBag )
import ErrUtils
import MonadUtils
diff --git a/compiler/main/HscMain.hs b/compiler/main/HscMain.hs
index 1960193358..d7658ad2aa 100644
--- a/compiler/main/HscMain.hs
+++ b/compiler/main/HscMain.hs
@@ -149,7 +149,7 @@ import DynamicLoading ( initializePlugins )
import DynFlags
import ErrUtils
-import Platform ( platformOS, osSubsectionsViaSymbols )
+import GHC.Platform ( platformOS, osSubsectionsViaSymbols )
import Outputable
import NameEnv
diff --git a/compiler/main/HscTypes.hs b/compiler/main/HscTypes.hs
index 2749073ff1..0fa9ffa664 100644
--- a/compiler/main/HscTypes.hs
+++ b/compiler/main/HscTypes.hs
@@ -201,7 +201,7 @@ import Bag
import Binary
import ErrUtils
import NameCache
-import Platform
+import GHC.Platform
import Util
import UniqDSet
import GHC.Serialized ( Serialized )
diff --git a/compiler/main/Packages.hs b/compiler/main/Packages.hs
index 64e012c57f..ec63308b83 100644
--- a/compiler/main/Packages.hs
+++ b/compiler/main/Packages.hs
@@ -77,7 +77,7 @@ import UniqSet
import Module
import Util
import Panic
-import Platform
+import GHC.Platform
import Outputable
import Maybes
diff --git a/compiler/main/Settings.hs b/compiler/main/Settings.hs
index b8285340cf..e9e09711ba 100644
--- a/compiler/main/Settings.hs
+++ b/compiler/main/Settings.hs
@@ -64,7 +64,7 @@ import CliOption
import Fingerprint
import FileSettings
import GhcNameVersion
-import Platform
+import GHC.Platform
import PlatformConstants
import ToolSettings
diff --git a/compiler/main/StaticPtrTable.hs b/compiler/main/StaticPtrTable.hs
index 47547fca5b..9f327c90d9 100644
--- a/compiler/main/StaticPtrTable.hs
+++ b/compiler/main/StaticPtrTable.hs
@@ -135,7 +135,7 @@ import MkCore (mkStringExprFSWith)
import Module
import Name
import Outputable
-import Platform
+import GHC.Platform
import PrelNames
import TcEnv (lookupGlobal)
import Type
diff --git a/compiler/main/SysTools.hs b/compiler/main/SysTools.hs
index 6db3f3243d..5ab8805132 100644
--- a/compiler/main/SysTools.hs
+++ b/compiler/main/SysTools.hs
@@ -45,7 +45,7 @@ import Packages
import Config
import Outputable
import ErrUtils
-import Platform
+import GHC.Platform
import Util
import DynFlags
import Fingerprint
diff --git a/compiler/main/SysTools/ExtraObj.hs b/compiler/main/SysTools/ExtraObj.hs
index 149d3a678a..c930389c95 100644
--- a/compiler/main/SysTools/ExtraObj.hs
+++ b/compiler/main/SysTools/ExtraObj.hs
@@ -17,7 +17,7 @@ import AsmUtils
import ErrUtils
import DynFlags
import Packages
-import Platform
+import GHC.Platform
import Outputable
import SrcLoc ( noSrcSpan )
import Module
diff --git a/compiler/main/SysTools/Info.hs b/compiler/main/SysTools/Info.hs
index 9aa9002c23..e61846d4e6 100644
--- a/compiler/main/SysTools/Info.hs
+++ b/compiler/main/SysTools/Info.hs
@@ -19,7 +19,7 @@ import Data.IORef
import System.IO
-import Platform
+import GHC.Platform
import GhcPrelude
import SysTools.Process
diff --git a/compiler/main/SysTools/Tasks.hs b/compiler/main/SysTools/Tasks.hs
index 1747d50be1..10e1102304 100644
--- a/compiler/main/SysTools/Tasks.hs
+++ b/compiler/main/SysTools/Tasks.hs
@@ -13,7 +13,7 @@ import ErrUtils
import HscTypes
import DynFlags
import Outputable
-import Platform
+import GHC.Platform
import Util
import Data.Char
diff --git a/compiler/nativeGen/AsmCodeGen.hs b/compiler/nativeGen/AsmCodeGen.hs
index ed0c57e1e2..6e9450fd85 100644
--- a/compiler/nativeGen/AsmCodeGen.hs
+++ b/compiler/nativeGen/AsmCodeGen.hs
@@ -60,7 +60,7 @@ import qualified RegAlloc.Graph.TrivColorable as Color
import AsmUtils
import TargetReg
-import Platform
+import GHC.Platform
import BlockLayout
import Config
import Instruction
diff --git a/compiler/nativeGen/Dwarf.hs b/compiler/nativeGen/Dwarf.hs
index 0e645a2a56..b64b4efc33 100644
--- a/compiler/nativeGen/Dwarf.hs
+++ b/compiler/nativeGen/Dwarf.hs
@@ -12,7 +12,7 @@ import Debug
import DynFlags
import Module
import Outputable
-import Platform
+import GHC.Platform
import Unique
import UniqSupply
diff --git a/compiler/nativeGen/Dwarf/Constants.hs b/compiler/nativeGen/Dwarf/Constants.hs
index 687a4f818f..01b85c47bc 100644
--- a/compiler/nativeGen/Dwarf/Constants.hs
+++ b/compiler/nativeGen/Dwarf/Constants.hs
@@ -7,7 +7,7 @@ import GhcPrelude
import AsmUtils
import FastString
-import Platform
+import GHC.Platform
import Outputable
import Reg
diff --git a/compiler/nativeGen/Dwarf/Types.hs b/compiler/nativeGen/Dwarf/Types.hs
index 57ff0b2478..01253544e6 100644
--- a/compiler/nativeGen/Dwarf/Types.hs
+++ b/compiler/nativeGen/Dwarf/Types.hs
@@ -30,7 +30,7 @@ import CmmExpr ( GlobalReg(..) )
import Encoding
import FastString
import Outputable
-import Platform
+import GHC.Platform
import Unique
import Reg
import SrcLoc
diff --git a/compiler/nativeGen/Instruction.hs b/compiler/nativeGen/Instruction.hs
index 0bd99fbee8..4f18a45c16 100644
--- a/compiler/nativeGen/Instruction.hs
+++ b/compiler/nativeGen/Instruction.hs
@@ -23,7 +23,7 @@ import Hoopl.Collections
import Hoopl.Label
import DynFlags
import Cmm hiding (topInfoTable)
-import Platform
+import GHC.Platform
-- | Holds a list of source and destination registers used by a
-- particular instruction.
diff --git a/compiler/nativeGen/PIC.hs b/compiler/nativeGen/PIC.hs
index 69113e8ea5..9c57a0292f 100644
--- a/compiler/nativeGen/PIC.hs
+++ b/compiler/nativeGen/PIC.hs
@@ -54,7 +54,7 @@ import qualified PPC.Regs as PPC
import qualified X86.Instr as X86
-import Platform
+import GHC.Platform
import Instruction
import Reg
import NCGMonad
diff --git a/compiler/nativeGen/PPC/CodeGen.hs b/compiler/nativeGen/PPC/CodeGen.hs
index 03e8e42d9a..516cda0eb3 100644
--- a/compiler/nativeGen/PPC/CodeGen.hs
+++ b/compiler/nativeGen/PPC/CodeGen.hs
@@ -41,7 +41,7 @@ import Format
import RegClass
import Reg
import TargetReg
-import Platform
+import GHC.Platform
-- Our intermediate code:
import BlockId
diff --git a/compiler/nativeGen/PPC/Instr.hs b/compiler/nativeGen/PPC/Instr.hs
index 3bf19f2dc6..b17ea32f01 100644
--- a/compiler/nativeGen/PPC/Instr.hs
+++ b/compiler/nativeGen/PPC/Instr.hs
@@ -43,7 +43,7 @@ import CmmInfo
import FastString
import CLabel
import Outputable
-import Platform
+import GHC.Platform
import UniqFM (listToUFM, lookupUFM)
import UniqSupply
diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs
index be6402e57a..4254f23122 100644
--- a/compiler/nativeGen/PPC/Ppr.hs
+++ b/compiler/nativeGen/PPC/Ppr.hs
@@ -30,7 +30,7 @@ import CLabel
import PprCmmExpr ()
import Unique ( pprUniqueAlways, getUnique )
-import Platform
+import GHC.Platform
import FastString
import Outputable
import DynFlags
diff --git a/compiler/nativeGen/PPC/Regs.hs b/compiler/nativeGen/PPC/Regs.hs
index 8ba2ead926..5b7ac208b6 100644
--- a/compiler/nativeGen/PPC/Regs.hs
+++ b/compiler/nativeGen/PPC/Regs.hs
@@ -63,7 +63,7 @@ import Unique
import CodeGen.Platform
import DynFlags
import Outputable
-import Platform
+import GHC.Platform
import Data.Word ( Word8, Word16, Word32, Word64 )
import Data.Int ( Int8, Int16, Int32, Int64 )
diff --git a/compiler/nativeGen/PprBase.hs b/compiler/nativeGen/PprBase.hs
index 80f3e6179b..48e9e26ae4 100644
--- a/compiler/nativeGen/PprBase.hs
+++ b/compiler/nativeGen/PprBase.hs
@@ -28,7 +28,7 @@ import Cmm
import DynFlags
import FastString
import Outputable
-import Platform
+import GHC.Platform
import FileCleanup
import qualified Data.Array.Unsafe as U ( castSTUArray )
diff --git a/compiler/nativeGen/RegAlloc/Graph/Main.hs b/compiler/nativeGen/RegAlloc/Graph/Main.hs
index c7875cfaea..df97de1c62 100644
--- a/compiler/nativeGen/RegAlloc/Graph/Main.hs
+++ b/compiler/nativeGen/RegAlloc/Graph/Main.hs
@@ -21,7 +21,7 @@ import Reg
import Bag
import DynFlags
import Outputable
-import Platform
+import GHC.Platform
import UniqFM
import UniqSet
import UniqSupply
diff --git a/compiler/nativeGen/RegAlloc/Graph/Spill.hs b/compiler/nativeGen/RegAlloc/Graph/Spill.hs
index bc26a663a5..eccc83eb48 100644
--- a/compiler/nativeGen/RegAlloc/Graph/Spill.hs
+++ b/compiler/nativeGen/RegAlloc/Graph/Spill.hs
@@ -23,7 +23,7 @@ import UniqFM
import UniqSet
import UniqSupply
import Outputable
-import Platform
+import GHC.Platform
import Data.List
import Data.Maybe
diff --git a/compiler/nativeGen/RegAlloc/Graph/SpillClean.hs b/compiler/nativeGen/RegAlloc/Graph/SpillClean.hs
index 50001d7334..6d7b377d68 100644
--- a/compiler/nativeGen/RegAlloc/Graph/SpillClean.hs
+++ b/compiler/nativeGen/RegAlloc/Graph/SpillClean.hs
@@ -41,7 +41,7 @@ import UniqFM
import Unique
import State
import Outputable
-import Platform
+import GHC.Platform
import Hoopl.Collections
import Data.List
diff --git a/compiler/nativeGen/RegAlloc/Graph/SpillCost.hs b/compiler/nativeGen/RegAlloc/Graph/SpillCost.hs
index b62c44fa81..9c6e24d320 100644
--- a/compiler/nativeGen/RegAlloc/Graph/SpillCost.hs
+++ b/compiler/nativeGen/RegAlloc/Graph/SpillCost.hs
@@ -28,7 +28,7 @@ import UniqFM
import UniqSet
import Digraph (flattenSCCs)
import Outputable
-import Platform
+import GHC.Platform
import State
import CFG
diff --git a/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs b/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs
index 8db80ef064..5d4fd418c3 100644
--- a/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs
+++ b/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs
@@ -16,7 +16,7 @@ import Reg
import GraphBase
import UniqSet
-import Platform
+import GHC.Platform
import Panic
-- trivColorable ---------------------------------------------------------------
diff --git a/compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs b/compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs
index b4e79432d8..5a4f1c65a8 100644
--- a/compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs
+++ b/compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs
@@ -16,7 +16,7 @@ import RegClass
import DynFlags
import Panic
-import Platform
+import GHC.Platform
-- -----------------------------------------------------------------------------
-- The free register set
diff --git a/compiler/nativeGen/RegAlloc/Linear/Main.hs b/compiler/nativeGen/RegAlloc/Linear/Main.hs
index a9337b0044..cdaf738d68 100644
--- a/compiler/nativeGen/RegAlloc/Linear/Main.hs
+++ b/compiler/nativeGen/RegAlloc/Linear/Main.hs
@@ -130,7 +130,7 @@ import UniqSet
import UniqFM
import UniqSupply
import Outputable
-import Platform
+import GHC.Platform
import Data.Maybe
import Data.List
diff --git a/compiler/nativeGen/RegAlloc/Linear/PPC/FreeRegs.hs b/compiler/nativeGen/RegAlloc/Linear/PPC/FreeRegs.hs
index 24577c446c..1239380ba2 100644
--- a/compiler/nativeGen/RegAlloc/Linear/PPC/FreeRegs.hs
+++ b/compiler/nativeGen/RegAlloc/Linear/PPC/FreeRegs.hs
@@ -9,7 +9,7 @@ import RegClass
import Reg
import Outputable
-import Platform
+import GHC.Platform
import Data.Word
import Data.Bits
diff --git a/compiler/nativeGen/RegAlloc/Linear/SPARC/FreeRegs.hs b/compiler/nativeGen/RegAlloc/Linear/SPARC/FreeRegs.hs
index 09003cf0a3..5528a38727 100644
--- a/compiler/nativeGen/RegAlloc/Linear/SPARC/FreeRegs.hs
+++ b/compiler/nativeGen/RegAlloc/Linear/SPARC/FreeRegs.hs
@@ -11,7 +11,7 @@ import Reg
import CodeGen.Platform
import Outputable
-import Platform
+import GHC.Platform
import Data.Word
import Data.Bits
diff --git a/compiler/nativeGen/RegAlloc/Linear/X86/FreeRegs.hs b/compiler/nativeGen/RegAlloc/Linear/X86/FreeRegs.hs
index b8af046d82..e7f8cb4a63 100644
--- a/compiler/nativeGen/RegAlloc/Linear/X86/FreeRegs.hs
+++ b/compiler/nativeGen/RegAlloc/Linear/X86/FreeRegs.hs
@@ -9,7 +9,7 @@ import X86.Regs
import RegClass
import Reg
import Panic
-import Platform
+import GHC.Platform
import Data.Word
import Data.Bits
diff --git a/compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs b/compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs
index 3a6e3407a7..44a3bbb306 100644
--- a/compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs
+++ b/compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs
@@ -9,7 +9,7 @@ import X86.Regs
import RegClass
import Reg
import Panic
-import Platform
+import GHC.Platform
import Data.Word
import Data.Bits
diff --git a/compiler/nativeGen/RegAlloc/Liveness.hs b/compiler/nativeGen/RegAlloc/Liveness.hs
index 3ad01c6d7c..bbb7976a75 100644
--- a/compiler/nativeGen/RegAlloc/Liveness.hs
+++ b/compiler/nativeGen/RegAlloc/Liveness.hs
@@ -51,7 +51,7 @@ import Digraph
import DynFlags
import MonadUtils
import Outputable
-import Platform
+import GHC.Platform
import UniqSet
import UniqFM
import UniqSupply
diff --git a/compiler/nativeGen/SPARC/CodeGen.hs b/compiler/nativeGen/SPARC/CodeGen.hs
index ea81219c69..30a4d6979b 100644
--- a/compiler/nativeGen/SPARC/CodeGen.hs
+++ b/compiler/nativeGen/SPARC/CodeGen.hs
@@ -59,7 +59,7 @@ import DynFlags
import FastString
import OrdList
import Outputable
-import Platform
+import GHC.Platform
import Control.Monad ( mapAndUnzipM )
diff --git a/compiler/nativeGen/SPARC/CodeGen/Base.hs b/compiler/nativeGen/SPARC/CodeGen/Base.hs
index 039bb6496c..e64af0c44e 100644
--- a/compiler/nativeGen/SPARC/CodeGen/Base.hs
+++ b/compiler/nativeGen/SPARC/CodeGen/Base.hs
@@ -26,7 +26,7 @@ import CodeGen.Platform
import DynFlags
import Cmm
import PprCmmExpr ()
-import Platform
+import GHC.Platform
import Outputable
import OrdList
diff --git a/compiler/nativeGen/SPARC/Instr.hs b/compiler/nativeGen/SPARC/Instr.hs
index 3f78ac51d7..f57b6fafb5 100644
--- a/compiler/nativeGen/SPARC/Instr.hs
+++ b/compiler/nativeGen/SPARC/Instr.hs
@@ -46,7 +46,7 @@ import DynFlags
import Cmm
import FastString
import Outputable
-import Platform
+import GHC.Platform
-- | Register or immediate
diff --git a/compiler/nativeGen/SPARC/Ppr.hs b/compiler/nativeGen/SPARC/Ppr.hs
index 0619956f39..fc67f77541 100644
--- a/compiler/nativeGen/SPARC/Ppr.hs
+++ b/compiler/nativeGen/SPARC/Ppr.hs
@@ -47,7 +47,7 @@ import Hoopl.Collections
import Unique ( pprUniqueAlways )
import Outputable
-import Platform
+import GHC.Platform
import FastString
-- -----------------------------------------------------------------------------
diff --git a/compiler/nativeGen/TargetReg.hs b/compiler/nativeGen/TargetReg.hs
index 6800b9043b..da39b635b2 100644
--- a/compiler/nativeGen/TargetReg.hs
+++ b/compiler/nativeGen/TargetReg.hs
@@ -29,7 +29,7 @@ import Format
import Outputable
import Unique
-import Platform
+import GHC.Platform
import qualified X86.Regs as X86
import qualified X86.RegInfo as X86
diff --git a/compiler/nativeGen/X86/CodeGen.hs b/compiler/nativeGen/X86/CodeGen.hs
index 21e18ee6fd..73cfb28d46 100644
--- a/compiler/nativeGen/X86/CodeGen.hs
+++ b/compiler/nativeGen/X86/CodeGen.hs
@@ -54,7 +54,7 @@ import NCGMonad ( NatM, getNewRegNat, getNewLabelNat, setDeltaNat
import CFG
import Format
import Reg
-import Platform
+import GHC.Platform
-- Our intermediate code:
import BasicTypes
diff --git a/compiler/nativeGen/X86/Instr.hs b/compiler/nativeGen/X86/Instr.hs
index 0e69d421a3..6e5d656beb 100644
--- a/compiler/nativeGen/X86/Instr.hs
+++ b/compiler/nativeGen/X86/Instr.hs
@@ -34,7 +34,7 @@ import CodeGen.Platform
import Cmm
import FastString
import Outputable
-import Platform
+import GHC.Platform
import BasicTypes (Alignment)
import CLabel
diff --git a/compiler/nativeGen/X86/Ppr.hs b/compiler/nativeGen/X86/Ppr.hs
index bf28d29be9..095d9eba7c 100644
--- a/compiler/nativeGen/X86/Ppr.hs
+++ b/compiler/nativeGen/X86/Ppr.hs
@@ -42,7 +42,7 @@ import Cmm hiding (topInfoTable)
import BlockId
import CLabel
import Unique ( pprUniqueAlways )
-import Platform
+import GHC.Platform
import FastString
import Outputable
diff --git a/compiler/nativeGen/X86/RegInfo.hs b/compiler/nativeGen/X86/RegInfo.hs
index 24823e3985..19056be4fa 100644
--- a/compiler/nativeGen/X86/RegInfo.hs
+++ b/compiler/nativeGen/X86/RegInfo.hs
@@ -15,7 +15,7 @@ import Format
import Reg
import Outputable
-import Platform
+import GHC.Platform
import Unique
import UniqFM
diff --git a/compiler/nativeGen/X86/Regs.hs b/compiler/nativeGen/X86/Regs.hs
index 37e99c5a71..2d9fd88c8e 100644
--- a/compiler/nativeGen/X86/Regs.hs
+++ b/compiler/nativeGen/X86/Regs.hs
@@ -60,7 +60,7 @@ import Cmm
import CLabel ( CLabel )
import DynFlags
import Outputable
-import Platform
+import GHC.Platform
import qualified Data.Array as A
diff --git a/compiler/prelude/PrelRules.hs b/compiler/prelude/PrelRules.hs
index 6b93df5494..8a1876506d 100644
--- a/compiler/prelude/PrelRules.hs
+++ b/compiler/prelude/PrelRules.hs
@@ -53,7 +53,7 @@ import Outputable
import FastString
import BasicTypes
import DynFlags
-import Platform
+import GHC.Platform
import Util
import Coercion (mkUnbranchedAxInstCo,mkSymCo,Role(..))
diff --git a/compiler/stgSyn/StgSyn.hs b/compiler/stgSyn/StgSyn.hs
index 4922c15d3f..2372e3ed27 100644
--- a/compiler/stgSyn/StgSyn.hs
+++ b/compiler/stgSyn/StgSyn.hs
@@ -76,7 +76,7 @@ import Literal ( Literal, literalType )
import Module ( Module )
import Outputable
import Packages ( isDllName )
-import Platform
+import GHC.Platform
import PprCore ( {- instances -} )
import PrimOp ( PrimOp, PrimCall )
import TyCon ( PrimRep(..), TyCon )
diff --git a/compiler/typecheck/TcForeign.hs b/compiler/typecheck/TcForeign.hs
index 61c35e7e5d..ace0cddb66 100644
--- a/compiler/typecheck/TcForeign.hs
+++ b/compiler/typecheck/TcForeign.hs
@@ -57,7 +57,7 @@ import TcType
import PrelNames
import DynFlags
import Outputable
-import Platform
+import GHC.Platform
import SrcLoc
import Bag
import Hooks
diff --git a/compiler/utils/AsmUtils.hs b/compiler/utils/AsmUtils.hs
index 36fb7ef6cb..bb19dc2ba3 100644
--- a/compiler/utils/AsmUtils.hs
+++ b/compiler/utils/AsmUtils.hs
@@ -8,7 +8,7 @@ module AsmUtils
import GhcPrelude
-import Platform
+import GHC.Platform
import Outputable
-- | Generate a section type (e.g. @\@progbits@). See #13937.
diff --git a/compiler/utils/Outputable.hs b/compiler/utils/Outputable.hs
index ee857a817e..a5306faaa4 100644
--- a/compiler/utils/Outputable.hs
+++ b/compiler/utils/Outputable.hs
@@ -101,7 +101,7 @@ import BufWrite (BufHandle)
import FastString
import qualified Pretty
import Util
-import Platform
+import GHC.Platform
import qualified PprColour as Col
import Pretty ( Doc, Mode(..) )
import Panic
diff --git a/ghc/GHCi/Leak.hs b/ghc/GHCi/Leak.hs
index 3bb9bbceb5..0878f9ff5a 100644
--- a/ghc/GHCi/Leak.hs
+++ b/ghc/GHCi/Leak.hs
@@ -13,7 +13,7 @@ import GHC.Ptr (Ptr (..))
import GHCi.Util
import HscTypes
import Outputable
-import Platform (target32Bit)
+import GHC.Platform (target32Bit)
import Prelude
import System.Mem
import System.Mem.Weak
diff --git a/compiler/utils/Platform.hs b/libraries/ghc-boot/GHC/Platform.hs
index 5f7d939f0d..8344778ea9 100644
--- a/compiler/utils/Platform.hs
+++ b/libraries/ghc-boot/GHC/Platform.hs
@@ -1,7 +1,7 @@
-- | A description of the platform we're compiling for.
--
-module Platform (
+module GHC.Platform (
Platform(..),
Arch(..),
OS(..),
@@ -23,7 +23,7 @@ module Platform (
where
-import GhcPrelude
+import Prelude -- See Note [Why do we import Prelude here?]
-- | Contains enough information for the native code generator to emit
-- code for this platform.
diff --git a/libraries/ghc-boot/ghc-boot.cabal.in b/libraries/ghc-boot/ghc-boot.cabal.in
index 97872c15f7..15721b1489 100644
--- a/libraries/ghc-boot/ghc-boot.cabal.in
+++ b/libraries/ghc-boot/ghc-boot.cabal.in
@@ -43,6 +43,7 @@ Library
GHC.Serialized
GHC.ForeignSrcLang
GHC.HandleEncoding
+ GHC.Platform
build-depends: base >= 4.7 && < 4.14,
binary == 0.8.*,
diff --git a/testsuite/tests/codeGen/should_run/T13825-unit.hs b/testsuite/tests/codeGen/should_run/T13825-unit.hs
index 1197dc60fe..40088aa734 100644
--- a/testsuite/tests/codeGen/should_run/T13825-unit.hs
+++ b/testsuite/tests/codeGen/should_run/T13825-unit.hs
@@ -8,7 +8,7 @@ import StgCmmClosure
import GHC
import GhcMonad
import System.Environment
-import Platform
+import GHC.Platform
main :: IO ()
main = do