diff options
Diffstat (limited to 'compiler/main')
38 files changed, 73 insertions, 3 deletions
diff --git a/compiler/main/Annotations.hs b/compiler/main/Annotations.hs index 052b0615e7..f6d5a1cb12 100644 --- a/compiler/main/Annotations.hs +++ b/compiler/main/Annotations.hs @@ -17,6 +17,8 @@ module Annotations ( deserializeAnns ) where +import GhcPrelude + import Binary import Module ( Module ) import Name diff --git a/compiler/main/Ar.hs b/compiler/main/Ar.hs index d3b50f39dd..51655c023c 100644 --- a/compiler/main/Ar.hs +++ b/compiler/main/Ar.hs @@ -32,6 +32,8 @@ module Ar ) where +import GhcPrelude + import Data.Semigroup (Semigroup) import Data.List (mapAccumL, isPrefixOf) import Data.Monoid ((<>)) diff --git a/compiler/main/CmdLineParser.hs b/compiler/main/CmdLineParser.hs index e6ecd17bdf..49fbd8fc07 100644 --- a/compiler/main/CmdLineParser.hs +++ b/compiler/main/CmdLineParser.hs @@ -25,6 +25,8 @@ module CmdLineParser #include "HsVersions.h" +import GhcPrelude + import Util import Outputable import Panic diff --git a/compiler/main/CodeOutput.hs b/compiler/main/CodeOutput.hs index 34cada3ff9..fc854e40b7 100644 --- a/compiler/main/CodeOutput.hs +++ b/compiler/main/CodeOutput.hs @@ -10,6 +10,8 @@ module CodeOutput( codeOutput, outputForeignStubs ) where #include "HsVersions.h" +import GhcPrelude + import AsmCodeGen ( nativeCodeGen ) import LlvmCodeGen ( llvmCodeGen ) diff --git a/compiler/main/Constants.hs b/compiler/main/Constants.hs index 3dafbac996..06d93128e7 100644 --- a/compiler/main/Constants.hs +++ b/compiler/main/Constants.hs @@ -6,6 +6,8 @@ module Constants (module Constants) where +import GhcPrelude + import Config hiVersion :: Integer diff --git a/compiler/main/DriverMkDepend.hs b/compiler/main/DriverMkDepend.hs index b346f661c8..741104596a 100644 --- a/compiler/main/DriverMkDepend.hs +++ b/compiler/main/DriverMkDepend.hs @@ -14,6 +14,8 @@ module DriverMkDepend ( #include "HsVersions.h" +import GhcPrelude + import qualified GHC import GhcMonad import DynFlags diff --git a/compiler/main/DriverPhases.hs b/compiler/main/DriverPhases.hs index a59c452788..177c15ec8e 100644 --- a/compiler/main/DriverPhases.hs +++ b/compiler/main/DriverPhases.hs @@ -40,6 +40,8 @@ module DriverPhases ( #include "HsVersions.h" +import GhcPrelude + import {-# SOURCE #-} DynFlags import Outputable import Platform diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index a90de8153d..4f2cc4c794 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -35,6 +35,8 @@ module DriverPipeline ( #include "HsVersions.h" +import GhcPrelude + import AsmUtils import PipelineMonad import Packages diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index ec014e8ab1..0bc54be7d1 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -165,6 +165,8 @@ module DynFlags ( #include "HsVersions.h" +import GhcPrelude + import Platform import PlatformConstants import Module diff --git a/compiler/main/DynFlags.hs-boot b/compiler/main/DynFlags.hs-boot index 5fd80fcd82..a8efb6013d 100644 --- a/compiler/main/DynFlags.hs-boot +++ b/compiler/main/DynFlags.hs-boot @@ -1,6 +1,6 @@ - module DynFlags where +import GhcPrelude import Platform data DynFlags diff --git a/compiler/main/DynamicLoading.hs b/compiler/main/DynamicLoading.hs index ffdce28762..7e45146fc0 100644 --- a/compiler/main/DynamicLoading.hs +++ b/compiler/main/DynamicLoading.hs @@ -24,6 +24,8 @@ module DynamicLoading ( #endif ) where +import GhcPrelude + #if defined(GHCI) import Linker ( linkModule, getHValue ) import GHCi ( wormhole ) diff --git a/compiler/main/Elf.hs b/compiler/main/Elf.hs index 599d4d9160..648f20aad9 100644 --- a/compiler/main/Elf.hs +++ b/compiler/main/Elf.hs @@ -14,6 +14,8 @@ module Elf ( makeElfNote ) where +import GhcPrelude + import AsmUtils import Exception import DynFlags diff --git a/compiler/main/ErrUtils.hs b/compiler/main/ErrUtils.hs index 5883fe14da..5010a29513 100644 --- a/compiler/main/ErrUtils.hs +++ b/compiler/main/ErrUtils.hs @@ -57,6 +57,8 @@ module ErrUtils ( #include "HsVersions.h" +import GhcPrelude + import Bag import Exception import Outputable diff --git a/compiler/main/ErrUtils.hs-boot b/compiler/main/ErrUtils.hs-boot index bbbf74e197..6f180af546 100644 --- a/compiler/main/ErrUtils.hs-boot +++ b/compiler/main/ErrUtils.hs-boot @@ -1,5 +1,6 @@ module ErrUtils where +import GhcPrelude import Outputable (SDoc, PrintUnqualified ) import SrcLoc (SrcSpan) import Json diff --git a/compiler/main/FileCleanup.hs b/compiler/main/FileCleanup.hs index 22a492aa04..5150b81fd1 100644 --- a/compiler/main/FileCleanup.hs +++ b/compiler/main/FileCleanup.hs @@ -7,6 +7,8 @@ module FileCleanup , withSystemTempDirectory, withTempDirectory ) where +import GhcPrelude + import DynFlags import ErrUtils import Outputable diff --git a/compiler/main/Finder.hs b/compiler/main/Finder.hs index d1bf1c8073..2bfea5d37a 100644 --- a/compiler/main/Finder.hs +++ b/compiler/main/Finder.hs @@ -33,6 +33,8 @@ module Finder ( #include "HsVersions.h" +import GhcPrelude + import Module import HscTypes import Packages diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs index 9ed8aaa989..63c15518b5 100644 --- a/compiler/main/GHC.hs +++ b/compiler/main/GHC.hs @@ -283,6 +283,8 @@ module GHC ( #include "HsVersions.h" +import GhcPrelude hiding (init) + import ByteCodeTypes import InteractiveEval import InteractiveEvalTypes @@ -361,8 +363,6 @@ import System.Exit ( exitWith, ExitCode(..) ) import Exception import Data.IORef import System.FilePath -import System.IO -import Prelude hiding (init) -- %************************************************************************ diff --git a/compiler/main/GhcMake.hs b/compiler/main/GhcMake.hs index 724ced2474..73a7157c10 100644 --- a/compiler/main/GhcMake.hs +++ b/compiler/main/GhcMake.hs @@ -33,6 +33,8 @@ module GhcMake( #include "HsVersions.h" +import GhcPrelude + import qualified Linker ( unload ) import DriverPhases diff --git a/compiler/main/GhcMonad.hs b/compiler/main/GhcMonad.hs index 2673dd8e45..f72cacc7ef 100644 --- a/compiler/main/GhcMonad.hs +++ b/compiler/main/GhcMonad.hs @@ -23,6 +23,8 @@ module GhcMonad ( WarnErrLogger, defaultWarnErrLogger ) where +import GhcPrelude + import MonadUtils import HscTypes import DynFlags diff --git a/compiler/main/HeaderInfo.hs b/compiler/main/HeaderInfo.hs index be38e53f3d..3158335435 100644 --- a/compiler/main/HeaderInfo.hs +++ b/compiler/main/HeaderInfo.hs @@ -18,6 +18,8 @@ module HeaderInfo ( getImports #include "HsVersions.h" +import GhcPrelude + import HscTypes import Parser ( parseHeader ) import Lexer diff --git a/compiler/main/Hooks.hs b/compiler/main/Hooks.hs index 2e228d5a9a..f9d420ab61 100644 --- a/compiler/main/Hooks.hs +++ b/compiler/main/Hooks.hs @@ -23,6 +23,8 @@ module Hooks ( Hooks , createIservProcessHook ) where +import GhcPrelude + import DynFlags import PipelineMonad import HscTypes diff --git a/compiler/main/Hooks.hs-boot b/compiler/main/Hooks.hs-boot index 280de32063..f0246ef941 100644 --- a/compiler/main/Hooks.hs-boot +++ b/compiler/main/Hooks.hs-boot @@ -1,5 +1,7 @@ module Hooks where +import GhcPrelude () + data Hooks emptyHooks :: Hooks diff --git a/compiler/main/HscMain.hs b/compiler/main/HscMain.hs index 6613c9861f..f7a7933db4 100644 --- a/compiler/main/HscMain.hs +++ b/compiler/main/HscMain.hs @@ -82,6 +82,8 @@ module HscMain , hscAddSptEntries ) where +import GhcPrelude + import Data.Data hiding (Fixity, TyCon) import Id import GHCi ( addSptEntry ) diff --git a/compiler/main/HscStats.hs b/compiler/main/HscStats.hs index 598cb5be0a..48b8eccaca 100644 --- a/compiler/main/HscStats.hs +++ b/compiler/main/HscStats.hs @@ -8,6 +8,8 @@ module HscStats ( ppSourceStats ) where +import GhcPrelude + import Bag import HsSyn import Outputable diff --git a/compiler/main/HscTypes.hs b/compiler/main/HscTypes.hs index 2d8e19cc39..b7baa57dff 100644 --- a/compiler/main/HscTypes.hs +++ b/compiler/main/HscTypes.hs @@ -146,6 +146,8 @@ module HscTypes ( #include "HsVersions.h" +import GhcPrelude + import ByteCodeTypes import InteractiveEvalTypes ( Resume ) import GHCi.Message ( Pipe ) diff --git a/compiler/main/InteractiveEval.hs b/compiler/main/InteractiveEval.hs index 88d5dbe57d..c6b5e22367 100644 --- a/compiler/main/InteractiveEval.hs +++ b/compiler/main/InteractiveEval.hs @@ -40,6 +40,8 @@ module InteractiveEval ( #include "HsVersions.h" +import GhcPrelude + import InteractiveEvalTypes import GHCi diff --git a/compiler/main/InteractiveEvalTypes.hs b/compiler/main/InteractiveEvalTypes.hs index e45ef6dde3..3bc043f88b 100644 --- a/compiler/main/InteractiveEvalTypes.hs +++ b/compiler/main/InteractiveEvalTypes.hs @@ -12,6 +12,8 @@ module InteractiveEvalTypes ( BreakInfo(..) ) where +import GhcPrelude + import GHCi.RemoteTypes import GHCi.Message (EvalExpr, ResumeContext) import Id diff --git a/compiler/main/PackageConfig.hs b/compiler/main/PackageConfig.hs index 23f37da64d..b003f5fa5a 100644 --- a/compiler/main/PackageConfig.hs +++ b/compiler/main/PackageConfig.hs @@ -30,6 +30,8 @@ module PackageConfig ( #include "HsVersions.h" +import GhcPrelude + import GHC.PackageDb import Data.Version diff --git a/compiler/main/Packages.hs b/compiler/main/Packages.hs index ca77c30099..46ca4064fb 100644 --- a/compiler/main/Packages.hs +++ b/compiler/main/Packages.hs @@ -62,6 +62,8 @@ where #include "HsVersions.h" +import GhcPrelude + import GHC.PackageDb import PackageConfig import DynFlags diff --git a/compiler/main/Packages.hs-boot b/compiler/main/Packages.hs-boot index 0ed59db92b..80b9ebf8ae 100644 --- a/compiler/main/Packages.hs-boot +++ b/compiler/main/Packages.hs-boot @@ -1,4 +1,5 @@ module Packages where +import GhcPrelude import {-# SOURCE #-} DynFlags(DynFlags) import {-# SOURCE #-} Module(ComponentId, UnitId, InstalledUnitId) data PackageState diff --git a/compiler/main/PipelineMonad.hs b/compiler/main/PipelineMonad.hs index c8345276fa..bbb1a17b65 100644 --- a/compiler/main/PipelineMonad.hs +++ b/compiler/main/PipelineMonad.hs @@ -9,6 +9,8 @@ module PipelineMonad ( , getPipeEnv, getPipeState, setDynFlags, setModLocation, setForeignOs ) where +import GhcPrelude + import MonadUtils import Outputable import DynFlags diff --git a/compiler/main/PlatformConstants.hs b/compiler/main/PlatformConstants.hs index c9a4072206..96b0f70e6d 100644 --- a/compiler/main/PlatformConstants.hs +++ b/compiler/main/PlatformConstants.hs @@ -10,6 +10,8 @@ module PlatformConstants (PlatformConstants(..)) where +import GhcPrelude + -- Produced by deriveConstants #include "GHCConstantsHaskellType.hs" diff --git a/compiler/main/Plugins.hs b/compiler/main/Plugins.hs index 273bf7abd9..19ea2ed550 100644 --- a/compiler/main/Plugins.hs +++ b/compiler/main/Plugins.hs @@ -4,6 +4,8 @@ module Plugins ( defaultPlugin ) where +import GhcPrelude + import CoreMonad ( CoreToDo, CoreM ) import TcRnTypes ( TcPlugin ) import GhcMonad diff --git a/compiler/main/PprTyThing.hs b/compiler/main/PprTyThing.hs index 86098a5e7f..35741b877d 100644 --- a/compiler/main/PprTyThing.hs +++ b/compiler/main/PprTyThing.hs @@ -19,6 +19,8 @@ module PprTyThing ( #include "HsVersions.h" +import GhcPrelude + import Type ( TyThing(..) ) import IfaceSyn ( ShowSub(..), ShowHowMuch(..), AltPpr(..) , showToHeader, pprIfaceDecl ) diff --git a/compiler/main/StaticPtrTable.hs b/compiler/main/StaticPtrTable.hs index ff0d47e4b1..23d02f81ec 100644 --- a/compiler/main/StaticPtrTable.hs +++ b/compiler/main/StaticPtrTable.hs @@ -122,6 +122,8 @@ Here is a running example: in upsweep after we have compiled the module (see GhcMake.upsweep'). -} +import GhcPrelude + import CLabel import CoreSyn import CoreUtils (collectMakeStaticArgs) diff --git a/compiler/main/SysTools.hs b/compiler/main/SysTools.hs index cb2840b6ff..96a6f1764c 100644 --- a/compiler/main/SysTools.hs +++ b/compiler/main/SysTools.hs @@ -51,6 +51,8 @@ module SysTools ( #include "HsVersions.h" +import GhcPrelude + import Module import Packages import Config diff --git a/compiler/main/SysTools/Terminal.hs b/compiler/main/SysTools/Terminal.hs index b3bf6e651d..cd33bfb397 100644 --- a/compiler/main/SysTools/Terminal.hs +++ b/compiler/main/SysTools/Terminal.hs @@ -2,6 +2,8 @@ {-# LANGUAGE ScopedTypeVariables #-} module SysTools.Terminal (stderrSupportsAnsiColors) where #if defined MIN_VERSION_terminfo +import GhcPrelude + import Control.Exception (catch) import Data.Maybe (fromMaybe) import System.Console.Terminfo (SetupTermError, Terminal, getCapability, diff --git a/compiler/main/TidyPgm.hs b/compiler/main/TidyPgm.hs index 4b9fbae599..a0d2fb81b4 100644 --- a/compiler/main/TidyPgm.hs +++ b/compiler/main/TidyPgm.hs @@ -12,6 +12,8 @@ module TidyPgm ( #include "HsVersions.h" +import GhcPrelude + import TcRnTypes import DynFlags import CoreSyn |