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/parser | |
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/parser')
-rw-r--r-- | compiler/parser/ApiAnnotation.hs | 2 | ||||
-rw-r--r-- | compiler/parser/Ctype.hs | 2 | ||||
-rw-r--r-- | compiler/parser/HaddockUtils.hs | 2 | ||||
-rw-r--r-- | compiler/parser/Lexer.x | 2 | ||||
-rw-r--r-- | compiler/parser/Parser.y | 2 | ||||
-rw-r--r-- | compiler/parser/RdrHsSyn.hs | 2 |
6 files changed, 11 insertions, 1 deletions
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 ) |