From f63bc730c7ea42ca6882f8078eb86be8bf1cc6ad Mon Sep 17 00:00:00 2001 From: Herbert Valerio Riedel Date: Tue, 19 Sep 2017 14:35:36 -0400 Subject: 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 --- compiler/stranal/DmdAnal.hs | 2 ++ compiler/stranal/WorkWrap.hs | 2 ++ compiler/stranal/WwLib.hs | 2 ++ 3 files changed, 6 insertions(+) (limited to 'compiler/stranal') diff --git a/compiler/stranal/DmdAnal.hs b/compiler/stranal/DmdAnal.hs index 49912413e4..44adc81633 100644 --- a/compiler/stranal/DmdAnal.hs +++ b/compiler/stranal/DmdAnal.hs @@ -13,6 +13,8 @@ module DmdAnal ( dmdAnalProgram ) where #include "HsVersions.h" +import GhcPrelude + import DynFlags import WwLib ( findTypeShape, deepSplitProductType_maybe ) import Demand -- All of it diff --git a/compiler/stranal/WorkWrap.hs b/compiler/stranal/WorkWrap.hs index 630ec11442..252f18b983 100644 --- a/compiler/stranal/WorkWrap.hs +++ b/compiler/stranal/WorkWrap.hs @@ -7,6 +7,8 @@ {-# LANGUAGE CPP #-} module WorkWrap ( wwTopBinds ) where +import GhcPrelude + import CoreSyn import CoreUnfold ( certainlyWillInline, mkWwInlineRule, mkWorkerUnfolding ) import CoreUtils ( exprType, exprIsHNF ) diff --git a/compiler/stranal/WwLib.hs b/compiler/stranal/WwLib.hs index f83aafe7b0..474743a955 100644 --- a/compiler/stranal/WwLib.hs +++ b/compiler/stranal/WwLib.hs @@ -13,6 +13,8 @@ module WwLib ( mkWwBodies, mkWWstr, mkWorkerArgs #include "HsVersions.h" +import GhcPrelude + import CoreSyn import CoreUtils ( exprType, mkCast ) import Id -- cgit v1.2.1