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 ...@@ -61,7 +61,7 @@ import BasicTypes
import Binary import Binary
import Constants import Constants
import DynFlags import DynFlags
import Platform import GHC.Platform
import UniqFM import UniqFM
import Util import Util
......
...@@ -124,7 +124,7 @@ import CostCentre ...@@ -124,7 +124,7 @@ import CostCentre
import Outputable import Outputable
import FastString import FastString
import DynFlags import DynFlags
import Platform import GHC.Platform
import UniqSet import UniqSet
import Util import Util
import PprCore ( {- instances -} ) import PprCore ( {- instances -} )
......
...@@ -16,7 +16,7 @@ import Hoopl.Label ...@@ -16,7 +16,7 @@ import Hoopl.Label
import Hoopl.Collections import Hoopl.Collections
import Hoopl.Dataflow import Hoopl.Dataflow
import Module import Module
import Platform import GHC.Platform
import Digraph import Digraph
import CLabel import CLabel
import PprCmmDecl () import PprCmmDecl ()
......
...@@ -13,7 +13,7 @@ import Cmm (Convention(..)) ...@@ -13,7 +13,7 @@ import Cmm (Convention(..))
import PprCmm () import PprCmm ()
import DynFlags import DynFlags
import Platform import GHC.Platform
import Outputable import Outputable
-- Calculate the 'GlobalReg' or stack locations for function call -- Calculate the 'GlobalReg' or stack locations for function call
......
...@@ -45,7 +45,7 @@ import Stream (Stream) ...@@ -45,7 +45,7 @@ import Stream (Stream)
import qualified Stream import qualified Stream
import Hoopl.Collections import Hoopl.Collections
import Platform import GHC.Platform
import Maybes import Maybes
import DynFlags import DynFlags
import Panic import Panic
......
...@@ -25,7 +25,7 @@ import DynFlags ...@@ -25,7 +25,7 @@ import DynFlags
import Util import Util
import Outputable import Outputable
import Platform import GHC.Platform
import Data.Bits import Data.Bits
import Data.Maybe import Data.Maybe
......
...@@ -237,7 +237,7 @@ import CmmMonad ...@@ -237,7 +237,7 @@ import CmmMonad
import CostCentre import CostCentre
import ForeignCall import ForeignCall
import Module import Module
import Platform import GHC.Platform
import Literal import Literal
import Unique import Unique
import UniqFM import UniqFM
......
...@@ -26,7 +26,7 @@ import ErrUtils ...@@ -26,7 +26,7 @@ import ErrUtils
import HscTypes import HscTypes
import Control.Monad import Control.Monad
import Outputable import Outputable
import Platform import GHC.Platform
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
-- | Top level driver for C-- pipeline -- | Top level driver for C-- pipeline
......
...@@ -23,7 +23,7 @@ import Data.List (sortBy) ...@@ -23,7 +23,7 @@ import Data.List (sortBy)
import Maybes import Maybes
import Control.Monad import Control.Monad
import Outputable import Outputable
import Platform import GHC.Platform
import UniqSupply import UniqSupply
import Hoopl.Block import Hoopl.Block
import Hoopl.Collections import Hoopl.Collections
......
...@@ -14,7 +14,7 @@ import Hoopl.Label ...@@ -14,7 +14,7 @@ import Hoopl.Label
import Hoopl.Collections import Hoopl.Collections
import Hoopl.Graph import Hoopl.Graph
import CodeGen.Platform import CodeGen.Platform
import Platform (isARM, platformArch) import GHC.Platform (isARM, platformArch)
import DynFlags import DynFlags
import Unique import Unique
......
...@@ -44,7 +44,7 @@ import CPrim ...@@ -44,7 +44,7 @@ import CPrim
import DynFlags import DynFlags
import FastString import FastString
import Outputable import Outputable
import Platform import GHC.Platform
import UniqSet import UniqSet
import UniqFM import UniqFM
import Unique import Unique
......
...@@ -49,7 +49,7 @@ import GhcPrelude ...@@ -49,7 +49,7 @@ import GhcPrelude
import BasicTypes( ConTagZ ) import BasicTypes( ConTagZ )
import DynFlags import DynFlags
import Outputable import Outputable
import Platform import GHC.Platform
import FastString import FastString
import Data.Word import Data.Word
......
...@@ -6,7 +6,7 @@ module CodeGen.Platform ...@@ -6,7 +6,7 @@ module CodeGen.Platform
import GhcPrelude import GhcPrelude
import CmmExpr import CmmExpr
import Platform import GHC.Platform
import Reg import Reg
import qualified CodeGen.Platform.ARM as ARM import qualified CodeGen.Platform.ARM as ARM
......
...@@ -44,7 +44,7 @@ import RepType (countConRepArgs) ...@@ -44,7 +44,7 @@ import RepType (countConRepArgs)
import Literal import Literal
import PrelInfo import PrelInfo
import Outputable import Outputable
import Platform import GHC.Platform
import Util import Util
import MonadUtils (mapMaybeM) import MonadUtils (mapMaybeM)
......
...@@ -31,7 +31,7 @@ import StgCmmHeap ...@@ -31,7 +31,7 @@ import StgCmmHeap
import StgCmmProf ( costCentreFrom ) import StgCmmProf ( costCentreFrom )
import DynFlags import DynFlags
import Platform import GHC.Platform
import BasicTypes import BasicTypes
import BlockId import BlockId
import MkGraph import MkGraph
......
...@@ -53,7 +53,7 @@ import DynFlags ...@@ -53,7 +53,7 @@ import DynFlags
import Util import Util
import Pair import Pair
import Outputable import Outputable
import Platform import GHC.Platform
import FastString import FastString
import Name ( NamedThing(..), nameSrcSpan ) import Name ( NamedThing(..), nameSrcSpan )
import SrcLoc ( SrcSpan(..), realSrcLocSpan, mkRealSrcLoc ) import SrcLoc ( SrcSpan(..), realSrcLocSpan, mkRealSrcLoc )
......
...@@ -88,7 +88,7 @@ import FastString ...@@ -88,7 +88,7 @@ import FastString
import Maybes import Maybes
import ListSetOps ( minusList ) import ListSetOps ( minusList )
import BasicTypes ( Arity, isConLike ) import BasicTypes ( Arity, isConLike )
import Platform import GHC.Platform
import Util import Util
import Pair import Pair
import Data.ByteString ( ByteString ) import Data.ByteString ( ByteString )
......
...@@ -49,7 +49,7 @@ import SrcLoc ...@@ -49,7 +49,7 @@ import SrcLoc
import Outputable import Outputable
import FastString import FastString
import DynFlags import DynFlags
import Platform import GHC.Platform
import OrdList import OrdList
import Pair import Pair
import Util import Util
......
...@@ -607,7 +607,6 @@ Library ...@@ -607,7 +607,6 @@ Library
Reg Reg
RegClass RegClass
PIC PIC
Platform
CPrim CPrim
X86.Regs X86.Regs
X86.RegInfo X86.RegInfo
......
...@@ -33,7 +33,7 @@ import StgCmmLayout ( ArgRep(..) ) ...@@ -33,7 +33,7 @@ import StgCmmLayout ( ArgRep(..) )
import SMRep import SMRep
import DynFlags import DynFlags
import Outputable import Outputable
import Platform import GHC.Platform
import Util import Util
import Unique import Unique
import UniqDSet import UniqDSet
......
...@@ -23,7 +23,7 @@ import GHCi.RemoteTypes ...@@ -23,7 +23,7 @@ import GHCi.RemoteTypes
import BasicTypes import BasicTypes
import DynFlags import DynFlags
import Outputable import Outputable
import Platform import GHC.Platform
import Name import Name
import MkId import MkId
import Id import Id
......
...@@ -50,7 +50,7 @@ import SrcLoc ...@@ -50,7 +50,7 @@ import SrcLoc
import qualified Maybes import qualified Maybes
import UniqDSet import UniqDSet
import FastString import FastString
import Platform import GHC.Platform
import SysTools import SysTools
import FileCleanup import FileCleanup
......
...@@ -42,7 +42,7 @@ import FastMutInt ...@@ -42,7 +42,7 @@ import FastMutInt
import Unique import Unique
import Outputable import Outputable
import NameCache import NameCache
import Platform import GHC.Platform
import FastString import FastString
import Constants import Constants
import Util import Util
......
...@@ -49,7 +49,7 @@ import DynFlags ...@@ -49,7 +49,7 @@ import DynFlags
import FastString import FastString
import Cmm hiding ( succ ) import Cmm hiding ( succ )
import Outputable as Outp import Outputable as Outp
import Platform import GHC.Platform
import UniqFM import UniqFM
import Unique import Unique
import BufWrite ( BufHandle ) import BufWrite ( BufHandle )
......
...@@ -29,7 +29,7 @@ import FastString ...@@ -29,7 +29,7 @@ import FastString
import ForeignCall import ForeignCall
import Outputable hiding (panic, pprPanic) import Outputable hiding (panic, pprPanic)
import qualified Outputable import qualified Outputable
import Platform import GHC.Platform
import OrdList import OrdList
import UniqSupply import UniqSupply
import Unique import Unique
......
...@@ -18,7 +18,7 @@ import BlockId ...@@ -18,7 +18,7 @@ import BlockId
import CLabel import CLabel
import Cmm import Cmm
import DynFlags import DynFlags
import Platform import GHC.Platform
import FastString import FastString
import Outputable import Outputable
......
...@@ -14,7 +14,7 @@ module LlvmMangler ( llvmFixupAsm ) where ...@@ -14,7 +14,7 @@ module LlvmMangler ( llvmFixupAsm ) where
import GhcPrelude import GhcPrelude
import DynFlags ( DynFlags, targetPlatform ) import DynFlags ( DynFlags, targetPlatform )
import Platform ( platformArch, Arch(..) ) import GHC.Platform ( platformArch, Arch(..) )
import ErrUtils ( withTiming ) import ErrUtils ( withTiming )
import Outputable ( text ) import Outputable ( text )
......
...@@ -44,7 +44,7 @@ import GhcPrelude ...@@ -44,7 +44,7 @@ import GhcPrelude
import {-# SOURCE #-} DynFlags import {-# SOURCE #-} DynFlags
import Outputable import Outputable
import Platform import GHC.Platform
import System.FilePath import System.FilePath
import Binary import Binary
import Util import Util
......
...@@ -58,7 +58,7 @@ import Maybes ( expectJust ) ...@@ -58,7 +58,7 @@ import Maybes ( expectJust )
import SrcLoc import SrcLoc
import LlvmCodeGen ( llvmFixupAsm ) import LlvmCodeGen ( llvmFixupAsm )
import MonadUtils import MonadUtils
import Platform import GHC.Platform
import TcRnTypes import TcRnTypes
import ToolSettings import ToolSettings
import Hooks import Hooks
......
...@@ -248,7 +248,7 @@ module DynFlags ( ...@@ -248,7 +248,7 @@ module DynFlags (
import GhcPrelude import GhcPrelude
import Platform import GHC.Platform
import PlatformConstants import PlatformConstants
import Module import Module
import PackageConfig import PackageConfig
......
module DynFlags where module DynFlags where
import GhcPrelude import GhcPrelude
import Platform import GHC.Platform
data DynFlags data DynFlags
data DumpFlag data DumpFlag
......
...@@ -338,7 +338,7 @@ import SysTools.BaseDir ...@@ -338,7 +338,7 @@ import SysTools.BaseDir
import Annotations import Annotations
import Module import Module
import Panic import Panic
import Platform import GHC.Platform
import Bag ( listToBag ) import Bag ( listToBag )
import ErrUtils import ErrUtils
import MonadUtils import MonadUtils
......
...@@ -149,7 +149,7 @@ import DynamicLoading ( initializePlugins ) ...@@ -149,7 +149,7 @@ import DynamicLoading ( initializePlugins )
import DynFlags import DynFlags
import ErrUtils import ErrUtils
import Platform ( platformOS, osSubsectionsViaSymbols ) import GHC.Platform ( platformOS, osSubsectionsViaSymbols )
import Outputable import Outputable
import NameEnv import NameEnv
......
...@@ -201,7 +201,7 @@ import Bag ...@@ -201,7 +201,7 @@ import Bag
import Binary import Binary
import ErrUtils import ErrUtils
import NameCache import NameCache
import Platform import GHC.Platform
import Util import Util
import UniqDSet import UniqDSet
import GHC.Serialized ( Serialized ) import GHC.Serialized ( Serialized )
......
...@@ -77,7 +77,7 @@ import UniqSet ...@@ -77,7 +77,7 @@ import UniqSet
import Module import Module
import Util import Util
import Panic import Panic
import Platform import GHC.Platform
import Outputable import Outputable
import Maybes import Maybes
......
...@@ -64,7 +64,7 @@ import CliOption ...@@ -64,7 +64,7 @@ import CliOption
import Fingerprint import Fingerprint
import FileSettings import FileSettings
import GhcNameVersion import GhcNameVersion
import Platform import GHC.Platform
import PlatformConstants import PlatformConstants
import ToolSettings import ToolSettings
......
...@@ -135,7 +135,7 @@ import MkCore (mkStringExprFSWith) ...@@ -135,7 +135,7 @@ import MkCore (mkStringExprFSWith)
import Module import Module
import Name import Name
import Outputable import Outputable
import Platform import GHC.Platform
import PrelNames import PrelNames
import TcEnv (lookupGlobal) import TcEnv (lookupGlobal)
import Type import Type
......
...@@ -45,7 +45,7 @@ import Packages ...@@ -45,7 +45,7 @@ import Packages
import Config import Config
import Outputable import Outputable
import ErrUtils import ErrUtils
import Platform import GHC.Platform
import Util import Util
import DynFlags import DynFlags
import Fingerprint import Fingerprint
......
...@@ -17,7 +17,7 @@ import AsmUtils ...@@ -17,7 +17,7 @@ import AsmUtils
import ErrUtils import ErrUtils
import DynFlags import DynFlags
import Packages import Packages
import Platform import GHC.Platform
import Outputable import Outputable
import SrcLoc ( noSrcSpan ) import SrcLoc ( noSrcSpan )
import Module import Module
......
...@@ -19,7 +19,7 @@ import Data.IORef ...@@ -19,7 +19,7 @@ import Data.IORef
import System.IO import System.IO
import Platform import GHC.Platform
import GhcPrelude import GhcPrelude
import SysTools.Process import SysTools.Process
......
...@@ -13,7 +13,7 @@ import ErrUtils ...@@ -13,7 +13,7 @@ import ErrUtils
import HscTypes import HscTypes
import DynFlags import DynFlags
import Outputable import Outputable
import Platform import GHC.Platform
import Util import Util
import Data.Char import Data.Char
......
...@@ -60,7 +60,7 @@ import qualified RegAlloc.Graph.TrivColorable as Color ...@@ -60,7 +60,7 @@ import qualified RegAlloc.Graph.TrivColorable as Color
import AsmUtils import AsmUtils
import TargetReg import TargetReg
import Platform import GHC.Platform
import BlockLayout import BlockLayout
import Config import Config
import Instruction import Instruction
......
...@@ -12,7 +12,7 @@ import Debug ...@@ -12,7 +12,7 @@ import Debug
import DynFlags import DynFlags
import Module import Module
import Outputable import Outputable
import Platform import GHC.Platform
import Unique import Unique
import UniqSupply import UniqSupply
......
...@@ -7,7 +7,7 @@ import GhcPrelude ...@@ -7,7 +7,7 @@ import GhcPrelude
import AsmUtils import AsmUtils
import FastString import FastString
import Platform import GHC.Platform
import Outputable import Outputable
import Reg import Reg
......
...@@ -30,7 +30,7 @@ import CmmExpr ( GlobalReg(..) ) ...@@ -30,7 +30,7 @@ import CmmExpr ( GlobalReg(..) )
import Encoding import Encoding
import FastString import FastString
import Outputable import Outputable
import Platform import GHC.Platform
import Unique import Unique
import Reg import Reg
import SrcLoc import SrcLoc
......
...@@ -23,7 +23,7 @@ import Hoopl.Collections ...@@ -23,7 +23,7 @@ import Hoopl.Collections
import Hoopl.Label import Hoopl.Label
import DynFlags import DynFlags
import Cmm hiding (topInfoTable) import Cmm hiding (topInfoTable)
import Platform import GHC.Platform
-- | Holds a list of source and destination registers used by a -- | Holds a list of source and destination registers used by a
-- particular instruction. -- particular instruction.
......
...@@ -54,7 +54,7 @@ import qualified PPC.Regs as PPC ...@@ -54,7 +54,7 @@ import qualified PPC.Regs as PPC
import qualified X86.Instr as X86 import qualified X86.Instr as X86
import Platform import GHC.Platform
import Instruction import Instruction
import Reg import Reg
import NCGMonad import NCGMonad
......
...@@ -41,7 +41,7 @@ import Format ...@@ -41,7 +41,7 @@ import Format
import RegClass import RegClass
import Reg import Reg
import TargetReg import TargetReg
import Platform import GHC.Platform
-- Our intermediate code: -- Our intermediate code:
import BlockId import BlockId
......
...@@ -43,7 +43,7 @@ import CmmInfo ...@@ -43,7 +43,7 @@ import CmmInfo
import FastString import FastString
import CLabel import CLabel
import Outputable import Outputable
import Platform import GHC.Platform
import UniqFM (listToUFM, lookupUFM) import UniqFM (listToUFM, lookupUFM)
import UniqSupply import UniqSupply
......