diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2017-09-19 14:35:36 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-09-19 14:35:38 -0400 |
commit | f63bc730c7ea42ca6882f8078eb86be8bf1cc6ad (patch) | |
tree | 3273e53bf00121c2a2657a9fe997283300e997e9 /compiler | |
parent | 12a92fedf8b1997f2e26800929be117d54536b7e (diff) | |
download | haskell-f63bc730c7ea42ca6882f8078eb86be8bf1cc6ad.tar.gz |
compiler: introduce custom "GhcPrelude" Prelude
This switches the compiler/ component to get compiled with
-XNoImplicitPrelude and a `import GhcPrelude` is inserted in all
modules.
This is motivated by the upcoming "Prelude" re-export of
`Semigroup((<>))` which would cause lots of name clashes in every
modulewhich imports also `Outputable`
Reviewers: austin, goldfire, bgamari, alanz, simonmar
Reviewed By: bgamari
Subscribers: goldfire, rwbarton, thomie, mpickering, bgamari
Differential Revision: https://phabricator.haskell.org/D3989
Diffstat (limited to 'compiler')
484 files changed, 969 insertions, 43 deletions
diff --git a/compiler/backpack/BkpSyn.hs b/compiler/backpack/BkpSyn.hs index 842c0df49d..67905c6067 100644 --- a/compiler/backpack/BkpSyn.hs +++ b/compiler/backpack/BkpSyn.hs @@ -17,6 +17,8 @@ module BkpSyn ( LRenaming, Renaming(..), ) where +import GhcPrelude + import HsSyn import SrcLoc import Outputable diff --git a/compiler/backpack/DriverBkp.hs b/compiler/backpack/DriverBkp.hs index 4324e5763b..7784df2ff5 100644 --- a/compiler/backpack/DriverBkp.hs +++ b/compiler/backpack/DriverBkp.hs @@ -18,6 +18,8 @@ module DriverBkp (doBackpack) where #include "HsVersions.h" +import GhcPrelude + -- In a separate module because it hooks into the parser. import BkpSyn diff --git a/compiler/backpack/NameShape.hs b/compiler/backpack/NameShape.hs index 6ec243ef20..a1a0b1893b 100644 --- a/compiler/backpack/NameShape.hs +++ b/compiler/backpack/NameShape.hs @@ -12,6 +12,8 @@ module NameShape( #include "HsVersions.h" +import GhcPrelude + import Outputable import HscTypes import Module diff --git a/compiler/backpack/RnModIface.hs b/compiler/backpack/RnModIface.hs index e3da067ea4..1691706ad0 100644 --- a/compiler/backpack/RnModIface.hs +++ b/compiler/backpack/RnModIface.hs @@ -15,6 +15,8 @@ module RnModIface( #include "HsVersions.h" +import GhcPrelude + import SrcLoc import Outputable import HscTypes diff --git a/compiler/basicTypes/Avail.hs b/compiler/basicTypes/Avail.hs index 2d4a234db2..673d2fb342 100644 --- a/compiler/basicTypes/Avail.hs +++ b/compiler/basicTypes/Avail.hs @@ -26,6 +26,8 @@ module Avail ( ) where +import GhcPrelude + import Name import NameEnv import NameSet diff --git a/compiler/basicTypes/BasicTypes.hs b/compiler/basicTypes/BasicTypes.hs index 3e556a165b..d8c3eb739d 100644 --- a/compiler/basicTypes/BasicTypes.hs +++ b/compiler/basicTypes/BasicTypes.hs @@ -109,6 +109,8 @@ module BasicTypes( SpliceExplicitFlag(..) ) where +import GhcPrelude + import FastString import Outputable import SrcLoc ( Located,unLoc ) diff --git a/compiler/basicTypes/ConLike.hs b/compiler/basicTypes/ConLike.hs index aa6a362f68..f1fc03b332 100644 --- a/compiler/basicTypes/ConLike.hs +++ b/compiler/basicTypes/ConLike.hs @@ -26,6 +26,8 @@ module ConLike ( #include "HsVersions.h" +import GhcPrelude + import DataCon import PatSyn import Outputable diff --git a/compiler/basicTypes/DataCon.hs b/compiler/basicTypes/DataCon.hs index fa8e0a846f..9366c2ba11 100644 --- a/compiler/basicTypes/DataCon.hs +++ b/compiler/basicTypes/DataCon.hs @@ -61,6 +61,8 @@ module DataCon ( #include "HsVersions.h" +import GhcPrelude + import {-# SOURCE #-} MkId( DataConBoxer ) import Type import ForeignCall ( CType ) diff --git a/compiler/basicTypes/DataCon.hs-boot b/compiler/basicTypes/DataCon.hs-boot index 0938b9b963..95216b063c 100644 --- a/compiler/basicTypes/DataCon.hs-boot +++ b/compiler/basicTypes/DataCon.hs-boot @@ -1,4 +1,6 @@ module DataCon where + +import GhcPrelude import Var( TyVar, TyVarBinder ) import Name( Name, NamedThing ) import {-# SOURCE #-} TyCon( TyCon ) diff --git a/compiler/basicTypes/Demand.hs b/compiler/basicTypes/Demand.hs index 3a83cd9fd5..0b0da1349a 100644 --- a/compiler/basicTypes/Demand.hs +++ b/compiler/basicTypes/Demand.hs @@ -62,6 +62,8 @@ module Demand ( #include "HsVersions.h" +import GhcPrelude + import DynFlags import Outputable import Var ( Var ) diff --git a/compiler/basicTypes/FieldLabel.hs b/compiler/basicTypes/FieldLabel.hs index 8548fd2b72..d73dbd3ad3 100644 --- a/compiler/basicTypes/FieldLabel.hs +++ b/compiler/basicTypes/FieldLabel.hs @@ -69,6 +69,8 @@ module FieldLabel ( FieldLabelString , mkFieldLabelOccs ) where +import GhcPrelude + import OccName import Name diff --git a/compiler/basicTypes/Id.hs b/compiler/basicTypes/Id.hs index 05290776d0..7da61f8484 100644 --- a/compiler/basicTypes/Id.hs +++ b/compiler/basicTypes/Id.hs @@ -116,6 +116,8 @@ module Id ( #include "HsVersions.h" +import GhcPrelude + import DynFlags import CoreSyn ( CoreRule, isStableUnfolding, evaldUnfolding, Unfolding( NoUnfolding ) ) diff --git a/compiler/basicTypes/IdInfo.hs b/compiler/basicTypes/IdInfo.hs index bd6ec8f293..07f8814767 100644 --- a/compiler/basicTypes/IdInfo.hs +++ b/compiler/basicTypes/IdInfo.hs @@ -82,6 +82,8 @@ module IdInfo ( #include "HsVersions.h" +import GhcPrelude + import CoreSyn import Class diff --git a/compiler/basicTypes/IdInfo.hs-boot b/compiler/basicTypes/IdInfo.hs-boot index 0fabad3bbb..cacfe6af2e 100644 --- a/compiler/basicTypes/IdInfo.hs-boot +++ b/compiler/basicTypes/IdInfo.hs-boot @@ -1,4 +1,5 @@ module IdInfo where +import GhcPrelude import Outputable data IdInfo data IdDetails diff --git a/compiler/basicTypes/Lexeme.hs b/compiler/basicTypes/Lexeme.hs index dadc79ce21..74f6e6cd4a 100644 --- a/compiler/basicTypes/Lexeme.hs +++ b/compiler/basicTypes/Lexeme.hs @@ -27,6 +27,8 @@ module Lexeme ( ) where +import GhcPrelude + import FastString import Data.Char diff --git a/compiler/basicTypes/Literal.hs b/compiler/basicTypes/Literal.hs index 1c06350e83..f81f45224c 100644 --- a/compiler/basicTypes/Literal.hs +++ b/compiler/basicTypes/Literal.hs @@ -44,6 +44,8 @@ module Literal #include "HsVersions.h" +import GhcPrelude + import TysPrim import PrelNames import Type diff --git a/compiler/basicTypes/MkId.hs b/compiler/basicTypes/MkId.hs index a404e74e12..03ab04a24c 100644 --- a/compiler/basicTypes/MkId.hs +++ b/compiler/basicTypes/MkId.hs @@ -39,6 +39,8 @@ module MkId ( #include "HsVersions.h" +import GhcPrelude + import Rules import TysPrim import TysWiredIn diff --git a/compiler/basicTypes/Module.hs b/compiler/basicTypes/Module.hs index ab1f391e04..7fec612234 100644 --- a/compiler/basicTypes/Module.hs +++ b/compiler/basicTypes/Module.hs @@ -137,6 +137,8 @@ module Module unitModuleSet ) where +import GhcPrelude + import Config import Outputable import Unique diff --git a/compiler/basicTypes/Module.hs-boot b/compiler/basicTypes/Module.hs-boot index 734855a880..36e8abf997 100644 --- a/compiler/basicTypes/Module.hs-boot +++ b/compiler/basicTypes/Module.hs-boot @@ -1,4 +1,6 @@ module Module where + +import GhcPrelude import FastString data Module diff --git a/compiler/basicTypes/Name.hs b/compiler/basicTypes/Name.hs index d9326f1e88..2e352909ef 100644 --- a/compiler/basicTypes/Name.hs +++ b/compiler/basicTypes/Name.hs @@ -77,6 +77,8 @@ module Name ( module OccName ) where +import GhcPrelude + import {-# SOURCE #-} TyCoRep( TyThing ) import {-# SOURCE #-} PrelNames( starKindTyConKey, unicodeStarKindTyConKey ) diff --git a/compiler/basicTypes/Name.hs-boot b/compiler/basicTypes/Name.hs-boot index c4eeca4d68..54efe686ad 100644 --- a/compiler/basicTypes/Name.hs-boot +++ b/compiler/basicTypes/Name.hs-boot @@ -1,3 +1,5 @@ module Name where +import GhcPrelude () + data Name diff --git a/compiler/basicTypes/NameCache.hs b/compiler/basicTypes/NameCache.hs index 589c7c4e3b..20f3c15846 100644 --- a/compiler/basicTypes/NameCache.hs +++ b/compiler/basicTypes/NameCache.hs @@ -10,6 +10,8 @@ module NameCache , NameCache(..), OrigNameCache ) where +import GhcPrelude + import Module import Name import UniqSupply diff --git a/compiler/basicTypes/NameEnv.hs b/compiler/basicTypes/NameEnv.hs index cca771a33e..632ea7742e 100644 --- a/compiler/basicTypes/NameEnv.hs +++ b/compiler/basicTypes/NameEnv.hs @@ -33,6 +33,8 @@ module NameEnv ( #include "HsVersions.h" +import GhcPrelude + import Digraph import Name import UniqFM diff --git a/compiler/basicTypes/NameSet.hs b/compiler/basicTypes/NameSet.hs index 57de81cb44..3ec09c7ba2 100644 --- a/compiler/basicTypes/NameSet.hs +++ b/compiler/basicTypes/NameSet.hs @@ -33,6 +33,8 @@ module NameSet ( #include "HsVersions.h" +import GhcPrelude + import Name import UniqSet import Data.List (sortBy) diff --git a/compiler/basicTypes/OccName.hs b/compiler/basicTypes/OccName.hs index 0fa2749ba1..f6a66fd635 100644 --- a/compiler/basicTypes/OccName.hs +++ b/compiler/basicTypes/OccName.hs @@ -105,6 +105,8 @@ module OccName ( FastStringEnv, emptyFsEnv, lookupFsEnv, extendFsEnv, mkFsEnv ) where +import GhcPrelude + import Util import Unique import DynFlags diff --git a/compiler/basicTypes/OccName.hs-boot b/compiler/basicTypes/OccName.hs-boot index c6fa8850cf..31d77a44a9 100644 --- a/compiler/basicTypes/OccName.hs-boot +++ b/compiler/basicTypes/OccName.hs-boot @@ -1,3 +1,5 @@ module OccName where +import GhcPrelude () + data OccName diff --git a/compiler/basicTypes/PatSyn.hs b/compiler/basicTypes/PatSyn.hs index d59810b5e1..5a74a5b68a 100644 --- a/compiler/basicTypes/PatSyn.hs +++ b/compiler/basicTypes/PatSyn.hs @@ -24,6 +24,8 @@ module PatSyn ( #include "HsVersions.h" +import GhcPrelude + import Type import Name import Outputable diff --git a/compiler/basicTypes/RdrName.hs b/compiler/basicTypes/RdrName.hs index 5f496059d2..84ece4e9ff 100644 --- a/compiler/basicTypes/RdrName.hs +++ b/compiler/basicTypes/RdrName.hs @@ -67,6 +67,8 @@ module RdrName ( #include "HsVersions.h" +import GhcPrelude + import Module import Name import Avail diff --git a/compiler/basicTypes/SrcLoc.hs b/compiler/basicTypes/SrcLoc.hs index 3d3db956d7..5a0159e95f 100644 --- a/compiler/basicTypes/SrcLoc.hs +++ b/compiler/basicTypes/SrcLoc.hs @@ -77,6 +77,8 @@ module SrcLoc ( spans, isSubspanOf, sortLocated ) where +import GhcPrelude + import Util import Json import Outputable diff --git a/compiler/basicTypes/UniqSupply.hs b/compiler/basicTypes/UniqSupply.hs index da1a924736..83e54a7002 100644 --- a/compiler/basicTypes/UniqSupply.hs +++ b/compiler/basicTypes/UniqSupply.hs @@ -29,6 +29,8 @@ module UniqSupply ( initUniqSupply ) where +import GhcPrelude + import Unique import GHC.IO diff --git a/compiler/basicTypes/Unique.hs b/compiler/basicTypes/Unique.hs index a49fa80946..a2792e196a 100644 --- a/compiler/basicTypes/Unique.hs +++ b/compiler/basicTypes/Unique.hs @@ -68,6 +68,8 @@ module Unique ( #include "HsVersions.h" #include "Unique.h" +import GhcPrelude + import BasicTypes import FastString import Outputable diff --git a/compiler/basicTypes/Var.hs b/compiler/basicTypes/Var.hs index 9a39e2939b..1bf60cab21 100644 --- a/compiler/basicTypes/Var.hs +++ b/compiler/basicTypes/Var.hs @@ -82,6 +82,8 @@ module Var ( #include "HsVersions.h" +import GhcPrelude + import {-# SOURCE #-} TyCoRep( Type, Kind, pprKind ) import {-# SOURCE #-} TcType( TcTyVarDetails, pprTcTyVarDetails, vanillaSkolemTv ) import {-# SOURCE #-} IdInfo( IdDetails, IdInfo, coVarDetails, isCoVarDetails, diff --git a/compiler/basicTypes/VarEnv.hs b/compiler/basicTypes/VarEnv.hs index e22c207858..f8ab574bc5 100644 --- a/compiler/basicTypes/VarEnv.hs +++ b/compiler/basicTypes/VarEnv.hs @@ -73,6 +73,8 @@ module VarEnv ( emptyTidyEnv ) where +import GhcPrelude + import OccName import Var import VarSet diff --git a/compiler/basicTypes/VarSet.hs b/compiler/basicTypes/VarSet.hs index 710cb0db3a..ac3c545b2a 100644 --- a/compiler/basicTypes/VarSet.hs +++ b/compiler/basicTypes/VarSet.hs @@ -45,6 +45,8 @@ module VarSet ( #include "HsVersions.h" +import GhcPrelude + import Var ( Var, TyVar, CoVar, TyCoVar, Id ) import Unique import Name ( Name ) diff --git a/compiler/cmm/Bitmap.hs b/compiler/cmm/Bitmap.hs index a5cff38a98..6ff61933ee 100644 --- a/compiler/cmm/Bitmap.hs +++ b/compiler/cmm/Bitmap.hs @@ -18,6 +18,8 @@ module Bitmap ( #include "HsVersions.h" #include "../includes/MachDeps.h" +import GhcPrelude + import SMRep import DynFlags import Util diff --git a/compiler/cmm/BlockId.hs b/compiler/cmm/BlockId.hs index afc265d556..478affefbf 100644 --- a/compiler/cmm/BlockId.hs +++ b/compiler/cmm/BlockId.hs @@ -8,6 +8,8 @@ module BlockId , blockLbl, infoTblLbl ) where +import GhcPrelude + import CLabel import IdInfo import Name diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs index 62c8037e9c..28146ec1a9 100644 --- a/compiler/cmm/CLabel.hs +++ b/compiler/cmm/CLabel.hs @@ -115,6 +115,8 @@ module CLabel ( #include "HsVersions.h" +import GhcPrelude + import IdInfo import BasicTypes import Packages diff --git a/compiler/cmm/Cmm.hs b/compiler/cmm/Cmm.hs index dbd54236f5..c9ecda8a06 100644 --- a/compiler/cmm/Cmm.hs +++ b/compiler/cmm/Cmm.hs @@ -26,6 +26,8 @@ module Cmm ( module CmmExpr, ) where +import GhcPrelude + import CLabel import BlockId import CmmNode diff --git a/compiler/cmm/CmmBuildInfoTables.hs b/compiler/cmm/CmmBuildInfoTables.hs index 5dd8ee4ef2..a48230691f 100644 --- a/compiler/cmm/CmmBuildInfoTables.hs +++ b/compiler/cmm/CmmBuildInfoTables.hs @@ -7,6 +7,8 @@ where #include "HsVersions.h" +import GhcPrelude hiding (succ) + import Hoopl.Block import Hoopl.Graph import Hoopl.Label @@ -34,9 +36,6 @@ import Data.Set (Set) import qualified Data.Set as Set import Control.Monad -import qualified Prelude as P -import Prelude hiding (succ) - foldSet :: (a -> b -> b) -> b -> Set a -> b foldSet = Set.foldr @@ -220,7 +219,7 @@ procpointSRT dflags top_srt top_table entries = sorted_ints = sort ints offset = head sorted_ints bitmap_entries = map (subtract offset) sorted_ints - len = P.last bitmap_entries + 1 + len = GhcPrelude.last bitmap_entries + 1 bitmap = intsToBitmap dflags len bitmap_entries maxBmpSize :: DynFlags -> Int diff --git a/compiler/cmm/CmmCallConv.hs b/compiler/cmm/CmmCallConv.hs index 440ee5634f..0e89ce79f8 100644 --- a/compiler/cmm/CmmCallConv.hs +++ b/compiler/cmm/CmmCallConv.hs @@ -9,6 +9,8 @@ module CmmCallConv ( #include "HsVersions.h" +import GhcPrelude + import CmmExpr import SMRep import Cmm (Convention(..)) diff --git a/compiler/cmm/CmmCommonBlockElim.hs b/compiler/cmm/CmmCommonBlockElim.hs index 3c23e70b8c..f635520786 100644 --- a/compiler/cmm/CmmCommonBlockElim.hs +++ b/compiler/cmm/CmmCommonBlockElim.hs @@ -5,13 +5,14 @@ module CmmCommonBlockElim where +import GhcPrelude hiding (iterate, succ, unzip, zip) + import BlockId import Cmm import CmmUtils import CmmSwitch (eqSwitchTargetWith) import CmmContFlowOpt -- import PprCmm () -import Prelude hiding (iterate, succ, unzip, zip) import Hoopl.Block import Hoopl.Graph diff --git a/compiler/cmm/CmmContFlowOpt.hs b/compiler/cmm/CmmContFlowOpt.hs index 7981671c61..7e1689fdd5 100644 --- a/compiler/cmm/CmmContFlowOpt.hs +++ b/compiler/cmm/CmmContFlowOpt.hs @@ -9,6 +9,8 @@ module CmmContFlowOpt ) where +import GhcPrelude hiding (succ, unzip, zip) + import Hoopl.Block import Hoopl.Collections import Hoopl.Graph @@ -22,7 +24,6 @@ import Panic import Util import Control.Monad -import Prelude hiding (succ, unzip, zip) -- Note [What is shortcutting] diff --git a/compiler/cmm/CmmExpr.hs b/compiler/cmm/CmmExpr.hs index bb610a0b88..6a0220eb4f 100644 --- a/compiler/cmm/CmmExpr.hs +++ b/compiler/cmm/CmmExpr.hs @@ -28,6 +28,8 @@ module CmmExpr ) where +import GhcPrelude + import BlockId import CLabel import CmmMachOp diff --git a/compiler/cmm/CmmImplementSwitchPlans.hs b/compiler/cmm/CmmImplementSwitchPlans.hs index eda031e840..2e2da5d305 100644 --- a/compiler/cmm/CmmImplementSwitchPlans.hs +++ b/compiler/cmm/CmmImplementSwitchPlans.hs @@ -4,6 +4,8 @@ module CmmImplementSwitchPlans ) where +import GhcPrelude + import Hoopl.Block import BlockId import Cmm diff --git a/compiler/cmm/CmmInfo.hs b/compiler/cmm/CmmInfo.hs index e849c810ef..6d3e11c4a7 100644 --- a/compiler/cmm/CmmInfo.hs +++ b/compiler/cmm/CmmInfo.hs @@ -34,6 +34,8 @@ module CmmInfo ( #include "HsVersions.h" +import GhcPrelude + import Cmm import CmmUtils import CLabel diff --git a/compiler/cmm/CmmLayoutStack.hs b/compiler/cmm/CmmLayoutStack.hs index 4151aa0c4e..b2d74b2a9c 100644 --- a/compiler/cmm/CmmLayoutStack.hs +++ b/compiler/cmm/CmmLayoutStack.hs @@ -3,6 +3,8 @@ module CmmLayoutStack ( cmmLayoutStack, setInfoTableStackMap ) where +import GhcPrelude hiding ((<*>)) + import StgCmmUtils ( callerSaveVolatileRegs ) -- XXX layering violation import StgCmmForeign ( saveThreadState, loadThreadState ) -- XXX layering violation @@ -37,8 +39,6 @@ import Data.Array as Array import Data.Bits import Data.List (nub) -import Prelude hiding ((<*>)) - #include "HsVersions.h" {- Note [Stack Layout] diff --git a/compiler/cmm/CmmLex.x b/compiler/cmm/CmmLex.x index 82f7bee965..a68f155883 100644 --- a/compiler/cmm/CmmLex.x +++ b/compiler/cmm/CmmLex.x @@ -22,6 +22,8 @@ module CmmLex ( CmmToken(..), cmmlex, ) where +import GhcPrelude + import CmmExpr import Lexer diff --git a/compiler/cmm/CmmLint.hs b/compiler/cmm/CmmLint.hs index 64b4400378..3224bb8cab 100644 --- a/compiler/cmm/CmmLint.hs +++ b/compiler/cmm/CmmLint.hs @@ -10,6 +10,8 @@ module CmmLint ( cmmLint, cmmLintGraph ) where +import GhcPrelude + import Hoopl.Block import Hoopl.Collections import Hoopl.Graph diff --git a/compiler/cmm/CmmLive.hs b/compiler/cmm/CmmLive.hs index 944a9e394e..f340c32c8a 100644 --- a/compiler/cmm/CmmLive.hs +++ b/compiler/cmm/CmmLive.hs @@ -12,6 +12,8 @@ module CmmLive ) where +import GhcPrelude + import DynFlags import BlockId import Cmm diff --git a/compiler/cmm/CmmMachOp.hs b/compiler/cmm/CmmMachOp.hs index d736f14bfc..febb31582a 100644 --- a/compiler/cmm/CmmMachOp.hs +++ b/compiler/cmm/CmmMachOp.hs @@ -30,6 +30,8 @@ where #include "HsVersions.h" +import GhcPrelude + import CmmType import Outputable import DynFlags diff --git a/compiler/cmm/CmmMonad.hs b/compiler/cmm/CmmMonad.hs index e225d7dd4f..f3b4441a9b 100644 --- a/compiler/cmm/CmmMonad.hs +++ b/compiler/cmm/CmmMonad.hs @@ -12,6 +12,8 @@ module CmmMonad ( , liftP ) where +import GhcPrelude + import Control.Monad import qualified Control.Monad.Fail as MonadFail diff --git a/compiler/cmm/CmmNode.hs b/compiler/cmm/CmmNode.hs index f452b0b3f5..286b1e306c 100644 --- a/compiler/cmm/CmmNode.hs +++ b/compiler/cmm/CmmNode.hs @@ -22,6 +22,8 @@ module CmmNode ( CmmTickScope(..), isTickSubScope, combineTickScopes, ) where +import GhcPrelude hiding (succ) + import CodeGen.Platform import CmmExpr import CmmSwitch @@ -38,7 +40,6 @@ import Hoopl.Graph import Hoopl.Label import Data.Maybe import Data.List (tails,sortBy) -import Prelude hiding (succ) import Unique (nonDetCmpUnique) import Util diff --git a/compiler/cmm/CmmOpt.hs b/compiler/cmm/CmmOpt.hs index 78a186721b..4b1c8d060d 100644 --- a/compiler/cmm/CmmOpt.hs +++ b/compiler/cmm/CmmOpt.hs @@ -21,6 +21,8 @@ module CmmOpt ( #include "HsVersions.h" +import GhcPrelude + import CmmUtils import Cmm import DynFlags diff --git a/compiler/cmm/CmmParse.y b/compiler/cmm/CmmParse.y index e2fe593b5d..96019d2ff8 100644 --- a/compiler/cmm/CmmParse.y +++ b/compiler/cmm/CmmParse.y @@ -200,6 +200,8 @@ necessary to the stack to accommodate it (e.g. 2). { module CmmParse ( parseCmmFile ) where +import GhcPrelude + import StgCmmExtCode import CmmCallConv import StgCmmProf diff --git a/compiler/cmm/CmmPipeline.hs b/compiler/cmm/CmmPipeline.hs index edcaf7b789..4d109a4086 100644 --- a/compiler/cmm/CmmPipeline.hs +++ b/compiler/cmm/CmmPipeline.hs @@ -7,6 +7,8 @@ module CmmPipeline ( cmmPipeline ) where +import GhcPrelude + import Cmm import CmmLint import CmmBuildInfoTables diff --git a/compiler/cmm/CmmProcPoint.hs b/compiler/cmm/CmmProcPoint.hs index 5d611d1f25..68f80db670 100644 --- a/compiler/cmm/CmmProcPoint.hs +++ b/compiler/cmm/CmmProcPoint.hs @@ -8,7 +8,7 @@ module CmmProcPoint ) where -import Prelude hiding (last, unzip, succ, zip) +import GhcPrelude hiding (last, unzip, succ, zip) import DynFlags import BlockId diff --git a/compiler/cmm/CmmSink.hs b/compiler/cmm/CmmSink.hs index 517605b9ff..a674e54a54 100644 --- a/compiler/cmm/CmmSink.hs +++ b/compiler/cmm/CmmSink.hs @@ -3,6 +3,8 @@ module CmmSink ( cmmSink ) where +import GhcPrelude + import Cmm import CmmOpt import CmmLive diff --git a/compiler/cmm/CmmSwitch.hs b/compiler/cmm/CmmSwitch.hs index b0ca4be762..53d00de95a 100644 --- a/compiler/cmm/CmmSwitch.hs +++ b/compiler/cmm/CmmSwitch.hs @@ -11,6 +11,8 @@ module CmmSwitch ( createSwitchPlan, ) where +import GhcPrelude + import Outputable import DynFlags import Hoopl.Label (Label) diff --git a/compiler/cmm/CmmType.hs b/compiler/cmm/CmmType.hs index 4abbeaf0c1..cb15dc7e66 100644 --- a/compiler/cmm/CmmType.hs +++ b/compiler/cmm/CmmType.hs @@ -31,6 +31,8 @@ where #include "HsVersions.h" +import GhcPrelude + import DynFlags import FastString import Outputable diff --git a/compiler/cmm/CmmUtils.hs b/compiler/cmm/CmmUtils.hs index b22639e198..d42ca926a0 100644 --- a/compiler/cmm/CmmUtils.hs +++ b/compiler/cmm/CmmUtils.hs @@ -64,6 +64,8 @@ module CmmUtils( #include "HsVersions.h" +import GhcPrelude + import TyCon ( PrimRep(..), PrimElemRep(..) ) import RepType ( UnaryType, SlotTy (..), typePrimRep1 ) diff --git a/compiler/cmm/Debug.hs b/compiler/cmm/Debug.hs index 33595d8987..e5f86faaaf 100644 --- a/compiler/cmm/Debug.hs +++ b/compiler/cmm/Debug.hs @@ -22,6 +22,8 @@ module Debug ( UnwindExpr(..), toUnwindExpr ) where +import GhcPrelude + import BlockId import CLabel import Cmm diff --git a/compiler/cmm/Hoopl/Block.hs b/compiler/cmm/Hoopl/Block.hs index 3623fcd242..c4ff1794e8 100644 --- a/compiler/cmm/Hoopl/Block.hs +++ b/compiler/cmm/Hoopl/Block.hs @@ -33,6 +33,7 @@ module Hoopl.Block , replaceLastNode ) where +import GhcPrelude -- ----------------------------------------------------------------------------- -- Shapes: Open and Closed diff --git a/compiler/cmm/Hoopl/Collections.hs b/compiler/cmm/Hoopl/Collections.hs index 679057626b..be28849b60 100644 --- a/compiler/cmm/Hoopl/Collections.hs +++ b/compiler/cmm/Hoopl/Collections.hs @@ -6,6 +6,8 @@ module Hoopl.Collections , mapInsertList, mapDeleteList, mapUnions ) where +import GhcPrelude + import Data.List (foldl', foldl1') class IsSet set where diff --git a/compiler/cmm/Hoopl/Dataflow.hs b/compiler/cmm/Hoopl/Dataflow.hs index c2ace502b3..b2a7716c62 100644 --- a/compiler/cmm/Hoopl/Dataflow.hs +++ b/compiler/cmm/Hoopl/Dataflow.hs @@ -33,6 +33,8 @@ module Hoopl.Dataflow ) where +import GhcPrelude + import Cmm import UniqSupply diff --git a/compiler/cmm/Hoopl/Graph.hs b/compiler/cmm/Hoopl/Graph.hs index 87da072458..9a492d6279 100644 --- a/compiler/cmm/Hoopl/Graph.hs +++ b/compiler/cmm/Hoopl/Graph.hs @@ -18,6 +18,8 @@ module Hoopl.Graph ) where +import GhcPrelude + import Hoopl.Label import Hoopl.Block import Hoopl.Collections diff --git a/compiler/cmm/Hoopl/Label.hs b/compiler/cmm/Hoopl/Label.hs index 5ee4f72fc3..e28f92b6b9 100644 --- a/compiler/cmm/Hoopl/Label.hs +++ b/compiler/cmm/Hoopl/Label.hs @@ -11,6 +11,8 @@ module Hoopl.Label , uniqueToLbl ) where +import GhcPrelude + import Outputable import Hoopl.Collections diff --git a/compiler/cmm/Hoopl/Unique.hs b/compiler/cmm/Hoopl/Unique.hs index f27961bb28..f6fff985e2 100644 --- a/compiler/cmm/Hoopl/Unique.hs +++ b/compiler/cmm/Hoopl/Unique.hs @@ -9,6 +9,8 @@ module Hoopl.Unique , intToUnique ) where +import GhcPrelude + import qualified Data.IntMap as M import qualified Data.IntSet as S diff --git a/compiler/cmm/MkGraph.hs b/compiler/cmm/MkGraph.hs index 62dfd34da3..f130f1b313 100644 --- a/compiler/cmm/MkGraph.hs +++ b/compiler/cmm/MkGraph.hs @@ -21,6 +21,8 @@ module MkGraph ) where +import GhcPrelude (($),Int,Bool,Eq(..)) -- avoid importing (<*>) + import BlockId import Cmm import CmmCallConv @@ -39,7 +41,6 @@ import UniqSupply import Control.Monad import Data.List import Data.Maybe -import Prelude (($),Int,Bool,Eq(..)) -- avoid importing (<*>) #include "HsVersions.h" diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs index 7d36c120b0..e59a3adc18 100644 --- a/compiler/cmm/PprC.hs +++ b/compiler/cmm/PprC.hs @@ -26,6 +26,8 @@ module PprC ( #include "HsVersions.h" -- Cmm stuff +import GhcPrelude + import BlockId import CLabel import ForeignCall diff --git a/compiler/cmm/PprCmm.hs b/compiler/cmm/PprCmm.hs index dbd4619416..6769fc02f7 100644 --- a/compiler/cmm/PprCmm.hs +++ b/compiler/cmm/PprCmm.hs @@ -39,6 +39,8 @@ module PprCmm ) where +import GhcPrelude hiding (succ) + import BlockId () import CLabel import Cmm @@ -55,8 +57,6 @@ import PprCore () import BasicTypes import Hoopl.Block import Hoopl.Graph -import Data.List -import Prelude hiding (succ) ------------------------------------------------- -- Outputable instances diff --git a/compiler/cmm/PprCmmDecl.hs b/compiler/cmm/PprCmmDecl.hs index ce8fb0dc5d..968e872097 100644 --- a/compiler/cmm/PprCmmDecl.hs +++ b/compiler/cmm/PprCmmDecl.hs @@ -40,6 +40,8 @@ module PprCmmDecl ) where +import GhcPrelude + import PprCmmExpr import Cmm diff --git a/compiler/cmm/PprCmmExpr.hs b/compiler/cmm/PprCmmExpr.hs index 77c92407bc..9e91a74944 100644 --- a/compiler/cmm/PprCmmExpr.hs +++ b/compiler/cmm/PprCmmExpr.hs @@ -38,6 +38,8 @@ module PprCmmExpr ) where +import GhcPrelude + import CmmExpr import Outputable diff --git a/compiler/cmm/SMRep.hs b/compiler/cmm/SMRep.hs index d40af4ff1c..34048fe116 100644 --- a/compiler/cmm/SMRep.hs +++ b/compiler/cmm/SMRep.hs @@ -50,6 +50,8 @@ module SMRep ( #include "../HsVersions.h" #include "../includes/MachDeps.h" +import GhcPrelude + import BasicTypes( ConTagZ ) import DynFlags import Outputable diff --git a/compiler/codeGen/CgUtils.hs b/compiler/codeGen/CgUtils.hs index 7184153f10..a9f13c6ffa 100644 --- a/compiler/codeGen/CgUtils.hs +++ b/compiler/codeGen/CgUtils.hs @@ -12,6 +12,8 @@ module CgUtils ( fixStgRegisters ) where #include "HsVersions.h" +import GhcPrelude + import CodeGen.Platform import Cmm import Hoopl.Block diff --git a/compiler/codeGen/CodeGen/Platform.hs b/compiler/codeGen/CodeGen/Platform.hs index 80452d0585..3014a0596f 100644 --- a/compiler/codeGen/CodeGen/Platform.hs +++ b/compiler/codeGen/CodeGen/Platform.hs @@ -3,6 +3,8 @@ module CodeGen.Platform (callerSaves, activeStgRegs, haveRegBase, globalRegMaybe, freeReg) where +import GhcPrelude + import CmmExpr import Platform import Reg diff --git a/compiler/codeGen/CodeGen/Platform/ARM.hs b/compiler/codeGen/CodeGen/Platform/ARM.hs index 5d1148496c..a2cb476e04 100644 --- a/compiler/codeGen/CodeGen/Platform/ARM.hs +++ b/compiler/codeGen/CodeGen/Platform/ARM.hs @@ -2,6 +2,8 @@ module CodeGen.Platform.ARM where +import GhcPrelude + #define MACHREGS_NO_REGS 0 #define MACHREGS_arm 1 #include "../../../../includes/CodeGen.Platform.hs" diff --git a/compiler/codeGen/CodeGen/Platform/ARM64.hs b/compiler/codeGen/CodeGen/Platform/ARM64.hs index c3ebeda6bf..6ace181356 100644 --- a/compiler/codeGen/CodeGen/Platform/ARM64.hs +++ b/compiler/codeGen/CodeGen/Platform/ARM64.hs @@ -2,6 +2,8 @@ module CodeGen.Platform.ARM64 where +import GhcPrelude + #define MACHREGS_NO_REGS 0 #define MACHREGS_aarch64 1 #include "../../../../includes/CodeGen.Platform.hs" diff --git a/compiler/codeGen/CodeGen/Platform/NoRegs.hs b/compiler/codeGen/CodeGen/Platform/NoRegs.hs index 0c85ffbda7..4c074ee313 100644 --- a/compiler/codeGen/CodeGen/Platform/NoRegs.hs +++ b/compiler/codeGen/CodeGen/Platform/NoRegs.hs @@ -2,6 +2,8 @@ module CodeGen.Platform.NoRegs where +import GhcPrelude + #define MACHREGS_NO_REGS 1 #include "../../../../includes/CodeGen.Platform.hs" diff --git a/compiler/codeGen/CodeGen/Platform/PPC.hs b/compiler/codeGen/CodeGen/Platform/PPC.hs index 76a2b020ac..f7eae6b4ca 100644 --- a/compiler/codeGen/CodeGen/Platform/PPC.hs +++ b/compiler/codeGen/CodeGen/Platform/PPC.hs @@ -2,6 +2,8 @@ module CodeGen.Platform.PPC where +import GhcPrelude + #define MACHREGS_NO_REGS 0 #define MACHREGS_powerpc 1 #include "../../../../includes/CodeGen.Platform.hs" diff --git a/compiler/codeGen/CodeGen/Platform/PPC_Darwin.hs b/compiler/codeGen/CodeGen/Platform/PPC_Darwin.hs index a98e558cc1..91923fd453 100644 --- a/compiler/codeGen/CodeGen/Platform/PPC_Darwin.hs +++ b/compiler/codeGen/CodeGen/Platform/PPC_Darwin.hs @@ -2,6 +2,8 @@ module CodeGen.Platform.PPC_Darwin where +import GhcPrelude + #define MACHREGS_NO_REGS 0 #define MACHREGS_powerpc 1 #define MACHREGS_darwin 1 diff --git a/compiler/codeGen/CodeGen/Platform/SPARC.hs b/compiler/codeGen/CodeGen/Platform/SPARC.hs index 991f515eaf..5d8dbb1da9 100644 --- a/compiler/codeGen/CodeGen/Platform/SPARC.hs +++ b/compiler/codeGen/CodeGen/Platform/SPARC.hs @@ -2,6 +2,8 @@ module CodeGen.Platform.SPARC where +import GhcPrelude + #define MACHREGS_NO_REGS 0 #define MACHREGS_sparc 1 #include "../../../../includes/CodeGen.Platform.hs" diff --git a/compiler/codeGen/CodeGen/Platform/X86.hs b/compiler/codeGen/CodeGen/Platform/X86.hs index e74807ff88..84d52c1585 100644 --- a/compiler/codeGen/CodeGen/Platform/X86.hs +++ b/compiler/codeGen/CodeGen/Platform/X86.hs @@ -2,6 +2,8 @@ module CodeGen.Platform.X86 where +import GhcPrelude + #define MACHREGS_NO_REGS 0 #define MACHREGS_i386 1 #include "../../../../includes/CodeGen.Platform.hs" diff --git a/compiler/codeGen/CodeGen/Platform/X86_64.hs b/compiler/codeGen/CodeGen/Platform/X86_64.hs index 102132d679..1b2b5549ac 100644 --- a/compiler/codeGen/CodeGen/Platform/X86_64.hs +++ b/compiler/codeGen/CodeGen/Platform/X86_64.hs @@ -2,6 +2,8 @@ module CodeGen.Platform.X86_64 where +import GhcPrelude + #define MACHREGS_NO_REGS 0 #define MACHREGS_x86_64 1 #include "../../../../includes/CodeGen.Platform.hs" diff --git a/compiler/codeGen/StgCmm.hs b/compiler/codeGen/StgCmm.hs index d92b410a7f..825c309aef 100644 --- a/compiler/codeGen/StgCmm.hs +++ b/compiler/codeGen/StgCmm.hs @@ -12,6 +12,8 @@ module StgCmm ( codeGen ) where #include "HsVersions.h" +import GhcPrelude as Prelude + import StgCmmProf (initCostCentres, ldvEnter) import StgCmmMonad import StgCmmEnv diff --git a/compiler/codeGen/StgCmmArgRep.hs b/compiler/codeGen/StgCmmArgRep.hs index 969e14f79e..2ea04079d0 100644 --- a/compiler/codeGen/StgCmmArgRep.hs +++ b/compiler/codeGen/StgCmmArgRep.hs @@ -15,6 +15,8 @@ module StgCmmArgRep ( ) where +import GhcPrelude + import StgCmmClosure ( idPrimRep ) import SMRep ( WordOff ) diff --git a/compiler/codeGen/StgCmmBind.hs b/compiler/codeGen/StgCmmBind.hs index 31775d6624..8b2e998b5e 100644 --- a/compiler/codeGen/StgCmmBind.hs +++ b/compiler/codeGen/StgCmmBind.hs @@ -17,6 +17,8 @@ module StgCmmBind ( #include "HsVersions.h" +import GhcPrelude hiding ((<*>)) + import StgCmmExpr import StgCmmMonad import StgCmmEnv @@ -53,8 +55,6 @@ import DynFlags import Control.Monad -import Prelude hiding ((<*>)) - ------------------------------------------------------------------------ -- Top-level bindings ------------------------------------------------------------------------ diff --git a/compiler/codeGen/StgCmmClosure.hs b/compiler/codeGen/StgCmmClosure.hs index 8eaee795a5..1da1f707a2 100644 --- a/compiler/codeGen/StgCmmClosure.hs +++ b/compiler/codeGen/StgCmmClosure.hs @@ -66,6 +66,8 @@ module StgCmmClosure ( #include "HsVersions.h" +import GhcPrelude + import StgSyn import SMRep import Cmm diff --git a/compiler/codeGen/StgCmmCon.hs b/compiler/codeGen/StgCmmCon.hs index 6438b8cd3c..1540d00715 100644 --- a/compiler/codeGen/StgCmmCon.hs +++ b/compiler/codeGen/StgCmmCon.hs @@ -17,6 +17,8 @@ module StgCmmCon ( #include "HsVersions.h" +import GhcPrelude + import StgSyn import CoreSyn ( AltCon(..) ) diff --git a/compiler/codeGen/StgCmmEnv.hs b/compiler/codeGen/StgCmmEnv.hs index 3061fb351b..f27728189f 100644 --- a/compiler/codeGen/StgCmmEnv.hs +++ b/compiler/codeGen/StgCmmEnv.hs @@ -24,6 +24,8 @@ module StgCmmEnv ( #include "HsVersions.h" +import GhcPrelude + import TyCon import StgCmmMonad import StgCmmUtils diff --git a/compiler/codeGen/StgCmmExpr.hs b/compiler/codeGen/StgCmmExpr.hs index 6e6ad7e9d7..95dcc9f9ef 100644 --- a/compiler/codeGen/StgCmmExpr.hs +++ b/compiler/codeGen/StgCmmExpr.hs @@ -13,6 +13,8 @@ module StgCmmExpr ( cgExpr ) where #include "HsVersions.h" +import GhcPrelude hiding ((<*>)) + import {-# SOURCE #-} StgCmmBind ( cgBind ) import StgCmmMonad @@ -51,8 +53,6 @@ import Control.Monad (unless,void) import Control.Arrow (first) import Data.Function ( on ) -import Prelude hiding ((<*>)) - ------------------------------------------------------------------------ -- cgExpr: the main function ------------------------------------------------------------------------ diff --git a/compiler/codeGen/StgCmmExtCode.hs b/compiler/codeGen/StgCmmExtCode.hs index f12ada242b..551535d758 100644 --- a/compiler/codeGen/StgCmmExtCode.hs +++ b/compiler/codeGen/StgCmmExtCode.hs @@ -36,6 +36,8 @@ module StgCmmExtCode ( where +import GhcPrelude + import qualified StgCmmMonad as F import StgCmmMonad (FCode, newUnique) diff --git a/compiler/codeGen/StgCmmForeign.hs b/compiler/codeGen/StgCmmForeign.hs index 2e3ed39a37..fc3d42aa8b 100644 --- a/compiler/codeGen/StgCmmForeign.hs +++ b/compiler/codeGen/StgCmmForeign.hs @@ -22,6 +22,8 @@ module StgCmmForeign ( #include "HsVersions.h" +import GhcPrelude hiding( succ, (<*>) ) + import StgSyn import StgCmmProf (storeCurCCS, ccsType, curCCS) import StgCmmEnv @@ -48,8 +50,6 @@ import BasicTypes import Control.Monad -import Prelude hiding( succ, (<*>) ) - ----------------------------------------------------------------------------- -- Code generation for Foreign Calls ----------------------------------------------------------------------------- diff --git a/compiler/codeGen/StgCmmHeap.hs b/compiler/codeGen/StgCmmHeap.hs index 000045f363..15dcaa2d89 100644 --- a/compiler/codeGen/StgCmmHeap.hs +++ b/compiler/codeGen/StgCmmHeap.hs @@ -24,6 +24,8 @@ module StgCmmHeap ( #include "HsVersions.h" +import GhcPrelude hiding ((<*>)) + import StgSyn import CLabel import StgCmmLayout @@ -49,8 +51,6 @@ import DynFlags import FastString( mkFastString, fsLit ) import Panic( sorry ) -import Prelude hiding ((<*>)) - import Control.Monad (when) import Data.Maybe (isJust) diff --git a/compiler/codeGen/StgCmmHpc.hs b/compiler/codeGen/StgCmmHpc.hs index c8e65ad126..8e9676bd33 100644 --- a/compiler/codeGen/StgCmmHpc.hs +++ b/compiler/codeGen/StgCmmHpc.hs @@ -8,6 +8,8 @@ module StgCmmHpc ( initHpc, mkTickBox ) where +import GhcPrelude + import StgCmmMonad import MkGraph diff --git a/compiler/codeGen/StgCmmLayout.hs b/compiler/codeGen/StgCmmLayout.hs index b123420d58..aeb01242e7 100644 --- a/compiler/codeGen/StgCmmLayout.hs +++ b/compiler/codeGen/StgCmmLayout.hs @@ -25,7 +25,7 @@ module StgCmmLayout ( #include "HsVersions.h" -import Prelude hiding ((<*>)) +import GhcPrelude hiding ((<*>)) import StgCmmClosure import StgCmmEnv diff --git a/compiler/codeGen/StgCmmMonad.hs b/compiler/codeGen/StgCmmMonad.hs index 5e62183fb5..8145be1046 100644 --- a/compiler/codeGen/StgCmmMonad.hs +++ b/compiler/codeGen/StgCmmMonad.hs @@ -61,11 +61,12 @@ module StgCmmMonad ( #include "HsVersions.h" +import GhcPrelude hiding( sequence, succ ) + import Cmm import StgCmmClosure import DynFlags import Hoopl.Collections -import Maybes import MkGraph import BlockId import CLabel @@ -82,7 +83,6 @@ import Outputable import Control.Monad import Data.List -import Prelude hiding( sequence, succ ) infixr 9 `thenC` -- Right-associative! infixr 9 `thenFC` diff --git a/compiler/codeGen/StgCmmPrim.hs b/compiler/codeGen/StgCmmPrim.hs index 1ecd72f9db..c17855e76f 100644 --- a/compiler/codeGen/StgCmmPrim.hs +++ b/compiler/codeGen/StgCmmPrim.hs @@ -17,6 +17,8 @@ module StgCmmPrim ( #include "HsVersions.h" +import GhcPrelude hiding ((<*>)) + import StgCmmLayout import StgCmmForeign import StgCmmEnv @@ -44,8 +46,6 @@ import FastString import Outputable import Util -import Prelude hiding ((<*>)) - import Data.Bits ((.&.), bit) import Control.Monad (liftM, when) diff --git a/compiler/codeGen/StgCmmProf.hs b/compiler/codeGen/StgCmmProf.hs index 434d7b50de..a91c4c0ed1 100644 --- a/compiler/codeGen/StgCmmProf.hs +++ b/compiler/codeGen/StgCmmProf.hs @@ -27,6 +27,8 @@ module StgCmmProf ( #include "HsVersions.h" +import GhcPrelude + import StgCmmClosure import StgCmmUtils import StgCmmMonad diff --git a/compiler/codeGen/StgCmmTicky.hs b/compiler/codeGen/StgCmmTicky.hs index 8d86e37ddf..a7d158ce3a 100644 --- a/compiler/codeGen/StgCmmTicky.hs +++ b/compiler/codeGen/StgCmmTicky.hs @@ -106,6 +106,8 @@ module StgCmmTicky ( #include "HsVersions.h" +import GhcPrelude + import StgCmmArgRep ( slowCallPattern , toArgRep , argRepString ) import StgCmmClosure import StgCmmUtils diff --git a/compiler/codeGen/StgCmmUtils.hs b/compiler/codeGen/StgCmmUtils.hs index 237520877f..07432c45ab 100644 --- a/compiler/codeGen/StgCmmUtils.hs +++ b/compiler/codeGen/StgCmmUtils.hs @@ -43,6 +43,8 @@ module StgCmmUtils ( #include "HsVersions.h" +import GhcPrelude + import StgCmmMonad import StgCmmClosure import Cmm diff --git a/compiler/coreSyn/CoreArity.hs b/compiler/coreSyn/CoreArity.hs index a2ad5f7fff..945cad6d4a 100644 --- a/compiler/coreSyn/CoreArity.hs +++ b/compiler/coreSyn/CoreArity.hs @@ -18,6 +18,8 @@ module CoreArity ( #include "HsVersions.h" +import GhcPrelude + import CoreSyn import CoreFVs import CoreUtils diff --git a/compiler/coreSyn/CoreFVs.hs b/compiler/coreSyn/CoreFVs.hs index f5343caf2b..4855c1749a 100644 --- a/compiler/coreSyn/CoreFVs.hs +++ b/compiler/coreSyn/CoreFVs.hs @@ -60,6 +60,8 @@ module CoreFVs ( #include "HsVersions.h" +import GhcPrelude + import CoreSyn import Id import IdInfo diff --git a/compiler/coreSyn/CoreLint.hs b/compiler/coreSyn/CoreLint.hs index 6195e675cb..6b6d8d9d1e 100644 --- a/compiler/coreSyn/CoreLint.hs +++ b/compiler/coreSyn/CoreLint.hs @@ -21,6 +21,8 @@ module CoreLint ( #include "HsVersions.h" +import GhcPrelude + import CoreSyn import CoreFVs import CoreUtils diff --git a/compiler/coreSyn/CoreOpt.hs b/compiler/coreSyn/CoreOpt.hs index 4a196057b1..47a4e35a67 100644 --- a/compiler/coreSyn/CoreOpt.hs +++ b/compiler/coreSyn/CoreOpt.hs @@ -20,6 +20,8 @@ module CoreOpt ( #include "HsVersions.h" +import GhcPrelude + import CoreArity( joinRhsArity, etaExpandToJoinPoint ) import CoreSyn diff --git a/compiler/coreSyn/CorePrep.hs b/compiler/coreSyn/CorePrep.hs index 4f7a0da835..79f378cd56 100644 --- a/compiler/coreSyn/CorePrep.hs +++ b/compiler/coreSyn/CorePrep.hs @@ -14,6 +14,8 @@ module CorePrep ( #include "HsVersions.h" +import GhcPrelude + import OccurAnal import HscTypes diff --git a/compiler/coreSyn/CoreSeq.hs b/compiler/coreSyn/CoreSeq.hs index d426bd3581..7de8923a71 100644 --- a/compiler/coreSyn/CoreSeq.hs +++ b/compiler/coreSyn/CoreSeq.hs @@ -10,6 +10,8 @@ module CoreSeq ( megaSeqIdInfo, seqRuleInfo, seqBinds, ) where +import GhcPrelude + import CoreSyn import IdInfo import Demand( seqDemand, seqStrictSig ) diff --git a/compiler/coreSyn/CoreStats.hs b/compiler/coreSyn/CoreStats.hs index cb73d147a8..826ffe171e 100644 --- a/compiler/coreSyn/CoreStats.hs +++ b/compiler/coreSyn/CoreStats.hs @@ -11,6 +11,8 @@ module CoreStats ( CoreStats(..), coreBindsStats, exprStats, ) where +import GhcPrelude + import BasicTypes import CoreSyn import Outputable diff --git a/compiler/coreSyn/CoreSubst.hs b/compiler/coreSyn/CoreSubst.hs index 919d9e8cd0..ae4458bebe 100644 --- a/compiler/coreSyn/CoreSubst.hs +++ b/compiler/coreSyn/CoreSubst.hs @@ -36,6 +36,8 @@ module CoreSubst ( #include "HsVersions.h" +import GhcPrelude + import CoreSyn import CoreFVs import CoreSeq diff --git a/compiler/coreSyn/CoreSyn.hs b/compiler/coreSyn/CoreSyn.hs index 99478d2b66..6bbcda9fe3 100644 --- a/compiler/coreSyn/CoreSyn.hs +++ b/compiler/coreSyn/CoreSyn.hs @@ -99,6 +99,8 @@ module CoreSyn ( #include "HsVersions.h" +import GhcPrelude + import CostCentre import VarEnv( InScopeSet ) import Var diff --git a/compiler/coreSyn/CoreTidy.hs b/compiler/coreSyn/CoreTidy.hs index 89ce692422..38e6052da0 100644 --- a/compiler/coreSyn/CoreTidy.hs +++ b/compiler/coreSyn/CoreTidy.hs @@ -14,6 +14,8 @@ module CoreTidy ( #include "HsVersions.h" +import GhcPrelude + import CoreSyn import CoreSeq ( seqUnfolding ) import CoreArity diff --git a/compiler/coreSyn/CoreUnfold.hs b/compiler/coreSyn/CoreUnfold.hs index a104cd693f..fd5a23349a 100644 --- a/compiler/coreSyn/CoreUnfold.hs +++ b/compiler/coreSyn/CoreUnfold.hs @@ -42,6 +42,8 @@ module CoreUnfold ( #include "HsVersions.h" +import GhcPrelude + import DynFlags import CoreSyn import PprCore () -- Instances diff --git a/compiler/coreSyn/CoreUtils.hs b/compiler/coreSyn/CoreUtils.hs index 1b92a7f0f3..0e27ae901f 100644 --- a/compiler/coreSyn/CoreUtils.hs +++ b/compiler/coreSyn/CoreUtils.hs @@ -58,6 +58,8 @@ module CoreUtils ( #include "HsVersions.h" +import GhcPrelude + import CoreSyn import PrelNames ( makeStaticName ) import PprCore diff --git a/compiler/coreSyn/MkCore.hs b/compiler/coreSyn/MkCore.hs index 5fe0392315..2ea0c89a07 100644 --- a/compiler/coreSyn/MkCore.hs +++ b/compiler/coreSyn/MkCore.hs @@ -51,6 +51,8 @@ module MkCore ( #include "HsVersions.h" +import GhcPrelude + import Id import Var ( EvVar, setTyVarUnique ) diff --git a/compiler/coreSyn/PprCore.hs b/compiler/coreSyn/PprCore.hs index 73a15c318f..96f7aa59d8 100644 --- a/compiler/coreSyn/PprCore.hs +++ b/compiler/coreSyn/PprCore.hs @@ -15,6 +15,8 @@ module PprCore ( pprRules, pprOptCo ) where +import GhcPrelude + import CoreSyn import CoreStats (exprStats) import Literal( pprLiteral ) diff --git a/compiler/coreSyn/TrieMap.hs b/compiler/coreSyn/TrieMap.hs index fcff256123..9e0cab9f5a 100644 --- a/compiler/coreSyn/TrieMap.hs +++ b/compiler/coreSyn/TrieMap.hs @@ -31,6 +31,8 @@ module TrieMap( (>.>), (|>), (|>>), ) where +import GhcPrelude + import CoreSyn import Coercion import Literal diff --git a/compiler/deSugar/Check.hs b/compiler/deSugar/Check.hs index 72c94f814c..53b766f01b 100644 --- a/compiler/deSugar/Check.hs +++ b/compiler/deSugar/Check.hs @@ -20,6 +20,8 @@ module Check ( #include "HsVersions.h" +import GhcPrelude + import TmOracle import Unify( tcMatchTy ) import BasicTypes diff --git a/compiler/deSugar/Coverage.hs b/compiler/deSugar/Coverage.hs index a9d953dc0e..c58c1a489e 100644 --- a/compiler/deSugar/Coverage.hs +++ b/compiler/deSugar/Coverage.hs @@ -7,6 +7,8 @@ module Coverage (addTicksToBinds, hpcInitCode) where +import GhcPrelude as Prelude + import qualified GHCi import GHCi.RemoteTypes import Data.Array diff --git a/compiler/deSugar/Desugar.hs b/compiler/deSugar/Desugar.hs index fbb6386c60..6351fa87ba 100644 --- a/compiler/deSugar/Desugar.hs +++ b/compiler/deSugar/Desugar.hs @@ -16,6 +16,8 @@ module Desugar ( #include "HsVersions.h" +import GhcPrelude + import DsUsage import DynFlags import HscTypes diff --git a/compiler/deSugar/DsArrows.hs b/compiler/deSugar/DsArrows.hs index ec0f419319..24d7d8a61c 100644 --- a/compiler/deSugar/DsArrows.hs +++ b/compiler/deSugar/DsArrows.hs @@ -13,6 +13,8 @@ module DsArrows ( dsProcExpr ) where #include "HsVersions.h" +import GhcPrelude + import Match import DsUtils import DsMonad diff --git a/compiler/deSugar/DsBinds.hs b/compiler/deSugar/DsBinds.hs index d704f7ba08..c01cb40000 100644 --- a/compiler/deSugar/DsBinds.hs +++ b/compiler/deSugar/DsBinds.hs @@ -19,6 +19,8 @@ module DsBinds ( dsTopLHsBinds, dsLHsBinds, decomposeRuleLhs, dsSpec, #include "HsVersions.h" +import GhcPrelude + import {-# SOURCE #-} DsExpr( dsLExpr ) import {-# SOURCE #-} Match( matchWrapper ) diff --git a/compiler/deSugar/DsCCall.hs b/compiler/deSugar/DsCCall.hs index f24dd9fea7..64ab9dfe80 100644 --- a/compiler/deSugar/DsCCall.hs +++ b/compiler/deSugar/DsCCall.hs @@ -18,6 +18,8 @@ module DsCCall #include "HsVersions.h" +import GhcPrelude + import CoreSyn import DsMonad diff --git a/compiler/deSugar/DsExpr.hs b/compiler/deSugar/DsExpr.hs index b8ed3c5fbf..1ed45fcde2 100644 --- a/compiler/deSugar/DsExpr.hs +++ b/compiler/deSugar/DsExpr.hs @@ -14,6 +14,8 @@ module DsExpr ( dsExpr, dsLExpr, dsLExprNoLP, dsLocalBinds #include "HsVersions.h" +import GhcPrelude + import Match import MatchLit import DsBinds diff --git a/compiler/deSugar/DsForeign.hs b/compiler/deSugar/DsForeign.hs index 9b088b280d..01173c932d 100644 --- a/compiler/deSugar/DsForeign.hs +++ b/compiler/deSugar/DsForeign.hs @@ -13,6 +13,8 @@ Desugaring foreign declarations (see also DsCCall). module DsForeign ( dsForeigns ) where #include "HsVersions.h" +import GhcPrelude + import TcRnMonad -- temp import CoreSyn diff --git a/compiler/deSugar/DsGRHSs.hs b/compiler/deSugar/DsGRHSs.hs index c3dcdf6879..d521f537e5 100644 --- a/compiler/deSugar/DsGRHSs.hs +++ b/compiler/deSugar/DsGRHSs.hs @@ -12,6 +12,8 @@ module DsGRHSs ( dsGuarded, dsGRHSs, dsGRHS, isTrueLHsExpr ) where #include "HsVersions.h" +import GhcPrelude + import {-# SOURCE #-} DsExpr ( dsLExpr, dsLocalBinds ) import {-# SOURCE #-} Match ( matchSinglePat ) diff --git a/compiler/deSugar/DsListComp.hs b/compiler/deSugar/DsListComp.hs index dc24183537..fea637fafe 100644 --- a/compiler/deSugar/DsListComp.hs +++ b/compiler/deSugar/DsListComp.hs @@ -13,6 +13,8 @@ module DsListComp ( dsListComp, dsPArrComp, dsMonadComp ) where #include "HsVersions.h" +import GhcPrelude + import {-# SOURCE #-} DsExpr ( dsExpr, dsLExpr, dsLExprNoLP, dsLocalBinds, dsSyntaxExpr ) import HsSyn diff --git a/compiler/deSugar/DsMeta.hs b/compiler/deSugar/DsMeta.hs index bcdee68edf..2a181e8d16 100644 --- a/compiler/deSugar/DsMeta.hs +++ b/compiler/deSugar/DsMeta.hs @@ -20,6 +20,8 @@ module DsMeta( dsBracket ) where #include "HsVersions.h" +import GhcPrelude + import {-# SOURCE #-} DsExpr ( dsExpr ) import MatchLit diff --git a/compiler/deSugar/DsMonad.hs b/compiler/deSugar/DsMonad.hs index c3a29733be..1eabf02161 100644 --- a/compiler/deSugar/DsMonad.hs +++ b/compiler/deSugar/DsMonad.hs @@ -52,6 +52,8 @@ module DsMonad ( dsNoLevPoly, dsNoLevPolyExpr, dsWhenNoErrs ) where +import GhcPrelude + import TcRnMonad import FamInstEnv import CoreSyn diff --git a/compiler/deSugar/DsUsage.hs b/compiler/deSugar/DsUsage.hs index 62198046d0..2eebca818f 100644 --- a/compiler/deSugar/DsUsage.hs +++ b/compiler/deSugar/DsUsage.hs @@ -7,6 +7,8 @@ module DsUsage ( #include "HsVersions.h" +import GhcPrelude + import DynFlags import HscTypes import TcRnTypes diff --git a/compiler/deSugar/DsUtils.hs b/compiler/deSugar/DsUtils.hs index 088db2c568..3748193a19 100644 --- a/compiler/deSugar/DsUtils.hs +++ b/compiler/deSugar/DsUtils.hs @@ -40,6 +40,8 @@ module DsUtils ( #include "HsVersions.h" +import GhcPrelude + import {-# SOURCE #-} Match ( matchSimply ) import {-# SOURCE #-} DsExpr ( dsLExpr ) diff --git a/compiler/deSugar/Match.hs b/compiler/deSugar/Match.hs index 95cf40dcf2..99529e7d78 100644 --- a/compiler/deSugar/Match.hs +++ b/compiler/deSugar/Match.hs @@ -13,6 +13,8 @@ module Match ( match, matchEquations, matchWrapper, matchSimply, matchSinglePat #include "HsVersions.h" +import GhcPrelude + import {-#SOURCE#-} DsExpr (dsLExpr, dsSyntaxExpr) import DynFlags diff --git a/compiler/deSugar/Match.hs-boot b/compiler/deSugar/Match.hs-boot index 4096b9cd0b..bd23e1a795 100644 --- a/compiler/deSugar/Match.hs-boot +++ b/compiler/deSugar/Match.hs-boot @@ -1,4 +1,6 @@ module Match where + +import GhcPrelude import Var ( Id ) import TcType ( Type ) import DsMonad ( DsM, EquationInfo, MatchResult ) diff --git a/compiler/deSugar/MatchCon.hs b/compiler/deSugar/MatchCon.hs index 7923ae4eb5..5bf8c066f4 100644 --- a/compiler/deSugar/MatchCon.hs +++ b/compiler/deSugar/MatchCon.hs @@ -13,6 +13,8 @@ module MatchCon ( matchConFamily, matchPatSyn ) where #include "HsVersions.h" +import GhcPrelude + import {-# SOURCE #-} Match ( match ) import HsSyn diff --git a/compiler/deSugar/MatchLit.hs b/compiler/deSugar/MatchLit.hs index c3ba420232..355927deef 100644 --- a/compiler/deSugar/MatchLit.hs +++ b/compiler/deSugar/MatchLit.hs @@ -17,6 +17,8 @@ module MatchLit ( dsLit, dsOverLit, dsOverLit', hsLitKey #include "HsVersions.h" +import GhcPrelude + import {-# SOURCE #-} Match ( match ) import {-# SOURCE #-} DsExpr ( dsExpr, dsSyntaxExpr ) diff --git a/compiler/deSugar/PmExpr.hs b/compiler/deSugar/PmExpr.hs index e9af145183..aa1bc814c5 100644 --- a/compiler/deSugar/PmExpr.hs +++ b/compiler/deSugar/PmExpr.hs @@ -15,6 +15,8 @@ module PmExpr ( #include "HsVersions.h" +import GhcPrelude + import HsSyn import Id import Name diff --git a/compiler/deSugar/TmOracle.hs b/compiler/deSugar/TmOracle.hs index 115c0a882f..3644c7847c 100644 --- a/compiler/deSugar/TmOracle.hs +++ b/compiler/deSugar/TmOracle.hs @@ -22,6 +22,8 @@ module TmOracle ( #include "HsVersions.h" +import GhcPrelude + import PmExpr import Id diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in index a961160e61..817b410b0f 100644 --- a/compiler/ghc.cabal.in +++ b/compiler/ghc.cabal.in @@ -161,6 +161,13 @@ Library utils vectorise + -- we use an explicit Prelude + Default-Extensions: + NoImplicitPrelude + + Other-Modules: + GhcPrelude + Exposed-Modules: Ar FileCleanup diff --git a/compiler/ghc.mk b/compiler/ghc.mk index ab52a1ecf3..9bc6b3f278 100644 --- a/compiler/ghc.mk +++ b/compiler/ghc.mk @@ -51,6 +51,8 @@ compiler/stage%/build/Config.hs : mk/config.mk mk/project.mk | $$(dir $$@)/. @echo '{-# LANGUAGE CPP #-}' >> $@ @echo 'module Config where' >> $@ @echo >> $@ + @echo 'import GhcPrelude' >> $@ + @echo >> $@ @echo '#include "ghc_boot_platform.h"' >> $@ @echo >> $@ @echo 'data IntegerLibrary = IntegerGMP' >> $@ diff --git a/compiler/ghci/ByteCodeAsm.hs b/compiler/ghci/ByteCodeAsm.hs index a7395221ce..edb18df382 100644 --- a/compiler/ghci/ByteCodeAsm.hs +++ b/compiler/ghci/ByteCodeAsm.hs @@ -15,6 +15,8 @@ module ByteCodeAsm ( #include "HsVersions.h" +import GhcPrelude + import ByteCodeInstr import ByteCodeItbls import ByteCodeTypes diff --git a/compiler/ghci/ByteCodeGen.hs b/compiler/ghci/ByteCodeGen.hs index 939d1dd760..c7b96a83a0 100644 --- a/compiler/ghci/ByteCodeGen.hs +++ b/compiler/ghci/ByteCodeGen.hs @@ -10,6 +10,8 @@ module ByteCodeGen ( UnlinkedBCO, byteCodeGen, coreExprToBCOs ) where #include "HsVersions.h" +import GhcPrelude + import ByteCodeInstr import ByteCodeAsm import ByteCodeTypes diff --git a/compiler/ghci/ByteCodeInstr.hs b/compiler/ghci/ByteCodeInstr.hs index fabde4e52d..7ef82206cb 100644 --- a/compiler/ghci/ByteCodeInstr.hs +++ b/compiler/ghci/ByteCodeInstr.hs @@ -12,6 +12,8 @@ module ByteCodeInstr ( #include "HsVersions.h" #include "../includes/MachDeps.h" +import GhcPrelude + import ByteCodeTypes import GHCi.RemoteTypes import GHCi.FFI (C_ffi_cif) diff --git a/compiler/ghci/ByteCodeItbls.hs b/compiler/ghci/ByteCodeItbls.hs index 6dc89e1d9d..7381c8f926 100644 --- a/compiler/ghci/ByteCodeItbls.hs +++ b/compiler/ghci/ByteCodeItbls.hs @@ -9,6 +9,8 @@ module ByteCodeItbls ( mkITbls ) where #include "HsVersions.h" +import GhcPrelude + import ByteCodeTypes import GHCi import DynFlags diff --git a/compiler/ghci/ByteCodeLink.hs b/compiler/ghci/ByteCodeLink.hs index e865590f2b..bea431185c 100644 --- a/compiler/ghci/ByteCodeLink.hs +++ b/compiler/ghci/ByteCodeLink.hs @@ -19,6 +19,8 @@ module ByteCodeLink ( #include "HsVersions.h" +import GhcPrelude + import GHCi.RemoteTypes import GHCi.ResolvedBCO import GHCi.InfoTable diff --git a/compiler/ghci/ByteCodeTypes.hs b/compiler/ghci/ByteCodeTypes.hs index 4b78600f70..ecb9d2212f 100644 --- a/compiler/ghci/ByteCodeTypes.hs +++ b/compiler/ghci/ByteCodeTypes.hs @@ -13,6 +13,8 @@ module ByteCodeTypes , CCostCentre ) where +import GhcPrelude + import FastString import Id import Name diff --git a/compiler/ghci/Debugger.hs b/compiler/ghci/Debugger.hs index b40dd5cd89..0db74cb5cb 100644 --- a/compiler/ghci/Debugger.hs +++ b/compiler/ghci/Debugger.hs @@ -14,6 +14,8 @@ module Debugger (pprintClosureCommand, showTerm, pprTypeAndContents) where +import GhcPrelude + import Linker import RtClosureInspect diff --git a/compiler/ghci/DebuggerUtils.hs b/compiler/ghci/DebuggerUtils.hs index 9e3d56e0d1..f67e44860e 100644 --- a/compiler/ghci/DebuggerUtils.hs +++ b/compiler/ghci/DebuggerUtils.hs @@ -4,6 +4,8 @@ module DebuggerUtils ( dataConInfoPtrToName, ) where +import GhcPrelude + import GHCi.InfoTable import CmmInfo ( stdInfoTableSizeB ) import DynFlags diff --git a/compiler/ghci/GHCi.hs b/compiler/ghci/GHCi.hs index 403cffdc70..c9d8fe351e 100644 --- a/compiler/ghci/GHCi.hs +++ b/compiler/ghci/GHCi.hs @@ -46,6 +46,8 @@ module GHCi , fromEvalResult ) where +import GhcPrelude + import GHCi.Message #if defined(GHCI) import GHCi.Run diff --git a/compiler/ghci/Linker.hs b/compiler/ghci/Linker.hs index d174cc089d..b2645f271e 100644 --- a/compiler/ghci/Linker.hs +++ b/compiler/ghci/Linker.hs @@ -20,6 +20,8 @@ module Linker ( getHValue, showLinkerState, #include "HsVersions.h" +import GhcPrelude + import GHCi import GHCi.RemoteTypes import LoadIface diff --git a/compiler/ghci/RtClosureInspect.hs b/compiler/ghci/RtClosureInspect.hs index b269f33a1c..7c532e5755 100644 --- a/compiler/ghci/RtClosureInspect.hs +++ b/compiler/ghci/RtClosureInspect.hs @@ -26,6 +26,8 @@ module RtClosureInspect( #include "HsVersions.h" +import GhcPrelude + import DebuggerUtils import GHCi.RemoteTypes ( HValue ) import qualified GHCi.InfoTable as InfoTable diff --git a/compiler/hsSyn/Convert.hs b/compiler/hsSyn/Convert.hs index 727a04adca..f9e5ca1958 100644 --- a/compiler/hsSyn/Convert.hs +++ b/compiler/hsSyn/Convert.hs @@ -13,6 +13,8 @@ module Convert( convertToHsExpr, convertToPat, convertToHsDecls, convertToHsType, thRdrNameGuesses ) where +import GhcPrelude + import HsSyn as Hs import qualified Class import RdrName diff --git a/compiler/hsSyn/HsBinds.hs b/compiler/hsSyn/HsBinds.hs index 089e2440f6..6648cda42a 100644 --- a/compiler/hsSyn/HsBinds.hs +++ b/compiler/hsSyn/HsBinds.hs @@ -17,6 +17,8 @@ Datatype for: @BindGroup@, @Bind@, @Sig@, @Bind@. module HsBinds where +import GhcPrelude + import {-# SOURCE #-} HsExpr ( pprExpr, LHsExpr, MatchGroup, pprFunBind, GRHSs, pprPatBind ) diff --git a/compiler/hsSyn/HsDecls.hs b/compiler/hsSyn/HsDecls.hs index cb67be8ed7..ecb11a08d6 100644 --- a/compiler/hsSyn/HsDecls.hs +++ b/compiler/hsSyn/HsDecls.hs @@ -87,6 +87,8 @@ module HsDecls ( ) where -- friends: +import GhcPrelude + import {-# SOURCE #-} HsExpr( LHsExpr, HsExpr, HsSplice, pprExpr, pprSpliceDecl ) -- Because Expr imports Decls via HsBracket diff --git a/compiler/hsSyn/HsDoc.hs b/compiler/hsSyn/HsDoc.hs index d9c5dba296..7c6bdd9431 100644 --- a/compiler/hsSyn/HsDoc.hs +++ b/compiler/hsSyn/HsDoc.hs @@ -8,6 +8,8 @@ module HsDoc ( #include "HsVersions.h" +import GhcPrelude + import Outputable import SrcLoc import FastString diff --git a/compiler/hsSyn/HsDumpAst.hs b/compiler/hsSyn/HsDumpAst.hs index 8ab9cd40fa..1a1c259c01 100644 --- a/compiler/hsSyn/HsDumpAst.hs +++ b/compiler/hsSyn/HsDumpAst.hs @@ -15,6 +15,8 @@ module HsDumpAst ( BlankSrcSpan(..), ) where +import GhcPrelude + import Data.Data hiding (Fixity) import Bag import BasicTypes diff --git a/compiler/hsSyn/HsExpr.hs b/compiler/hsSyn/HsExpr.hs index 2186a728f2..5ee359e6b3 100644 --- a/compiler/hsSyn/HsExpr.hs +++ b/compiler/hsSyn/HsExpr.hs @@ -18,6 +18,8 @@ module HsExpr where #include "HsVersions.h" -- friends: +import GhcPrelude + import HsDecls import HsPat import HsLit diff --git a/compiler/hsSyn/HsExtension.hs b/compiler/hsSyn/HsExtension.hs index 880f7096c6..80dfa67ea3 100644 --- a/compiler/hsSyn/HsExtension.hs +++ b/compiler/hsSyn/HsExtension.hs @@ -13,6 +13,8 @@ module HsExtension where -- This module captures the type families to precisely identify the extension -- points for HsSyn +import GhcPrelude + import GHC.Exts (Constraint) import Data.Data hiding ( Fixity ) import PlaceHolder diff --git a/compiler/hsSyn/HsImpExp.hs b/compiler/hsSyn/HsImpExp.hs index 79ff2876aa..2930b51ee2 100644 --- a/compiler/hsSyn/HsImpExp.hs +++ b/compiler/hsSyn/HsImpExp.hs @@ -14,6 +14,8 @@ HsImpExp: Abstract syntax: imports, exports, interfaces module HsImpExp where +import GhcPrelude + import Module ( ModuleName ) import HsDoc ( HsDocString ) import OccName ( HasOccName(..), isTcOcc, isSymOcc ) diff --git a/compiler/hsSyn/HsLit.hs b/compiler/hsSyn/HsLit.hs index 8995ed93b3..7f0864eccc 100644 --- a/compiler/hsSyn/HsLit.hs +++ b/compiler/hsSyn/HsLit.hs @@ -19,6 +19,8 @@ module HsLit where #include "HsVersions.h" +import GhcPrelude + import {-# SOURCE #-} HsExpr( HsExpr, pprExpr ) import BasicTypes ( IntegralLit(..),FractionalLit(..),negateIntegralLit, negateFractionalLit,SourceText(..),pprWithSourceText ) diff --git a/compiler/hsSyn/HsPat.hs b/compiler/hsSyn/HsPat.hs index 445086867d..e05d8bbf68 100644 --- a/compiler/hsSyn/HsPat.hs +++ b/compiler/hsSyn/HsPat.hs @@ -38,6 +38,8 @@ module HsPat ( pprParendLPat, pprConArgs ) where +import GhcPrelude + import {-# SOURCE #-} HsExpr (SyntaxExpr, LHsExpr, HsSplice, pprLExpr, pprSplice) -- friends: diff --git a/compiler/hsSyn/HsSyn.hs b/compiler/hsSyn/HsSyn.hs index 76afa8b81e..62bfa2e5c5 100644 --- a/compiler/hsSyn/HsSyn.hs +++ b/compiler/hsSyn/HsSyn.hs @@ -34,6 +34,8 @@ module HsSyn ( ) where -- friends: +import GhcPrelude + import HsDecls import HsBinds import HsExpr diff --git a/compiler/hsSyn/HsTypes.hs b/compiler/hsSyn/HsTypes.hs index 47d38353f8..b9cd9462f3 100644 --- a/compiler/hsSyn/HsTypes.hs +++ b/compiler/hsSyn/HsTypes.hs @@ -68,6 +68,8 @@ module HsTypes ( pprHsContext, pprHsContextNoArrow, pprHsContextMaybe ) where +import GhcPrelude + import {-# SOURCE #-} HsExpr ( HsSplice, pprSplice ) import PlaceHolder ( PlaceHolder(..) ) diff --git a/compiler/hsSyn/HsUtils.hs b/compiler/hsSyn/HsUtils.hs index a72e3c8469..8ba143e50e 100644 --- a/compiler/hsSyn/HsUtils.hs +++ b/compiler/hsSyn/HsUtils.hs @@ -92,6 +92,8 @@ module HsUtils( #include "HsVersions.h" +import GhcPrelude + import HsDecls import HsBinds import HsExpr diff --git a/compiler/hsSyn/PlaceHolder.hs b/compiler/hsSyn/PlaceHolder.hs index 5c716d259c..0b4711a364 100644 --- a/compiler/hsSyn/PlaceHolder.hs +++ b/compiler/hsSyn/PlaceHolder.hs @@ -6,6 +6,8 @@ module PlaceHolder where +import GhcPrelude () + import Type ( Type ) import Outputable import Name diff --git a/compiler/iface/BinFingerprint.hs b/compiler/iface/BinFingerprint.hs index bbf45d7d0c..913ece0f27 100644 --- a/compiler/iface/BinFingerprint.hs +++ b/compiler/iface/BinFingerprint.hs @@ -10,6 +10,8 @@ module BinFingerprint #include "HsVersions.h" +import GhcPrelude + import Fingerprint import Binary import Name diff --git a/compiler/iface/BinIface.hs b/compiler/iface/BinIface.hs index f658d7f156..969dc85c04 100644 --- a/compiler/iface/BinIface.hs +++ b/compiler/iface/BinIface.hs @@ -20,6 +20,8 @@ module BinIface ( #include "HsVersions.h" +import GhcPrelude + import TcRnMonad import PrelInfo ( isKnownKeyName, lookupKnownKeyName ) import IfaceEnv diff --git a/compiler/iface/BuildTyCl.hs b/compiler/iface/BuildTyCl.hs index a5b724994c..4eb8271477 100644 --- a/compiler/iface/BuildTyCl.hs +++ b/compiler/iface/BuildTyCl.hs @@ -15,6 +15,8 @@ module BuildTyCl ( #include "HsVersions.h" +import GhcPrelude + import IfaceEnv import FamInstEnv( FamInstEnvs, mkNewTypeCoAxiom ) import TysWiredIn( isCTupleTyConName ) diff --git a/compiler/iface/FlagChecker.hs b/compiler/iface/FlagChecker.hs index fd0459d6cc..eb99c743e6 100644 --- a/compiler/iface/FlagChecker.hs +++ b/compiler/iface/FlagChecker.hs @@ -6,6 +6,8 @@ module FlagChecker ( fingerprintDynFlags ) where +import GhcPrelude + import Binary import BinIface () import DynFlags diff --git a/compiler/iface/IfaceEnv.hs b/compiler/iface/IfaceEnv.hs index f66ebdc321..285bb2899c 100644 --- a/compiler/iface/IfaceEnv.hs +++ b/compiler/iface/IfaceEnv.hs @@ -22,6 +22,8 @@ module IfaceEnv ( #include "HsVersions.h" +import GhcPrelude + import TcRnMonad import HscTypes import Type diff --git a/compiler/iface/IfaceSyn.hs b/compiler/iface/IfaceSyn.hs index 1373fb0fcb..191ebbf368 100644 --- a/compiler/iface/IfaceSyn.hs +++ b/compiler/iface/IfaceSyn.hs @@ -41,6 +41,8 @@ module IfaceSyn ( #include "HsVersions.h" +import GhcPrelude + import IfaceType import BinFingerprint import CoreSyn( IsOrphan, isOrphan ) diff --git a/compiler/iface/IfaceType.hs b/compiler/iface/IfaceType.hs index 3475366e31..096430e04f 100644 --- a/compiler/iface/IfaceType.hs +++ b/compiler/iface/IfaceType.hs @@ -49,6 +49,8 @@ module IfaceType ( #include "HsVersions.h" +import GhcPrelude + import {-# SOURCE #-} TysWiredIn ( liftedRepDataConTyCon ) import DynFlags diff --git a/compiler/iface/LoadIface.hs b/compiler/iface/LoadIface.hs index 01fdaacd9f..60698287a0 100644 --- a/compiler/iface/LoadIface.hs +++ b/compiler/iface/LoadIface.hs @@ -32,6 +32,8 @@ module LoadIface ( #include "HsVersions.h" +import GhcPrelude + import {-# SOURCE #-} TcIface( tcIfaceDecl, tcIfaceRules, tcIfaceInst, tcIfaceFamInst, tcIfaceVectInfo, tcIfaceAnnotations, tcIfaceCompleteSigs ) diff --git a/compiler/iface/MkIface.hs b/compiler/iface/MkIface.hs index 94ace18545..184ee48984 100644 --- a/compiler/iface/MkIface.hs +++ b/compiler/iface/MkIface.hs @@ -58,6 +58,8 @@ Basic idea: #include "HsVersions.h" +import GhcPrelude + import IfaceSyn import BinFingerprint import LoadIface diff --git a/compiler/iface/TcIface.hs b/compiler/iface/TcIface.hs index d17e2351e3..8633658dd9 100644 --- a/compiler/iface/TcIface.hs +++ b/compiler/iface/TcIface.hs @@ -22,6 +22,8 @@ module TcIface ( #include "HsVersions.h" +import GhcPrelude + import TcTypeNats(typeNatCoAxiomRules) import IfaceSyn import LoadIface diff --git a/compiler/iface/TcIface.hs-boot b/compiler/iface/TcIface.hs-boot index 4a99114fc0..dbc5ff14f8 100644 --- a/compiler/iface/TcIface.hs-boot +++ b/compiler/iface/TcIface.hs-boot @@ -1,5 +1,6 @@ module TcIface where +import GhcPrelude import IfaceSyn ( IfaceDecl, IfaceClsInst, IfaceFamInst, IfaceRule, IfaceAnnotation, IfaceCompleteMatch ) import TyCoRep ( TyThing ) diff --git a/compiler/iface/ToIface.hs b/compiler/iface/ToIface.hs index f5cbe9e5c7..9eceb6d750 100644 --- a/compiler/iface/ToIface.hs +++ b/compiler/iface/ToIface.hs @@ -44,6 +44,8 @@ module ToIface #include "HsVersions.h" +import GhcPrelude + import IfaceSyn import DataCon import Id diff --git a/compiler/llvmGen/Llvm/AbsSyn.hs b/compiler/llvmGen/Llvm/AbsSyn.hs index 7dd3c4807b..a748ac5657 100644 --- a/compiler/llvmGen/Llvm/AbsSyn.hs +++ b/compiler/llvmGen/Llvm/AbsSyn.hs @@ -4,6 +4,8 @@ module Llvm.AbsSyn where +import GhcPrelude + import Llvm.MetaData import Llvm.Types diff --git a/compiler/llvmGen/Llvm/MetaData.hs b/compiler/llvmGen/Llvm/MetaData.hs index 5fe9e37ddc..97e8086f42 100644 --- a/compiler/llvmGen/Llvm/MetaData.hs +++ b/compiler/llvmGen/Llvm/MetaData.hs @@ -2,6 +2,8 @@ module Llvm.MetaData where +import GhcPrelude + import Llvm.Types import Outputable diff --git a/compiler/llvmGen/Llvm/PpLlvm.hs b/compiler/llvmGen/Llvm/PpLlvm.hs index f2eeffe114..b350ab408d 100644 --- a/compiler/llvmGen/Llvm/PpLlvm.hs +++ b/compiler/llvmGen/Llvm/PpLlvm.hs @@ -25,6 +25,8 @@ module Llvm.PpLlvm ( #include "HsVersions.h" +import GhcPrelude + import Llvm.AbsSyn import Llvm.MetaData import Llvm.Types diff --git a/compiler/llvmGen/Llvm/Types.hs b/compiler/llvmGen/Llvm/Types.hs index bf23cd89f7..87111499fc 100644 --- a/compiler/llvmGen/Llvm/Types.hs +++ b/compiler/llvmGen/Llvm/Types.hs @@ -8,6 +8,8 @@ module Llvm.Types where #include "HsVersions.h" +import GhcPrelude + import Data.Char import Data.Int import Numeric diff --git a/compiler/llvmGen/LlvmCodeGen.hs b/compiler/llvmGen/LlvmCodeGen.hs index c11252aa10..3fcf83ab2f 100644 --- a/compiler/llvmGen/LlvmCodeGen.hs +++ b/compiler/llvmGen/LlvmCodeGen.hs @@ -7,6 +7,8 @@ module LlvmCodeGen ( llvmCodeGen, llvmFixupAsm ) where #include "HsVersions.h" +import GhcPrelude + import Llvm import LlvmCodeGen.Base import LlvmCodeGen.CodeGen diff --git a/compiler/llvmGen/LlvmCodeGen/Base.hs b/compiler/llvmGen/LlvmCodeGen/Base.hs index 424891fe77..6e20da48c1 100644 --- a/compiler/llvmGen/LlvmCodeGen/Base.hs +++ b/compiler/llvmGen/LlvmCodeGen/Base.hs @@ -37,6 +37,8 @@ module LlvmCodeGen.Base ( #include "HsVersions.h" #include "ghcautoconf.h" +import GhcPrelude + import Llvm import LlvmCodeGen.Regs diff --git a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs index 099e8194bd..584d90cad0 100644 --- a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs +++ b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs @@ -7,6 +7,8 @@ module LlvmCodeGen.CodeGen ( genLlvmProc ) where #include "HsVersions.h" +import GhcPrelude + import Llvm import LlvmCodeGen.Base import LlvmCodeGen.Regs diff --git a/compiler/llvmGen/LlvmCodeGen/Data.hs b/compiler/llvmGen/LlvmCodeGen/Data.hs index 39abbd1ac0..89b8fe7013 100644 --- a/compiler/llvmGen/LlvmCodeGen/Data.hs +++ b/compiler/llvmGen/LlvmCodeGen/Data.hs @@ -9,6 +9,8 @@ module LlvmCodeGen.Data ( #include "HsVersions.h" +import GhcPrelude + import Llvm import LlvmCodeGen.Base diff --git a/compiler/llvmGen/LlvmCodeGen/Ppr.hs b/compiler/llvmGen/LlvmCodeGen/Ppr.hs index ef32d41d7c..2a8340bcf9 100644 --- a/compiler/llvmGen/LlvmCodeGen/Ppr.hs +++ b/compiler/llvmGen/LlvmCodeGen/Ppr.hs @@ -9,6 +9,8 @@ module LlvmCodeGen.Ppr ( #include "HsVersions.h" +import GhcPrelude + import Llvm import LlvmCodeGen.Base import LlvmCodeGen.Data diff --git a/compiler/llvmGen/LlvmCodeGen/Regs.hs b/compiler/llvmGen/LlvmCodeGen/Regs.hs index e09ab8026c..8cdf3c6869 100644 --- a/compiler/llvmGen/LlvmCodeGen/Regs.hs +++ b/compiler/llvmGen/LlvmCodeGen/Regs.hs @@ -11,6 +11,8 @@ module LlvmCodeGen.Regs ( #include "HsVersions.h" +import GhcPrelude + import Llvm import CmmExpr diff --git a/compiler/llvmGen/LlvmMangler.hs b/compiler/llvmGen/LlvmMangler.hs index eed13ba203..fe03cf21e9 100644 --- a/compiler/llvmGen/LlvmMangler.hs +++ b/compiler/llvmGen/LlvmMangler.hs @@ -11,6 +11,8 @@ module LlvmMangler ( llvmFixupAsm ) where +import GhcPrelude + import DynFlags ( DynFlags, targetPlatform ) import Platform ( platformArch, Arch(..) ) import ErrUtils ( withTiming ) 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 diff --git a/compiler/nativeGen/AsmCodeGen.hs b/compiler/nativeGen/AsmCodeGen.hs index 314d726b50..373852a4be 100644 --- a/compiler/nativeGen/AsmCodeGen.hs +++ b/compiler/nativeGen/AsmCodeGen.hs @@ -25,6 +25,8 @@ module AsmCodeGen ( #include "nativeGen/NCG.h" +import GhcPrelude + import qualified X86.CodeGen import qualified X86.Regs import qualified X86.Instr diff --git a/compiler/nativeGen/CPrim.hs b/compiler/nativeGen/CPrim.hs index c52fe10b13..ad61a002d3 100644 --- a/compiler/nativeGen/CPrim.hs +++ b/compiler/nativeGen/CPrim.hs @@ -11,6 +11,8 @@ module CPrim , word2FloatLabel ) where +import GhcPrelude + import CmmType import CmmMachOp import Outputable diff --git a/compiler/nativeGen/Dwarf.hs b/compiler/nativeGen/Dwarf.hs index afeac030fd..b858b7734d 100644 --- a/compiler/nativeGen/Dwarf.hs +++ b/compiler/nativeGen/Dwarf.hs @@ -2,6 +2,8 @@ module Dwarf ( dwarfGen ) where +import GhcPrelude + import CLabel import CmmExpr ( GlobalReg(..) ) import Config ( cProjectName, cProjectVersion ) diff --git a/compiler/nativeGen/Dwarf/Constants.hs b/compiler/nativeGen/Dwarf/Constants.hs index a8034ef295..db5395af35 100644 --- a/compiler/nativeGen/Dwarf/Constants.hs +++ b/compiler/nativeGen/Dwarf/Constants.hs @@ -3,6 +3,8 @@ module Dwarf.Constants where +import GhcPrelude + import AsmUtils import FastString import Platform diff --git a/compiler/nativeGen/Dwarf/Types.hs b/compiler/nativeGen/Dwarf/Types.hs index 95f07151ce..23a2c920e7 100644 --- a/compiler/nativeGen/Dwarf/Types.hs +++ b/compiler/nativeGen/Dwarf/Types.hs @@ -22,6 +22,8 @@ module Dwarf.Types ) where +import GhcPrelude + import Debug import CLabel import CmmExpr ( GlobalReg(..) ) diff --git a/compiler/nativeGen/Format.hs b/compiler/nativeGen/Format.hs index 1e3218517a..82ecbecc14 100644 --- a/compiler/nativeGen/Format.hs +++ b/compiler/nativeGen/Format.hs @@ -20,6 +20,8 @@ module Format ( where +import GhcPrelude + import Cmm import Outputable diff --git a/compiler/nativeGen/Instruction.hs b/compiler/nativeGen/Instruction.hs index 515d4f3d85..63b5b0df7e 100644 --- a/compiler/nativeGen/Instruction.hs +++ b/compiler/nativeGen/Instruction.hs @@ -14,6 +14,8 @@ module Instruction ( where +import GhcPrelude + import Reg import BlockId diff --git a/compiler/nativeGen/NCGMonad.hs b/compiler/nativeGen/NCGMonad.hs index 6af0df5b01..f4d02dae3c 100644 --- a/compiler/nativeGen/NCGMonad.hs +++ b/compiler/nativeGen/NCGMonad.hs @@ -37,6 +37,8 @@ where #include "HsVersions.h" +import GhcPrelude + import Reg import Format import TargetReg diff --git a/compiler/nativeGen/PIC.hs b/compiler/nativeGen/PIC.hs index de1fbaa8d4..165c3a7a44 100644 --- a/compiler/nativeGen/PIC.hs +++ b/compiler/nativeGen/PIC.hs @@ -47,6 +47,8 @@ module PIC ( where +import GhcPrelude + import qualified PPC.Instr as PPC import qualified PPC.Regs as PPC diff --git a/compiler/nativeGen/PPC/CodeGen.hs b/compiler/nativeGen/PPC/CodeGen.hs index 7b898ee6b0..299238b7a5 100644 --- a/compiler/nativeGen/PPC/CodeGen.hs +++ b/compiler/nativeGen/PPC/CodeGen.hs @@ -25,6 +25,8 @@ where #include "../includes/MachDeps.h" -- NCG stuff: +import GhcPrelude + import CodeGen.Platform import PPC.Instr import PPC.Cond diff --git a/compiler/nativeGen/PPC/Cond.hs b/compiler/nativeGen/PPC/Cond.hs index 0e4b1fd701..bd8bdee81a 100644 --- a/compiler/nativeGen/PPC/Cond.hs +++ b/compiler/nativeGen/PPC/Cond.hs @@ -8,6 +8,8 @@ module PPC.Cond ( where +import GhcPrelude + import Panic data Cond diff --git a/compiler/nativeGen/PPC/Instr.hs b/compiler/nativeGen/PPC/Instr.hs index eb179c5a99..d39f0bcff5 100644 --- a/compiler/nativeGen/PPC/Instr.hs +++ b/compiler/nativeGen/PPC/Instr.hs @@ -23,6 +23,8 @@ module PPC.Instr ( where +import GhcPrelude + import PPC.Regs import PPC.Cond import Instruction diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs index fe8d9e6484..7f8f407bd8 100644 --- a/compiler/nativeGen/PPC/Ppr.hs +++ b/compiler/nativeGen/PPC/Ppr.hs @@ -9,6 +9,8 @@ {-# OPTIONS_GHC -fno-warn-orphans #-} module PPC.Ppr (pprNatCmmDecl) where +import GhcPrelude + import PPC.Regs import PPC.Instr import PPC.Cond diff --git a/compiler/nativeGen/PPC/RegInfo.hs b/compiler/nativeGen/PPC/RegInfo.hs index c4724d4193..bf894fd42f 100644 --- a/compiler/nativeGen/PPC/RegInfo.hs +++ b/compiler/nativeGen/PPC/RegInfo.hs @@ -20,6 +20,8 @@ where #include "nativeGen/NCG.h" #include "HsVersions.h" +import GhcPrelude + import PPC.Instr import BlockId diff --git a/compiler/nativeGen/PPC/Regs.hs b/compiler/nativeGen/PPC/Regs.hs index 5c7c5aec90..7ebe36f178 100644 --- a/compiler/nativeGen/PPC/Regs.hs +++ b/compiler/nativeGen/PPC/Regs.hs @@ -50,6 +50,8 @@ where #include "nativeGen/NCG.h" #include "HsVersions.h" +import GhcPrelude + import Reg import RegClass import Format diff --git a/compiler/nativeGen/PprBase.hs b/compiler/nativeGen/PprBase.hs index aca427449d..d96b18783d 100644 --- a/compiler/nativeGen/PprBase.hs +++ b/compiler/nativeGen/PprBase.hs @@ -16,6 +16,8 @@ module PprBase ( where +import GhcPrelude + import AsmUtils import CLabel import Cmm diff --git a/compiler/nativeGen/Reg.hs b/compiler/nativeGen/Reg.hs index 598074d881..d9d56d47c4 100644 --- a/compiler/nativeGen/Reg.hs +++ b/compiler/nativeGen/Reg.hs @@ -26,6 +26,8 @@ module Reg ( where +import GhcPrelude + import Outputable import Unique import RegClass diff --git a/compiler/nativeGen/RegAlloc/Graph/ArchBase.hs b/compiler/nativeGen/RegAlloc/Graph/ArchBase.hs index 6771e4ecb9..634e61cb13 100644 --- a/compiler/nativeGen/RegAlloc/Graph/ArchBase.hs +++ b/compiler/nativeGen/RegAlloc/Graph/ArchBase.hs @@ -21,6 +21,8 @@ module RegAlloc.Graph.ArchBase ( bound, squeese ) where +import GhcPrelude + import UniqSet import UniqFM import Unique diff --git a/compiler/nativeGen/RegAlloc/Graph/ArchX86.hs b/compiler/nativeGen/RegAlloc/Graph/ArchX86.hs index 9873118dcf..0472e4cf09 100644 --- a/compiler/nativeGen/RegAlloc/Graph/ArchX86.hs +++ b/compiler/nativeGen/RegAlloc/Graph/ArchX86.hs @@ -15,6 +15,8 @@ module RegAlloc.Graph.ArchX86 ( squeese, ) where +import GhcPrelude + import RegAlloc.Graph.ArchBase (Reg(..), RegSub(..), RegClass(..)) import UniqSet diff --git a/compiler/nativeGen/RegAlloc/Graph/Coalesce.hs b/compiler/nativeGen/RegAlloc/Graph/Coalesce.hs index 832df2334e..0f5cf2dfd8 100644 --- a/compiler/nativeGen/RegAlloc/Graph/Coalesce.hs +++ b/compiler/nativeGen/RegAlloc/Graph/Coalesce.hs @@ -3,6 +3,8 @@ module RegAlloc.Graph.Coalesce ( regCoalesce, slurpJoinMovs ) where +import GhcPrelude + import RegAlloc.Liveness import Instruction import Reg diff --git a/compiler/nativeGen/RegAlloc/Graph/Main.hs b/compiler/nativeGen/RegAlloc/Graph/Main.hs index 08538453f7..a4d1841c93 100644 --- a/compiler/nativeGen/RegAlloc/Graph/Main.hs +++ b/compiler/nativeGen/RegAlloc/Graph/Main.hs @@ -4,6 +4,8 @@ module RegAlloc.Graph.Main ( regAlloc ) where +import GhcPrelude + import qualified GraphColor as Color import RegAlloc.Liveness import RegAlloc.Graph.Spill diff --git a/compiler/nativeGen/RegAlloc/Graph/Spill.hs b/compiler/nativeGen/RegAlloc/Graph/Spill.hs index b86b143f59..02da824cfe 100644 --- a/compiler/nativeGen/RegAlloc/Graph/Spill.hs +++ b/compiler/nativeGen/RegAlloc/Graph/Spill.hs @@ -7,6 +7,8 @@ module RegAlloc.Graph.Spill ( SpillStats(..), accSpillSL ) where +import GhcPrelude + import RegAlloc.Liveness import Instruction import Reg diff --git a/compiler/nativeGen/RegAlloc/Graph/SpillClean.hs b/compiler/nativeGen/RegAlloc/Graph/SpillClean.hs index faef4037c2..50001d7334 100644 --- a/compiler/nativeGen/RegAlloc/Graph/SpillClean.hs +++ b/compiler/nativeGen/RegAlloc/Graph/SpillClean.hs @@ -28,6 +28,8 @@ module RegAlloc.Graph.SpillClean ( cleanSpills ) where +import GhcPrelude + import RegAlloc.Liveness import Instruction import Reg diff --git a/compiler/nativeGen/RegAlloc/Graph/SpillCost.hs b/compiler/nativeGen/RegAlloc/Graph/SpillCost.hs index 9811f1a64b..f603b609df 100644 --- a/compiler/nativeGen/RegAlloc/Graph/SpillCost.hs +++ b/compiler/nativeGen/RegAlloc/Graph/SpillCost.hs @@ -13,6 +13,8 @@ module RegAlloc.Graph.SpillCost ( lifeMapFromSpillCostInfo ) where +import GhcPrelude + import RegAlloc.Liveness import Instruction import RegClass diff --git a/compiler/nativeGen/RegAlloc/Graph/Stats.hs b/compiler/nativeGen/RegAlloc/Graph/Stats.hs index 71956025b0..e3ff226710 100644 --- a/compiler/nativeGen/RegAlloc/Graph/Stats.hs +++ b/compiler/nativeGen/RegAlloc/Graph/Stats.hs @@ -16,6 +16,8 @@ module RegAlloc.Graph.Stats ( #include "nativeGen/NCG.h" +import GhcPrelude + import qualified GraphColor as Color import RegAlloc.Liveness import RegAlloc.Graph.Spill diff --git a/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs b/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs index 204de846ae..7774985dce 100644 --- a/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs +++ b/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs @@ -8,6 +8,8 @@ where #include "HsVersions.h" +import GhcPrelude + import RegClass import Reg diff --git a/compiler/nativeGen/RegAlloc/Linear/Base.hs b/compiler/nativeGen/RegAlloc/Linear/Base.hs index d4f124e297..1172870729 100644 --- a/compiler/nativeGen/RegAlloc/Linear/Base.hs +++ b/compiler/nativeGen/RegAlloc/Linear/Base.hs @@ -17,6 +17,8 @@ module RegAlloc.Linear.Base ( where +import GhcPrelude + import RegAlloc.Linear.StackMap import RegAlloc.Liveness import Reg diff --git a/compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs b/compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs index 9933f5bb49..b4e79432d8 100644 --- a/compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs +++ b/compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs @@ -9,6 +9,8 @@ module RegAlloc.Linear.FreeRegs ( where +import GhcPrelude + import Reg import RegClass diff --git a/compiler/nativeGen/RegAlloc/Linear/JoinToTargets.hs b/compiler/nativeGen/RegAlloc/Linear/JoinToTargets.hs index c262b2b059..89f496c409 100644 --- a/compiler/nativeGen/RegAlloc/Linear/JoinToTargets.hs +++ b/compiler/nativeGen/RegAlloc/Linear/JoinToTargets.hs @@ -9,6 +9,8 @@ -- module RegAlloc.Linear.JoinToTargets (joinToTargets) where +import GhcPrelude + import RegAlloc.Linear.State import RegAlloc.Linear.Base import RegAlloc.Linear.FreeRegs diff --git a/compiler/nativeGen/RegAlloc/Linear/Main.hs b/compiler/nativeGen/RegAlloc/Linear/Main.hs index c13d02edb8..171ce88ef3 100644 --- a/compiler/nativeGen/RegAlloc/Linear/Main.hs +++ b/compiler/nativeGen/RegAlloc/Linear/Main.hs @@ -102,6 +102,8 @@ module RegAlloc.Linear.Main ( #include "HsVersions.h" +import GhcPrelude + import RegAlloc.Linear.State import RegAlloc.Linear.Base import RegAlloc.Linear.StackMap diff --git a/compiler/nativeGen/RegAlloc/Linear/PPC/FreeRegs.hs b/compiler/nativeGen/RegAlloc/Linear/PPC/FreeRegs.hs index 5d369249c7..581548212a 100644 --- a/compiler/nativeGen/RegAlloc/Linear/PPC/FreeRegs.hs +++ b/compiler/nativeGen/RegAlloc/Linear/PPC/FreeRegs.hs @@ -2,6 +2,8 @@ module RegAlloc.Linear.PPC.FreeRegs where +import GhcPrelude + import PPC.Regs import RegClass import Reg diff --git a/compiler/nativeGen/RegAlloc/Linear/SPARC/FreeRegs.hs b/compiler/nativeGen/RegAlloc/Linear/SPARC/FreeRegs.hs index db4d6ba376..653b2707c9 100644 --- a/compiler/nativeGen/RegAlloc/Linear/SPARC/FreeRegs.hs +++ b/compiler/nativeGen/RegAlloc/Linear/SPARC/FreeRegs.hs @@ -3,6 +3,8 @@ module RegAlloc.Linear.SPARC.FreeRegs where +import GhcPrelude + import SPARC.Regs import RegClass import Reg diff --git a/compiler/nativeGen/RegAlloc/Linear/StackMap.hs b/compiler/nativeGen/RegAlloc/Linear/StackMap.hs index 748fb98c30..95819c6fb3 100644 --- a/compiler/nativeGen/RegAlloc/Linear/StackMap.hs +++ b/compiler/nativeGen/RegAlloc/Linear/StackMap.hs @@ -20,6 +20,8 @@ module RegAlloc.Linear.StackMap ( where +import GhcPrelude + import DynFlags import UniqFM import Unique diff --git a/compiler/nativeGen/RegAlloc/Linear/State.hs b/compiler/nativeGen/RegAlloc/Linear/State.hs index 8b17d3ab88..6554188f41 100644 --- a/compiler/nativeGen/RegAlloc/Linear/State.hs +++ b/compiler/nativeGen/RegAlloc/Linear/State.hs @@ -31,6 +31,8 @@ module RegAlloc.Linear.State ( ) where +import GhcPrelude + import RegAlloc.Linear.Stats import RegAlloc.Linear.StackMap import RegAlloc.Linear.Base diff --git a/compiler/nativeGen/RegAlloc/Linear/Stats.hs b/compiler/nativeGen/RegAlloc/Linear/Stats.hs index 71dedaeb55..66fd8742ba 100644 --- a/compiler/nativeGen/RegAlloc/Linear/Stats.hs +++ b/compiler/nativeGen/RegAlloc/Linear/Stats.hs @@ -6,6 +6,8 @@ module RegAlloc.Linear.Stats ( where +import GhcPrelude + import RegAlloc.Linear.Base import RegAlloc.Liveness import Instruction diff --git a/compiler/nativeGen/RegAlloc/Linear/X86/FreeRegs.hs b/compiler/nativeGen/RegAlloc/Linear/X86/FreeRegs.hs index ae4aa53254..65a566d1c3 100644 --- a/compiler/nativeGen/RegAlloc/Linear/X86/FreeRegs.hs +++ b/compiler/nativeGen/RegAlloc/Linear/X86/FreeRegs.hs @@ -3,6 +3,8 @@ module RegAlloc.Linear.X86.FreeRegs where +import GhcPrelude + import X86.Regs import RegClass import Reg diff --git a/compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs b/compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs index 5a7f71e3f0..713b053356 100644 --- a/compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs +++ b/compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs @@ -3,6 +3,8 @@ module RegAlloc.Linear.X86_64.FreeRegs where +import GhcPrelude + import X86.Regs import RegClass import Reg diff --git a/compiler/nativeGen/RegAlloc/Liveness.hs b/compiler/nativeGen/RegAlloc/Liveness.hs index e66139786b..db09b0e994 100644 --- a/compiler/nativeGen/RegAlloc/Liveness.hs +++ b/compiler/nativeGen/RegAlloc/Liveness.hs @@ -35,6 +35,8 @@ module RegAlloc.Liveness ( regLiveness, natCmmTopToLive ) where +import GhcPrelude + import Reg import Instruction diff --git a/compiler/nativeGen/RegClass.hs b/compiler/nativeGen/RegClass.hs index 0c793173cb..cd008bbbb1 100644 --- a/compiler/nativeGen/RegClass.hs +++ b/compiler/nativeGen/RegClass.hs @@ -4,6 +4,8 @@ module RegClass where +import GhcPrelude + import Outputable import Unique diff --git a/compiler/nativeGen/SPARC/AddrMode.hs b/compiler/nativeGen/SPARC/AddrMode.hs index bf4d480005..ee40843351 100644 --- a/compiler/nativeGen/SPARC/AddrMode.hs +++ b/compiler/nativeGen/SPARC/AddrMode.hs @@ -6,6 +6,8 @@ module SPARC.AddrMode ( where +import GhcPrelude + import SPARC.Imm import SPARC.Base import Reg diff --git a/compiler/nativeGen/SPARC/Base.hs b/compiler/nativeGen/SPARC/Base.hs index a57d5e1c9a..04e8fed2b3 100644 --- a/compiler/nativeGen/SPARC/Base.hs +++ b/compiler/nativeGen/SPARC/Base.hs @@ -18,6 +18,8 @@ module SPARC.Base ( where +import GhcPrelude + import DynFlags import Panic diff --git a/compiler/nativeGen/SPARC/CodeGen.hs b/compiler/nativeGen/SPARC/CodeGen.hs index 902a5aea43..1a7fbeb54d 100644 --- a/compiler/nativeGen/SPARC/CodeGen.hs +++ b/compiler/nativeGen/SPARC/CodeGen.hs @@ -22,6 +22,8 @@ where #include "../includes/MachDeps.h" -- NCG stuff: +import GhcPrelude + import SPARC.Base import SPARC.CodeGen.Sanity import SPARC.CodeGen.Amode diff --git a/compiler/nativeGen/SPARC/CodeGen/Amode.hs b/compiler/nativeGen/SPARC/CodeGen/Amode.hs index a59287f171..33e3f535da 100644 --- a/compiler/nativeGen/SPARC/CodeGen/Amode.hs +++ b/compiler/nativeGen/SPARC/CodeGen/Amode.hs @@ -4,6 +4,8 @@ module SPARC.CodeGen.Amode ( where +import GhcPrelude + import {-# SOURCE #-} SPARC.CodeGen.Gen32 import SPARC.CodeGen.Base import SPARC.AddrMode diff --git a/compiler/nativeGen/SPARC/CodeGen/Base.hs b/compiler/nativeGen/SPARC/CodeGen/Base.hs index 27b533f46b..039bb6496c 100644 --- a/compiler/nativeGen/SPARC/CodeGen/Base.hs +++ b/compiler/nativeGen/SPARC/CodeGen/Base.hs @@ -13,6 +13,8 @@ module SPARC.CodeGen.Base ( where +import GhcPrelude + import SPARC.Instr import SPARC.Cond import SPARC.AddrMode diff --git a/compiler/nativeGen/SPARC/CodeGen/CondCode.hs b/compiler/nativeGen/SPARC/CodeGen/CondCode.hs index e5fb82df4d..e6b2e174b6 100644 --- a/compiler/nativeGen/SPARC/CodeGen/CondCode.hs +++ b/compiler/nativeGen/SPARC/CodeGen/CondCode.hs @@ -6,6 +6,8 @@ module SPARC.CodeGen.CondCode ( where +import GhcPrelude + import {-# SOURCE #-} SPARC.CodeGen.Gen32 import SPARC.CodeGen.Base import SPARC.Instr diff --git a/compiler/nativeGen/SPARC/CodeGen/Expand.hs b/compiler/nativeGen/SPARC/CodeGen/Expand.hs index 70cb0111c0..cf861df77a 100644 --- a/compiler/nativeGen/SPARC/CodeGen/Expand.hs +++ b/compiler/nativeGen/SPARC/CodeGen/Expand.hs @@ -5,6 +5,8 @@ module SPARC.CodeGen.Expand ( where +import GhcPrelude + import SPARC.Instr import SPARC.Imm import SPARC.AddrMode diff --git a/compiler/nativeGen/SPARC/CodeGen/Gen32.hs b/compiler/nativeGen/SPARC/CodeGen/Gen32.hs index a0e86f14c4..a7a1f60416 100644 --- a/compiler/nativeGen/SPARC/CodeGen/Gen32.hs +++ b/compiler/nativeGen/SPARC/CodeGen/Gen32.hs @@ -6,6 +6,8 @@ module SPARC.CodeGen.Gen32 ( where +import GhcPrelude + import SPARC.CodeGen.CondCode import SPARC.CodeGen.Amode import SPARC.CodeGen.Gen64 diff --git a/compiler/nativeGen/SPARC/CodeGen/Gen64.hs b/compiler/nativeGen/SPARC/CodeGen/Gen64.hs index f186d437d0..8549fa07ee 100644 --- a/compiler/nativeGen/SPARC/CodeGen/Gen64.hs +++ b/compiler/nativeGen/SPARC/CodeGen/Gen64.hs @@ -7,6 +7,8 @@ module SPARC.CodeGen.Gen64 ( where +import GhcPrelude + import {-# SOURCE #-} SPARC.CodeGen.Gen32 import SPARC.CodeGen.Base import SPARC.CodeGen.Amode diff --git a/compiler/nativeGen/SPARC/CodeGen/Sanity.hs b/compiler/nativeGen/SPARC/CodeGen/Sanity.hs index 81641326f2..fcf5b65bde 100644 --- a/compiler/nativeGen/SPARC/CodeGen/Sanity.hs +++ b/compiler/nativeGen/SPARC/CodeGen/Sanity.hs @@ -6,6 +6,8 @@ module SPARC.CodeGen.Sanity ( where +import GhcPrelude + import SPARC.Instr import SPARC.Ppr () import Instruction diff --git a/compiler/nativeGen/SPARC/Cond.hs b/compiler/nativeGen/SPARC/Cond.hs index da41457950..3fbfb8603f 100644 --- a/compiler/nativeGen/SPARC/Cond.hs +++ b/compiler/nativeGen/SPARC/Cond.hs @@ -7,6 +7,8 @@ module SPARC.Cond ( where +import GhcPrelude + -- | Branch condition codes. data Cond = ALWAYS diff --git a/compiler/nativeGen/SPARC/Imm.hs b/compiler/nativeGen/SPARC/Imm.hs index cb53ba411c..15acf41a50 100644 --- a/compiler/nativeGen/SPARC/Imm.hs +++ b/compiler/nativeGen/SPARC/Imm.hs @@ -7,6 +7,8 @@ module SPARC.Imm ( where +import GhcPrelude + import Cmm import CLabel diff --git a/compiler/nativeGen/SPARC/Instr.hs b/compiler/nativeGen/SPARC/Instr.hs index 4c19ac69a7..54fb513478 100644 --- a/compiler/nativeGen/SPARC/Instr.hs +++ b/compiler/nativeGen/SPARC/Instr.hs @@ -25,6 +25,8 @@ module SPARC.Instr ( where +import GhcPrelude + import SPARC.Stack import SPARC.Imm import SPARC.AddrMode diff --git a/compiler/nativeGen/SPARC/Ppr.hs b/compiler/nativeGen/SPARC/Ppr.hs index 1e4d5c535d..eb401fff06 100644 --- a/compiler/nativeGen/SPARC/Ppr.hs +++ b/compiler/nativeGen/SPARC/Ppr.hs @@ -25,6 +25,8 @@ where #include "HsVersions.h" #include "nativeGen/NCG.h" +import GhcPrelude + import SPARC.Regs import SPARC.Instr import SPARC.Cond diff --git a/compiler/nativeGen/SPARC/Regs.hs b/compiler/nativeGen/SPARC/Regs.hs index 188f66e482..544e4488a9 100644 --- a/compiler/nativeGen/SPARC/Regs.hs +++ b/compiler/nativeGen/SPARC/Regs.hs @@ -32,6 +32,8 @@ module SPARC.Regs ( where +import GhcPrelude + import CodeGen.Platform.SPARC import Reg import RegClass diff --git a/compiler/nativeGen/SPARC/ShortcutJump.hs b/compiler/nativeGen/SPARC/ShortcutJump.hs index 0bbcc48f94..0df280095b 100644 --- a/compiler/nativeGen/SPARC/ShortcutJump.hs +++ b/compiler/nativeGen/SPARC/ShortcutJump.hs @@ -8,6 +8,8 @@ module SPARC.ShortcutJump ( where +import GhcPrelude + import SPARC.Instr import SPARC.Imm diff --git a/compiler/nativeGen/SPARC/Stack.hs b/compiler/nativeGen/SPARC/Stack.hs index 629b18789f..3f5b2a7289 100644 --- a/compiler/nativeGen/SPARC/Stack.hs +++ b/compiler/nativeGen/SPARC/Stack.hs @@ -7,6 +7,8 @@ module SPARC.Stack ( where +import GhcPrelude + import SPARC.AddrMode import SPARC.Regs import SPARC.Base diff --git a/compiler/nativeGen/TargetReg.hs b/compiler/nativeGen/TargetReg.hs index a298cccaf6..6800b9043b 100644 --- a/compiler/nativeGen/TargetReg.hs +++ b/compiler/nativeGen/TargetReg.hs @@ -21,6 +21,8 @@ where #include "HsVersions.h" +import GhcPrelude + import Reg import RegClass import Format diff --git a/compiler/nativeGen/X86/CodeGen.hs b/compiler/nativeGen/X86/CodeGen.hs index 49631066ca..e62906d125 100644 --- a/compiler/nativeGen/X86/CodeGen.hs +++ b/compiler/nativeGen/X86/CodeGen.hs @@ -30,6 +30,8 @@ where #include "../includes/MachDeps.h" -- NCG stuff: +import GhcPrelude + import X86.Instr import X86.Cond import X86.Regs diff --git a/compiler/nativeGen/X86/Cond.hs b/compiler/nativeGen/X86/Cond.hs index 586dabd8f4..35cbf943e1 100644 --- a/compiler/nativeGen/X86/Cond.hs +++ b/compiler/nativeGen/X86/Cond.hs @@ -8,6 +8,8 @@ module X86.Cond ( where +import GhcPrelude + data Cond = ALWAYS -- What's really used? ToDo | EQQ diff --git a/compiler/nativeGen/X86/Instr.hs b/compiler/nativeGen/X86/Instr.hs index 71f50e9d2a..1bb682ad87 100644 --- a/compiler/nativeGen/X86/Instr.hs +++ b/compiler/nativeGen/X86/Instr.hs @@ -17,6 +17,8 @@ where #include "HsVersions.h" #include "nativeGen/NCG.h" +import GhcPrelude + import X86.Cond import X86.Regs import Instruction diff --git a/compiler/nativeGen/X86/Ppr.hs b/compiler/nativeGen/X86/Ppr.hs index 8f9fe9be39..84ce7516b5 100644 --- a/compiler/nativeGen/X86/Ppr.hs +++ b/compiler/nativeGen/X86/Ppr.hs @@ -23,6 +23,8 @@ where #include "HsVersions.h" #include "nativeGen/NCG.h" +import GhcPrelude + import X86.Regs import X86.Instr import X86.Cond diff --git a/compiler/nativeGen/X86/RegInfo.hs b/compiler/nativeGen/X86/RegInfo.hs index 4dfe0350d4..226441b16f 100644 --- a/compiler/nativeGen/X86/RegInfo.hs +++ b/compiler/nativeGen/X86/RegInfo.hs @@ -9,6 +9,8 @@ where #include "nativeGen/NCG.h" #include "HsVersions.h" +import GhcPrelude + import Format import Reg diff --git a/compiler/nativeGen/X86/Regs.hs b/compiler/nativeGen/X86/Regs.hs index c81850c736..169d4020a0 100644 --- a/compiler/nativeGen/X86/Regs.hs +++ b/compiler/nativeGen/X86/Regs.hs @@ -48,6 +48,8 @@ where #include "nativeGen/NCG.h" #include "HsVersions.h" +import GhcPrelude + import CodeGen.Platform import Reg import RegClass diff --git a/compiler/parser/ApiAnnotation.hs b/compiler/parser/ApiAnnotation.hs index 34787b3399..282d3904f8 100644 --- a/compiler/parser/ApiAnnotation.hs +++ b/compiler/parser/ApiAnnotation.hs @@ -13,6 +13,8 @@ module ApiAnnotation ( LRdrName -- Exists for haddocks only ) where +import GhcPrelude + import RdrName import Outputable import SrcLoc diff --git a/compiler/parser/Ctype.hs b/compiler/parser/Ctype.hs index 6423218f91..9c3988e869 100644 --- a/compiler/parser/Ctype.hs +++ b/compiler/parser/Ctype.hs @@ -16,6 +16,8 @@ module Ctype #include "HsVersions.h" +import GhcPrelude + import Data.Int ( Int32 ) import Data.Bits ( Bits((.&.)) ) import Data.Char ( ord, chr ) diff --git a/compiler/parser/HaddockUtils.hs b/compiler/parser/HaddockUtils.hs index 387cbf8f08..7969f6e1a2 100644 --- a/compiler/parser/HaddockUtils.hs +++ b/compiler/parser/HaddockUtils.hs @@ -1,6 +1,8 @@ module HaddockUtils where +import GhcPrelude + import HsSyn import SrcLoc diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x index 5d3d65d035..8c17315fb0 100644 --- a/compiler/parser/Lexer.x +++ b/compiler/parser/Lexer.x @@ -75,6 +75,8 @@ module Lexer ( moveAnnotations ) where +import GhcPrelude + -- base import Control.Monad import Control.Monad.Fail as MonadFail diff --git a/compiler/parser/Parser.y b/compiler/parser/Parser.y index a4507fc233..d13b9c0b7f 100644 --- a/compiler/parser/Parser.y +++ b/compiler/parser/Parser.y @@ -83,7 +83,7 @@ import TysWiredIn ( unitTyCon, unitDataCon, tupleTyCon, tupleDataCon, nilD -- compiler/utils import Util ( looksLikePackageName ) -import Prelude +import GhcPrelude import qualified GHC.LanguageExtensions as LangExt } diff --git a/compiler/parser/RdrHsSyn.hs b/compiler/parser/RdrHsSyn.hs index 41d8a4a339..4eabb66b43 100644 --- a/compiler/parser/RdrHsSyn.hs +++ b/compiler/parser/RdrHsSyn.hs @@ -67,6 +67,8 @@ module RdrHsSyn ( ) where +import GhcPrelude + import HsSyn -- Lots of it import Class ( FunDep ) import TyCon ( TyCon, isTupleTyCon, tyConSingleDataCon_maybe ) diff --git a/compiler/prelude/ForeignCall.hs b/compiler/prelude/ForeignCall.hs index bd80a36ad4..c143b1ed1e 100644 --- a/compiler/prelude/ForeignCall.hs +++ b/compiler/prelude/ForeignCall.hs @@ -18,6 +18,8 @@ module ForeignCall ( Header(..), CType(..), ) where +import GhcPrelude + import FastString import Binary import Outputable diff --git a/compiler/prelude/KnownUniques.hs b/compiler/prelude/KnownUniques.hs index 60fa0e2435..00085cad0b 100644 --- a/compiler/prelude/KnownUniques.hs +++ b/compiler/prelude/KnownUniques.hs @@ -26,6 +26,8 @@ module KnownUniques #include "HsVersions.h" +import GhcPrelude + import TysWiredIn import TyCon import DataCon diff --git a/compiler/prelude/KnownUniques.hs-boot b/compiler/prelude/KnownUniques.hs-boot index eeb478526d..b217c84aca 100644 --- a/compiler/prelude/KnownUniques.hs-boot +++ b/compiler/prelude/KnownUniques.hs-boot @@ -1,5 +1,6 @@ module KnownUniques where +import GhcPrelude import Unique import Name import BasicTypes diff --git a/compiler/prelude/PrelInfo.hs b/compiler/prelude/PrelInfo.hs index 47f41fbf73..8d1f140ca2 100644 --- a/compiler/prelude/PrelInfo.hs +++ b/compiler/prelude/PrelInfo.hs @@ -46,6 +46,8 @@ module PrelInfo ( #include "HsVersions.h" +import GhcPrelude + import KnownUniques import Unique ( isValidKnownKeyUnique ) diff --git a/compiler/prelude/PrelNames.hs b/compiler/prelude/PrelNames.hs index b7cfb4f226..0159037606 100644 --- a/compiler/prelude/PrelNames.hs +++ b/compiler/prelude/PrelNames.hs @@ -128,6 +128,8 @@ module PrelNames ( #include "HsVersions.h" +import GhcPrelude + import Module import OccName import RdrName diff --git a/compiler/prelude/PrelRules.hs b/compiler/prelude/PrelRules.hs index d2b8d875b2..fc211f426d 100644 --- a/compiler/prelude/PrelRules.hs +++ b/compiler/prelude/PrelRules.hs @@ -25,6 +25,8 @@ where #include "HsVersions.h" #include "../includes/MachDeps.h" +import GhcPrelude + import {-# SOURCE #-} MkId ( mkPrimOpId, magicDictId ) import CoreSyn diff --git a/compiler/prelude/PrimOp.hs b/compiler/prelude/PrimOp.hs index 79bec86d00..4eb94e9fdb 100644 --- a/compiler/prelude/PrimOp.hs +++ b/compiler/prelude/PrimOp.hs @@ -27,6 +27,8 @@ module PrimOp ( #include "HsVersions.h" +import GhcPrelude + import TysPrim import TysWiredIn diff --git a/compiler/prelude/PrimOp.hs-boot b/compiler/prelude/PrimOp.hs-boot index 6b92ef3d49..f10ef44972 100644 --- a/compiler/prelude/PrimOp.hs-boot +++ b/compiler/prelude/PrimOp.hs-boot @@ -1,3 +1,5 @@ module PrimOp where +import GhcPrelude () + data PrimOp diff --git a/compiler/prelude/THNames.hs b/compiler/prelude/THNames.hs index 4128ab375e..068f01feea 100644 --- a/compiler/prelude/THNames.hs +++ b/compiler/prelude/THNames.hs @@ -6,6 +6,8 @@ module THNames where +import GhcPrelude () + import PrelNames( mk_known_key_name ) import Module( Module, mkModuleNameFS, mkModule, thUnitId ) import Name( Name ) diff --git a/compiler/prelude/TysPrim.hs b/compiler/prelude/TysPrim.hs index 0732b5636d..b4a5b6b541 100644 --- a/compiler/prelude/TysPrim.hs +++ b/compiler/prelude/TysPrim.hs @@ -80,6 +80,8 @@ module TysPrim( #include "HsVersions.h" +import GhcPrelude + import {-# SOURCE #-} TysWiredIn ( runtimeRepTy, unboxedTupleKind, liftedTypeKind , vecRepDataConTyCon, tupleRepDataConTyCon diff --git a/compiler/prelude/TysWiredIn.hs b/compiler/prelude/TysWiredIn.hs index 37e76f9b73..f4e055f376 100644 --- a/compiler/prelude/TysWiredIn.hs +++ b/compiler/prelude/TysWiredIn.hs @@ -128,6 +128,8 @@ module TysWiredIn ( #include "HsVersions.h" #include "MachDeps.h" +import GhcPrelude + import {-# SOURCE #-} MkId( mkDataConWorkId, mkDictSelId ) -- friends: diff --git a/compiler/profiling/CostCentre.hs b/compiler/profiling/CostCentre.hs index e5fcf315ff..d1452ad576 100644 --- a/compiler/profiling/CostCentre.hs +++ b/compiler/profiling/CostCentre.hs @@ -20,6 +20,8 @@ module CostCentre ( cmpCostCentre -- used for removing dups in a list ) where +import GhcPrelude + import Binary import Var import Name diff --git a/compiler/profiling/ProfInit.hs b/compiler/profiling/ProfInit.hs index 0de8069eb5..557bdf0ea4 100644 --- a/compiler/profiling/ProfInit.hs +++ b/compiler/profiling/ProfInit.hs @@ -8,6 +8,8 @@ module ProfInit (profilingInitCode) where +import GhcPrelude + import CLabel import CostCentre import DynFlags diff --git a/compiler/profiling/SCCfinal.hs b/compiler/profiling/SCCfinal.hs index 9704e0b132..4c582f4d28 100644 --- a/compiler/profiling/SCCfinal.hs +++ b/compiler/profiling/SCCfinal.hs @@ -21,6 +21,8 @@ module SCCfinal ( stgMassageForProfiling ) where #include "HsVersions.h" +import GhcPrelude + import StgSyn import CostCentre -- lots of things diff --git a/compiler/rename/RnBinds.hs b/compiler/rename/RnBinds.hs index b956a5adda..f43715eaf4 100644 --- a/compiler/rename/RnBinds.hs +++ b/compiler/rename/RnBinds.hs @@ -26,6 +26,8 @@ module RnBinds ( HsSigCtxt(..) ) where +import GhcPrelude + import {-# SOURCE #-} RnExpr( rnLExpr, rnStmts ) import HsSyn diff --git a/compiler/rename/RnEnv.hs b/compiler/rename/RnEnv.hs index d5013b2a2c..7b5d18e0eb 100644 --- a/compiler/rename/RnEnv.hs +++ b/compiler/rename/RnEnv.hs @@ -45,6 +45,8 @@ module RnEnv ( #include "HsVersions.h" +import GhcPrelude + import LoadIface ( loadInterfaceForName, loadSrcInterface_maybe ) import IfaceEnv import HsSyn diff --git a/compiler/rename/RnExpr.hs b/compiler/rename/RnExpr.hs index 99e3f7068a..c0d9898e61 100644 --- a/compiler/rename/RnExpr.hs +++ b/compiler/rename/RnExpr.hs @@ -21,6 +21,8 @@ module RnExpr ( #include "HsVersions.h" +import GhcPrelude + import RnBinds ( rnLocalBindsAndThen, rnLocalValBindsLHS, rnLocalValBindsRHS, rnMatchGroup, rnGRHS, makeMiniFixityEnv) import HsSyn diff --git a/compiler/rename/RnFixity.hs b/compiler/rename/RnFixity.hs index 0bd08574a0..b1305f55f3 100644 --- a/compiler/rename/RnFixity.hs +++ b/compiler/rename/RnFixity.hs @@ -9,6 +9,8 @@ module RnFixity ( MiniFixityEnv, lookupFixityRn, lookupFixityRn_help, lookupFieldFixityRn, lookupTyFixityRn ) where +import GhcPrelude + import LoadIface import HsSyn import RdrName diff --git a/compiler/rename/RnHsDoc.hs b/compiler/rename/RnHsDoc.hs index 9e53f49320..ac0731d50a 100644 --- a/compiler/rename/RnHsDoc.hs +++ b/compiler/rename/RnHsDoc.hs @@ -1,6 +1,8 @@ module RnHsDoc ( rnHsDoc, rnLHsDoc, rnMbLHsDoc ) where +import GhcPrelude + import TcRnTypes import HsSyn import SrcLoc diff --git a/compiler/rename/RnNames.hs b/compiler/rename/RnNames.hs index 84e62f0113..b1dc8877b5 100644 --- a/compiler/rename/RnNames.hs +++ b/compiler/rename/RnNames.hs @@ -25,6 +25,8 @@ module RnNames ( #include "HsVersions.h" +import GhcPrelude + import DynFlags import HsSyn import TcEnv diff --git a/compiler/rename/RnPat.hs b/compiler/rename/RnPat.hs index 9b439a7b19..ce8f3793ad 100644 --- a/compiler/rename/RnPat.hs +++ b/compiler/rename/RnPat.hs @@ -35,6 +35,8 @@ module RnPat (-- main entry points -- ENH: thin imports to only what is necessary for patterns +import GhcPrelude + import {-# SOURCE #-} RnExpr ( rnLExpr ) import {-# SOURCE #-} RnSplice ( rnSplicePat ) diff --git a/compiler/rename/RnSource.hs b/compiler/rename/RnSource.hs index 0e11ece40e..b47686ebfa 100644 --- a/compiler/rename/RnSource.hs +++ b/compiler/rename/RnSource.hs @@ -14,6 +14,8 @@ module RnSource ( #include "HsVersions.h" +import GhcPrelude + import {-# SOURCE #-} RnExpr( rnLExpr ) import {-# SOURCE #-} RnSplice ( rnSpliceDecl, rnTopSpliceDecls ) diff --git a/compiler/rename/RnSplice.hs b/compiler/rename/RnSplice.hs index a03e4c88df..36b1eda140 100644 --- a/compiler/rename/RnSplice.hs +++ b/compiler/rename/RnSplice.hs @@ -11,6 +11,8 @@ module RnSplice ( #include "HsVersions.h" +import GhcPrelude + import Name import NameSet import HsSyn diff --git a/compiler/rename/RnSplice.hs-boot b/compiler/rename/RnSplice.hs-boot index 875ba05e52..d8f0f1fc7f 100644 --- a/compiler/rename/RnSplice.hs-boot +++ b/compiler/rename/RnSplice.hs-boot @@ -1,5 +1,6 @@ module RnSplice where +import GhcPrelude import HsSyn import TcRnMonad import NameSet diff --git a/compiler/rename/RnTypes.hs b/compiler/rename/RnTypes.hs index a1174f65ca..dc519b5ba5 100644 --- a/compiler/rename/RnTypes.hs +++ b/compiler/rename/RnTypes.hs @@ -34,6 +34,8 @@ module RnTypes ( elemRdr ) where +import GhcPrelude + import {-# SOURCE #-} RnSplice( rnSpliceType ) import DynFlags diff --git a/compiler/rename/RnUnbound.hs b/compiler/rename/RnUnbound.hs index cf5dab5d37..a77025fe7e 100644 --- a/compiler/rename/RnUnbound.hs +++ b/compiler/rename/RnUnbound.hs @@ -14,6 +14,8 @@ module RnUnbound ( mkUnboundName , unboundNameX , perhapsForallMsg ) where +import GhcPrelude + import RdrName import HscTypes import TcRnMonad diff --git a/compiler/rename/RnUtils.hs b/compiler/rename/RnUtils.hs index 50598f8b49..bbac43d304 100644 --- a/compiler/rename/RnUtils.hs +++ b/compiler/rename/RnUtils.hs @@ -26,6 +26,8 @@ module RnUtils ( where +import GhcPrelude + import HsSyn import RdrName import HscTypes diff --git a/compiler/simplCore/CSE.hs b/compiler/simplCore/CSE.hs index 53d7836d68..16dd64cceb 100644 --- a/compiler/simplCore/CSE.hs +++ b/compiler/simplCore/CSE.hs @@ -10,6 +10,8 @@ module CSE (cseProgram, cseOneExpr) where #include "HsVersions.h" +import GhcPrelude + import CoreSubst import Var ( Var ) import VarEnv ( elemInScopeSet, mkInScopeSet ) diff --git a/compiler/simplCore/CallArity.hs b/compiler/simplCore/CallArity.hs index e41e5bdef9..0e6cf70ba6 100644 --- a/compiler/simplCore/CallArity.hs +++ b/compiler/simplCore/CallArity.hs @@ -7,6 +7,8 @@ module CallArity , callArityRHS -- for testing ) where +import GhcPrelude + import VarSet import VarEnv import DynFlags ( DynFlags ) diff --git a/compiler/simplCore/CoreMonad.hs b/compiler/simplCore/CoreMonad.hs index 9198e0ca5a..35790ab925 100644 --- a/compiler/simplCore/CoreMonad.hs +++ b/compiler/simplCore/CoreMonad.hs @@ -53,6 +53,8 @@ module CoreMonad ( thNameToGhcName ) where +import GhcPrelude hiding ( read ) + import Name( Name ) import TcRnMonad ( initTcForLookup ) import CoreSyn @@ -70,7 +72,6 @@ import Outputable import FastString import qualified ErrUtils as Err import ErrUtils( Severity(..) ) -import Maybes import UniqSupply import UniqFM ( UniqFM, mapUFM, filterUFM ) import MonadUtils @@ -87,8 +88,6 @@ import Data.Word import Control.Monad import Control.Applicative ( Alternative(..) ) -import Prelude hiding ( read ) - import {-# SOURCE #-} TcSplice ( lookupThName_maybe ) import qualified Language.Haskell.TH as TH diff --git a/compiler/simplCore/FloatIn.hs b/compiler/simplCore/FloatIn.hs index 3e44e81cea..af3ad7f02e 100644 --- a/compiler/simplCore/FloatIn.hs +++ b/compiler/simplCore/FloatIn.hs @@ -19,6 +19,8 @@ module FloatIn ( floatInwards ) where #include "HsVersions.h" +import GhcPrelude + import CoreSyn import MkCore import HscTypes ( ModGuts(..) ) diff --git a/compiler/simplCore/FloatOut.hs b/compiler/simplCore/FloatOut.hs index 72fc0d1ff7..a8223b47b9 100644 --- a/compiler/simplCore/FloatOut.hs +++ b/compiler/simplCore/FloatOut.hs @@ -11,6 +11,8 @@ module FloatOut ( floatOutwards ) where +import GhcPrelude + import CoreSyn import CoreUtils import MkCore diff --git a/compiler/simplCore/LiberateCase.hs b/compiler/simplCore/LiberateCase.hs index 1776db51fd..8cee064617 100644 --- a/compiler/simplCore/LiberateCase.hs +++ b/compiler/simplCore/LiberateCase.hs @@ -9,6 +9,8 @@ module LiberateCase ( liberateCase ) where #include "HsVersions.h" +import GhcPrelude + import DynFlags import CoreSyn import CoreUnfold ( couldBeSmallEnoughToInline ) diff --git a/compiler/simplCore/OccurAnal.hs b/compiler/simplCore/OccurAnal.hs index 0c237cabe0..c2b4bd4fc5 100644 --- a/compiler/simplCore/OccurAnal.hs +++ b/compiler/simplCore/OccurAnal.hs @@ -19,6 +19,8 @@ module OccurAnal ( #include "HsVersions.h" +import GhcPrelude + import CoreSyn import CoreFVs import CoreUtils ( exprIsTrivial, isDefaultAlt, isExpandableApp, diff --git a/compiler/simplCore/SAT.hs b/compiler/simplCore/SAT.hs index 923d3a4209..e9a62d530d 100644 --- a/compiler/simplCore/SAT.hs +++ b/compiler/simplCore/SAT.hs @@ -51,6 +51,8 @@ essential to make this work well! {-# LANGUAGE CPP #-} module SAT ( doStaticArgs ) where +import GhcPrelude + import Var import CoreSyn import CoreUtils diff --git a/compiler/simplCore/SetLevels.hs b/compiler/simplCore/SetLevels.hs index 5e1d70273b..5a09db30d7 100644 --- a/compiler/simplCore/SetLevels.hs +++ b/compiler/simplCore/SetLevels.hs @@ -62,6 +62,8 @@ module SetLevels ( #include "HsVersions.h" +import GhcPrelude + import CoreSyn import CoreMonad ( FloatOutSwitches(..) ) import CoreUtils ( exprType, exprIsHNF diff --git a/compiler/simplCore/SimplCore.hs b/compiler/simplCore/SimplCore.hs index 6f481c5e06..afb0804aa8 100644 --- a/compiler/simplCore/SimplCore.hs +++ b/compiler/simplCore/SimplCore.hs @@ -10,6 +10,8 @@ module SimplCore ( core2core, simplifyExpr ) where #include "HsVersions.h" +import GhcPrelude + import DynFlags import CoreSyn import HscTypes diff --git a/compiler/simplCore/SimplEnv.hs b/compiler/simplCore/SimplEnv.hs index 21ba4bc539..0badb2a13e 100644 --- a/compiler/simplCore/SimplEnv.hs +++ b/compiler/simplCore/SimplEnv.hs @@ -45,6 +45,8 @@ module SimplEnv ( #include "HsVersions.h" +import GhcPrelude + import SimplMonad import CoreMonad ( SimplMode(..) ) import CoreSyn diff --git a/compiler/simplCore/SimplMonad.hs b/compiler/simplCore/SimplMonad.hs index 015ee5c786..915c89ee91 100644 --- a/compiler/simplCore/SimplMonad.hs +++ b/compiler/simplCore/SimplMonad.hs @@ -19,6 +19,8 @@ module SimplMonad ( plusSimplCount, isZeroSimplCount ) where +import GhcPrelude + import Var ( Var, isTyVar, mkLocalVar ) import Name ( mkSystemVarName ) import Id ( Id, mkSysLocalOrCoVar ) diff --git a/compiler/simplCore/SimplUtils.hs b/compiler/simplCore/SimplUtils.hs index 8365952ebb..bf09f7261d 100644 --- a/compiler/simplCore/SimplUtils.hs +++ b/compiler/simplCore/SimplUtils.hs @@ -35,6 +35,8 @@ module SimplUtils ( #include "HsVersions.h" +import GhcPrelude + import SimplEnv import CoreMonad ( SimplMode(..), Tick(..) ) import DynFlags diff --git a/compiler/simplCore/Simplify.hs b/compiler/simplCore/Simplify.hs index b17f2afa17..c73f0f6545 100644 --- a/compiler/simplCore/Simplify.hs +++ b/compiler/simplCore/Simplify.hs @@ -10,6 +10,8 @@ module Simplify ( simplTopBinds, simplExpr, simplRules ) where #include "HsVersions.h" +import GhcPrelude + import DynFlags import SimplMonad import Type hiding ( substTy, substTyVar, extendTvSubst, extendCvSubst ) diff --git a/compiler/simplStg/RepType.hs b/compiler/simplStg/RepType.hs index 2acc815125..694aa4ebf7 100644 --- a/compiler/simplStg/RepType.hs +++ b/compiler/simplStg/RepType.hs @@ -23,6 +23,8 @@ module RepType #include "HsVersions.h" +import GhcPrelude + import BasicTypes (Arity, RepArity) import DataCon import Outputable diff --git a/compiler/simplStg/SimplStg.hs b/compiler/simplStg/SimplStg.hs index 6c8b005d80..ad714ea4c8 100644 --- a/compiler/simplStg/SimplStg.hs +++ b/compiler/simplStg/SimplStg.hs @@ -10,6 +10,8 @@ module SimplStg ( stg2stg ) where #include "HsVersions.h" +import GhcPrelude + import StgSyn import CostCentre ( CollectedCCs ) diff --git a/compiler/simplStg/StgCse.hs b/compiler/simplStg/StgCse.hs index b221902768..a35309c181 100644 --- a/compiler/simplStg/StgCse.hs +++ b/compiler/simplStg/StgCse.hs @@ -70,6 +70,8 @@ and nothing stops us from transforming that to -} module StgCse (stgCse) where +import GhcPrelude + import DataCon import Id import StgSyn diff --git a/compiler/simplStg/StgStats.hs b/compiler/simplStg/StgStats.hs index 3f75ae23fa..712ec2d22e 100644 --- a/compiler/simplStg/StgStats.hs +++ b/compiler/simplStg/StgStats.hs @@ -27,6 +27,8 @@ module StgStats ( showStgStats ) where #include "HsVersions.h" +import GhcPrelude + import StgSyn import Id (Id) diff --git a/compiler/simplStg/UnariseStg.hs b/compiler/simplStg/UnariseStg.hs index 2e8fbda02b..6fb8d0ea2d 100644 --- a/compiler/simplStg/UnariseStg.hs +++ b/compiler/simplStg/UnariseStg.hs @@ -196,6 +196,8 @@ module UnariseStg (unarise) where #include "HsVersions.h" +import GhcPrelude + import BasicTypes import CoreSyn import DataCon diff --git a/compiler/specialise/Rules.hs b/compiler/specialise/Rules.hs index a0f42cd2b5..ec19740d0f 100644 --- a/compiler/specialise/Rules.hs +++ b/compiler/specialise/Rules.hs @@ -28,6 +28,8 @@ module Rules ( #include "HsVersions.h" +import GhcPrelude + import CoreSyn -- All of it import Module ( Module, ModuleSet, elemModuleSet ) import CoreSubst diff --git a/compiler/specialise/SpecConstr.hs b/compiler/specialise/SpecConstr.hs index 2b9c20aa19..609e70c0ad 100644 --- a/compiler/specialise/SpecConstr.hs +++ b/compiler/specialise/SpecConstr.hs @@ -19,6 +19,8 @@ module SpecConstr( #include "HsVersions.h" +import GhcPrelude + import CoreSyn import CoreSubst import CoreUtils diff --git a/compiler/specialise/Specialise.hs b/compiler/specialise/Specialise.hs index 83f1ed78bb..c4fe042b1f 100644 --- a/compiler/specialise/Specialise.hs +++ b/compiler/specialise/Specialise.hs @@ -9,6 +9,8 @@ module Specialise ( specProgram, specUnfolding ) where #include "HsVersions.h" +import GhcPrelude + import Id import TcType hiding( substTy ) import Type hiding( substTy, extendTvSubstList ) diff --git a/compiler/stgSyn/CoreToStg.hs b/compiler/stgSyn/CoreToStg.hs index 900d23f7b5..900c52e2a6 100644 --- a/compiler/stgSyn/CoreToStg.hs +++ b/compiler/stgSyn/CoreToStg.hs @@ -15,6 +15,8 @@ module CoreToStg ( coreToStg, coreExprToStg ) where #include "HsVersions.h" +import GhcPrelude + import CoreSyn import CoreUtils ( exprType, findDefault, isJoinBind ) import CoreArity ( manifestArity ) diff --git a/compiler/stgSyn/StgLint.hs b/compiler/stgSyn/StgLint.hs index d7ecbe6345..70231f2863 100644 --- a/compiler/stgSyn/StgLint.hs +++ b/compiler/stgSyn/StgLint.hs @@ -8,6 +8,8 @@ module StgLint ( lintStgTopBindings ) where +import GhcPrelude + import StgSyn import Bag ( Bag, emptyBag, isEmptyBag, snocBag, bagToList ) diff --git a/compiler/stgSyn/StgSyn.hs b/compiler/stgSyn/StgSyn.hs index afbcc386ba..b31a8fce3b 100644 --- a/compiler/stgSyn/StgSyn.hs +++ b/compiler/stgSyn/StgSyn.hs @@ -45,6 +45,8 @@ module StgSyn ( #include "HsVersions.h" +import GhcPrelude + import CoreSyn ( AltCon, Tickish ) import CostCentre ( CostCentreStack ) import Data.ByteString ( ByteString ) diff --git a/compiler/stranal/DmdAnal.hs b/compiler/stranal/DmdAnal.hs index 49912413e4..44adc81633 100644 --- a/compiler/stranal/DmdAnal.hs +++ b/compiler/stranal/DmdAnal.hs @@ -13,6 +13,8 @@ module DmdAnal ( dmdAnalProgram ) where #include "HsVersions.h" +import GhcPrelude + import DynFlags import WwLib ( findTypeShape, deepSplitProductType_maybe ) import Demand -- All of it diff --git a/compiler/stranal/WorkWrap.hs b/compiler/stranal/WorkWrap.hs index 630ec11442..252f18b983 100644 --- a/compiler/stranal/WorkWrap.hs +++ b/compiler/stranal/WorkWrap.hs @@ -7,6 +7,8 @@ {-# LANGUAGE CPP #-} module WorkWrap ( wwTopBinds ) where +import GhcPrelude + import CoreSyn import CoreUnfold ( certainlyWillInline, mkWwInlineRule, mkWorkerUnfolding ) import CoreUtils ( exprType, exprIsHNF ) diff --git a/compiler/stranal/WwLib.hs b/compiler/stranal/WwLib.hs index f83aafe7b0..474743a955 100644 --- a/compiler/stranal/WwLib.hs +++ b/compiler/stranal/WwLib.hs @@ -13,6 +13,8 @@ module WwLib ( mkWwBodies, mkWWstr, mkWorkerArgs #include "HsVersions.h" +import GhcPrelude + import CoreSyn import CoreUtils ( exprType, mkCast ) import Id diff --git a/compiler/typecheck/FamInst.hs b/compiler/typecheck/FamInst.hs index a869ff4e4a..9c91daafc4 100644 --- a/compiler/typecheck/FamInst.hs +++ b/compiler/typecheck/FamInst.hs @@ -14,6 +14,8 @@ module FamInst ( makeInjectivityErrors, injTyVarsOfType, injTyVarsOfTypes ) where +import GhcPrelude + import HscTypes import FamInstEnv import InstEnv( roughMatchTcs ) diff --git a/compiler/typecheck/FunDeps.hs b/compiler/typecheck/FunDeps.hs index 789254d230..e4936a9251 100644 --- a/compiler/typecheck/FunDeps.hs +++ b/compiler/typecheck/FunDeps.hs @@ -19,6 +19,8 @@ module FunDeps ( #include "HsVersions.h" +import GhcPrelude + import Name import Var import Class diff --git a/compiler/typecheck/Inst.hs b/compiler/typecheck/Inst.hs index 69f0005602..6d656fefc3 100644 --- a/compiler/typecheck/Inst.hs +++ b/compiler/typecheck/Inst.hs @@ -32,6 +32,8 @@ module Inst ( #include "HsVersions.h" +import GhcPrelude + import {-# SOURCE #-} TcExpr( tcPolyExpr, tcSyntaxOp ) import {-# SOURCE #-} TcUnify( unifyType, unifyKind ) diff --git a/compiler/typecheck/TcAnnotations.hs b/compiler/typecheck/TcAnnotations.hs index 2c587e213f..edf696e3c9 100644 --- a/compiler/typecheck/TcAnnotations.hs +++ b/compiler/typecheck/TcAnnotations.hs @@ -10,6 +10,8 @@ module TcAnnotations ( tcAnnotations, annCtxt ) where +import GhcPrelude + import {-# SOURCE #-} TcSplice ( runAnnotation ) import Module import DynFlags diff --git a/compiler/typecheck/TcArrows.hs b/compiler/typecheck/TcArrows.hs index d56a8d8c74..d456438671 100644 --- a/compiler/typecheck/TcArrows.hs +++ b/compiler/typecheck/TcArrows.hs @@ -10,6 +10,8 @@ Typecheck arrow notation module TcArrows ( tcProc ) where +import GhcPrelude + import {-# SOURCE #-} TcExpr( tcMonoExpr, tcInferRho, tcSyntaxOp, tcCheckId, tcPolyExpr ) import HsSyn diff --git a/compiler/typecheck/TcBackpack.hs b/compiler/typecheck/TcBackpack.hs index dd8062fca5..31055fdb7c 100644 --- a/compiler/typecheck/TcBackpack.hs +++ b/compiler/typecheck/TcBackpack.hs @@ -17,6 +17,8 @@ module TcBackpack ( instantiateSignature, ) where +import GhcPrelude + import BasicTypes (defaultFixity) import Packages import TcRnExports diff --git a/compiler/typecheck/TcBinds.hs b/compiler/typecheck/TcBinds.hs index 24173eb574..128fc37a78 100644 --- a/compiler/typecheck/TcBinds.hs +++ b/compiler/typecheck/TcBinds.hs @@ -15,6 +15,8 @@ module TcBinds ( tcLocalBinds, tcTopBinds, tcRecSelBinds, chooseInferredQuantifiers, badBootDeclErr ) where +import GhcPrelude + import {-# SOURCE #-} TcMatches ( tcGRHSsPat, tcMatchesFun ) import {-# SOURCE #-} TcExpr ( tcMonoExpr ) import {-# SOURCE #-} TcPatSyn ( tcInferPatSynDecl, tcCheckPatSynDecl diff --git a/compiler/typecheck/TcCanonical.hs b/compiler/typecheck/TcCanonical.hs index 7b259257c4..034deb5824 100644 --- a/compiler/typecheck/TcCanonical.hs +++ b/compiler/typecheck/TcCanonical.hs @@ -9,6 +9,8 @@ module TcCanonical( #include "HsVersions.h" +import GhcPrelude + import TcRnTypes import TcUnify( swapOverTyVars, metaTyVarUpdateOK ) import TcType diff --git a/compiler/typecheck/TcClassDcl.hs b/compiler/typecheck/TcClassDcl.hs index 0a64ffea60..250319742c 100644 --- a/compiler/typecheck/TcClassDcl.hs +++ b/compiler/typecheck/TcClassDcl.hs @@ -20,6 +20,8 @@ module TcClassDcl ( tcClassSigs, tcClassDecl2, #include "HsVersions.h" +import GhcPrelude + import HsSyn import TcEnv import TcSigs diff --git a/compiler/typecheck/TcDefaults.hs b/compiler/typecheck/TcDefaults.hs index 8d005a09e6..8ab13fa44c 100644 --- a/compiler/typecheck/TcDefaults.hs +++ b/compiler/typecheck/TcDefaults.hs @@ -8,6 +8,8 @@ module TcDefaults ( tcDefaults ) where +import GhcPrelude + import HsSyn import Class import TcRnMonad diff --git a/compiler/typecheck/TcDeriv.hs b/compiler/typecheck/TcDeriv.hs index 829b4c95db..155aee85ce 100644 --- a/compiler/typecheck/TcDeriv.hs +++ b/compiler/typecheck/TcDeriv.hs @@ -13,6 +13,8 @@ module TcDeriv ( tcDeriving, DerivInfo(..), mkDerivInfos ) where #include "HsVersions.h" +import GhcPrelude + import HsSyn import DynFlags diff --git a/compiler/typecheck/TcDerivInfer.hs b/compiler/typecheck/TcDerivInfer.hs index 81bbfd94b4..f598e70b99 100644 --- a/compiler/typecheck/TcDerivInfer.hs +++ b/compiler/typecheck/TcDerivInfer.hs @@ -13,6 +13,8 @@ module TcDerivInfer (inferConstraints, simplifyInstanceContexts) where #include "HsVersions.h" +import GhcPrelude + import Bag import BasicTypes import Class diff --git a/compiler/typecheck/TcDerivUtils.hs b/compiler/typecheck/TcDerivUtils.hs index fd0bf04a1f..f27516258b 100644 --- a/compiler/typecheck/TcDerivUtils.hs +++ b/compiler/typecheck/TcDerivUtils.hs @@ -22,6 +22,8 @@ module TcDerivUtils ( newDerivClsInst, extendLocalInstEnv ) where +import GhcPrelude + import Bag import BasicTypes import Class diff --git a/compiler/typecheck/TcEnv.hs b/compiler/typecheck/TcEnv.hs index 087643deba..79ba7c51b7 100644 --- a/compiler/typecheck/TcEnv.hs +++ b/compiler/typecheck/TcEnv.hs @@ -71,6 +71,8 @@ module TcEnv( #include "HsVersions.h" +import GhcPrelude + import HsSyn import IfaceEnv import TcRnMonad diff --git a/compiler/typecheck/TcErrors.hs b/compiler/typecheck/TcErrors.hs index 664031d46a..d7c97145b8 100644 --- a/compiler/typecheck/TcErrors.hs +++ b/compiler/typecheck/TcErrors.hs @@ -9,6 +9,8 @@ module TcErrors( #include "HsVersions.h" +import GhcPrelude + import TcRnTypes import TcRnMonad import TcMType diff --git a/compiler/typecheck/TcEvidence.hs b/compiler/typecheck/TcEvidence.hs index eda4b28e97..0287818b44 100644 --- a/compiler/typecheck/TcEvidence.hs +++ b/compiler/typecheck/TcEvidence.hs @@ -39,6 +39,8 @@ module TcEvidence ( ) where #include "HsVersions.h" +import GhcPrelude + import Var import CoAxiom import Coercion diff --git a/compiler/typecheck/TcExpr.hs b/compiler/typecheck/TcExpr.hs index f88eb5c803..4b9bcd11a4 100644 --- a/compiler/typecheck/TcExpr.hs +++ b/compiler/typecheck/TcExpr.hs @@ -19,6 +19,8 @@ module TcExpr ( tcPolyExpr, tcMonoExpr, tcMonoExprNC, #include "HsVersions.h" +import GhcPrelude + import {-# SOURCE #-} TcSplice( tcSpliceExpr, tcTypedBracket, tcUntypedBracket ) import THNames( liftStringName, liftName ) diff --git a/compiler/typecheck/TcFlatten.hs b/compiler/typecheck/TcFlatten.hs index 69f8357a1d..9fd9cadde7 100644 --- a/compiler/typecheck/TcFlatten.hs +++ b/compiler/typecheck/TcFlatten.hs @@ -9,6 +9,8 @@ module TcFlatten( #include "HsVersions.h" +import GhcPrelude + import TcRnTypes import TcType import Type diff --git a/compiler/typecheck/TcForeign.hs b/compiler/typecheck/TcForeign.hs index 9f560311ae..bbe9f38109 100644 --- a/compiler/typecheck/TcForeign.hs +++ b/compiler/typecheck/TcForeign.hs @@ -33,6 +33,8 @@ module TcForeign #include "HsVersions.h" +import GhcPrelude + import HsSyn import TcRnMonad diff --git a/compiler/typecheck/TcGenDeriv.hs b/compiler/typecheck/TcGenDeriv.hs index 4af8b024d1..bd9902e2be 100644 --- a/compiler/typecheck/TcGenDeriv.hs +++ b/compiler/typecheck/TcGenDeriv.hs @@ -37,6 +37,8 @@ module TcGenDeriv ( #include "HsVersions.h" +import GhcPrelude + import TcRnMonad import HsSyn import RdrName diff --git a/compiler/typecheck/TcGenFunctor.hs b/compiler/typecheck/TcGenFunctor.hs index 5cb608b5f5..61e2864c13 100644 --- a/compiler/typecheck/TcGenFunctor.hs +++ b/compiler/typecheck/TcGenFunctor.hs @@ -16,6 +16,8 @@ module TcGenFunctor ( gen_Functor_binds, gen_Foldable_binds, gen_Traversable_binds ) where +import GhcPrelude + import Bag import DataCon import FastString diff --git a/compiler/typecheck/TcGenGenerics.hs b/compiler/typecheck/TcGenGenerics.hs index a187a268fc..61a432e9dc 100644 --- a/compiler/typecheck/TcGenGenerics.hs +++ b/compiler/typecheck/TcGenGenerics.hs @@ -14,6 +14,8 @@ module TcGenGenerics (canDoGenerics, canDoGenerics1, GenericKind(..), gen_Generic_binds, get_gen1_constrained_tys) where +import GhcPrelude + import HsSyn import Type import TcType diff --git a/compiler/typecheck/TcHsSyn.hs b/compiler/typecheck/TcHsSyn.hs index b6d40df633..0303ec6c33 100644 --- a/compiler/typecheck/TcHsSyn.hs +++ b/compiler/typecheck/TcHsSyn.hs @@ -39,6 +39,8 @@ module TcHsSyn ( #include "HsVersions.h" +import GhcPrelude + import HsSyn import Id import IdInfo diff --git a/compiler/typecheck/TcHsType.hs b/compiler/typecheck/TcHsType.hs index 4fd561e65c..709206e99f 100644 --- a/compiler/typecheck/TcHsType.hs +++ b/compiler/typecheck/TcHsType.hs @@ -49,6 +49,8 @@ module TcHsType ( #include "HsVersions.h" +import GhcPrelude + import HsSyn import TcRnMonad import TcEvidence diff --git a/compiler/typecheck/TcInstDcls.hs b/compiler/typecheck/TcInstDcls.hs index 179688f64b..dc7416103b 100644 --- a/compiler/typecheck/TcInstDcls.hs +++ b/compiler/typecheck/TcInstDcls.hs @@ -14,6 +14,8 @@ module TcInstDcls ( tcInstDecls1, tcInstDeclsDeriv, tcInstDecls2 ) where #include "HsVersions.h" +import GhcPrelude + import HsSyn import TcBinds import TcTyClsDecls diff --git a/compiler/typecheck/TcInteract.hs b/compiler/typecheck/TcInteract.hs index cbe24ca0ef..9fe054d4e9 100644 --- a/compiler/typecheck/TcInteract.hs +++ b/compiler/typecheck/TcInteract.hs @@ -9,6 +9,8 @@ module TcInteract ( #include "HsVersions.h" +import GhcPrelude + import BasicTypes ( SwapFlag(..), isSwapped, infinity, IntWithInf, intGtLimit ) import HsTypes ( HsIPName(..) ) diff --git a/compiler/typecheck/TcMType.hs b/compiler/typecheck/TcMType.hs index 23b51f6a94..1ed6f59024 100644 --- a/compiler/typecheck/TcMType.hs +++ b/compiler/typecheck/TcMType.hs @@ -90,6 +90,8 @@ module TcMType ( #include "HsVersions.h" -- friends: +import GhcPrelude + import TyCoRep import TcType import Type diff --git a/compiler/typecheck/TcMatches.hs b/compiler/typecheck/TcMatches.hs index 142e6b5147..89d34f5a60 100644 --- a/compiler/typecheck/TcMatches.hs +++ b/compiler/typecheck/TcMatches.hs @@ -19,6 +19,8 @@ module TcMatches ( tcMatchesFun, tcGRHS, tcGRHSsPat, tcMatchesCase, tcMatchLambd tcDoStmt, tcGuardStmt ) where +import GhcPrelude + import {-# SOURCE #-} TcExpr( tcSyntaxOp, tcInferSigmaNC, tcInferSigma , tcCheckId, tcMonoExpr, tcMonoExprNC, tcPolyExpr ) diff --git a/compiler/typecheck/TcPat.hs b/compiler/typecheck/TcPat.hs index 6be2a4e965..f2188af006 100644 --- a/compiler/typecheck/TcPat.hs +++ b/compiler/typecheck/TcPat.hs @@ -16,6 +16,8 @@ module TcPat ( tcLetPat, newLetBndr, LetBndrSpec(..) #include "HsVersions.h" +import GhcPrelude + import {-# SOURCE #-} TcExpr( tcSyntaxOp, tcSyntaxOpGen, tcInferSigma ) import HsSyn diff --git a/compiler/typecheck/TcPatSyn.hs b/compiler/typecheck/TcPatSyn.hs index fe9ad18a92..d234fd5ca1 100644 --- a/compiler/typecheck/TcPatSyn.hs +++ b/compiler/typecheck/TcPatSyn.hs @@ -13,6 +13,8 @@ module TcPatSyn ( tcInferPatSynDecl, tcCheckPatSynDecl , tcPatSynBuilderBind, tcPatSynBuilderOcc, nonBidirectionalErr ) where +import GhcPrelude + import HsSyn import TcPat import Type( mkEmptyTCvSubst, tidyTyVarBinders, tidyTypes, tidyType ) diff --git a/compiler/typecheck/TcPluginM.hs b/compiler/typecheck/TcPluginM.hs index b195a555f9..cc0c7a1bf2 100644 --- a/compiler/typecheck/TcPluginM.hs +++ b/compiler/typecheck/TcPluginM.hs @@ -53,6 +53,8 @@ module TcPluginM ( ) where #if defined(GHCI) +import GhcPrelude + import qualified TcRnMonad as TcM import qualified TcSMonad as TcS import qualified TcEnv as TcM diff --git a/compiler/typecheck/TcRnDriver.hs b/compiler/typecheck/TcRnDriver.hs index a0bd2a837c..105f88496a 100644 --- a/compiler/typecheck/TcRnDriver.hs +++ b/compiler/typecheck/TcRnDriver.hs @@ -42,6 +42,8 @@ module TcRnDriver ( missingBootThing, ) where +import GhcPrelude + import {-# SOURCE #-} TcSplice ( finishTH ) import RnSplice ( rnTopSpliceDecls, traceSplice, SpliceInfo(..) ) import IfaceEnv( externaliseName ) diff --git a/compiler/typecheck/TcRnDriver.hs-boot b/compiler/typecheck/TcRnDriver.hs-boot index e73855e033..6ffc409e22 100644 --- a/compiler/typecheck/TcRnDriver.hs-boot +++ b/compiler/typecheck/TcRnDriver.hs-boot @@ -1,5 +1,6 @@ module TcRnDriver where +import GhcPrelude import DynFlags (DynFlags) import Type (TyThing) import TcRnTypes (TcM) diff --git a/compiler/typecheck/TcRnExports.hs b/compiler/typecheck/TcRnExports.hs index fd099d0c4c..b593d52169 100644 --- a/compiler/typecheck/TcRnExports.hs +++ b/compiler/typecheck/TcRnExports.hs @@ -5,6 +5,8 @@ {-# LANGUAGE TypeFamilies #-} module TcRnExports (tcRnExports, exports_from_avail) where +import GhcPrelude + import HsSyn import PrelNames import RdrName diff --git a/compiler/typecheck/TcRnMonad.hs b/compiler/typecheck/TcRnMonad.hs index e5ecb3b138..fba0f5d379 100644 --- a/compiler/typecheck/TcRnMonad.hs +++ b/compiler/typecheck/TcRnMonad.hs @@ -135,6 +135,8 @@ module TcRnMonad( #include "HsVersions.h" +import GhcPrelude + import TcRnTypes -- Re-export all import IOEnv -- Re-export all import TcEvidence diff --git a/compiler/typecheck/TcRnTypes.hs b/compiler/typecheck/TcRnTypes.hs index e718b4d68b..1ae809fd99 100644 --- a/compiler/typecheck/TcRnTypes.hs +++ b/compiler/typecheck/TcRnTypes.hs @@ -138,6 +138,8 @@ module TcRnTypes( #include "HsVersions.h" +import GhcPrelude + import HsSyn import CoreSyn import HscTypes diff --git a/compiler/typecheck/TcRules.hs b/compiler/typecheck/TcRules.hs index 7225d4e81b..c3919a3acc 100644 --- a/compiler/typecheck/TcRules.hs +++ b/compiler/typecheck/TcRules.hs @@ -11,6 +11,8 @@ TcRules: Typechecking transformation rules module TcRules ( tcRules ) where +import GhcPrelude + import HsSyn import TcRnMonad import TcSimplify diff --git a/compiler/typecheck/TcSMonad.hs b/compiler/typecheck/TcSMonad.hs index 932237c6c3..cada75f65f 100644 --- a/compiler/typecheck/TcSMonad.hs +++ b/compiler/typecheck/TcSMonad.hs @@ -117,6 +117,8 @@ module TcSMonad ( #include "HsVersions.h" +import GhcPrelude + import HscTypes import qualified Inst as TcM diff --git a/compiler/typecheck/TcSigs.hs b/compiler/typecheck/TcSigs.hs index f3331ac237..8678dd33c8 100644 --- a/compiler/typecheck/TcSigs.hs +++ b/compiler/typecheck/TcSigs.hs @@ -25,6 +25,8 @@ module TcSigs( #include "HsVersions.h" +import GhcPrelude + import HsSyn import TcHsType import TcRnTypes diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs index 60d8f621be..37cc77c422 100644 --- a/compiler/typecheck/TcSimplify.hs +++ b/compiler/typecheck/TcSimplify.hs @@ -17,6 +17,8 @@ module TcSimplify( #include "HsVersions.h" +import GhcPrelude + import Bag import Class ( Class, classKey, classTyCon ) import DynFlags ( WarningFlag ( Opt_WarnMonomorphism ) diff --git a/compiler/typecheck/TcSplice.hs b/compiler/typecheck/TcSplice.hs index f31c28111a..9e102130af 100644 --- a/compiler/typecheck/TcSplice.hs +++ b/compiler/typecheck/TcSplice.hs @@ -31,6 +31,8 @@ module TcSplice( #include "HsVersions.h" +import GhcPrelude + import HsSyn import Annotations import Name diff --git a/compiler/typecheck/TcSplice.hs-boot b/compiler/typecheck/TcSplice.hs-boot index 03b2c31315..be2c67d887 100644 --- a/compiler/typecheck/TcSplice.hs-boot +++ b/compiler/typecheck/TcSplice.hs-boot @@ -2,6 +2,8 @@ {-# LANGUAGE TypeFamilies #-} module TcSplice where + +import GhcPrelude import Name import HsExpr ( PendingRnSplice ) import TcRnTypes( TcM , SpliceType ) diff --git a/compiler/typecheck/TcTyClsDecls.hs b/compiler/typecheck/TcTyClsDecls.hs index 8024ef570e..b479412e83 100644 --- a/compiler/typecheck/TcTyClsDecls.hs +++ b/compiler/typecheck/TcTyClsDecls.hs @@ -22,6 +22,8 @@ module TcTyClsDecls ( #include "HsVersions.h" +import GhcPrelude + import HsSyn import HscTypes import BuildTyCl diff --git a/compiler/typecheck/TcTyDecls.hs b/compiler/typecheck/TcTyDecls.hs index e55b8e8503..e59c612aff 100644 --- a/compiler/typecheck/TcTyDecls.hs +++ b/compiler/typecheck/TcTyDecls.hs @@ -27,6 +27,8 @@ module TcTyDecls( #include "HsVersions.h" +import GhcPrelude + import TcRnMonad import TcEnv import TcBinds( tcRecSelBinds ) diff --git a/compiler/typecheck/TcType.hs b/compiler/typecheck/TcType.hs index 6253bbf456..bd50dd6ac8 100644 --- a/compiler/typecheck/TcType.hs +++ b/compiler/typecheck/TcType.hs @@ -198,6 +198,8 @@ module TcType ( #include "HsVersions.h" -- friends: +import GhcPrelude + import Kind import TyCoRep import Class diff --git a/compiler/typecheck/TcTypeNats.hs b/compiler/typecheck/TcTypeNats.hs index 6af486caaa..a3b45b3890 100644 --- a/compiler/typecheck/TcTypeNats.hs +++ b/compiler/typecheck/TcTypeNats.hs @@ -15,6 +15,8 @@ module TcTypeNats , typeSymbolAppendTyCon ) where +import GhcPrelude + import Type import Pair import TcType ( TcType, tcEqType ) diff --git a/compiler/typecheck/TcTypeable.hs b/compiler/typecheck/TcTypeable.hs index 2fcca7ffc2..ed4b5483ef 100644 --- a/compiler/typecheck/TcTypeable.hs +++ b/compiler/typecheck/TcTypeable.hs @@ -10,6 +10,8 @@ module TcTypeable(mkTypeableBinds) where +import GhcPrelude + import BasicTypes ( Boxity(..), neverInlinePragma ) import TcBinds( addTypecheckedBinds ) import IfaceEnv( newGlobalBinder ) diff --git a/compiler/typecheck/TcUnify.hs b/compiler/typecheck/TcUnify.hs index 6c45279c74..926db6e65b 100644 --- a/compiler/typecheck/TcUnify.hs +++ b/compiler/typecheck/TcUnify.hs @@ -38,6 +38,8 @@ module TcUnify ( #include "HsVersions.h" +import GhcPrelude + import HsSyn import TyCoRep import TcMType diff --git a/compiler/typecheck/TcUnify.hs-boot b/compiler/typecheck/TcUnify.hs-boot index 5335c15db7..295c85eb73 100644 --- a/compiler/typecheck/TcUnify.hs-boot +++ b/compiler/typecheck/TcUnify.hs-boot @@ -1,4 +1,6 @@ module TcUnify where + +import GhcPrelude import TcType ( TcTauType ) import TcRnTypes ( TcM ) import TcEvidence ( TcCoercion ) diff --git a/compiler/typecheck/TcValidity.hs b/compiler/typecheck/TcValidity.hs index 37f774047a..5c5ed7f781 100644 --- a/compiler/typecheck/TcValidity.hs +++ b/compiler/typecheck/TcValidity.hs @@ -20,6 +20,8 @@ module TcValidity ( #include "HsVersions.h" +import GhcPrelude + import Maybes -- friends: diff --git a/compiler/types/Class.hs b/compiler/types/Class.hs index b981a4998e..3bc88969bf 100644 --- a/compiler/types/Class.hs +++ b/compiler/types/Class.hs @@ -24,6 +24,8 @@ module Class ( #include "HsVersions.h" +import GhcPrelude + import {-# SOURCE #-} TyCon ( TyCon ) import {-# SOURCE #-} TyCoRep ( Type, PredType, pprType ) import Var diff --git a/compiler/types/CoAxiom.hs b/compiler/types/CoAxiom.hs index 6d66fb80b1..5234290fd2 100644 --- a/compiler/types/CoAxiom.hs +++ b/compiler/types/CoAxiom.hs @@ -29,6 +29,8 @@ module CoAxiom ( BuiltInSynFamily(..), trivialBuiltInFamily ) where +import GhcPrelude + import {-# SOURCE #-} TyCoRep ( Type, pprType ) import {-# SOURCE #-} TyCon ( TyCon ) import Outputable diff --git a/compiler/types/Coercion.hs b/compiler/types/Coercion.hs index 214fe2d92e..99969ee143 100644 --- a/compiler/types/Coercion.hs +++ b/compiler/types/Coercion.hs @@ -107,6 +107,8 @@ module Coercion ( #include "HsVersions.h" +import GhcPrelude + import TyCoRep import Type import TyCon diff --git a/compiler/types/Coercion.hs-boot b/compiler/types/Coercion.hs-boot index d9aa234193..2eed58038c 100644 --- a/compiler/types/Coercion.hs-boot +++ b/compiler/types/Coercion.hs-boot @@ -2,6 +2,8 @@ module Coercion where +import GhcPrelude + import {-# SOURCE #-} TyCoRep import {-# SOURCE #-} TyCon diff --git a/compiler/types/FamInstEnv.hs b/compiler/types/FamInstEnv.hs index 451f427d08..9918a75faa 100644 --- a/compiler/types/FamInstEnv.hs +++ b/compiler/types/FamInstEnv.hs @@ -38,6 +38,8 @@ module FamInstEnv ( #include "HsVersions.h" +import GhcPrelude + import Unify import Type import TyCoRep diff --git a/compiler/types/InstEnv.hs b/compiler/types/InstEnv.hs index 80b9b901c2..6f065e9ec5 100644 --- a/compiler/types/InstEnv.hs +++ b/compiler/types/InstEnv.hs @@ -28,6 +28,8 @@ module InstEnv ( #include "HsVersions.h" +import GhcPrelude + import TcType -- InstEnv is really part of the type checker, -- and depends on TcType in many ways import CoreSyn ( IsOrphan(..), isOrphan, chooseOrphanAnchor ) diff --git a/compiler/types/Kind.hs b/compiler/types/Kind.hs index 0d619fcd82..95a3bbf766 100644 --- a/compiler/types/Kind.hs +++ b/compiler/types/Kind.hs @@ -20,6 +20,8 @@ module Kind ( #include "HsVersions.h" +import GhcPrelude + import {-# SOURCE #-} Type ( coreView, tcView , splitTyConApp_maybe ) import {-# SOURCE #-} DataCon ( DataCon ) diff --git a/compiler/types/OptCoercion.hs b/compiler/types/OptCoercion.hs index f26351f3bd..1f1b9378dc 100644 --- a/compiler/types/OptCoercion.hs +++ b/compiler/types/OptCoercion.hs @@ -10,6 +10,8 @@ module OptCoercion ( optCoercion, checkAxInstCo ) where #include "HsVersions.h" +import GhcPrelude + import DynFlags import TyCoRep import Coercion diff --git a/compiler/types/TyCoRep.hs b/compiler/types/TyCoRep.hs index d58536bb34..27f177ac96 100644 --- a/compiler/types/TyCoRep.hs +++ b/compiler/types/TyCoRep.hs @@ -135,6 +135,8 @@ module TyCoRep ( #include "HsVersions.h" +import GhcPrelude + import {-# SOURCE #-} DataCon( dataConFullSig , dataConUnivTyVarBinders, dataConExTyVarBinders , DataCon, filterEqSpec ) diff --git a/compiler/types/TyCon.hs b/compiler/types/TyCon.hs index 204d3ae9b5..9147c1f7b0 100644 --- a/compiler/types/TyCon.hs +++ b/compiler/types/TyCon.hs @@ -124,6 +124,8 @@ module TyCon( #include "HsVersions.h" +import GhcPrelude + import {-# SOURCE #-} TyCoRep ( Kind, Type, PredType, pprType ) import {-# SOURCE #-} TysWiredIn ( runtimeRepTyCon, constraintKind , vecCountTyCon, vecElemTyCon, liftedTypeKind diff --git a/compiler/types/TyCon.hs-boot b/compiler/types/TyCon.hs-boot index d77ed8a172..4db8d0f1c1 100644 --- a/compiler/types/TyCon.hs-boot +++ b/compiler/types/TyCon.hs-boot @@ -1,5 +1,7 @@ module TyCon where +import GhcPrelude + data TyCon isTupleTyCon :: TyCon -> Bool diff --git a/compiler/types/Type.hs b/compiler/types/Type.hs index c905e34bc3..d28f18c37e 100644 --- a/compiler/types/Type.hs +++ b/compiler/types/Type.hs @@ -205,6 +205,8 @@ module Type ( #include "HsVersions.h" +import GhcPrelude + import BasicTypes -- We import the representation and primitive functions from TyCoRep. diff --git a/compiler/types/Type.hs-boot b/compiler/types/Type.hs-boot index 1c3bfa8570..e5db1064d4 100644 --- a/compiler/types/Type.hs-boot +++ b/compiler/types/Type.hs-boot @@ -1,6 +1,8 @@ {-# LANGUAGE FlexibleContexts #-} module Type where + +import GhcPrelude import TyCon import Var ( TyCoVar ) import {-# SOURCE #-} TyCoRep( Type, Coercion ) diff --git a/compiler/types/Unify.hs b/compiler/types/Unify.hs index cb21899d3e..5fba83fef5 100644 --- a/compiler/types/Unify.hs +++ b/compiler/types/Unify.hs @@ -26,6 +26,8 @@ module Unify ( #include "HsVersions.h" +import GhcPrelude + import Var import VarEnv import VarSet diff --git a/compiler/utils/AsmUtils.hs b/compiler/utils/AsmUtils.hs index 55f9d6d551..36fb7ef6cb 100644 --- a/compiler/utils/AsmUtils.hs +++ b/compiler/utils/AsmUtils.hs @@ -6,6 +6,8 @@ module AsmUtils ( sectionType ) where +import GhcPrelude + import Platform import Outputable diff --git a/compiler/utils/Bag.hs b/compiler/utils/Bag.hs index fffbb6eb12..a027db23b7 100644 --- a/compiler/utils/Bag.hs +++ b/compiler/utils/Bag.hs @@ -25,6 +25,8 @@ module Bag ( anyBagM, filterBagM ) where +import GhcPrelude + import Outputable import Util diff --git a/compiler/utils/Binary.hs b/compiler/utils/Binary.hs index 9254e97985..1c0284a332 100644 --- a/compiler/utils/Binary.hs +++ b/compiler/utils/Binary.hs @@ -59,6 +59,8 @@ module Binary -- The *host* architecture version: #include "../includes/MachDeps.h" +import GhcPrelude + import {-# SOURCE #-} Name (Name) import FastString import Panic diff --git a/compiler/utils/BooleanFormula.hs b/compiler/utils/BooleanFormula.hs index 43a71f0080..a42bb90a1c 100644 --- a/compiler/utils/BooleanFormula.hs +++ b/compiler/utils/BooleanFormula.hs @@ -16,6 +16,8 @@ module BooleanFormula ( pprBooleanFormula, pprBooleanFormulaNice ) where +import GhcPrelude + import Data.List ( nub, intersperse ) import Data.Data diff --git a/compiler/utils/BufWrite.hs b/compiler/utils/BufWrite.hs index eff57059de..e25bf06c4c 100644 --- a/compiler/utils/BufWrite.hs +++ b/compiler/utils/BufWrite.hs @@ -23,6 +23,8 @@ module BufWrite ( bFlush, ) where +import GhcPrelude + import FastString import FastMutInt diff --git a/compiler/utils/Digraph.hs b/compiler/utils/Digraph.hs index 3d9e5a39cb..c6f2706cec 100644 --- a/compiler/utils/Digraph.hs +++ b/compiler/utils/Digraph.hs @@ -40,6 +40,8 @@ module Digraph( ------------------------------------------------------------------------------ +import GhcPrelude + import Util ( minWith, count ) import Outputable import Maybes ( expectJust ) diff --git a/compiler/utils/Encoding.hs b/compiler/utils/Encoding.hs index f2b0979995..f809ba9016 100644 --- a/compiler/utils/Encoding.hs +++ b/compiler/utils/Encoding.hs @@ -33,6 +33,8 @@ module Encoding ( toBase62Padded ) where +import GhcPrelude + import Foreign import Foreign.ForeignPtr.Unsafe import Data.Char diff --git a/compiler/utils/EnumSet.hs b/compiler/utils/EnumSet.hs index aa36b788aa..99b93f5c22 100644 --- a/compiler/utils/EnumSet.hs +++ b/compiler/utils/EnumSet.hs @@ -10,6 +10,8 @@ module EnumSet , empty ) where +import GhcPrelude + import qualified Data.IntSet as IntSet newtype EnumSet a = EnumSet IntSet.IntSet diff --git a/compiler/utils/Exception.hs b/compiler/utils/Exception.hs index 850393e359..9d9b3ae25c 100644 --- a/compiler/utils/Exception.hs +++ b/compiler/utils/Exception.hs @@ -6,6 +6,8 @@ module Exception ) where +import GhcPrelude + import Control.Exception import Control.Monad.IO.Class diff --git a/compiler/utils/FV.hs b/compiler/utils/FV.hs index b5cf096aac..6d0dc2b2ab 100644 --- a/compiler/utils/FV.hs +++ b/compiler/utils/FV.hs @@ -26,6 +26,8 @@ module FV ( mapUnionFV, ) where +import GhcPrelude + import Var import VarSet diff --git a/compiler/utils/FastFunctions.hs b/compiler/utils/FastFunctions.hs index c643e3c8fb..be3f3cbee4 100644 --- a/compiler/utils/FastFunctions.hs +++ b/compiler/utils/FastFunctions.hs @@ -10,6 +10,8 @@ module FastFunctions ( #include "HsVersions.h" +import GhcPrelude () + import GHC.Exts import GHC.IO (IO(..)) diff --git a/compiler/utils/FastMutInt.hs b/compiler/utils/FastMutInt.hs index 2a6e7b83aa..6ba139a486 100644 --- a/compiler/utils/FastMutInt.hs +++ b/compiler/utils/FastMutInt.hs @@ -15,6 +15,8 @@ module FastMutInt( readFastMutPtr, writeFastMutPtr ) where +import GhcPrelude + import Data.Bits import GHC.Base import GHC.Ptr diff --git a/compiler/utils/FastString.hs b/compiler/utils/FastString.hs index ee6dd7a415..fde4ff01de 100644 --- a/compiler/utils/FastString.hs +++ b/compiler/utils/FastString.hs @@ -97,6 +97,8 @@ module FastString #include "HsVersions.h" +import GhcPrelude as Prelude + import Encoding import FastFunctions import Panic diff --git a/compiler/utils/FastStringEnv.hs b/compiler/utils/FastStringEnv.hs index 14b0859211..1b4af6cee7 100644 --- a/compiler/utils/FastStringEnv.hs +++ b/compiler/utils/FastStringEnv.hs @@ -27,6 +27,8 @@ module FastStringEnv ( mkDFsEnv, emptyDFsEnv, dFsEnvElts, lookupDFsEnv ) where +import GhcPrelude + import UniqFM import UniqDFM import Maybes diff --git a/compiler/utils/Fingerprint.hsc b/compiler/utils/Fingerprint.hsc index d4cee0e10b..4c89ec0893 100644 --- a/compiler/utils/Fingerprint.hsc +++ b/compiler/utils/Fingerprint.hsc @@ -24,6 +24,8 @@ module Fingerprint ( #include "md5.h" ##include "HsVersions.h" +import GhcPrelude + import Foreign import GHC.IO import Numeric ( readHex ) diff --git a/compiler/utils/FiniteMap.hs b/compiler/utils/FiniteMap.hs index cb6e5573e8..afa3636432 100644 --- a/compiler/utils/FiniteMap.hs +++ b/compiler/utils/FiniteMap.hs @@ -7,6 +7,8 @@ module FiniteMap ( foldRight, foldRightWithKey ) where +import GhcPrelude + import Data.Map (Map) import qualified Data.Map as Map diff --git a/compiler/utils/GhcPrelude.hs b/compiler/utils/GhcPrelude.hs new file mode 100644 index 0000000000..ed4eacbfb8 --- /dev/null +++ b/compiler/utils/GhcPrelude.hs @@ -0,0 +1,9 @@ +-- | Custom GHC "Prelude" +-- +-- This module serves as a replacement for the "Prelude" module +-- and abstracts over differences between the bootstrapping +-- GHC version, and may also provide a common default vocabulary. +-- +module GhcPrelude (module X) where + +import Prelude as X diff --git a/compiler/utils/GraphBase.hs b/compiler/utils/GraphBase.hs index c3850dfdd6..b66599356e 100644 --- a/compiler/utils/GraphBase.hs +++ b/compiler/utils/GraphBase.hs @@ -12,6 +12,8 @@ module GraphBase ( where +import GhcPrelude + import UniqSet import UniqFM diff --git a/compiler/utils/GraphColor.hs b/compiler/utils/GraphColor.hs index be7975b306..7affb92391 100644 --- a/compiler/utils/GraphColor.hs +++ b/compiler/utils/GraphColor.hs @@ -12,6 +12,8 @@ module GraphColor ( where +import GhcPrelude + import GraphBase import GraphOps import GraphPpr diff --git a/compiler/utils/GraphOps.hs b/compiler/utils/GraphOps.hs index 565134be92..bb4504ff1f 100644 --- a/compiler/utils/GraphOps.hs +++ b/compiler/utils/GraphOps.hs @@ -18,6 +18,8 @@ module GraphOps ( ) where +import GhcPrelude + import GraphBase import Outputable diff --git a/compiler/utils/GraphPpr.hs b/compiler/utils/GraphPpr.hs index a40e1058d0..c39395eda8 100644 --- a/compiler/utils/GraphPpr.hs +++ b/compiler/utils/GraphPpr.hs @@ -7,6 +7,8 @@ module GraphPpr ( ) where +import GhcPrelude + import GraphBase import Outputable diff --git a/compiler/utils/IOEnv.hs b/compiler/utils/IOEnv.hs index 6fc5f9dc67..b9210702fa 100644 --- a/compiler/utils/IOEnv.hs +++ b/compiler/utils/IOEnv.hs @@ -29,6 +29,8 @@ module IOEnv ( atomicUpdMutVar, atomicUpdMutVar' ) where +import GhcPrelude + import DynFlags import Exception import Module diff --git a/compiler/utils/Json.hs b/compiler/utils/Json.hs index ffbff50641..2bf00d3851 100644 --- a/compiler/utils/Json.hs +++ b/compiler/utils/Json.hs @@ -1,6 +1,8 @@ {-# LANGUAGE GADTs #-} module Json where +import GhcPrelude + import Outputable import Data.Char import Numeric diff --git a/compiler/utils/ListSetOps.hs b/compiler/utils/ListSetOps.hs index 7fa441402c..c311ac9c85 100644 --- a/compiler/utils/ListSetOps.hs +++ b/compiler/utils/ListSetOps.hs @@ -23,6 +23,8 @@ module ListSetOps ( #include "HsVersions.h" +import GhcPrelude + import Outputable import Util diff --git a/compiler/utils/ListT.hs b/compiler/utils/ListT.hs index 7dc1aa3eaf..c16701419d 100644 --- a/compiler/utils/ListT.hs +++ b/compiler/utils/ListT.hs @@ -29,6 +29,8 @@ module ListT ( fold ) where +import GhcPrelude + import Control.Applicative import Control.Monad diff --git a/compiler/utils/Maybes.hs b/compiler/utils/Maybes.hs index 89dd5b4fae..3a139a5b36 100644 --- a/compiler/utils/Maybes.hs +++ b/compiler/utils/Maybes.hs @@ -23,6 +23,8 @@ module Maybes ( MaybeT(..), liftMaybeT, tryMaybeT ) where +import GhcPrelude + import Control.Monad import Control.Monad.Trans.Maybe import Control.Exception (catch, SomeException(..)) diff --git a/compiler/utils/MonadUtils.hs b/compiler/utils/MonadUtils.hs index d6fb31731e..39a76e1cf2 100644 --- a/compiler/utils/MonadUtils.hs +++ b/compiler/utils/MonadUtils.hs @@ -27,6 +27,8 @@ module MonadUtils -- Imports ------------------------------------------------------------------------------- +import GhcPrelude + import Maybes import Control.Monad diff --git a/compiler/utils/OrdList.hs b/compiler/utils/OrdList.hs index 90fdefb908..081210a534 100644 --- a/compiler/utils/OrdList.hs +++ b/compiler/utils/OrdList.hs @@ -15,6 +15,8 @@ module OrdList ( mapOL, fromOL, toOL, foldrOL, foldlOL ) where +import GhcPrelude + import Outputable import Data.Semigroup ( Semigroup ) diff --git a/compiler/utils/Outputable.hs b/compiler/utils/Outputable.hs index 5cd7656b4f..d257e3ec9f 100644 --- a/compiler/utils/Outputable.hs +++ b/compiler/utils/Outputable.hs @@ -85,6 +85,8 @@ module Outputable ( pprDebugAndThen, callStackDoc ) where +import GhcPrelude + import {-# SOURCE #-} DynFlags( DynFlags, hasPprDebug, hasNoDebugOutput, targetPlatform, pprUserLength, pprCols, useUnicode, useUnicodeSyntax, diff --git a/compiler/utils/Outputable.hs-boot b/compiler/utils/Outputable.hs-boot index 980c186889..ad7d091833 100644 --- a/compiler/utils/Outputable.hs-boot +++ b/compiler/utils/Outputable.hs-boot @@ -1,5 +1,7 @@ module Outputable where +import GhcPrelude + data SDoc showSDocUnsafe :: SDoc -> String diff --git a/compiler/utils/Pair.hs b/compiler/utils/Pair.hs index aeb8648b64..08b19be0b2 100644 --- a/compiler/utils/Pair.hs +++ b/compiler/utils/Pair.hs @@ -9,6 +9,8 @@ module Pair ( Pair(..), unPair, toPair, swap, pLiftFst, pLiftSnd ) where #include "HsVersions.h" +import GhcPrelude + import Outputable import qualified Data.Semigroup as Semi diff --git a/compiler/utils/Panic.hs b/compiler/utils/Panic.hs index 0a21f251fb..910906e08c 100644 --- a/compiler/utils/Panic.hs +++ b/compiler/utils/Panic.hs @@ -27,6 +27,8 @@ module Panic ( ) where #include "HsVersions.h" +import GhcPrelude + import {-# SOURCE #-} Outputable (SDoc, showSDocUnsafe) import Config diff --git a/compiler/utils/Platform.hs b/compiler/utils/Platform.hs index 8cd1fa75e3..c313870f2f 100644 --- a/compiler/utils/Platform.hs +++ b/compiler/utils/Platform.hs @@ -20,6 +20,8 @@ module Platform ( where +import GhcPrelude + -- | Contains enough information for the native code generator to emit -- code for this platform. data Platform diff --git a/compiler/utils/PprColour.hs b/compiler/utils/PprColour.hs index f8ea28faa9..f32b8b0084 100644 --- a/compiler/utils/PprColour.hs +++ b/compiler/utils/PprColour.hs @@ -1,4 +1,6 @@ module PprColour where +import GhcPrelude + import Data.Maybe (fromMaybe) import Util (OverridingBool(..), split) import Data.Semigroup as Semi diff --git a/compiler/utils/Pretty.hs b/compiler/utils/Pretty.hs index a4d67f03a0..78c8e6a885 100644 --- a/compiler/utils/Pretty.hs +++ b/compiler/utils/Pretty.hs @@ -111,11 +111,12 @@ module Pretty ( ) where +import GhcPrelude hiding (error) + import BufWrite import FastString import Panic import System.IO -import Prelude hiding (error) --for a RULES import GHC.Base ( unpackCString# ) diff --git a/compiler/utils/State.hs b/compiler/utils/State.hs index 8eca4657df..11bd7686d7 100644 --- a/compiler/utils/State.hs +++ b/compiler/utils/State.hs @@ -2,6 +2,8 @@ module State where +import GhcPrelude + newtype State s a = State { runState' :: s -> (# a, s #) } instance Functor (State s) where diff --git a/compiler/utils/Stream.hs b/compiler/utils/Stream.hs index f7b21017cf..ad01fad40c 100644 --- a/compiler/utils/Stream.hs +++ b/compiler/utils/Stream.hs @@ -11,6 +11,8 @@ module Stream ( Stream.map, Stream.mapM, Stream.mapAccumL ) where +import GhcPrelude + import Control.Monad -- | diff --git a/compiler/utils/StringBuffer.hs b/compiler/utils/StringBuffer.hs index d75e537fca..08402101af 100644 --- a/compiler/utils/StringBuffer.hs +++ b/compiler/utils/StringBuffer.hs @@ -45,6 +45,8 @@ module StringBuffer #include "HsVersions.h" +import GhcPrelude + import Encoding import FastString import FastFunctions diff --git a/compiler/utils/UnVarGraph.hs b/compiler/utils/UnVarGraph.hs index 228f3b5220..a540132bb7 100644 --- a/compiler/utils/UnVarGraph.hs +++ b/compiler/utils/UnVarGraph.hs @@ -27,6 +27,8 @@ module UnVarGraph , delNode ) where +import GhcPrelude + import Id import VarEnv import UniqFM diff --git a/compiler/utils/UniqDFM.hs b/compiler/utils/UniqDFM.hs index cb3dd7b7bd..715600ddb8 100644 --- a/compiler/utils/UniqDFM.hs +++ b/compiler/utils/UniqDFM.hs @@ -59,6 +59,8 @@ module UniqDFM ( alwaysUnsafeUfmToUdfm, ) where +import GhcPrelude + import Unique ( Uniquable(..), Unique, getKey ) import Outputable diff --git a/compiler/utils/UniqDSet.hs b/compiler/utils/UniqDSet.hs index eef545eedd..e33becf036 100644 --- a/compiler/utils/UniqDSet.hs +++ b/compiler/utils/UniqDSet.hs @@ -32,6 +32,8 @@ module UniqDSet ( partitionUniqDSet ) where +import GhcPrelude + import UniqDFM import UniqSet import Unique diff --git a/compiler/utils/UniqFM.hs b/compiler/utils/UniqFM.hs index 076479f984..f0cc197b71 100644 --- a/compiler/utils/UniqFM.hs +++ b/compiler/utils/UniqFM.hs @@ -71,6 +71,8 @@ module UniqFM ( pprUniqFM, pprUFM, pprUFMWithKeys, pluralUFM ) where +import GhcPrelude + import Unique ( Uniquable(..), Unique, getKey ) import Outputable diff --git a/compiler/utils/UniqMap.hs b/compiler/utils/UniqMap.hs index c0960dd5b2..2dd3cd57ea 100644 --- a/compiler/utils/UniqMap.hs +++ b/compiler/utils/UniqMap.hs @@ -44,6 +44,8 @@ module UniqMap ( -- Non-deterministic functions omitted ) where +import GhcPrelude + import UniqFM import Unique diff --git a/compiler/utils/UniqSet.hs b/compiler/utils/UniqSet.hs index d09b337d12..be600a09b3 100644 --- a/compiler/utils/UniqSet.hs +++ b/compiler/utils/UniqSet.hs @@ -46,6 +46,8 @@ module UniqSet ( nonDetFoldUniqSet_Directly ) where +import GhcPrelude + import UniqFM import Unique import Data.Coerce diff --git a/compiler/utils/Util.hs b/compiler/utils/Util.hs index 6146bf0113..3b402f2833 100644 --- a/compiler/utils/Util.hs +++ b/compiler/utils/Util.hs @@ -129,6 +129,8 @@ module Util ( #include "HsVersions.h" +import GhcPrelude + import Exception import Panic diff --git a/compiler/vectorise/Vectorise.hs b/compiler/vectorise/Vectorise.hs index 2e09adbbbe..0181c6cdd1 100644 --- a/compiler/vectorise/Vectorise.hs +++ b/compiler/vectorise/Vectorise.hs @@ -8,6 +8,8 @@ module Vectorise ( vectorise ) where +import GhcPrelude + import Vectorise.Type.Env import Vectorise.Type.Type import Vectorise.Convert diff --git a/compiler/vectorise/Vectorise/Builtins/Base.hs b/compiler/vectorise/Vectorise/Builtins/Base.hs index 4837bde208..ba61a8b548 100644 --- a/compiler/vectorise/Vectorise/Builtins/Base.hs +++ b/compiler/vectorise/Vectorise/Builtins/Base.hs @@ -30,6 +30,8 @@ module Vectorise.Builtins.Base ( closureCtrFun ) where +import GhcPrelude + import TysPrim import BasicTypes import Class diff --git a/compiler/vectorise/Vectorise/Builtins/Initialise.hs b/compiler/vectorise/Vectorise/Builtins/Initialise.hs index 73cedc4c53..0772e5be43 100644 --- a/compiler/vectorise/Vectorise/Builtins/Initialise.hs +++ b/compiler/vectorise/Vectorise/Builtins/Initialise.hs @@ -5,6 +5,8 @@ module Vectorise.Builtins.Initialise ( initBuiltins, initBuiltinVars ) where +import GhcPrelude + import Vectorise.Builtins.Base import BasicTypes diff --git a/compiler/vectorise/Vectorise/Convert.hs b/compiler/vectorise/Vectorise/Convert.hs index b3b70986e5..dda724ff5a 100644 --- a/compiler/vectorise/Vectorise/Convert.hs +++ b/compiler/vectorise/Vectorise/Convert.hs @@ -3,6 +3,8 @@ module Vectorise.Convert ) where +import GhcPrelude + import Vectorise.Monad import Vectorise.Builtins import Vectorise.Type.Type @@ -15,9 +17,6 @@ import NameSet import FastString import Outputable -import Control.Applicative -import Prelude -- avoid redundant import warning due to AMP - -- |Convert a vectorised expression such that it computes the non-vectorised equivalent of its -- value. -- diff --git a/compiler/vectorise/Vectorise/Env.hs b/compiler/vectorise/Vectorise/Env.hs index 8f1a0a0662..8ae35896e1 100644 --- a/compiler/vectorise/Vectorise/Env.hs +++ b/compiler/vectorise/Vectorise/Env.hs @@ -15,6 +15,8 @@ module Vectorise.Env ( modVectInfo ) where +import GhcPrelude + import HscTypes import InstEnv import FamInstEnv diff --git a/compiler/vectorise/Vectorise/Exp.hs b/compiler/vectorise/Vectorise/Exp.hs index 9224aeac4f..c5de9c4250 100644 --- a/compiler/vectorise/Vectorise/Exp.hs +++ b/compiler/vectorise/Vectorise/Exp.hs @@ -13,6 +13,8 @@ where #include "HsVersions.h" +import GhcPrelude + import Vectorise.Type.Type import Vectorise.Var import Vectorise.Convert diff --git a/compiler/vectorise/Vectorise/Generic/Description.hs b/compiler/vectorise/Vectorise/Generic/Description.hs index 78a8f2c192..483e96f712 100644 --- a/compiler/vectorise/Vectorise/Generic/Description.hs +++ b/compiler/vectorise/Vectorise/Generic/Description.hs @@ -16,6 +16,8 @@ module Vectorise.Generic.Description ) where +import GhcPrelude + import Vectorise.Utils import Vectorise.Monad import Vectorise.Builtins diff --git a/compiler/vectorise/Vectorise/Generic/PADict.hs b/compiler/vectorise/Vectorise/Generic/PADict.hs index 5b7748a499..d24f989161 100644 --- a/compiler/vectorise/Vectorise/Generic/PADict.hs +++ b/compiler/vectorise/Vectorise/Generic/PADict.hs @@ -3,6 +3,8 @@ module Vectorise.Generic.PADict ( buildPADict ) where +import GhcPrelude + import Vectorise.Monad import Vectorise.Builtins import Vectorise.Generic.Description diff --git a/compiler/vectorise/Vectorise/Generic/PAMethods.hs b/compiler/vectorise/Vectorise/Generic/PAMethods.hs index d480ea926b..34163d17f6 100644 --- a/compiler/vectorise/Vectorise/Generic/PAMethods.hs +++ b/compiler/vectorise/Vectorise/Generic/PAMethods.hs @@ -9,6 +9,8 @@ module Vectorise.Generic.PAMethods , buildPAScAndMethods ) where +import GhcPrelude + import Vectorise.Utils import Vectorise.Monad import Vectorise.Builtins diff --git a/compiler/vectorise/Vectorise/Generic/PData.hs b/compiler/vectorise/Vectorise/Generic/PData.hs index 4560c83e8b..c0a7e1cc5a 100644 --- a/compiler/vectorise/Vectorise/Generic/PData.hs +++ b/compiler/vectorise/Vectorise/Generic/PData.hs @@ -8,6 +8,8 @@ module Vectorise.Generic.PData , buildPDatasTyCon ) where +import GhcPrelude + import Vectorise.Monad import Vectorise.Builtins import Vectorise.Generic.Description diff --git a/compiler/vectorise/Vectorise/Monad.hs b/compiler/vectorise/Vectorise/Monad.hs index ac8b87a0dc..bcfb8deadf 100644 --- a/compiler/vectorise/Vectorise/Monad.hs +++ b/compiler/vectorise/Vectorise/Monad.hs @@ -18,6 +18,8 @@ module Vectorise.Monad ( addGlobalParallelTyCon, ) where +import GhcPrelude + import Vectorise.Monad.Base import Vectorise.Monad.Naming import Vectorise.Monad.Local diff --git a/compiler/vectorise/Vectorise/Monad/Base.hs b/compiler/vectorise/Vectorise/Monad/Base.hs index a612a9c1cc..eb648710a9 100644 --- a/compiler/vectorise/Vectorise/Monad/Base.hs +++ b/compiler/vectorise/Vectorise/Monad/Base.hs @@ -26,6 +26,8 @@ module Vectorise.Monad.Base ( fixV, ) where +import GhcPrelude + import Vectorise.Builtins import Vectorise.Env diff --git a/compiler/vectorise/Vectorise/Monad/Global.hs b/compiler/vectorise/Vectorise/Monad/Global.hs index cd642f37b6..9abeb59dcb 100644 --- a/compiler/vectorise/Vectorise/Monad/Global.hs +++ b/compiler/vectorise/Vectorise/Monad/Global.hs @@ -33,6 +33,8 @@ module Vectorise.Monad.Global ( lookupTyConPR ) where +import GhcPrelude + import Vectorise.Monad.Base import Vectorise.Env diff --git a/compiler/vectorise/Vectorise/Monad/InstEnv.hs b/compiler/vectorise/Vectorise/Monad/InstEnv.hs index 64b7441235..68d70a46b6 100644 --- a/compiler/vectorise/Vectorise/Monad/InstEnv.hs +++ b/compiler/vectorise/Vectorise/Monad/InstEnv.hs @@ -7,6 +7,8 @@ module Vectorise.Monad.InstEnv ) where +import GhcPrelude + import Vectorise.Monad.Global import Vectorise.Monad.Base import Vectorise.Env diff --git a/compiler/vectorise/Vectorise/Monad/Local.hs b/compiler/vectorise/Vectorise/Monad/Local.hs index 61f55ccd43..1f0da7ebd2 100644 --- a/compiler/vectorise/Vectorise/Monad/Local.hs +++ b/compiler/vectorise/Vectorise/Monad/Local.hs @@ -13,6 +13,8 @@ module Vectorise.Monad.Local ) where +import GhcPrelude + import Vectorise.Monad.Base import Vectorise.Env diff --git a/compiler/vectorise/Vectorise/Monad/Naming.hs b/compiler/vectorise/Vectorise/Monad/Naming.hs index 0b46416ddb..b1a8cb4092 100644 --- a/compiler/vectorise/Vectorise/Monad/Naming.hs +++ b/compiler/vectorise/Vectorise/Monad/Naming.hs @@ -14,6 +14,8 @@ module Vectorise.Monad.Naming ) where +import GhcPrelude + import Vectorise.Monad.Base import DsMonad diff --git a/compiler/vectorise/Vectorise/Type/Classify.hs b/compiler/vectorise/Vectorise/Type/Classify.hs index ffe95f3cc4..5532c40ee1 100644 --- a/compiler/vectorise/Vectorise/Type/Classify.hs +++ b/compiler/vectorise/Vectorise/Type/Classify.hs @@ -18,6 +18,8 @@ module Vectorise.Type.Classify ) where +import GhcPrelude + import NameSet import UniqSet import UniqFM diff --git a/compiler/vectorise/Vectorise/Type/Env.hs b/compiler/vectorise/Vectorise/Type/Env.hs index 9526feddaf..a70e166aa2 100644 --- a/compiler/vectorise/Vectorise/Type/Env.hs +++ b/compiler/vectorise/Vectorise/Type/Env.hs @@ -11,6 +11,8 @@ module Vectorise.Type.Env ( #include "HsVersions.h" +import GhcPrelude + import Vectorise.Env import Vectorise.Vect import Vectorise.Monad diff --git a/compiler/vectorise/Vectorise/Type/TyConDecl.hs b/compiler/vectorise/Vectorise/Type/TyConDecl.hs index 684754684b..0828250363 100644 --- a/compiler/vectorise/Vectorise/Type/TyConDecl.hs +++ b/compiler/vectorise/Vectorise/Type/TyConDecl.hs @@ -3,6 +3,8 @@ module Vectorise.Type.TyConDecl ( vectTyConDecls ) where +import GhcPrelude + import Vectorise.Type.Type import Vectorise.Monad import Vectorise.Env( GlobalEnv( global_fam_inst_env ) ) diff --git a/compiler/vectorise/Vectorise/Type/Type.hs b/compiler/vectorise/Vectorise/Type/Type.hs index 88d3f565f3..270f130123 100644 --- a/compiler/vectorise/Vectorise/Type/Type.hs +++ b/compiler/vectorise/Vectorise/Type/Type.hs @@ -7,6 +7,8 @@ module Vectorise.Type.Type ) where +import GhcPrelude + import Vectorise.Utils import Vectorise.Monad import Vectorise.Builtins @@ -15,10 +17,8 @@ import Type import TyCoRep import TyCon import Control.Monad -import Control.Applicative import Data.Maybe import Outputable -import Prelude -- avoid redundant import warning due to AMP -- |Vectorise a type constructor. Unless there is a vectorised version (stripped of embedded -- parallel arrays), the vectorised version is the same as the original. diff --git a/compiler/vectorise/Vectorise/Utils.hs b/compiler/vectorise/Vectorise/Utils.hs index 733eeb9cfd..6467bf9e7a 100644 --- a/compiler/vectorise/Vectorise/Utils.hs +++ b/compiler/vectorise/Vectorise/Utils.hs @@ -23,6 +23,8 @@ module Vectorise.Utils ( newLocalVar ) where +import GhcPrelude + import Vectorise.Utils.Base import Vectorise.Utils.Closure import Vectorise.Utils.Hoisting diff --git a/compiler/vectorise/Vectorise/Utils/Base.hs b/compiler/vectorise/Vectorise/Utils/Base.hs index 88058e22d9..72ee0bed1e 100644 --- a/compiler/vectorise/Vectorise/Utils/Base.hs +++ b/compiler/vectorise/Vectorise/Utils/Base.hs @@ -27,6 +27,8 @@ module Vectorise.Utils.Base , preprFamInst ) where +import GhcPrelude + import Vectorise.Monad import Vectorise.Vect import Vectorise.Builtins diff --git a/compiler/vectorise/Vectorise/Utils/Closure.hs b/compiler/vectorise/Vectorise/Utils/Closure.hs index 118f34dfbf..49ef127975 100644 --- a/compiler/vectorise/Vectorise/Utils/Closure.hs +++ b/compiler/vectorise/Vectorise/Utils/Closure.hs @@ -7,6 +7,8 @@ module Vectorise.Utils.Closure ) where +import GhcPrelude + import Vectorise.Builtins import Vectorise.Vect import Vectorise.Monad diff --git a/compiler/vectorise/Vectorise/Utils/Hoisting.hs b/compiler/vectorise/Vectorise/Utils/Hoisting.hs index 05883457bf..e1d208590d 100644 --- a/compiler/vectorise/Vectorise/Utils/Hoisting.hs +++ b/compiler/vectorise/Vectorise/Utils/Hoisting.hs @@ -11,6 +11,8 @@ module Vectorise.Utils.Hoisting ) where +import GhcPrelude + import Vectorise.Monad import Vectorise.Env import Vectorise.Vect @@ -24,8 +26,6 @@ import Id import BasicTypes (Arity) import FastString import Control.Monad -import Control.Applicative -import Prelude -- avoid redundant import warning due to AMP -- Inline --------------------------------------------------------------------- diff --git a/compiler/vectorise/Vectorise/Utils/PADict.hs b/compiler/vectorise/Vectorise/Utils/PADict.hs index 4d32f5df74..1176b78e54 100644 --- a/compiler/vectorise/Vectorise/Utils/PADict.hs +++ b/compiler/vectorise/Vectorise/Utils/PADict.hs @@ -6,6 +6,8 @@ module Vectorise.Utils.PADict ( prDictOfPReprInstTyCon ) where +import GhcPrelude + import Vectorise.Monad import Vectorise.Builtins import Vectorise.Utils.Base diff --git a/compiler/vectorise/Vectorise/Utils/Poly.hs b/compiler/vectorise/Vectorise/Utils/Poly.hs index d9f657f950..6d7a4112da 100644 --- a/compiler/vectorise/Vectorise/Utils/Poly.hs +++ b/compiler/vectorise/Vectorise/Utils/Poly.hs @@ -8,6 +8,8 @@ module Vectorise.Utils.Poly ) where +import GhcPrelude + import Vectorise.Vect import Vectorise.Monad import Vectorise.Utils.PADict diff --git a/compiler/vectorise/Vectorise/Var.hs b/compiler/vectorise/Vectorise/Var.hs index 5cfc8415f7..b107354899 100644 --- a/compiler/vectorise/Vectorise/Var.hs +++ b/compiler/vectorise/Vectorise/Var.hs @@ -13,6 +13,8 @@ module Vectorise.Var ) where +import GhcPrelude + import Vectorise.Utils import Vectorise.Monad import Vectorise.Env @@ -23,8 +25,6 @@ import Type import VarEnv import Id import FastString -import Control.Applicative -import Prelude -- avoid redundant import warning due to AMP -- Binders ---------------------------------------------------------------------------------------- diff --git a/compiler/vectorise/Vectorise/Vect.hs b/compiler/vectorise/Vectorise/Vect.hs index 03492291d6..1b0e57167c 100644 --- a/compiler/vectorise/Vectorise/Vect.hs +++ b/compiler/vectorise/Vectorise/Vect.hs @@ -20,6 +20,8 @@ module Vectorise.Vect ) where +import GhcPrelude + import CoreSyn import Type ( Type ) import Var |