Commit 240f5bf6 authored by Sylvain Henry's avatar Sylvain Henry Committed by Marge Bot

Modules: Driver (#13009)

submodule updates: nofib, haddock
parent be7068a6
...@@ -288,7 +288,7 @@ module GHC ( ...@@ -288,7 +288,7 @@ module GHC (
{- {-
ToDo: ToDo:
* inline bits of HscMain here to simplify layering: hscTcExpr, hscStmt. * inline bits of GHC.Driver.Main here to simplify layering: hscTcExpr, hscStmt.
-} -}
#include "HsVersions.h" #include "HsVersions.h"
...@@ -302,15 +302,15 @@ import GHC.Runtime.Interpreter ...@@ -302,15 +302,15 @@ import GHC.Runtime.Interpreter
import GHCi.RemoteTypes import GHCi.RemoteTypes
import PprTyThing ( pprFamInst ) import PprTyThing ( pprFamInst )
import HscMain import GHC.Driver.Main
import GhcMake import GHC.Driver.Make
import DriverPipeline ( compileOne' ) import GHC.Driver.Pipeline ( compileOne' )
import GhcMonad import GHC.Driver.Monad
import TcRnMonad ( finalSafeMode, fixSafeInstances, initIfaceTcRn ) import TcRnMonad ( finalSafeMode, fixSafeInstances, initIfaceTcRn )
import GHC.Iface.Load ( loadSysInterface ) import GHC.Iface.Load ( loadSysInterface )
import TcRnTypes import TcRnTypes
import Predicate import Predicate
import Packages import GHC.Driver.Packages
import NameSet import NameSet
import RdrName import RdrName
import GHC.Hs import GHC.Hs
...@@ -329,11 +329,11 @@ import FamInstEnv ( FamInst ) ...@@ -329,11 +329,11 @@ import FamInstEnv ( FamInst )
import SrcLoc import SrcLoc
import CoreSyn import CoreSyn
import GHC.Iface.Tidy import GHC.Iface.Tidy
import DriverPhases ( Phase(..), isHaskellSrcFilename ) import GHC.Driver.Phases ( Phase(..), isHaskellSrcFilename )
import Finder import GHC.Driver.Finder
import HscTypes import GHC.Driver.Types
import CmdLineParser import GHC.Driver.CmdLine
import DynFlags hiding (WarnReason(..)) import GHC.Driver.Session hiding (WarnReason(..))
import SysTools import SysTools
import SysTools.BaseDir import SysTools.BaseDir
import Annotations import Annotations
...@@ -1364,7 +1364,7 @@ getModuleSourceAndFlags mod = do ...@@ -1364,7 +1364,7 @@ getModuleSourceAndFlags mod = do
-- | Return module source as token stream, including comments. -- | Return module source as token stream, including comments.
-- --
-- The module must be in the module graph and its source must be available. -- The module must be in the module graph and its source must be available.
-- Throws a 'HscTypes.SourceError' on parse error. -- Throws a 'GHC.Driver.Types.SourceError' on parse error.
getTokenStream :: GhcMonad m => Module -> m [Located Token] getTokenStream :: GhcMonad m => Module -> m [Located Token]
getTokenStream mod = do getTokenStream mod = do
(sourceFile, source, flags) <- getModuleSourceAndFlags mod (sourceFile, source, flags) <- getModuleSourceAndFlags mod
......
...@@ -23,7 +23,7 @@ import GHC.ByteCode.Types ...@@ -23,7 +23,7 @@ import GHC.ByteCode.Types
import GHCi.RemoteTypes import GHCi.RemoteTypes
import GHC.Runtime.Interpreter import GHC.Runtime.Interpreter
import HscTypes import GHC.Driver.Types
import Name import Name
import NameSet import NameSet
import Literal import Literal
...@@ -31,7 +31,7 @@ import TyCon ...@@ -31,7 +31,7 @@ import TyCon
import FastString import FastString
import GHC.StgToCmm.Layout ( ArgRep(..) ) import GHC.StgToCmm.Layout ( ArgRep(..) )
import GHC.Runtime.Heap.Layout import GHC.Runtime.Heap.Layout
import DynFlags import GHC.Driver.Session
import Outputable import Outputable
import GHC.Platform import GHC.Platform
import Util import Util
......
...@@ -13,8 +13,8 @@ import GhcPrelude ...@@ -13,8 +13,8 @@ import GhcPrelude
import GHC.ByteCode.Types import GHC.ByteCode.Types
import GHC.Runtime.Interpreter import GHC.Runtime.Interpreter
import DynFlags import GHC.Driver.Session
import HscTypes import GHC.Driver.Types
import Name ( Name, getName ) import Name ( Name, getName )
import NameEnv import NameEnv
import DataCon ( DataCon, dataConRepArgTys, dataConIdentity ) import DataCon ( DataCon, dataConRepArgTys, dataConIdentity )
......
...@@ -27,7 +27,7 @@ import SizedSeq ...@@ -27,7 +27,7 @@ import SizedSeq
import GHC.Runtime.Interpreter import GHC.Runtime.Interpreter
import GHC.ByteCode.Types import GHC.ByteCode.Types
import HscTypes import GHC.Driver.Types
import Name import Name
import NameEnv import NameEnv
import PrimOp import PrimOp
......
...@@ -118,7 +118,7 @@ import GhcPrelude ...@@ -118,7 +118,7 @@ import GhcPrelude
import IdInfo import IdInfo
import BasicTypes import BasicTypes
import {-# SOURCE #-} GHC.Cmm.BlockId (BlockId, mkBlockId) import {-# SOURCE #-} GHC.Cmm.BlockId (BlockId, mkBlockId)
import Packages import GHC.Driver.Packages
import Module import Module
import Name import Name
import Unique import Unique
...@@ -126,7 +126,7 @@ import PrimOp ...@@ -126,7 +126,7 @@ import PrimOp
import CostCentre import CostCentre
import Outputable import Outputable
import FastString import FastString
import DynFlags import GHC.Driver.Session
import GHC.Platform import GHC.Platform
import UniqSet import UniqSet
import Util import Util
......
...@@ -12,7 +12,7 @@ import GHC.Runtime.Heap.Layout ...@@ -12,7 +12,7 @@ import GHC.Runtime.Heap.Layout
import GHC.Cmm (Convention(..)) import GHC.Cmm (Convention(..))
import GHC.Cmm.Ppr () -- For Outputable instances import GHC.Cmm.Ppr () -- For Outputable instances
import DynFlags import GHC.Driver.Session
import GHC.Platform import GHC.Platform
import Outputable import Outputable
......
...@@ -36,7 +36,7 @@ import GHC.Cmm.BlockId ...@@ -36,7 +36,7 @@ import GHC.Cmm.BlockId
import GHC.Cmm.CLabel import GHC.Cmm.CLabel
import GHC.Cmm.MachOp import GHC.Cmm.MachOp
import GHC.Cmm.Type import GHC.Cmm.Type
import DynFlags import GHC.Driver.Session
import Outputable (panic) import Outputable (panic)
import Unique import Unique
......
...@@ -31,7 +31,7 @@ import GHC.Cmm.Switch (SwitchTargets) ...@@ -31,7 +31,7 @@ import GHC.Cmm.Switch (SwitchTargets)
import GHC.Cmm.Dataflow.Block import GHC.Cmm.Dataflow.Block
import GHC.Cmm.Dataflow.Graph import GHC.Cmm.Dataflow.Graph
import GHC.Cmm.Dataflow.Label import GHC.Cmm.Dataflow.Label
import DynFlags import GHC.Driver.Session
import FastString import FastString
import ForeignCall import ForeignCall
import OrdList import OrdList
......
...@@ -46,7 +46,7 @@ import GHC.Cmm.Dataflow.Collections ...@@ -46,7 +46,7 @@ import GHC.Cmm.Dataflow.Collections
import GHC.Platform import GHC.Platform
import Maybes import Maybes
import DynFlags import GHC.Driver.Session
import ErrUtils (withTimingSilent) import ErrUtils (withTimingSilent)
import Panic import Panic
import UniqSupply import UniqSupply
......
...@@ -24,7 +24,7 @@ import Digraph ...@@ -24,7 +24,7 @@ import Digraph
import GHC.Cmm.CLabel import GHC.Cmm.CLabel
import GHC.Cmm import GHC.Cmm
import GHC.Cmm.Utils import GHC.Cmm.Utils
import DynFlags import GHC.Driver.Session
import Maybes import Maybes
import Outputable import Outputable
import GHC.Runtime.Heap.Layout import GHC.Runtime.Heap.Layout
......
...@@ -29,7 +29,7 @@ import Maybes ...@@ -29,7 +29,7 @@ import Maybes
import UniqFM import UniqFM
import Util import Util
import DynFlags import GHC.Driver.Session
import FastString import FastString
import Outputable hiding ( isEmpty ) import Outputable hiding ( isEmpty )
import qualified Data.Set as Set import qualified Data.Set as Set
......
...@@ -23,7 +23,7 @@ import GHC.Cmm.Liveness ...@@ -23,7 +23,7 @@ import GHC.Cmm.Liveness
import GHC.Cmm.Switch (switchTargetsToList) import GHC.Cmm.Switch (switchTargetsToList)
import GHC.Cmm.Ppr () -- For Outputable instances import GHC.Cmm.Ppr () -- For Outputable instances
import Outputable import Outputable
import DynFlags import GHC.Driver.Session
import Control.Monad (ap) import Control.Monad (ap)
......
...@@ -14,7 +14,7 @@ where ...@@ -14,7 +14,7 @@ where
import GhcPrelude import GhcPrelude
import DynFlags import GHC.Driver.Session
import GHC.Cmm.BlockId import GHC.Cmm.BlockId
import GHC.Cmm import GHC.Cmm
import GHC.Cmm.Ppr.Expr () -- For Outputable instances import GHC.Cmm.Ppr.Expr () -- For Outputable instances
......
...@@ -32,7 +32,7 @@ import GhcPrelude ...@@ -32,7 +32,7 @@ import GhcPrelude
import GHC.Cmm.Type import GHC.Cmm.Type
import Outputable import Outputable
import DynFlags import GHC.Driver.Session
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
-- MachOp -- MachOp
......
...@@ -17,7 +17,7 @@ import GhcPrelude ...@@ -17,7 +17,7 @@ import GhcPrelude
import Control.Monad import Control.Monad
import DynFlags import GHC.Driver.Session
import Lexer import Lexer
newtype PD a = PD { unPD :: DynFlags -> PState -> ParseResult a } newtype PD a = PD { unPD :: DynFlags -> PState -> ParseResult a }
......
...@@ -31,7 +31,7 @@ import GhcPrelude hiding (succ) ...@@ -31,7 +31,7 @@ import GhcPrelude hiding (succ)
import GHC.Platform.Regs import GHC.Platform.Regs
import GHC.Cmm.Expr import GHC.Cmm.Expr
import GHC.Cmm.Switch import GHC.Cmm.Switch
import DynFlags import GHC.Driver.Session
import FastString import FastString
import ForeignCall import ForeignCall
import Outputable import Outputable
......
...@@ -17,7 +17,7 @@ import GhcPrelude ...@@ -17,7 +17,7 @@ import GhcPrelude
import GHC.Cmm.Utils import GHC.Cmm.Utils
import GHC.Cmm import GHC.Cmm
import DynFlags import GHC.Driver.Session
import Util import Util
import Outputable import Outputable
......
...@@ -242,7 +242,7 @@ import Literal ...@@ -242,7 +242,7 @@ import Literal
import Unique import Unique
import UniqFM import UniqFM
import SrcLoc import SrcLoc
import DynFlags import GHC.Driver.Session
import ErrUtils import ErrUtils
import StringBuffer import StringBuffer
import FastString import FastString
......
...@@ -23,9 +23,9 @@ import GHC.Cmm.Sink ...@@ -23,9 +23,9 @@ import GHC.Cmm.Sink
import GHC.Cmm.Dataflow.Collections import GHC.Cmm.Dataflow.Collections
import UniqSupply import UniqSupply
import DynFlags import GHC.Driver.Session
import ErrUtils import ErrUtils
import HscTypes import GHC.Driver.Types
import Control.Monad import Control.Monad
import Outputable import Outputable
import GHC.Platform import GHC.Platform
......
...@@ -43,7 +43,7 @@ import GhcPrelude ...@@ -43,7 +43,7 @@ import GhcPrelude
import GHC.Cmm.Ppr.Expr import GHC.Cmm.Ppr.Expr
import GHC.Cmm import GHC.Cmm
import DynFlags import GHC.Driver.Session
import Outputable import Outputable
import FastString import FastString
......
...@@ -11,7 +11,7 @@ where ...@@ -11,7 +11,7 @@ where
import GhcPrelude hiding (last, unzip, succ, zip) import GhcPrelude hiding (last, unzip, succ, zip)
import DynFlags import GHC.Driver.Session
import GHC.Cmm.BlockId import GHC.Cmm.BlockId
import GHC.Cmm.CLabel import GHC.Cmm.CLabel
import GHC.Cmm import GHC.Cmm
......
...@@ -16,7 +16,7 @@ import GHC.Cmm.Dataflow.Graph ...@@ -16,7 +16,7 @@ import GHC.Cmm.Dataflow.Graph
import GHC.Platform.Regs import GHC.Platform.Regs
import GHC.Platform (isARM, platformArch) import GHC.Platform (isARM, platformArch)
import DynFlags import GHC.Driver.Session
import Unique import Unique
import UniqFM import UniqFM
......
...@@ -15,7 +15,7 @@ module GHC.Cmm.Switch ( ...@@ -15,7 +15,7 @@ module GHC.Cmm.Switch (
import GhcPrelude import GhcPrelude
import Outputable import Outputable
import DynFlags import GHC.Driver.Session
import GHC.Cmm.Dataflow.Label (Label) import GHC.Cmm.Dataflow.Label (Label)
import Data.Maybe import Data.Maybe
......
...@@ -12,7 +12,7 @@ import GHC.Cmm ...@@ -12,7 +12,7 @@ import GHC.Cmm
import GHC.Cmm.Utils import GHC.Cmm.Utils
import GHC.Cmm.Switch import GHC.Cmm.Switch
import UniqSupply import UniqSupply
import DynFlags import GHC.Driver.Session
import MonadUtils (concatMapM) import MonadUtils (concatMapM)
-- --
......
...@@ -31,7 +31,7 @@ where ...@@ -31,7 +31,7 @@ where
import GhcPrelude import GhcPrelude
import DynFlags import GHC.Driver.Session
import FastString import FastString
import Outputable import Outputable
......
...@@ -80,7 +80,7 @@ import GHC.Cmm ...@@ -80,7 +80,7 @@ import GHC.Cmm
import GHC.Cmm.BlockId import GHC.Cmm.BlockId
import GHC.Cmm.CLabel import GHC.Cmm.CLabel
import Outputable import Outputable
import DynFlags import GHC.Driver.Session
import Unique import Unique
import GHC.Platform.Regs import GHC.Platform.Regs
......
...@@ -40,7 +40,7 @@ import GHC.Cmm.Switch ...@@ -40,7 +40,7 @@ import GHC.Cmm.Switch
-- Utils -- Utils
import CPrim import CPrim
import DynFlags import GHC.Driver.Session
import FastString import FastString
import Outputable import Outputable
import GHC.Platform import GHC.Platform
......
...@@ -29,7 +29,7 @@ import GHC.Cmm.Dataflow.Collections ...@@ -29,7 +29,7 @@ import GHC.Cmm.Dataflow.Collections
import GHC.Cmm.Ppr import GHC.Cmm.Ppr
import BufWrite import BufWrite
import DynFlags import GHC.Driver.Session
import GHC.Platform ( platformArch, Arch(..) ) import GHC.Platform ( platformArch, Arch(..) )
import ErrUtils import ErrUtils
import FastString import FastString
......
...@@ -48,7 +48,7 @@ import GHC.CmmToLlvm.Regs ...@@ -48,7 +48,7 @@ import GHC.CmmToLlvm.Regs
import GHC.Cmm.CLabel import GHC.Cmm.CLabel
import GHC.Platform.Regs ( activeStgRegs ) import GHC.Platform.Regs ( activeStgRegs )
import DynFlags import GHC.Driver.Session
import FastString import FastString
import GHC.Cmm hiding ( succ ) import GHC.Cmm hiding ( succ )
import GHC.Cmm.Utils (regsOverlap) import GHC.Cmm.Utils (regsOverlap)
......
...@@ -25,7 +25,7 @@ import GHC.Cmm.Dataflow.Block ...@@ -25,7 +25,7 @@ import GHC.Cmm.Dataflow.Block
import GHC.Cmm.Dataflow.Graph import GHC.Cmm.Dataflow.Graph
import GHC.Cmm.Dataflow.Collections import GHC.Cmm.Dataflow.Collections
import DynFlags import GHC.Driver.Session
import FastString import FastString
import ForeignCall import ForeignCall
import Outputable hiding (panic, pprPanic) import Outputable hiding (panic, pprPanic)
......
...@@ -17,7 +17,7 @@ import GHC.CmmToLlvm.Base ...@@ -17,7 +17,7 @@ import GHC.CmmToLlvm.Base
import GHC.Cmm.BlockId import GHC.Cmm.BlockId
import GHC.Cmm.CLabel import GHC.Cmm.CLabel
import GHC.Cmm import GHC.Cmm
import DynFlags import GHC.Driver.Session
import GHC.Platform import GHC.Platform
import FastString import FastString
......
...@@ -13,7 +13,7 @@ module GHC.CmmToLlvm.Mangler ( llvmFixupAsm ) where ...@@ -13,7 +13,7 @@ module GHC.CmmToLlvm.Mangler ( llvmFixupAsm ) where
import GhcPrelude import GhcPrelude
import DynFlags ( DynFlags, targetPlatform ) import GHC.Driver.Session ( DynFlags, targetPlatform )
import GHC.Platform ( platformArch, Arch(..) ) import GHC.Platform ( platformArch, Arch(..) )
import ErrUtils ( withTiming ) import ErrUtils ( withTiming )
import Outputable ( text ) import Outputable ( text )
......
...@@ -16,7 +16,7 @@ import GhcPrelude ...@@ -16,7 +16,7 @@ import GhcPrelude
import GHC.Llvm import GHC.Llvm
import GHC.Cmm.Expr import GHC.Cmm.Expr
import DynFlags import GHC.Driver.Session
import FastString import FastString
import Outputable ( panic ) import Outputable ( panic )
import Unique import Unique
......
...@@ -22,7 +22,7 @@ import GHC.Runtime.Interpreter ...@@ -22,7 +22,7 @@ import GHC.Runtime.Interpreter
import GHCi.FFI import GHCi.FFI
import GHCi.RemoteTypes import GHCi.RemoteTypes
import BasicTypes import BasicTypes
import DynFlags import GHC.Driver.Session
import Outputable import Outputable
import GHC.Platform import GHC.Platform
import Name import Name
...@@ -30,7 +30,7 @@ import MkId ...@@ -30,7 +30,7 @@ import MkId
import Id import Id