summaryrefslogtreecommitdiff
path: root/compiler/codeGen/CodeGen
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2017-09-19 14:35:36 -0400
committerBen Gamari <ben@smart-cactus.org>2017-09-19 14:35:38 -0400
commitf63bc730c7ea42ca6882f8078eb86be8bf1cc6ad (patch)
tree3273e53bf00121c2a2657a9fe997283300e997e9 /compiler/codeGen/CodeGen
parent12a92fedf8b1997f2e26800929be117d54536b7e (diff)
downloadhaskell-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/codeGen/CodeGen')
-rw-r--r--compiler/codeGen/CodeGen/Platform.hs2
-rw-r--r--compiler/codeGen/CodeGen/Platform/ARM.hs2
-rw-r--r--compiler/codeGen/CodeGen/Platform/ARM64.hs2
-rw-r--r--compiler/codeGen/CodeGen/Platform/NoRegs.hs2
-rw-r--r--compiler/codeGen/CodeGen/Platform/PPC.hs2
-rw-r--r--compiler/codeGen/CodeGen/Platform/PPC_Darwin.hs2
-rw-r--r--compiler/codeGen/CodeGen/Platform/SPARC.hs2
-rw-r--r--compiler/codeGen/CodeGen/Platform/X86.hs2
-rw-r--r--compiler/codeGen/CodeGen/Platform/X86_64.hs2
9 files changed, 18 insertions, 0 deletions
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"