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