Commit bff2f24b authored by John Ericson's avatar John Ericson Committed by Marge Bot

Move 'Platform' to ghc-boot

ghc-pkg needs to be aware of platforms so it can figure out which
subdire within the user package db to use. This is admittedly
roundabout, but maybe Cabal could use the same notion of a platform as
GHC to good affect too.
parent 3ae23992
......@@ -61,7 +61,7 @@ import BasicTypes
import Binary
import Constants
import DynFlags
import Platform
import GHC.Platform
import UniqFM
import Util
......
......@@ -124,7 +124,7 @@ import CostCentre
import Outputable
import FastString
import DynFlags
import Platform
import GHC.Platform
import UniqSet
import Util
import PprCore ( {- instances -} )
......
......@@ -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 ()
......
......@@ -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
......
......@@ -45,7 +45,7 @@ import Stream (Stream)
import qualified Stream
import Hoopl.Collections
import Platform
import GHC.Platform
import Maybes
import DynFlags
import Panic
......
......@@ -25,7 +25,7 @@ import DynFlags
import Util
import Outputable
import Platform
import GHC.Platform
import Data.Bits
import Data.Maybe
......
......@@ -237,7 +237,7 @@ import CmmMonad
import CostCentre
import ForeignCall
import Module
import Platform
import GHC.Platform
import Literal
import Unique
import UniqFM
......
......@@ -26,7 +26,7 @@ import ErrUtils
import HscTypes
import Control.Monad
import Outputable
import Platform
import GHC.Platform
-----------------------------------------------------------------------------
-- | Top level driver for C-- pipeline
......
......@@ -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
......
......@@ -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
......
......@@ -44,7 +44,7 @@ import CPrim
import DynFlags
import FastString
import Outputable
import Platform
import GHC.Platform
import UniqSet
import UniqFM
import Unique
......
......@@ -49,7 +49,7 @@ import GhcPrelude
import BasicTypes( ConTagZ )
import DynFlags
import Outputable
import Platform
import GHC.Platform
import FastString
import Data.Word
......
......@@ -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
......
......@@ -44,7 +44,7 @@ import RepType (countConRepArgs)
import Literal
import PrelInfo
import Outputable
import Platform
import GHC.Platform
import Util
import MonadUtils (mapMaybeM)
......
......@@ -31,7 +31,7 @@ import StgCmmHeap
import StgCmmProf ( costCentreFrom )
import DynFlags
import Platform
import GHC.Platform
import BasicTypes
import BlockId
import MkGraph
......
......@@ -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 )
......
......@@ -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 )
......
......@@ -49,7 +49,7 @@ import SrcLoc
import Outputable
import FastString
import DynFlags
import Platform
import GHC.Platform
import OrdList
import Pair
import Util
......
......@@ -607,7 +607,6 @@ Library
Reg
RegClass
PIC
Platform
CPrim
X86.Regs
X86.RegInfo
......
......@@ -33,7 +33,7 @@ import StgCmmLayout ( ArgRep(..) )
import SMRep
import DynFlags
import Outputable
import Platform
import GHC.Platform
import Util
import Unique
import UniqDSet
......
......@@ -23,7 +23,7 @@ import GHCi.RemoteTypes
import BasicTypes
import DynFlags
import Outputable
import Platform
import GHC.Platform
import Name
import MkId
import Id
......
......@@ -50,7 +50,7 @@ import SrcLoc
import qualified Maybes
import UniqDSet
import FastString
import Platform
import GHC.Platform
import SysTools
import FileCleanup
......
......@@ -42,7 +42,7 @@ import FastMutInt
import Unique
import Outputable
import NameCache
import Platform
import GHC.Platform
import FastString
import Constants
import Util
......
......@@ -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 )
......
......@@ -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
......
......@@ -18,7 +18,7 @@ import BlockId
import CLabel
import Cmm
import DynFlags
import Platform
import GHC.Platform
import FastString
import Outputable
......
......@@ -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 )
......
......@@ -44,7 +44,7 @@ import GhcPrelude
import {-# SOURCE #-} DynFlags
import Outputable
import Platform
import GHC.Platform
import System.FilePath
import Binary
import Util
......
......@@ -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
......
......@@ -248,7 +248,7 @@ module DynFlags (
import GhcPrelude
import Platform
import GHC.Platform
import PlatformConstants
import Module
import PackageConfig
......
module DynFlags where
import GhcPrelude
import Platform
import GHC.Platform
data DynFlags
data DumpFlag
......
......@@ -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
......
......@@ -149,7 +149,7 @@ import DynamicLoading ( initializePlugins )
import DynFlags
import ErrUtils
import Platform ( platformOS, osSubsectionsViaSymbols )
import GHC.Platform ( platformOS, osSubsectionsViaSymbols )
import Outputable
import NameEnv
......
......@@ -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 )
......
......@@ -77,7 +77,7 @@ import UniqSet
import Module
import Util
import Panic
import Platform
import GHC.Platform
import Outputable
import Maybes
......
......@@ -64,7 +64,7 @@ import CliOption
import Fingerprint
import FileSettings
import GhcNameVersion
import Platform
import GHC.Platform
import PlatformConstants
import ToolSettings
......
......@@ -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
......
......@@ -45,7 +45,7 @@ import Packages
import Config
import Outputable
import ErrUtils
import Platform
import GHC.Platform
import Util
import DynFlags
import Fingerprint
......
......@@ -17,7 +17,7 @@ import AsmUtils
import ErrUtils
import DynFlags
import Packages
import Platform
import GHC.Platform
import Outputable
import SrcLoc ( noSrcSpan )
import Module
......
......@@ -19,7 +19,7 @@ import Data.IORef
import System.IO
import Platform
import GHC.Platform
import GhcPrelude
import SysTools.Process
......
......@@ -13,7 +13,7 @@ import ErrUtils
import HscTypes
import DynFlags
import Outputable
import Platform
import GHC.Platform
import Util
import Data.Char
......
......@@ -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
......
......@@ -12,7 +12,7 @@ import Debug
import DynFlags
import Module
import Outputable
import Platform
import GHC.Platform
import Unique
import UniqSupply
......
......@@ -7,7 +7,7 @@ import GhcPrelude
import AsmUtils
import FastString
import Platform
import GHC.Platform
import Outputable
import Reg
......
......@@ -30,7 +30,7 @@ import CmmExpr ( GlobalReg(..) )
import Encoding
import FastString
import Outputable
import Platform
import GHC.Platform
import Unique
import Reg
import SrcLoc
......
......@@ -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.
......
......@@ -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
......
......@@ -41,7 +41,7 @@ import Format
import RegClass
import Reg
import TargetReg
import Platform
import GHC.Platform
-- Our intermediate code:
import BlockId
......
......@@ -43,7 +43,7 @@ import CmmInfo
import FastString
import CLabel
import Outputable
import Platform
import GHC.Platform
import UniqFM (listToUFM, lookupUFM)
import UniqSupply
......
......@@ -30,7 +30,7 @@ import CLabel
import PprCmmExpr ()
import Unique ( pprUniqueAlways, getUnique )
import Platform
import GHC.Platform
import FastString
import Outputable
import DynFlags
......
......@@ -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 )
......
......@@ -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 )
......
......@@ -21,7 +21,7 @@ import Reg
import Bag
import DynFlags
import Outputable
import Platform
import GHC.Platform
import UniqFM
import UniqSet
import UniqSupply
......
......@@ -23,7 +23,7 @@ import UniqFM
import UniqSet
import UniqSupply
import Outputable
import Platform
import GHC.Platform
import Data.List
import Data.Maybe
......
......@@ -41,7 +41,7 @@ import UniqFM
import Unique
import State
import Outputable
import Platform
import GHC.Platform
import Hoopl.Collections
import Data.List
......
......@@ -28,7 +28,7 @@ import UniqFM
import UniqSet
import Digraph (flattenSCCs)
import Outputable
import Platform
import GHC.Platform
import State
import CFG
......
......@@ -16,7 +16,7 @@ import Reg
import GraphBase
import UniqSet
import Platform
import GHC.Platform
import Panic
-- trivColorable ---------------------------------------------------------------
......
......@@ -16,7 +16,7 @@ import RegClass
import DynFlags
import Panic
import Platform
import GHC.Platform
-- -----------------------------------------------------------------------------
-- The free register set
......
......@@ -130,7 +130,7 @@ import UniqSet
import UniqFM
import UniqSupply
import Outputable
import Platform
import GHC.Platform
import Data.Maybe
import Data.List
......
......@@ -9,7 +9,7 @@ import RegClass
import Reg
import Outputable
import Platform
import GHC.Platform
import Data.Word
import Data.Bits
......
......@@ -11,7 +11,7 @@ import Reg
import CodeGen.Platform
import Outputable
import Platform
import GHC.Platform
import Data.Word
import Data.Bits
......
......@@ -9,7 +9,7 @@ import X86.Regs
import RegClass
import Reg
import Panic
import Platform
import GHC.Platform
import Data.Word
import Data.Bits
......
......@@ -9,7 +9,7 @@ import X86.Regs
import RegClass
import Reg
import Panic
import Platform
import GHC.Platform
import Data.Word
import Data.Bits
......
......@@ -51,7 +51,7 @@ import Digraph
import DynFlags
import MonadUtils
import Outputable
import Platform
import GHC.Platform
import UniqSet
import UniqFM
import UniqSupply
......
......@@ -59,7 +59,7 @@ import DynFlags
import FastString
import OrdList
import Outputable
import Platform
import GHC.Platform
import Control.Monad ( mapAndUnzipM )
......
......@@ -26,7 +26,7 @@ import CodeGen.Platform
import DynFlags
import Cmm
import PprCmmExpr ()
import Platform
import GHC.Platform
import Outputable
import OrdList
......
......@@ -46,7 +46,7 @@ import DynFlags
import Cmm
import FastString
import Outputable
import Platform
import GHC.Platform
-- | Register or immediate
......
......@@ -47,7 +47,7 @@ import Hoopl.Collections
import Unique ( pprUniqueAlways )
import Outputable
import Platform
import GHC.Platform
import FastString
-- -----------------------------------------------------------------------------
......
......@@ -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
......
......@@ -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
......
......@@ -34,7 +34,7 @@ import CodeGen.Platform
import Cmm
import FastString
import Outputable
import Platform
import GHC.Platform
import BasicTypes (Alignment)
import CLabel
......
......@@ -42,7 +42,7 @@ import Cmm hiding (topInfoTable)
import BlockId
import CLabel
import Unique ( pprUniqueAlways )
import Platform
import GHC.Platform
import FastString
import Outputable
......
......@@ -15,7 +15,7 @@ import Format
import Reg
import Outputable
import Platform
import GHC.Platform