diff options
Diffstat (limited to 'compiler/cmm')
39 files changed, 77 insertions, 13 deletions
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 |