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/backpack | |
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/backpack')
-rw-r--r-- | compiler/backpack/BkpSyn.hs | 2 | ||||
-rw-r--r-- | compiler/backpack/DriverBkp.hs | 2 | ||||
-rw-r--r-- | compiler/backpack/NameShape.hs | 2 | ||||
-rw-r--r-- | compiler/backpack/RnModIface.hs | 2 |
4 files changed, 8 insertions, 0 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 |