Commit f63bc730 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺 Committed by Ben Gamari
Browse files

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
parent 12a92fed
......@@ -17,6 +17,8 @@ module BkpSyn (
LRenaming, Renaming(..),
) where
import GhcPrelude
import HsSyn
import SrcLoc
import Outputable
......
......@@ -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
......
......@@ -12,6 +12,8 @@ module NameShape(
#include "HsVersions.h"
import GhcPrelude
import Outputable
import HscTypes
import Module
......
......@@ -15,6 +15,8 @@ module RnModIface(
#include "HsVersions.h"
import GhcPrelude
import SrcLoc
import Outputable
import HscTypes
......
......@@ -26,6 +26,8 @@ module Avail (
) where
import GhcPrelude
import Name
import NameEnv
import NameSet
......
......@@ -109,6 +109,8 @@ module BasicTypes(
SpliceExplicitFlag(..)
) where
import GhcPrelude
import FastString
import Outputable
import SrcLoc ( Located,unLoc )
......
......@@ -26,6 +26,8 @@ module ConLike (
#include "HsVersions.h"
import GhcPrelude
import DataCon
import PatSyn
import Outputable
......
......@@ -61,6 +61,8 @@ module DataCon (
#include "HsVersions.h"
import GhcPrelude
import {-# SOURCE #-} MkId( DataConBoxer )
import Type
import ForeignCall ( CType )
......
module DataCon where
import GhcPrelude
import Var( TyVar, TyVarBinder )
import Name( Name, NamedThing )
import {-# SOURCE #-} TyCon( TyCon )
......
......@@ -62,6 +62,8 @@ module Demand (
#include "HsVersions.h"
import GhcPrelude
import DynFlags
import Outputable
import Var ( Var )
......
......@@ -69,6 +69,8 @@ module FieldLabel ( FieldLabelString
, mkFieldLabelOccs
) where
import GhcPrelude
import OccName
import Name
......
......@@ -116,6 +116,8 @@ module Id (
#include "HsVersions.h"
import GhcPrelude
import DynFlags
import CoreSyn ( CoreRule, isStableUnfolding, evaldUnfolding, Unfolding( NoUnfolding ) )
......
......@@ -82,6 +82,8 @@ module IdInfo (
#include "HsVersions.h"
import GhcPrelude
import CoreSyn
import Class
......
module IdInfo where
import GhcPrelude
import Outputable
data IdInfo
data IdDetails
......
......@@ -27,6 +27,8 @@ module Lexeme (
) where
import GhcPrelude
import FastString
import Data.Char
......
......@@ -44,6 +44,8 @@ module Literal
#include "HsVersions.h"
import GhcPrelude
import TysPrim
import PrelNames
import Type
......
......@@ -39,6 +39,8 @@ module MkId (
#include "HsVersions.h"
import GhcPrelude
import Rules
import TysPrim
import TysWiredIn
......
......@@ -137,6 +137,8 @@ module Module
unitModuleSet
) where
import GhcPrelude
import Config
import Outputable
import Unique
......
module Module where
import GhcPrelude
import FastString
data Module
......
......@@ -77,6 +77,8 @@ module Name (
module OccName
) where
import GhcPrelude
import {-# SOURCE #-} TyCoRep( TyThing )
import {-# SOURCE #-} PrelNames( starKindTyConKey, unicodeStarKindTyConKey )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment