summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/GHC.hs2
-rw-r--r--compiler/GHC/Builtin/Names.hs2
-rw-r--r--compiler/GHC/Builtin/PrimOps.hs2
-rw-r--r--compiler/GHC/Builtin/Types.hs2
-rw-r--r--compiler/GHC/Builtin/Types/Prim.hs2
-rw-r--r--compiler/GHC/Builtin/Uniques.hs2
-rw-r--r--compiler/GHC/Builtin/Utils.hs2
-rw-r--r--compiler/GHC/ByteCode/Asm.hs2
-rw-r--r--compiler/GHC/ByteCode/InfoTable.hs2
-rw-r--r--compiler/GHC/ByteCode/Instr.hs2
-rw-r--r--compiler/GHC/ByteCode/Linker.hs2
-rw-r--r--compiler/GHC/Cmm/CLabel.hs2
-rw-r--r--compiler/GHC/Cmm/Info.hs2
-rw-r--r--compiler/GHC/Cmm/Parser.y2
-rw-r--r--compiler/GHC/CmmToAsm.hs2
-rw-r--r--compiler/GHC/CmmToAsm/BlockLayout.hs1
-rw-r--r--compiler/GHC/CmmToAsm/CFG.hs2
-rw-r--r--compiler/GHC/CmmToAsm/Monad.hs2
-rw-r--r--compiler/GHC/CmmToAsm/PPC/CodeGen.hs2
-rw-r--r--compiler/GHC/CmmToAsm/PPC/Instr.hs2
-rw-r--r--compiler/GHC/CmmToAsm/PPC/RegInfo.hs2
-rw-r--r--compiler/GHC/CmmToAsm/PPC/Regs.hs2
-rw-r--r--compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs2
-rw-r--r--compiler/GHC/CmmToAsm/Reg/Linear.hs3
-rw-r--r--compiler/GHC/CmmToAsm/Reg/Linear/FreeRegs.hs3
-rw-r--r--compiler/GHC/CmmToAsm/Reg/Target.hs2
-rw-r--r--compiler/GHC/CmmToAsm/SPARC/CodeGen.hs2
-rw-r--r--compiler/GHC/CmmToAsm/SPARC/Instr.hs2
-rw-r--r--compiler/GHC/CmmToAsm/SPARC/Ppr.hs2
-rw-r--r--compiler/GHC/CmmToAsm/X86/CodeGen.hs2
-rw-r--r--compiler/GHC/CmmToAsm/X86/Instr.hs2
-rw-r--r--compiler/GHC/CmmToAsm/X86/Ppr.hs2
-rw-r--r--compiler/GHC/CmmToAsm/X86/RegInfo.hs2
-rw-r--r--compiler/GHC/CmmToAsm/X86/Regs.hs2
-rw-r--r--compiler/GHC/CmmToC.hs4
-rw-r--r--compiler/GHC/CmmToLlvm.hs2
-rw-r--r--compiler/GHC/CmmToLlvm/Base.hs1
-rw-r--r--compiler/GHC/CmmToLlvm/CodeGen.hs2
-rw-r--r--compiler/GHC/CmmToLlvm/Data.hs2
-rw-r--r--compiler/GHC/CmmToLlvm/Ppr.hs2
-rw-r--r--compiler/GHC/CmmToLlvm/Regs.hs2
-rw-r--r--compiler/GHC/Core.hs6
-rw-r--r--compiler/GHC/Core/Class.hs2
-rw-r--r--compiler/GHC/Core/Coercion.hs2
-rw-r--r--compiler/GHC/Core/Coercion/Axiom.hs2
-rw-r--r--compiler/GHC/Core/Coercion/Opt.hs8
-rw-r--r--compiler/GHC/Core/ConLike.hs2
-rw-r--r--compiler/GHC/Core/DataCon.hs2
-rw-r--r--compiler/GHC/Core/FVs.hs2
-rw-r--r--compiler/GHC/Core/FamInstEnv.hs2
-rw-r--r--compiler/GHC/Core/InstEnv.hs2
-rw-r--r--compiler/GHC/Core/Lint.hs2
-rw-r--r--compiler/GHC/Core/Make.hs2
-rw-r--r--compiler/GHC/Core/Map/Expr.hs2
-rw-r--r--compiler/GHC/Core/Opt/Arity.hs15
-rw-r--r--compiler/GHC/Core/Opt/CSE.hs2
-rw-r--r--compiler/GHC/Core/Opt/ConstantFold.hs4
-rw-r--r--compiler/GHC/Core/Opt/CprAnal.hs2
-rw-r--r--compiler/GHC/Core/Opt/DmdAnal.hs2
-rw-r--r--compiler/GHC/Core/Opt/FloatIn.hs2
-rw-r--r--compiler/GHC/Core/Opt/FloatOut.hs2
-rw-r--r--compiler/GHC/Core/Opt/LiberateCase.hs2
-rw-r--r--compiler/GHC/Core/Opt/OccurAnal.hs12
-rw-r--r--compiler/GHC/Core/Opt/Pipeline.hs11
-rw-r--r--compiler/GHC/Core/Opt/SetLevels.hs8
-rw-r--r--compiler/GHC/Core/Opt/Simplify.hs16
-rw-r--r--compiler/GHC/Core/Opt/Simplify/Env.hs2
-rw-r--r--compiler/GHC/Core/Opt/Simplify/Utils.hs6
-rw-r--r--compiler/GHC/Core/Opt/SpecConstr.hs10
-rw-r--r--compiler/GHC/Core/Opt/Specialise.hs6
-rw-r--r--compiler/GHC/Core/Opt/StaticArgs.hs2
-rw-r--r--compiler/GHC/Core/Opt/WorkWrap.hs4
-rw-r--r--compiler/GHC/Core/Opt/WorkWrap/Utils.hs12
-rw-r--r--compiler/GHC/Core/PatSyn.hs2
-rw-r--r--compiler/GHC/Core/Rules.hs2
-rw-r--r--compiler/GHC/Core/SimpleOpt.hs2
-rw-r--r--compiler/GHC/Core/Subst.hs7
-rw-r--r--compiler/GHC/Core/Tidy.hs2
-rw-r--r--compiler/GHC/Core/TyCo/FVs.hs2
-rw-r--r--compiler/GHC/Core/TyCo/Rep.hs2
-rw-r--r--compiler/GHC/Core/TyCo/Subst.hs2
-rw-r--r--compiler/GHC/Core/TyCon.hs2
-rw-r--r--compiler/GHC/Core/TyCon/Env.hs2
-rw-r--r--compiler/GHC/Core/TyCon/RecWalk.hs2
-rw-r--r--compiler/GHC/Core/TyCon/Set.hs2
-rw-r--r--compiler/GHC/Core/Type.hs2
-rw-r--r--compiler/GHC/Core/Unfold.hs2
-rw-r--r--compiler/GHC/Core/Unfold/Make.hs2
-rw-r--r--compiler/GHC/Core/Unify.hs2
-rw-r--r--compiler/GHC/Core/Utils.hs16
-rw-r--r--compiler/GHC/CoreToIface.hs4
-rw-r--r--compiler/GHC/CoreToStg.hs4
-rw-r--r--compiler/GHC/CoreToStg/Prep.hs4
-rw-r--r--compiler/GHC/Data/Graph/Directed.hs2
-rw-r--r--compiler/GHC/Data/List/SetOps.hs4
-rw-r--r--compiler/GHC/Data/Pair.hs2
-rw-r--r--compiler/GHC/Data/StringBuffer.hs2
-rw-r--r--compiler/GHC/Driver/Backpack.hs2
-rw-r--r--compiler/GHC/Driver/CmdLine.hs2
-rw-r--r--compiler/GHC/Driver/CodeOutput.hs2
-rw-r--r--compiler/GHC/Driver/Env.hs2
-rw-r--r--compiler/GHC/Driver/Main.hs3
-rw-r--r--compiler/GHC/Driver/Make.hs2
-rw-r--r--compiler/GHC/Driver/MakeFile.hs2
-rw-r--r--compiler/GHC/Driver/Phases.hs2
-rw-r--r--compiler/GHC/Driver/Pipeline.hs4
-rw-r--r--compiler/GHC/Driver/Session.hs2
-rw-r--r--compiler/GHC/Hs/Doc.hs2
-rw-r--r--compiler/GHC/Hs/Expr.hs2
-rw-r--r--compiler/GHC/Hs/Lit.hs2
-rw-r--r--compiler/GHC/Hs/Type.hs2
-rw-r--r--compiler/GHC/Hs/Utils.hs2
-rw-r--r--compiler/GHC/HsToCore.hs2
-rw-r--r--compiler/GHC/HsToCore/Arrows.hs2
-rw-r--r--compiler/GHC/HsToCore/Binds.hs2
-rw-r--r--compiler/GHC/HsToCore/Expr.hs2
-rw-r--r--compiler/GHC/HsToCore/Foreign/Call.hs2
-rw-r--r--compiler/GHC/HsToCore/Foreign/Decl.hs1
-rw-r--r--compiler/GHC/HsToCore/GuardedRHSs.hs2
-rw-r--r--compiler/GHC/HsToCore/ListComp.hs2
-rw-r--r--compiler/GHC/HsToCore/Match.hs2
-rw-r--r--compiler/GHC/HsToCore/Match/Constructor.hs2
-rw-r--r--compiler/GHC/HsToCore/Match/Literal.hs2
-rw-r--r--compiler/GHC/HsToCore/Pmc.hs2
-rw-r--r--compiler/GHC/HsToCore/Pmc/Check.hs2
-rw-r--r--compiler/GHC/HsToCore/Pmc/Desugar.hs2
-rw-r--r--compiler/GHC/HsToCore/Pmc/Ppr.hs2
-rw-r--r--compiler/GHC/HsToCore/Pmc/Solver.hs2
-rw-r--r--compiler/GHC/HsToCore/Pmc/Solver/Types.hs2
-rw-r--r--compiler/GHC/HsToCore/Pmc/Types.hs2
-rw-r--r--compiler/GHC/HsToCore/Pmc/Utils.hs2
-rw-r--r--compiler/GHC/HsToCore/Quote.hs2
-rw-r--r--compiler/GHC/HsToCore/Usage.hs2
-rw-r--r--compiler/GHC/HsToCore/Utils.hs2
-rw-r--r--compiler/GHC/Iface/Binary.hs2
-rw-r--r--compiler/GHC/Iface/Env.hs2
-rw-r--r--compiler/GHC/Iface/Ext/Ast.hs2
-rw-r--r--compiler/GHC/Iface/Load.hs4
-rw-r--r--compiler/GHC/Iface/Make.hs4
-rw-r--r--compiler/GHC/Iface/Recomp.hs2
-rw-r--r--compiler/GHC/Iface/Recomp/Binary.hs2
-rw-r--r--compiler/GHC/Iface/Rename.hs2
-rw-r--r--compiler/GHC/Iface/Syntax.hs2
-rw-r--r--compiler/GHC/Iface/Tidy.hs6
-rw-r--r--compiler/GHC/Iface/Type.hs2
-rw-r--r--compiler/GHC/IfaceToCore.hs2
-rw-r--r--compiler/GHC/Linker/Dynamic.hs2
-rw-r--r--compiler/GHC/Linker/Loader.hs2
-rw-r--r--compiler/GHC/Llvm/Ppr.hs2
-rw-r--r--compiler/GHC/Llvm/Types.hs2
-rw-r--r--compiler/GHC/Parser/CharClass.hs2
-rw-r--r--compiler/GHC/Parser/Header.hs2
-rw-r--r--compiler/GHC/Parser/PostProcess.hs2
-rw-r--r--compiler/GHC/Platform/Ways.hs2
-rw-r--r--compiler/GHC/Rename/Env.hs2
-rw-r--r--compiler/GHC/Rename/Expr.hs2
-rw-r--r--compiler/GHC/Rename/HsType.hs2
-rw-r--r--compiler/GHC/Rename/Module.hs2
-rw-r--r--compiler/GHC/Rename/Names.hs4
-rw-r--r--compiler/GHC/Rename/Pat.hs2
-rw-r--r--compiler/GHC/Rename/Splice.hs2
-rw-r--r--compiler/GHC/Runtime/Eval.hs4
-rw-r--r--compiler/GHC/Runtime/Heap/Inspect.hs2
-rw-r--r--compiler/GHC/Settings/IO.hs2
-rw-r--r--compiler/GHC/Stg/Lift.hs2
-rw-r--r--compiler/GHC/Stg/Lift/Monad.hs2
-rw-r--r--compiler/GHC/Stg/Pipeline.hs2
-rw-r--r--compiler/GHC/Stg/Stats.hs2
-rw-r--r--compiler/GHC/Stg/Subst.hs5
-rw-r--r--compiler/GHC/Stg/Syntax.hs2
-rw-r--r--compiler/GHC/Stg/Unarise.hs2
-rw-r--r--compiler/GHC/StgToByteCode.hs2
-rw-r--r--compiler/GHC/StgToCmm.hs2
-rw-r--r--compiler/GHC/StgToCmm/Closure.hs2
-rw-r--r--compiler/GHC/StgToCmm/DataCon.hs2
-rw-r--r--compiler/GHC/StgToCmm/Env.hs2
-rw-r--r--compiler/GHC/StgToCmm/Expr.hs2
-rw-r--r--compiler/GHC/StgToCmm/Layout.hs2
-rw-r--r--compiler/GHC/StgToCmm/Lit.hs2
-rw-r--r--compiler/GHC/StgToCmm/Prim.hs2
-rw-r--r--compiler/GHC/StgToCmm/Types.hs2
-rw-r--r--compiler/GHC/StgToCmm/Utils.hs2
-rw-r--r--compiler/GHC/SysTools.hs2
-rw-r--r--compiler/GHC/SysTools/BaseDir.hs2
-rw-r--r--compiler/GHC/SysTools/Process.hs2
-rw-r--r--compiler/GHC/Tc/Deriv.hs2
-rw-r--r--compiler/GHC/Tc/Deriv/Functor.hs2
-rw-r--r--compiler/GHC/Tc/Deriv/Generate.hs2
-rw-r--r--compiler/GHC/Tc/Deriv/Generics.hs2
-rw-r--r--compiler/GHC/Tc/Deriv/Infer.hs2
-rw-r--r--compiler/GHC/Tc/Errors.hs2
-rw-r--r--compiler/GHC/Tc/Gen/App.hs2
-rw-r--r--compiler/GHC/Tc/Gen/Bind.hs2
-rw-r--r--compiler/GHC/Tc/Gen/Expr.hs2
-rw-r--r--compiler/GHC/Tc/Gen/Foreign.hs2
-rw-r--r--compiler/GHC/Tc/Gen/Head.hs2
-rw-r--r--compiler/GHC/Tc/Gen/HsType.hs2
-rw-r--r--compiler/GHC/Tc/Gen/Match.hs2
-rw-r--r--compiler/GHC/Tc/Gen/Pat.hs2
-rw-r--r--compiler/GHC/Tc/Gen/Sig.hs4
-rw-r--r--compiler/GHC/Tc/Gen/Splice.hs2
-rw-r--r--compiler/GHC/Tc/Instance/Class.hs2
-rw-r--r--compiler/GHC/Tc/Instance/Family.hs2
-rw-r--r--compiler/GHC/Tc/Instance/FunDeps.hs2
-rw-r--r--compiler/GHC/Tc/Instance/Typeable.hs2
-rw-r--r--compiler/GHC/Tc/Module.hs2
-rw-r--r--compiler/GHC/Tc/Solver.hs2
-rw-r--r--compiler/GHC/Tc/Solver/Canonical.hs2
-rw-r--r--compiler/GHC/Tc/Solver/Interact.hs2
-rw-r--r--compiler/GHC/Tc/Solver/Monad.hs2
-rw-r--r--compiler/GHC/Tc/Solver/Rewrite.hs2
-rw-r--r--compiler/GHC/Tc/TyCl.hs2
-rw-r--r--compiler/GHC/Tc/TyCl/Build.hs2
-rw-r--r--compiler/GHC/Tc/TyCl/Class.hs2
-rw-r--r--compiler/GHC/Tc/TyCl/Instance.hs2
-rw-r--r--compiler/GHC/Tc/TyCl/PatSyn.hs2
-rw-r--r--compiler/GHC/Tc/TyCl/Utils.hs2
-rw-r--r--compiler/GHC/Tc/Types.hs2
-rw-r--r--compiler/GHC/Tc/Types/Constraint.hs2
-rw-r--r--compiler/GHC/Tc/Types/Evidence.hs1
-rw-r--r--compiler/GHC/Tc/Types/Origin.hs4
-rw-r--r--compiler/GHC/Tc/Utils/Backpack.hs2
-rw-r--r--compiler/GHC/Tc/Utils/Env.hs2
-rw-r--r--compiler/GHC/Tc/Utils/Instantiate.hs2
-rw-r--r--compiler/GHC/Tc/Utils/Monad.hs2
-rw-r--r--compiler/GHC/Tc/Utils/TcMType.hs4
-rw-r--r--compiler/GHC/Tc/Utils/TcType.hs2
-rw-r--r--compiler/GHC/Tc/Utils/Unify.hs2
-rw-r--r--compiler/GHC/Tc/Utils/Zonk.hs2
-rw-r--r--compiler/GHC/Tc/Validity.hs2
-rw-r--r--compiler/GHC/Types/Avail.hs2
-rw-r--r--compiler/GHC/Types/Demand.hs2
-rw-r--r--compiler/GHC/Types/Id.hs10
-rw-r--r--compiler/GHC/Types/Id/Info.hs2
-rw-r--r--compiler/GHC/Types/Id/Make.hs2
-rw-r--r--compiler/GHC/Types/Literal.hs2
-rw-r--r--compiler/GHC/Types/Name/Cache.hs2
-rw-r--r--compiler/GHC/Types/Name/Env.hs2
-rw-r--r--compiler/GHC/Types/Name/Ppr.hs2
-rw-r--r--compiler/GHC/Types/Name/Reader.hs2
-rw-r--r--compiler/GHC/Types/Name/Set.hs2
-rw-r--r--compiler/GHC/Types/Name/Shape.hs2
-rw-r--r--compiler/GHC/Types/RepType.hs2
-rw-r--r--compiler/GHC/Types/TyThing/Ppr.hs4
-rw-r--r--compiler/GHC/Types/Unique.hs1
-rw-r--r--compiler/GHC/Types/Unique/FM.hs2
-rw-r--r--compiler/GHC/Types/Unique/Supply.hs1
-rw-r--r--compiler/GHC/Types/Var.hs2
-rw-r--r--compiler/GHC/Types/Var/Set.hs2
-rw-r--r--compiler/GHC/Unit/Finder.hs2
-rw-r--r--compiler/GHC/Unit/Info.hs2
-rw-r--r--compiler/GHC/Unit/State.hs2
-rw-r--r--compiler/GHC/Utils/Binary.hs2
-rw-r--r--compiler/GHC/Utils/Binary/Typeable.hs2
-rw-r--r--compiler/GHC/Utils/Error.hs2
-rw-r--r--compiler/GHC/Utils/Fingerprint.hs2
-rw-r--r--compiler/GHC/Utils/IO/Unsafe.hs2
-rw-r--r--compiler/GHC/Utils/Misc.hs6
-rw-r--r--compiler/GHC/Utils/Panic/Plain.hs2
-rw-r--r--compiler/HsVersions.h25
-rw-r--r--compiler/Language/Haskell/Syntax/Expr.hs3
-rw-r--r--compiler/Language/Haskell/Syntax/Lit.hs2
-rw-r--r--compiler/Language/Haskell/Syntax/Type.hs2
-rw-r--r--compiler/ghc.cabal.in2
-rw-r--r--ghc/GHCi/UI.hs13
-rw-r--r--ghc/GHCi/UI/Monad.hs2
-rw-r--r--hadrian/src/Rules/Lint.hs3
m---------utils/haddock0
268 files changed, 84 insertions, 641 deletions
diff --git a/compiler/GHC.hs b/compiler/GHC.hs
index 9f64e5b02c..7f37a7537d 100644
--- a/compiler/GHC.hs
+++ b/compiler/GHC.hs
@@ -296,8 +296,6 @@ module GHC (
* inline bits of GHC.Driver.Main here to simplify layering: hscTcExpr, hscStmt.
-}
-#include "HsVersions.h"
-
import GHC.Prelude hiding (init)
import GHC.Platform
diff --git a/compiler/GHC/Builtin/Names.hs b/compiler/GHC/Builtin/Names.hs
index a85b61ca04..afad51ca70 100644
--- a/compiler/GHC/Builtin/Names.hs
+++ b/compiler/GHC/Builtin/Names.hs
@@ -133,8 +133,6 @@ module GHC.Builtin.Names
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Unit.Types
diff --git a/compiler/GHC/Builtin/PrimOps.hs b/compiler/GHC/Builtin/PrimOps.hs
index 2f89ba448b..bbedb6f2c8 100644
--- a/compiler/GHC/Builtin/PrimOps.hs
+++ b/compiler/GHC/Builtin/PrimOps.hs
@@ -24,8 +24,6 @@ module GHC.Builtin.PrimOps (
PrimCall(..)
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Builtin.Types.Prim
diff --git a/compiler/GHC/Builtin/Types.hs b/compiler/GHC/Builtin/Types.hs
index 48fb80df68..51950d6781 100644
--- a/compiler/GHC/Builtin/Types.hs
+++ b/compiler/GHC/Builtin/Types.hs
@@ -157,8 +157,6 @@ module GHC.Builtin.Types (
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import {-# SOURCE #-} GHC.Types.Id.Make ( mkDataConWorkId, mkDictSelId )
diff --git a/compiler/GHC/Builtin/Types/Prim.hs b/compiler/GHC/Builtin/Types/Prim.hs
index 115c76516d..45140e60f2 100644
--- a/compiler/GHC/Builtin/Types/Prim.hs
+++ b/compiler/GHC/Builtin/Types/Prim.hs
@@ -94,8 +94,6 @@ module GHC.Builtin.Types.Prim(
#include "primop-vector-tys-exports.hs-incl"
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import {-# SOURCE #-} GHC.Builtin.Types
diff --git a/compiler/GHC/Builtin/Uniques.hs b/compiler/GHC/Builtin/Uniques.hs
index 772213cee8..a361d10766 100644
--- a/compiler/GHC/Builtin/Uniques.hs
+++ b/compiler/GHC/Builtin/Uniques.hs
@@ -51,8 +51,6 @@ module GHC.Builtin.Uniques
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import {-# SOURCE #-} GHC.Builtin.Types
diff --git a/compiler/GHC/Builtin/Utils.hs b/compiler/GHC/Builtin/Utils.hs
index 7494fc416e..5905e2441a 100644
--- a/compiler/GHC/Builtin/Utils.hs
+++ b/compiler/GHC/Builtin/Utils.hs
@@ -45,8 +45,6 @@ module GHC.Builtin.Utils (
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Builtin.Uniques
diff --git a/compiler/GHC/ByteCode/Asm.hs b/compiler/GHC/ByteCode/Asm.hs
index 542a6b3635..24b055fe6c 100644
--- a/compiler/GHC/ByteCode/Asm.hs
+++ b/compiler/GHC/ByteCode/Asm.hs
@@ -15,8 +15,6 @@ module GHC.ByteCode.Asm (
mkTupleInfoLit
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.ByteCode.Instr
diff --git a/compiler/GHC/ByteCode/InfoTable.hs b/compiler/GHC/ByteCode/InfoTable.hs
index dbd816d7d0..50fa6f54f8 100644
--- a/compiler/GHC/ByteCode/InfoTable.hs
+++ b/compiler/GHC/ByteCode/InfoTable.hs
@@ -8,8 +8,6 @@
-- | Generate infotables for interpreter-made bytecodes
module GHC.ByteCode.InfoTable ( mkITbls ) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Session
diff --git a/compiler/GHC/ByteCode/Instr.hs b/compiler/GHC/ByteCode/Instr.hs
index 5b0b20e38d..85600703fa 100644
--- a/compiler/GHC/ByteCode/Instr.hs
+++ b/compiler/GHC/ByteCode/Instr.hs
@@ -10,8 +10,6 @@ module GHC.ByteCode.Instr (
BCInstr(..), ProtoBCO(..), bciStackUse, LocalLabel(..)
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.ByteCode.Types
diff --git a/compiler/GHC/ByteCode/Linker.hs b/compiler/GHC/ByteCode/Linker.hs
index 9170da7710..38e18a51da 100644
--- a/compiler/GHC/ByteCode/Linker.hs
+++ b/compiler/GHC/ByteCode/Linker.hs
@@ -20,8 +20,6 @@ module GHC.ByteCode.Linker
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Runtime.Interpreter
diff --git a/compiler/GHC/Cmm/CLabel.hs b/compiler/GHC/Cmm/CLabel.hs
index 97c87cae67..ca1036afdd 100644
--- a/compiler/GHC/Cmm/CLabel.hs
+++ b/compiler/GHC/Cmm/CLabel.hs
@@ -132,8 +132,6 @@ module GHC.Cmm.CLabel (
foreignLabelStdcallInfo
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Types.Id.Info
diff --git a/compiler/GHC/Cmm/Info.hs b/compiler/GHC/Cmm/Info.hs
index 66669c4389..a9fc93f9bb 100644
--- a/compiler/GHC/Cmm/Info.hs
+++ b/compiler/GHC/Cmm/Info.hs
@@ -32,8 +32,6 @@ module GHC.Cmm.Info (
stdPtrsOffset, stdNonPtrsOffset,
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Cmm
diff --git a/compiler/GHC/Cmm/Parser.y b/compiler/GHC/Cmm/Parser.y
index 666441a687..4576eb9b38 100644
--- a/compiler/GHC/Cmm/Parser.y
+++ b/compiler/GHC/Cmm/Parser.y
@@ -270,8 +270,6 @@ import System.Exit
import Data.Maybe
import qualified Data.Map as M
import qualified Data.ByteString.Char8 as BS8
-
-#include "HsVersions.h"
}
%expect 0
diff --git a/compiler/GHC/CmmToAsm.hs b/compiler/GHC/CmmToAsm.hs
index 5ff75e6520..cda6d46eed 100644
--- a/compiler/GHC/CmmToAsm.hs
+++ b/compiler/GHC/CmmToAsm.hs
@@ -80,8 +80,6 @@ module GHC.CmmToAsm
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import qualified GHC.CmmToAsm.X86 as X86
diff --git a/compiler/GHC/CmmToAsm/BlockLayout.hs b/compiler/GHC/CmmToAsm/BlockLayout.hs
index 5048d59e30..35dce5246d 100644
--- a/compiler/GHC/CmmToAsm/BlockLayout.hs
+++ b/compiler/GHC/CmmToAsm/BlockLayout.hs
@@ -13,7 +13,6 @@ module GHC.CmmToAsm.BlockLayout
( sequenceTop, backendMaintainsCfg)
where
-#include "HsVersions.h"
import GHC.Prelude
import GHC.Driver.Ppr (pprTrace)
diff --git a/compiler/GHC/CmmToAsm/CFG.hs b/compiler/GHC/CmmToAsm/CFG.hs
index 17631c989d..0e5d359de4 100644
--- a/compiler/GHC/CmmToAsm/CFG.hs
+++ b/compiler/GHC/CmmToAsm/CFG.hs
@@ -40,8 +40,6 @@ module GHC.CmmToAsm.CFG
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
diff --git a/compiler/GHC/CmmToAsm/Monad.hs b/compiler/GHC/CmmToAsm/Monad.hs
index 8fb834ec7a..96fe1e194c 100644
--- a/compiler/GHC/CmmToAsm/Monad.hs
+++ b/compiler/GHC/CmmToAsm/Monad.hs
@@ -43,8 +43,6 @@ module GHC.CmmToAsm.Monad (
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
diff --git a/compiler/GHC/CmmToAsm/PPC/CodeGen.hs b/compiler/GHC/CmmToAsm/PPC/CodeGen.hs
index 7e2daf76f8..520dd3445a 100644
--- a/compiler/GHC/CmmToAsm/PPC/CodeGen.hs
+++ b/compiler/GHC/CmmToAsm/PPC/CodeGen.hs
@@ -21,8 +21,6 @@ module GHC.CmmToAsm.PPC.CodeGen (
where
-#include "HsVersions.h"
-
-- NCG stuff:
import GHC.Prelude
diff --git a/compiler/GHC/CmmToAsm/PPC/Instr.hs b/compiler/GHC/CmmToAsm/PPC/Instr.hs
index 46c5afb04c..26155ac022 100644
--- a/compiler/GHC/CmmToAsm/PPC/Instr.hs
+++ b/compiler/GHC/CmmToAsm/PPC/Instr.hs
@@ -10,8 +10,6 @@
--
-----------------------------------------------------------------------------
-#include "HsVersions.h"
-
module GHC.CmmToAsm.PPC.Instr
( Instr(..)
, RI(..)
diff --git a/compiler/GHC/CmmToAsm/PPC/RegInfo.hs b/compiler/GHC/CmmToAsm/PPC/RegInfo.hs
index 0e0f1e464d..e2ddf97323 100644
--- a/compiler/GHC/CmmToAsm/PPC/RegInfo.hs
+++ b/compiler/GHC/CmmToAsm/PPC/RegInfo.hs
@@ -17,8 +17,6 @@ module GHC.CmmToAsm.PPC.RegInfo (
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.CmmToAsm.PPC.Instr
diff --git a/compiler/GHC/CmmToAsm/PPC/Regs.hs b/compiler/GHC/CmmToAsm/PPC/Regs.hs
index 3068be7ac5..2d5ae527cc 100644
--- a/compiler/GHC/CmmToAsm/PPC/Regs.hs
+++ b/compiler/GHC/CmmToAsm/PPC/Regs.hs
@@ -48,8 +48,6 @@ module GHC.CmmToAsm.PPC.Regs (
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform.Reg
diff --git a/compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs b/compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs
index 07eca93ac3..9f22594e33 100644
--- a/compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs
+++ b/compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs
@@ -6,8 +6,6 @@ module GHC.CmmToAsm.Reg.Graph.TrivColorable (
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform.Reg.Class
diff --git a/compiler/GHC/CmmToAsm/Reg/Linear.hs b/compiler/GHC/CmmToAsm/Reg/Linear.hs
index 31bcbd1d68..92d5ccdb36 100644
--- a/compiler/GHC/CmmToAsm/Reg/Linear.hs
+++ b/compiler/GHC/CmmToAsm/Reg/Linear.hs
@@ -102,9 +102,6 @@ module GHC.CmmToAsm.Reg.Linear (
module GHC.CmmToAsm.Reg.Linear.Stats
) where
-#include "HsVersions.h"
-
-
import GHC.Prelude
import GHC.CmmToAsm.Reg.Linear.State
diff --git a/compiler/GHC/CmmToAsm/Reg/Linear/FreeRegs.hs b/compiler/GHC/CmmToAsm/Reg/Linear/FreeRegs.hs
index 1768422f5c..d685945943 100644
--- a/compiler/GHC/CmmToAsm/Reg/Linear/FreeRegs.hs
+++ b/compiler/GHC/CmmToAsm/Reg/Linear/FreeRegs.hs
@@ -4,9 +4,6 @@ module GHC.CmmToAsm.Reg.Linear.FreeRegs (
FR(..),
maxSpillSlots
)
-
-#include "HsVersions.h"
-
where
import GHC.Prelude
diff --git a/compiler/GHC/CmmToAsm/Reg/Target.hs b/compiler/GHC/CmmToAsm/Reg/Target.hs
index e93db955e7..396abc357d 100644
--- a/compiler/GHC/CmmToAsm/Reg/Target.hs
+++ b/compiler/GHC/CmmToAsm/Reg/Target.hs
@@ -19,8 +19,6 @@ module GHC.CmmToAsm.Reg.Target (
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform.Reg
diff --git a/compiler/GHC/CmmToAsm/SPARC/CodeGen.hs b/compiler/GHC/CmmToAsm/SPARC/CodeGen.hs
index 21313aa0bd..52a644d528 100644
--- a/compiler/GHC/CmmToAsm/SPARC/CodeGen.hs
+++ b/compiler/GHC/CmmToAsm/SPARC/CodeGen.hs
@@ -17,8 +17,6 @@ module GHC.CmmToAsm.SPARC.CodeGen (
where
-#include "HsVersions.h"
-
-- NCG stuff:
import GHC.Prelude
diff --git a/compiler/GHC/CmmToAsm/SPARC/Instr.hs b/compiler/GHC/CmmToAsm/SPARC/Instr.hs
index 64b9276ac1..c5fa2120cd 100644
--- a/compiler/GHC/CmmToAsm/SPARC/Instr.hs
+++ b/compiler/GHC/CmmToAsm/SPARC/Instr.hs
@@ -7,8 +7,6 @@
-- (c) The University of Glasgow 1993-2004
--
-----------------------------------------------------------------------------
-#include "HsVersions.h"
-
module GHC.CmmToAsm.SPARC.Instr
( Instr(..)
, RI(..)
diff --git a/compiler/GHC/CmmToAsm/SPARC/Ppr.hs b/compiler/GHC/CmmToAsm/SPARC/Ppr.hs
index a45d05d6c6..13047b559f 100644
--- a/compiler/GHC/CmmToAsm/SPARC/Ppr.hs
+++ b/compiler/GHC/CmmToAsm/SPARC/Ppr.hs
@@ -25,8 +25,6 @@ module GHC.CmmToAsm.SPARC.Ppr (
where
-#include "HsVersions.h"
-
import GHC.Prelude
import Data.Word
diff --git a/compiler/GHC/CmmToAsm/X86/CodeGen.hs b/compiler/GHC/CmmToAsm/X86/CodeGen.hs
index 210bea0af2..11c0564b5d 100644
--- a/compiler/GHC/CmmToAsm/X86/CodeGen.hs
+++ b/compiler/GHC/CmmToAsm/X86/CodeGen.hs
@@ -28,8 +28,6 @@ module GHC.CmmToAsm.X86.CodeGen (
where
-#include "HsVersions.h"
-
-- NCG stuff:
import GHC.Prelude
diff --git a/compiler/GHC/CmmToAsm/X86/Instr.hs b/compiler/GHC/CmmToAsm/X86/Instr.hs
index da6ca0a662..5488079e3f 100644
--- a/compiler/GHC/CmmToAsm/X86/Instr.hs
+++ b/compiler/GHC/CmmToAsm/X86/Instr.hs
@@ -37,8 +37,6 @@ module GHC.CmmToAsm.X86.Instr
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.CmmToAsm.X86.Cond
diff --git a/compiler/GHC/CmmToAsm/X86/Ppr.hs b/compiler/GHC/CmmToAsm/X86/Ppr.hs
index a03a0bd82f..00ace38516 100644
--- a/compiler/GHC/CmmToAsm/X86/Ppr.hs
+++ b/compiler/GHC/CmmToAsm/X86/Ppr.hs
@@ -20,8 +20,6 @@ module GHC.CmmToAsm.X86.Ppr (
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
diff --git a/compiler/GHC/CmmToAsm/X86/RegInfo.hs b/compiler/GHC/CmmToAsm/X86/RegInfo.hs
index 0b5071ab97..69d64f67e7 100644
--- a/compiler/GHC/CmmToAsm/X86/RegInfo.hs
+++ b/compiler/GHC/CmmToAsm/X86/RegInfo.hs
@@ -6,8 +6,6 @@ module GHC.CmmToAsm.X86.RegInfo (
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.CmmToAsm.Format
diff --git a/compiler/GHC/CmmToAsm/X86/Regs.hs b/compiler/GHC/CmmToAsm/X86/Regs.hs
index a815ad0450..c2462e9397 100644
--- a/compiler/GHC/CmmToAsm/X86/Regs.hs
+++ b/compiler/GHC/CmmToAsm/X86/Regs.hs
@@ -47,8 +47,6 @@ module GHC.CmmToAsm.X86.Regs (
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform.Regs
diff --git a/compiler/GHC/CmmToC.hs b/compiler/GHC/CmmToC.hs
index 9b8832ff80..59d1203367 100644
--- a/compiler/GHC/CmmToC.hs
+++ b/compiler/GHC/CmmToC.hs
@@ -26,8 +26,6 @@ module GHC.CmmToC
)
where
-#include "HsVersions.h"
-
-- Cmm stuff
import GHC.Prelude
@@ -973,7 +971,7 @@ pprReg r = case r of
pprAsPtrReg :: CmmReg -> SDoc
pprAsPtrReg (CmmGlobal (VanillaReg n gcp))
- = WARN( gcp /= VGcPtr, ppr n ) char 'R' <> int n <> text ".p"
+ = warnPprTrace (gcp /= VGcPtr) (ppr n) $ char 'R' <> int n <> text ".p"
pprAsPtrReg other_reg = pprReg other_reg
pprGlobalReg :: GlobalReg -> SDoc
diff --git a/compiler/GHC/CmmToLlvm.hs b/compiler/GHC/CmmToLlvm.hs
index 95b682af38..050dee2e9b 100644
--- a/compiler/GHC/CmmToLlvm.hs
+++ b/compiler/GHC/CmmToLlvm.hs
@@ -11,8 +11,6 @@ module GHC.CmmToLlvm
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Llvm
diff --git a/compiler/GHC/CmmToLlvm/Base.hs b/compiler/GHC/CmmToLlvm/Base.hs
index eda29c1ec7..b3dc6a18c4 100644
--- a/compiler/GHC/CmmToLlvm/Base.hs
+++ b/compiler/GHC/CmmToLlvm/Base.hs
@@ -39,7 +39,6 @@ module GHC.CmmToLlvm.Base (
aliasify, llvmDefLabel
) where
-#include "HsVersions.h"
#include "ghcautoconf.h"
import GHC.Prelude
diff --git a/compiler/GHC/CmmToLlvm/CodeGen.hs b/compiler/GHC/CmmToLlvm/CodeGen.hs
index 3f81c79e3f..584f7f641a 100644
--- a/compiler/GHC/CmmToLlvm/CodeGen.hs
+++ b/compiler/GHC/CmmToLlvm/CodeGen.hs
@@ -6,8 +6,6 @@
--
module GHC.CmmToLlvm.CodeGen ( genLlvmProc ) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Session
diff --git a/compiler/GHC/CmmToLlvm/Data.hs b/compiler/GHC/CmmToLlvm/Data.hs
index 79e2e1a28b..ff3ec6ebd1 100644
--- a/compiler/GHC/CmmToLlvm/Data.hs
+++ b/compiler/GHC/CmmToLlvm/Data.hs
@@ -7,8 +7,6 @@ module GHC.CmmToLlvm.Data (
genLlvmData, genData
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Llvm
diff --git a/compiler/GHC/CmmToLlvm/Ppr.hs b/compiler/GHC/CmmToLlvm/Ppr.hs
index 6519eee637..23bb0bee65 100644
--- a/compiler/GHC/CmmToLlvm/Ppr.hs
+++ b/compiler/GHC/CmmToLlvm/Ppr.hs
@@ -7,8 +7,6 @@ module GHC.CmmToLlvm.Ppr (
pprLlvmCmmDecl, pprLlvmData, infoSection
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Ppr
diff --git a/compiler/GHC/CmmToLlvm/Regs.hs b/compiler/GHC/CmmToLlvm/Regs.hs
index c4d9d12a48..64a80d9e58 100644
--- a/compiler/GHC/CmmToLlvm/Regs.hs
+++ b/compiler/GHC/CmmToLlvm/Regs.hs
@@ -9,8 +9,6 @@ module GHC.CmmToLlvm.Regs (
stgTBAA, baseN, stackN, heapN, rxN, topN, tbaa, getTBAA
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Llvm
diff --git a/compiler/GHC/Core.hs b/compiler/GHC/Core.hs
index 498b58031c..c8b3dd65d0 100644
--- a/compiler/GHC/Core.hs
+++ b/compiler/GHC/Core.hs
@@ -92,8 +92,6 @@ module GHC.Core (
isBuiltinRule, isLocalRule, isAutoRule,
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
@@ -1576,8 +1574,8 @@ cmpAltCon (DataAlt _) DEFAULT = GT
cmpAltCon (LitAlt l1) (LitAlt l2) = l1 `compare` l2
cmpAltCon (LitAlt _) DEFAULT = GT
-cmpAltCon con1 con2 = WARN( True, text "Comparing incomparable AltCons" <+>
- ppr con1 <+> ppr con2 )
+cmpAltCon con1 con2 = warnPprTrace True (text "Comparing incomparable AltCons" <+>
+ ppr con1 <+> ppr con2) $
LT
{-
diff --git a/compiler/GHC/Core/Class.hs b/compiler/GHC/Core/Class.hs
index b6648ceaac..8319526322 100644
--- a/compiler/GHC/Core/Class.hs
+++ b/compiler/GHC/Core/Class.hs
@@ -21,8 +21,6 @@ module GHC.Core.Class (
isAbstractClass,
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import {-# SOURCE #-} GHC.Core.TyCon ( TyCon )
diff --git a/compiler/GHC/Core/Coercion.hs b/compiler/GHC/Core/Coercion.hs
index e0957c0278..e8207bad35 100644
--- a/compiler/GHC/Core/Coercion.hs
+++ b/compiler/GHC/Core/Coercion.hs
@@ -127,8 +127,6 @@ module GHC.Core.Coercion (
HoleSet, coercionHolesOfType, coercionHolesOfCo
) where
-#include "HsVersions.h"
-
import {-# SOURCE #-} GHC.CoreToIface (toIfaceTyCon, tidyToIfaceTcArgs)
import GHC.Prelude
diff --git a/compiler/GHC/Core/Coercion/Axiom.hs b/compiler/GHC/Core/Coercion/Axiom.hs
index e48ed2bd42..f9ec62e973 100644
--- a/compiler/GHC/Core/Coercion/Axiom.hs
+++ b/compiler/GHC/Core/Coercion/Axiom.hs
@@ -56,8 +56,6 @@ import qualified Data.Data as Data
import Data.Array
import Data.List ( mapAccumL )
-#include "HsVersions.h"
-
{-
Note [Coercion axiom branches]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/compiler/GHC/Core/Coercion/Opt.hs b/compiler/GHC/Core/Coercion/Opt.hs
index 81def895e0..85b6e93ec1 100644
--- a/compiler/GHC/Core/Coercion/Opt.hs
+++ b/compiler/GHC/Core/Coercion/Opt.hs
@@ -9,8 +9,6 @@ module GHC.Core.Coercion.Opt
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Ppr
@@ -294,9 +292,9 @@ opt_co4 env sym rep r (CoVarCo cv)
cv1 = case lookupInScope (lcInScopeSet env) cv of
Just cv1 -> cv1
- Nothing -> WARN( True, text "opt_co: not in scope:"
- <+> ppr cv $$ ppr env)
- cv
+ Nothing -> warnPprTrace True
+ (text "opt_co: not in scope:" <+> ppr cv $$ ppr env)
+ cv
-- cv1 might have a substituted kind!
opt_co4 _ _ _ _ (HoleCo h)
diff --git a/compiler/GHC/Core/ConLike.hs b/compiler/GHC/Core/ConLike.hs
index bbdab332a7..2c2a21d3ab 100644
--- a/compiler/GHC/Core/ConLike.hs
+++ b/compiler/GHC/Core/ConLike.hs
@@ -25,8 +25,6 @@ module GHC.Core.ConLike (
, conLikeHasBuilder
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Core.DataCon
diff --git a/compiler/GHC/Core/DataCon.hs b/compiler/GHC/Core/DataCon.hs
index 4714b3be01..2a29a9aac4 100644
--- a/compiler/GHC/Core/DataCon.hs
+++ b/compiler/GHC/Core/DataCon.hs
@@ -63,8 +63,6 @@ module GHC.Core.DataCon (
promoteDataCon
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import {-# SOURCE #-} GHC.Types.Id.Make ( DataConBoxer )
diff --git a/compiler/GHC/Core/FVs.hs b/compiler/GHC/Core/FVs.hs
index d21407d42b..af23ffb45a 100644
--- a/compiler/GHC/Core/FVs.hs
+++ b/compiler/GHC/Core/FVs.hs
@@ -56,8 +56,6 @@ module GHC.Core.FVs (
freeVarsOfAnn
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Core
diff --git a/compiler/GHC/Core/FamInstEnv.hs b/compiler/GHC/Core/FamInstEnv.hs
index 4b41f40dee..b4b2100705 100644
--- a/compiler/GHC/Core/FamInstEnv.hs
+++ b/compiler/GHC/Core/FamInstEnv.hs
@@ -38,8 +38,6 @@ module GHC.Core.FamInstEnv (
topReduceTyFamApp_maybe, reduceTyFamApp_maybe
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Core.Unify
diff --git a/compiler/GHC/Core/InstEnv.hs b/compiler/GHC/Core/InstEnv.hs
index 55f96a1b18..02f2183d63 100644
--- a/compiler/GHC/Core/InstEnv.hs
+++ b/compiler/GHC/Core/InstEnv.hs
@@ -29,8 +29,6 @@ module GHC.Core.InstEnv (
isOverlappable, isOverlapping, isIncoherent
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Tc.Utils.TcType -- InstEnv is really part of the type checker,
diff --git a/compiler/GHC/Core/Lint.hs b/compiler/GHC/Core/Lint.hs
index aa26fdabc4..86be68cdb6 100644
--- a/compiler/GHC/Core/Lint.hs
+++ b/compiler/GHC/Core/Lint.hs
@@ -25,8 +25,6 @@ module GHC.Core.Lint (
dumpIfSet,
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Session
diff --git a/compiler/GHC/Core/Make.hs b/compiler/GHC/Core/Make.hs
index 46ea720ec2..b174379bc9 100644
--- a/compiler/GHC/Core/Make.hs
+++ b/compiler/GHC/Core/Make.hs
@@ -52,8 +52,6 @@ module GHC.Core.Make (
tYPE_ERROR_ID, aBSENT_SUM_FIELD_ERROR_ID
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
diff --git a/compiler/GHC/Core/Map/Expr.hs b/compiler/GHC/Core/Map/Expr.hs
index 30be6adea2..8d47a947b4 100644
--- a/compiler/GHC/Core/Map/Expr.hs
+++ b/compiler/GHC/Core/Map/Expr.hs
@@ -24,8 +24,6 @@ module GHC.Core.Map.Expr (
(>.>), (|>), (|>>),
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Data.TrieMap
diff --git a/compiler/GHC/Core/Opt/Arity.hs b/compiler/GHC/Core/Opt/Arity.hs
index 73f8135a46..004e667e1b 100644
--- a/compiler/GHC/Core/Opt/Arity.hs
+++ b/compiler/GHC/Core/Opt/Arity.hs
@@ -30,8 +30,6 @@ module GHC.Core.Opt.Arity
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Ppr
@@ -655,11 +653,10 @@ findRhsArity dflags bndr rhs old_arity
| next_at == cur_at = cur_at
| otherwise =
-- Warn if more than 2 iterations. Why 2? See Note [Exciting arity]
- WARN( debugIsOn && n > 2, text "Exciting arity"
- $$ nest 2 (
- ppr bndr <+> ppr cur_at <+> ppr next_at
- $$ ppr rhs) )
- go (n+1) next_at
+ warnPprTrace (debugIsOn && n > 2)
+ (text "Exciting arity" $$ nest 2
+ ( ppr bndr <+> ppr cur_at <+> ppr next_at $$ ppr rhs)) $
+ go (n+1) next_at
where
next_at = step cur_at
@@ -1556,7 +1553,7 @@ mkEtaWW orig_oss ppr_orig_expr in_scope orig_ty
| otherwise -- We have an expression of arity > 0,
-- but its type isn't a function, or a binder
-- is levity-polymorphic
- = WARN( True, (ppr orig_oss <+> ppr orig_ty) $$ ppr_orig_expr )
+ = warnPprTrace True ((ppr orig_oss <+> ppr orig_ty) $$ ppr_orig_expr)
(getTCvInScope subst, reverse eis)
-- This *can* legitimately happen:
-- e.g. coerce Int (\x. x) Essentially the programmer is
@@ -1862,7 +1859,7 @@ etaExpandToJoinPoint join_arity expr
etaExpandToJoinPointRule :: JoinArity -> CoreRule -> CoreRule
etaExpandToJoinPointRule _ rule@(BuiltinRule {})
- = WARN(True, (sep [text "Can't eta-expand built-in rule:", ppr rule]))
+ = warnPprTrace True (sep [text "Can't eta-expand built-in rule:", ppr rule])
-- How did a local binding get a built-in rule anyway? Probably a plugin.
rule
etaExpandToJoinPointRule join_arity rule@(Rule { ru_bndrs = bndrs, ru_rhs = rhs
diff --git a/compiler/GHC/Core/Opt/CSE.hs b/compiler/GHC/Core/Opt/CSE.hs
index 9855c41731..cb5d446fa5 100644
--- a/compiler/GHC/Core/Opt/CSE.hs
+++ b/compiler/GHC/Core/Opt/CSE.hs
@@ -11,8 +11,6 @@
module GHC.Core.Opt.CSE (cseProgram, cseOneExpr) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Core.Subst
diff --git a/compiler/GHC/Core/Opt/ConstantFold.hs b/compiler/GHC/Core/Opt/ConstantFold.hs
index 1402a021f7..68ac1379e8 100644
--- a/compiler/GHC/Core/Opt/ConstantFold.hs
+++ b/compiler/GHC/Core/Opt/ConstantFold.hs
@@ -31,8 +31,6 @@ module GHC.Core.Opt.ConstantFold
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Ppr
@@ -1541,7 +1539,7 @@ tagToEnumRule = do
return $ mkTyApps (Var (dataConWorkId dc)) tc_args
-- See Note [tagToEnum#]
- _ -> WARN( True, text "tagToEnum# on non-enumeration type" <+> ppr ty )
+ _ -> warnPprTrace True (text "tagToEnum# on non-enumeration type" <+> ppr ty) $
return $ mkRuntimeErrorApp rUNTIME_ERROR_ID ty "tagToEnum# on non-enumeration type"
------------------------------
diff --git a/compiler/GHC/Core/Opt/CprAnal.hs b/compiler/GHC/Core/Opt/CprAnal.hs
index 6c76671c4b..25dc82d42f 100644
--- a/compiler/GHC/Core/Opt/CprAnal.hs
+++ b/compiler/GHC/Core/Opt/CprAnal.hs
@@ -9,8 +9,6 @@
-- See Note [Phase ordering].
module GHC.Core.Opt.CprAnal ( cprAnalProgram ) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Session
diff --git a/compiler/GHC/Core/Opt/DmdAnal.hs b/compiler/GHC/Core/Opt/DmdAnal.hs
index ac049c0212..61aa9bfc46 100644
--- a/compiler/GHC/Core/Opt/DmdAnal.hs
+++ b/compiler/GHC/Core/Opt/DmdAnal.hs
@@ -15,8 +15,6 @@ module GHC.Core.Opt.DmdAnal
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Core.Opt.WorkWrap.Utils
diff --git a/compiler/GHC/Core/Opt/FloatIn.hs b/compiler/GHC/Core/Opt/FloatIn.hs
index 78e993a26a..f1e9b044e8 100644
--- a/compiler/GHC/Core/Opt/FloatIn.hs
+++ b/compiler/GHC/Core/Opt/FloatIn.hs
@@ -18,8 +18,6 @@ then discover that they aren't needed in the chosen branch.
module GHC.Core.Opt.FloatIn ( floatInwards ) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
diff --git a/compiler/GHC/Core/Opt/FloatOut.hs b/compiler/GHC/Core/Opt/FloatOut.hs
index c66ae34fa9..b0c7db67c3 100644
--- a/compiler/GHC/Core/Opt/FloatOut.hs
+++ b/compiler/GHC/Core/Opt/FloatOut.hs
@@ -35,8 +35,6 @@ import qualified Data.IntMap as M
import Data.List ( partition )
-#include "HsVersions.h"
-
{-
-----------------
Overall game plan
diff --git a/compiler/GHC/Core/Opt/LiberateCase.hs b/compiler/GHC/Core/Opt/LiberateCase.hs
index e9140612f0..6efae425f2 100644
--- a/compiler/GHC/Core/Opt/LiberateCase.hs
+++ b/compiler/GHC/Core/Opt/LiberateCase.hs
@@ -7,8 +7,6 @@
{-# LANGUAGE CPP #-}
module GHC.Core.Opt.LiberateCase ( liberateCase ) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Session
diff --git a/compiler/GHC/Core/Opt/OccurAnal.hs b/compiler/GHC/Core/Opt/OccurAnal.hs
index c7b13f17c0..034f44176f 100644
--- a/compiler/GHC/Core/Opt/OccurAnal.hs
+++ b/compiler/GHC/Core/Opt/OccurAnal.hs
@@ -19,8 +19,6 @@ core expression with (hopefully) improved usage information.
module GHC.Core.Opt.OccurAnal ( occurAnalysePgm, occurAnalyseExpr ) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Ppr
@@ -82,8 +80,8 @@ occurAnalysePgm this_mod active_unf active_rule imp_rules binds
= occ_anald_binds
| otherwise -- See Note [Glomming]
- = WARN( True, hang (text "Glomming in" <+> ppr this_mod <> colon)
- 2 (ppr final_usage ) )
+ = warnPprTrace True (hang (text "Glomming in" <+> ppr this_mod <> colon)
+ 2 (ppr final_usage))
occ_anald_glommed_binds
where
init_env = initOccEnv { occ_rule_act = active_rule
@@ -3106,9 +3104,9 @@ decideJoinPointHood TopLevel _ _
= False
decideJoinPointHood NotTopLevel usage bndrs
| isJoinId (head bndrs)
- = WARN(not all_ok, text "OccurAnal failed to rediscover join point(s):" <+>
- ppr bndrs)
- all_ok
+ = warnPprTrace (not all_ok)
+ (text "OccurAnal failed to rediscover join point(s):" <+> ppr bndrs)
+ all_ok
| otherwise
= all_ok
where
diff --git a/compiler/GHC/Core/Opt/Pipeline.hs b/compiler/GHC/Core/Opt/Pipeline.hs
index c97f266052..ba75cab359 100644
--- a/compiler/GHC/Core/Opt/Pipeline.hs
+++ b/compiler/GHC/Core/Opt/Pipeline.hs
@@ -8,8 +8,6 @@
module GHC.Core.Opt.Pipeline ( core2core, simplifyExpr ) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Session
@@ -745,12 +743,12 @@ simplifyPgmIO pass@(CoreDoSimplify max_iterations mode)
-- iteration_no is the number of the iteration we are
-- about to begin, with '1' for the first
| iteration_no > max_iterations -- Stop if we've run out of iterations
- = WARN( debugIsOn && (max_iterations > 2)
- , hang (text "Simplifier bailing out after" <+> int max_iterations
+ = warnPprTrace (debugIsOn && (max_iterations > 2))
+ ( hang (text "Simplifier bailing out after" <+> int max_iterations
<+> text "iterations"
<+> (brackets $ hsep $ punctuate comma $
map (int . simplCountN) (reverse counts_so_far)))
- 2 (text "Size =" <+> ppr (coreBindsStats binds)))
+ 2 (text "Size =" <+> ppr (coreBindsStats binds))) $
-- Subtract 1 from iteration_no to get the
-- number of iterations we actually completed
@@ -1050,8 +1048,7 @@ shortMeOut ind_env exported_id local_id
then
if hasShortableIdInfo exported_id
then True -- See Note [Messing up the exported Id's IdInfo]
- else WARN( True, text "Not shorting out:" <+> ppr exported_id )
- False
+ else warnPprTrace True (text "Not shorting out:" <+> ppr exported_id) False
else
False
diff --git a/compiler/GHC/Core/Opt/SetLevels.hs b/compiler/GHC/Core/Opt/SetLevels.hs
index ed7f95b0b7..9d96dd3586 100644
--- a/compiler/GHC/Core/Opt/SetLevels.hs
+++ b/compiler/GHC/Core/Opt/SetLevels.hs
@@ -75,8 +75,6 @@ module GHC.Core.Opt.SetLevels (
incMinorLvl, ltMajLvl, ltLvl, isTopLvl
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Ppr
@@ -1691,9 +1689,9 @@ abstractVars dest_lvl (LE { le_subst = subst, le_lvl_env = lvl_env }) in_fvs
-- We are going to lambda-abstract, so nuke any IdInfo,
-- and add the tyvars of the Id (if necessary)
- zap v | isId v = WARN( isStableUnfolding (idUnfolding v) ||
- not (isEmptyRuleInfo (idSpecialisation v)),
- text "absVarsOf: discarding info on" <+> ppr v )
+ zap v | isId v = warnPprTrace (isStableUnfolding (idUnfolding v) ||
+ not (isEmptyRuleInfo (idSpecialisation v)))
+ (text "absVarsOf: discarding info on" <+> ppr v) $
setIdInfo v vanillaIdInfo
| otherwise = v
diff --git a/compiler/GHC/Core/Opt/Simplify.hs b/compiler/GHC/Core/Opt/Simplify.hs
index da15163ba6..3728b999ee 100644
--- a/compiler/GHC/Core/Opt/Simplify.hs
+++ b/compiler/GHC/Core/Opt/Simplify.hs
@@ -10,8 +10,6 @@
{-# OPTIONS_GHC -Wno-incomplete-record-updates -Wno-incomplete-uni-patterns #-}
module GHC.Core.Opt.Simplify ( simplTopBinds, simplExpr, simplRules ) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
@@ -3098,9 +3096,9 @@ addAltUnfoldings env scrut case_bndr con_app
addBinderUnfolding :: SimplEnv -> Id -> Unfolding -> SimplEnv
addBinderUnfolding env bndr unf
| debugIsOn, Just tmpl <- maybeUnfoldingTemplate unf
- = WARN( not (eqType (idType bndr) (exprType tmpl)),
- ppr bndr $$ ppr (idType bndr) $$ ppr tmpl $$ ppr (exprType tmpl) )
- modifyInScope env (bndr `setIdUnfolding` unf)
+ = warnPprTrace (not (eqType (idType bndr) (exprType tmpl)))
+ (ppr bndr $$ ppr (idType bndr) $$ ppr tmpl $$ ppr (exprType tmpl)) $
+ modifyInScope env (bndr `setIdUnfolding` unf)
| otherwise
= modifyInScope env (bndr `setIdUnfolding` unf)
@@ -3264,7 +3262,7 @@ missingAlt :: SimplEnv -> Id -> [InAlt] -> SimplCont
-- it "sees" that the entire branch of an outer case is
-- inaccessible. So we simply put an error case here instead.
missingAlt env case_bndr _ cont
- = WARN( True, text "missingAlt" <+> ppr case_bndr )
+ = warnPprTrace True (text "missingAlt" <+> ppr case_bndr) $
-- See Note [Avoiding space leaks in OutType]
let cont_ty = contResultType cont
in seqType cont_ty `seq`
@@ -3533,9 +3531,9 @@ mkDupableAlt platform case_bndr jfloats (Alt con bndrs' rhs')
unf = mkInlineUnfolding simpl_opts rhs
rhs = mkConApp2 dc (tyConAppArgs scrut_ty) bndrs'
- LitAlt {} -> WARN( True, text "mkDupableAlt"
- <+> ppr case_bndr <+> ppr con )
- case_bndr
+ LitAlt {} -> warnPprTrace True
+ (text "mkDupableAlt" <+> ppr case_bndr <+> ppr con)
+ case_bndr
-- The case binder is alive but trivial, so why has
-- it not been substituted away?
diff --git a/compiler/GHC/Core/Opt/Simplify/Env.hs b/compiler/GHC/Core/Opt/Simplify/Env.hs
index 43d28cffe2..6cc102ca23 100644
--- a/compiler/GHC/Core/Opt/Simplify/Env.hs
+++ b/compiler/GHC/Core/Opt/Simplify/Env.hs
@@ -43,8 +43,6 @@ module GHC.Core.Opt.Simplify.Env (
wrapJoinFloats, wrapJoinFloatsX, unitJoinFloat, addJoinFlts
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Core.Opt.Simplify.Monad
diff --git a/compiler/GHC/Core/Opt/Simplify/Utils.hs b/compiler/GHC/Core/Opt/Simplify/Utils.hs
index 75f5acaace..61c8133bc2 100644
--- a/compiler/GHC/Core/Opt/Simplify/Utils.hs
+++ b/compiler/GHC/Core/Opt/Simplify/Utils.hs
@@ -37,8 +37,6 @@ module GHC.Core.Opt.Simplify.Utils (
isExitJoinId
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Core.Opt.Simplify.Env
@@ -564,8 +562,8 @@ mkArgInfo env fun rules n_val_args call_cont
else
demands ++ vanilla_dmds
| otherwise
- -> WARN( True, text "More demands than arity" <+> ppr fun <+> ppr (idArity fun)
- <+> ppr n_val_args <+> ppr demands )
+ -> warnPprTrace True (text "More demands than arity" <+> ppr fun <+> ppr (idArity fun)
+ <+> ppr n_val_args <+> ppr demands) $
vanilla_dmds -- Not enough args, or no strictness
add_type_strictness :: Type -> [Demand] -> [Demand]
diff --git a/compiler/GHC/Core/Opt/SpecConstr.hs b/compiler/GHC/Core/Opt/SpecConstr.hs
index c5745f8b2f..58e77d76eb 100644
--- a/compiler/GHC/Core/Opt/SpecConstr.hs
+++ b/compiler/GHC/Core/Opt/SpecConstr.hs
@@ -19,8 +19,6 @@ module GHC.Core.Opt.SpecConstr(
SpecConstrAnnotation(..)
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Core
@@ -2178,9 +2176,9 @@ callToPats env bndr_occs call@(Call fn args con_env)
bad_covar v = isId v && not (is_in_scope v)
; -- pprTrace "callToPats" (ppr args $$ ppr bndr_occs) $
- WARN( not (isEmptyVarSet bad_covars)
- , text "SpecConstr: bad covars:" <+> ppr bad_covars
- $$ ppr call )
+ warnPprTrace (not (isEmptyVarSet bad_covars))
+ ( text "SpecConstr: bad covars:" <+> ppr bad_covars
+ $$ ppr call) $
if interesting && isEmptyVarSet bad_covars
then return (Just (CP { cp_qvars = qvars', cp_args = pats }))
else return Nothing }
@@ -2404,7 +2402,7 @@ samePat (CP { cp_qvars = vs1, cp_args = as1 })
same e1 (Tick _ e2) = same e1 e2
same e1 (Cast e2 _) = same e1 e2
- same e1 e2 = WARN( bad e1 || bad e2, ppr e1 $$ ppr e2)
+ same e1 e2 = warnPprTrace (bad e1 || bad e2) (ppr e1 $$ ppr e2) $
False -- Let, lambda, case should not occur
bad (Case {}) = True
bad (Let {}) = True
diff --git a/compiler/GHC/Core/Opt/Specialise.hs b/compiler/GHC/Core/Opt/Specialise.hs
index cab95b8b67..7a7eb5a5a3 100644
--- a/compiler/GHC/Core/Opt/Specialise.hs
+++ b/compiler/GHC/Core/Opt/Specialise.hs
@@ -10,8 +10,6 @@
module GHC.Core.Opt.Specialise ( specProgram, specUnfolding ) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Session
@@ -1440,8 +1438,8 @@ specCalls spec_imp env existing_rules calls_for_me fn rhs
foldlM spec_call ([], [], emptyUDs) calls_for_me
| otherwise -- No calls or RHS doesn't fit our preconceptions
- = WARN( not (exprIsTrivial rhs) && notNull calls_for_me,
- text "Missed specialisation opportunity for" <+> ppr fn $$ _trace_doc )
+ = warnPprTrace (not (exprIsTrivial rhs) && notNull calls_for_me)
+ (text "Missed specialisation opportunity for" <+> ppr fn $$ _trace_doc) $
-- Note [Specialisation shape]
-- pprTrace "specDefn: none" (ppr fn <+> ppr calls_for_me) $
return ([], [], emptyUDs)
diff --git a/compiler/GHC/Core/Opt/StaticArgs.hs b/compiler/GHC/Core/Opt/StaticArgs.hs
index ad82267523..00b84cdb2e 100644
--- a/compiler/GHC/Core/Opt/StaticArgs.hs
+++ b/compiler/GHC/Core/Opt/StaticArgs.hs
@@ -74,8 +74,6 @@ import GHC.Utils.Panic
import Data.List (mapAccumL)
import GHC.Data.FastString
-#include "HsVersions.h"
-
doStaticArgs :: UniqSupply -> CoreProgram -> CoreProgram
doStaticArgs us binds = snd $ mapAccumL sat_bind_threaded_us us binds
where
diff --git a/compiler/GHC/Core/Opt/WorkWrap.hs b/compiler/GHC/Core/Opt/WorkWrap.hs
index d27fdef24b..52c0b2259d 100644
--- a/compiler/GHC/Core/Opt/WorkWrap.hs
+++ b/compiler/GHC/Core/Opt/WorkWrap.hs
@@ -36,8 +36,6 @@ import GHC.Utils.Panic.Plain
import GHC.Core.FamInstEnv
import GHC.Utils.Monad
-#include "HsVersions.h"
-
{-
We take Core bindings whose binders have:
@@ -636,7 +634,7 @@ See https://gitlab.haskell.org/ghc/ghc/merge_requests/312#note_192064.
splitFun :: DynFlags -> FamInstEnvs -> Id -> IdInfo -> [Demand] -> Divergence -> Cpr -> CoreExpr
-> UniqSM [(Id, CoreExpr)]
splitFun dflags fam_envs fn_id fn_info wrap_dmds div cpr rhs
- = WARN( not (wrap_dmds `lengthIs` arity), ppr fn_id <+> (ppr arity $$ ppr wrap_dmds $$ ppr cpr) )
+ = warnPprTrace (not (wrap_dmds `lengthIs` arity)) (ppr fn_id <+> (ppr arity $$ ppr wrap_dmds $$ ppr cpr)) $
-- The arity should match the signature
do { mb_stuff <- mkWwBodies (initWwOpts dflags fam_envs) rhs_fvs fn_id wrap_dmds use_cpr_info
; case mb_stuff of
diff --git a/compiler/GHC/Core/Opt/WorkWrap/Utils.hs b/compiler/GHC/Core/Opt/WorkWrap/Utils.hs
index ce8d901ee2..546fdd2fa2 100644
--- a/compiler/GHC/Core/Opt/WorkWrap/Utils.hs
+++ b/compiler/GHC/Core/Opt/WorkWrap/Utils.hs
@@ -16,8 +16,6 @@ module GHC.Core.Opt.WorkWrap.Utils
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Core
@@ -230,9 +228,9 @@ mkWwBodies opts rhs_fvs fun_id demands cpr_info
too_many_args_for_join_point wrap_args
| Just join_arity <- mb_join_arity
, wrap_args `lengthExceeds` join_arity
- = WARN(True, text "Unable to worker/wrapper join point with arity " <+>
+ = warnPprTrace True (text "Unable to worker/wrapper join point with arity " <+>
int join_arity <+> text "but" <+>
- int (length wrap_args) <+> text "args")
+ int (length wrap_args) <+> text "args") $
True
| otherwise
= False
@@ -503,7 +501,7 @@ mkWWargs subst fun_ty demands
res_ty) }
| otherwise
- = WARN( True, ppr fun_ty ) -- Should not happen: if there is a demand
+ = warnPprTrace True (ppr fun_ty) $ -- Should not happen: if there is a demand
return ([], nop_fn, nop_fn, substTy subst fun_ty) -- then there should be a function arrow
where
-- See Note [Join points and beta-redexes]
@@ -671,7 +669,7 @@ wantToUnboxResult fam_envs ty cpr
where
-- | See Note [non-algebraic or open body type warning]
- open_body_ty_warning = WARN( True, text "wantToUnboxResult: non-algebraic or open body type" <+> ppr ty ) Nothing
+ open_body_ty_warning = warnPprTrace True (text "wantToUnboxResult: non-algebraic or open body type" <+> ppr ty) Nothing
isLinear :: Scaled a -> Bool
isLinear (Scaled w _ ) =
@@ -1025,7 +1023,7 @@ mk_absent_let opts arg
-- Catch all: Either @arg_ty@ wasn't of form @TYPE rep@ or @rep@ wasn't mono rep.
-- See (3) in Note [Absent fillers]
| Nothing <- mb_mono_prim_reps
- = WARN( True, text "No absent value for" <+> ppr arg_ty )
+ = warnPprTrace True (text "No absent value for" <+> ppr arg_ty) $
Nothing
where
arg_ty = idType arg
diff --git a/compiler/GHC/Core/PatSyn.hs b/compiler/GHC/Core/PatSyn.hs
index 03daede521..49bd8039d0 100644
--- a/compiler/GHC/Core/PatSyn.hs
+++ b/compiler/GHC/Core/PatSyn.hs
@@ -23,8 +23,6 @@ module GHC.Core.PatSyn (
pprPatSynType
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Core.Type
diff --git a/compiler/GHC/Core/Rules.hs b/compiler/GHC/Core/Rules.hs
index c61cdb8ee4..0b44b4f015 100644
--- a/compiler/GHC/Core/Rules.hs
+++ b/compiler/GHC/Core/Rules.hs
@@ -26,8 +26,6 @@ module GHC.Core.Rules (
lookupRule, mkRule, roughTopNames, initRuleOpts
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Core -- All of it
diff --git a/compiler/GHC/Core/SimpleOpt.hs b/compiler/GHC/Core/SimpleOpt.hs
index abf4a6c3a7..9bc41b8dfc 100644
--- a/compiler/GHC/Core/SimpleOpt.hs
+++ b/compiler/GHC/Core/SimpleOpt.hs
@@ -20,8 +20,6 @@ module GHC.Core.SimpleOpt (
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Core
diff --git a/compiler/GHC/Core/Subst.hs b/compiler/GHC/Core/Subst.hs
index 0f1305c52a..1d43387c72 100644
--- a/compiler/GHC/Core/Subst.hs
+++ b/compiler/GHC/Core/Subst.hs
@@ -34,9 +34,6 @@ module GHC.Core.Subst (
) where
-#include "HsVersions.h"
-
-
import GHC.Prelude
import GHC.Driver.Ppr
@@ -257,8 +254,8 @@ lookupIdSubst (Subst in_scope ids _ _) v
| Just e <- lookupVarEnv ids v = e
| Just v' <- lookupInScope in_scope v = Var v'
-- Vital! See Note [Extending the Subst]
- | otherwise = WARN( True, text "GHC.Core.Subst.lookupIdSubst" <+> ppr v
- $$ ppr in_scope)
+ | otherwise = warnPprTrace True (text "GHC.Core.Subst.lookupIdSubst" <+> ppr v
+ $$ ppr in_scope) $
Var v
-- | Find the substitution for a 'TyVar' in the 'Subst'
diff --git a/compiler/GHC/Core/Tidy.hs b/compiler/GHC/Core/Tidy.hs
index 2cb8eb5471..eab1946051 100644
--- a/compiler/GHC/Core/Tidy.hs
+++ b/compiler/GHC/Core/Tidy.hs
@@ -13,8 +13,6 @@ module GHC.Core.Tidy (
tidyExpr, tidyRules, tidyUnfolding
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Core
diff --git a/compiler/GHC/Core/TyCo/FVs.hs b/compiler/GHC/Core/TyCo/FVs.hs
index 0cc06e0fa6..1c8dc4cadc 100644
--- a/compiler/GHC/Core/TyCo/FVs.hs
+++ b/compiler/GHC/Core/TyCo/FVs.hs
@@ -42,8 +42,6 @@ module GHC.Core.TyCo.FVs
Endo(..), runTyCoVars
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import {-# SOURCE #-} GHC.Core.Type (coreView, partitionInvisibleTypes)
diff --git a/compiler/GHC/Core/TyCo/Rep.hs b/compiler/GHC/Core/TyCo/Rep.hs
index 19f1590c34..09bc9ab30d 100644
--- a/compiler/GHC/Core/TyCo/Rep.hs
+++ b/compiler/GHC/Core/TyCo/Rep.hs
@@ -74,8 +74,6 @@ module GHC.Core.TyCo.Rep (
Scaled(..), scaledMult, scaledThing, mapScaledType, Mult
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import {-# SOURCE #-} GHC.Core.TyCo.Ppr ( pprType, pprCo, pprTyLit )
diff --git a/compiler/GHC/Core/TyCo/Subst.hs b/compiler/GHC/Core/TyCo/Subst.hs
index a741c6672a..42c6ddac59 100644
--- a/compiler/GHC/Core/TyCo/Subst.hs
+++ b/compiler/GHC/Core/TyCo/Subst.hs
@@ -52,8 +52,6 @@ module GHC.Core.TyCo.Subst
checkValidSubst, isValidTCvSubst,
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import {-# SOURCE #-} GHC.Core.Type
diff --git a/compiler/GHC/Core/TyCon.hs b/compiler/GHC/Core/TyCon.hs
index a97efdf099..2a6bc4df4e 100644
--- a/compiler/GHC/Core/TyCon.hs
+++ b/compiler/GHC/Core/TyCon.hs
@@ -132,8 +132,6 @@ module GHC.Core.TyCon(
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
diff --git a/compiler/GHC/Core/TyCon/Env.hs b/compiler/GHC/Core/TyCon/Env.hs
index d5947a2fda..bf2aaaf8c7 100644
--- a/compiler/GHC/Core/TyCon/Env.hs
+++ b/compiler/GHC/Core/TyCon/Env.hs
@@ -33,8 +33,6 @@ module GHC.Core.TyCon.Env (
adjustDTyConEnv, alterDTyConEnv, extendDTyConEnv, foldDTyConEnv
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Types.Unique.FM
diff --git a/compiler/GHC/Core/TyCon/RecWalk.hs b/compiler/GHC/Core/TyCon/RecWalk.hs
index 7ddb2eb4d2..a3c5c73cf4 100644
--- a/compiler/GHC/Core/TyCon/RecWalk.hs
+++ b/compiler/GHC/Core/TyCon/RecWalk.hs
@@ -16,8 +16,6 @@ module GHC.Core.TyCon.RecWalk (
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Core.TyCon
diff --git a/compiler/GHC/Core/TyCon/Set.hs b/compiler/GHC/Core/TyCon/Set.hs
index d2615dfd73..567c52b43c 100644
--- a/compiler/GHC/Core/TyCon/Set.hs
+++ b/compiler/GHC/Core/TyCon/Set.hs
@@ -18,8 +18,6 @@ module GHC.Core.TyCon.Set (
nameSetAny, nameSetAll
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Types.Unique.Set
diff --git a/compiler/GHC/Core/Type.hs b/compiler/GHC/Core/Type.hs
index 9e5f05cde6..40c1e22149 100644
--- a/compiler/GHC/Core/Type.hs
+++ b/compiler/GHC/Core/Type.hs
@@ -235,8 +235,6 @@ module GHC.Core.Type (
isKindLevPoly
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Types.Basic
diff --git a/compiler/GHC/Core/Unfold.hs b/compiler/GHC/Core/Unfold.hs
index 8de84d7a80..c4910e7974 100644
--- a/compiler/GHC/Core/Unfold.hs
+++ b/compiler/GHC/Core/Unfold.hs
@@ -37,8 +37,6 @@ module GHC.Core.Unfold (
calcUnfoldingGuidance
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Session
diff --git a/compiler/GHC/Core/Unfold/Make.hs b/compiler/GHC/Core/Unfold/Make.hs
index 513b246324..9cc5b030a0 100644
--- a/compiler/GHC/Core/Unfold/Make.hs
+++ b/compiler/GHC/Core/Unfold/Make.hs
@@ -19,8 +19,6 @@ module GHC.Core.Unfold.Make
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Core
import GHC.Core.Unfold
diff --git a/compiler/GHC/Core/Unify.hs b/compiler/GHC/Core/Unify.hs
index bbdae319db..e7859f927b 100644
--- a/compiler/GHC/Core/Unify.hs
+++ b/compiler/GHC/Core/Unify.hs
@@ -27,8 +27,6 @@ module GHC.Core.Unify (
flattenTys, flattenTysX
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Types.Var
diff --git a/compiler/GHC/Core/Utils.hs b/compiler/GHC/Core/Utils.hs
index f63fc87e2a..b6273ed31d 100644
--- a/compiler/GHC/Core/Utils.hs
+++ b/compiler/GHC/Core/Utils.hs
@@ -66,8 +66,6 @@ module GHC.Core.Utils (
dumpIdInfoOfProgram
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
@@ -321,12 +319,12 @@ mkCast (Coercion e_co) co
= Coercion (mkCoCast e_co co)
mkCast (Cast expr co2) co
- = WARN(let { from_ty = coercionLKind co;
+ = warnPprTrace (let { from_ty = coercionLKind co;
to_ty2 = coercionRKind co2 } in
- not (from_ty `eqType` to_ty2),
- vcat ([ text "expr:" <+> ppr expr
+ not (from_ty `eqType` to_ty2))
+ (vcat ([ text "expr:" <+> ppr expr
, text "co2:" <+> ppr co2
- , text "co:" <+> ppr co ]) )
+ , text "co:" <+> ppr co ])) $
mkCast expr (mkTransCo co2 co)
mkCast (Tick t expr) co
@@ -334,11 +332,11 @@ mkCast (Tick t expr) co
mkCast expr co
= let from_ty = coercionLKind co in
- WARN( not (from_ty `eqType` exprType expr),
- text "Trying to coerce" <+> text "(" <> ppr expr
+ warnPprTrace (not (from_ty `eqType` exprType expr))
+ (text "Trying to coerce" <+> text "(" <> ppr expr
$$ text "::" <+> ppr (exprType expr) <> text ")"
$$ ppr co $$ ppr (coercionType co)
- $$ callStackDoc )
+ $$ callStackDoc) $
(Cast expr co)
-- | Wraps the given expression in the source annotation, dropping the
diff --git a/compiler/GHC/CoreToIface.hs b/compiler/GHC/CoreToIface.hs
index 60ebf9e9be..a6fad7e90d 100644
--- a/compiler/GHC/CoreToIface.hs
+++ b/compiler/GHC/CoreToIface.hs
@@ -44,8 +44,6 @@ module GHC.CoreToIface
, toIfaceLFInfo
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Ppr
@@ -368,7 +366,7 @@ toIfaceAppArgsX fr kind ty_args
-- This is probably a compiler bug, so we print a trace and
-- carry on as if it were FunTy. Without the test for
-- isEmptyTCvSubst we'd get an infinite loop (#15473)
- WARN( True, ppr kind $$ ppr ty_args )
+ warnPprTrace True (ppr kind $$ ppr ty_args) $
IA_Arg (toIfaceTypeX fr t1) Required (go env ty ts1)
tidyToIfaceType :: TidyEnv -> Type -> IfaceType
diff --git a/compiler/GHC/CoreToStg.hs b/compiler/GHC/CoreToStg.hs
index fe2fb027c4..7ad2bd0d74 100644
--- a/compiler/GHC/CoreToStg.hs
+++ b/compiler/GHC/CoreToStg.hs
@@ -15,8 +15,6 @@
module GHC.CoreToStg ( coreToStg ) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Core
@@ -616,7 +614,7 @@ coreToStgArgs (arg : args) = do -- Non-type argument
stg_arg_rep = typePrimRep (stgArgType stg_arg)
bad_args = not (primRepsCompatible platform arg_rep stg_arg_rep)
- WARN( bad_args, text "Dangerous-looking argument. Probable cause: bad unsafeCoerce#" $$ ppr arg )
+ warnPprTrace bad_args (text "Dangerous-looking argument. Probable cause: bad unsafeCoerce#" $$ ppr arg) $
return (stg_arg : stg_args, ticks ++ aticks)
coreToStgTick :: Type -- type of the ticked expression
diff --git a/compiler/GHC/CoreToStg/Prep.hs b/compiler/GHC/CoreToStg/Prep.hs
index 30d08f130f..44af340770 100644
--- a/compiler/GHC/CoreToStg/Prep.hs
+++ b/compiler/GHC/CoreToStg/Prep.hs
@@ -17,8 +17,6 @@ module GHC.CoreToStg.Prep
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
@@ -669,7 +667,7 @@ cpePair top_lvl is_rec dmd is_unlifted env bndr rhs
; (floats3, rhs3)
<- if manifestArity rhs1 <= arity
then return (floats2, cpeEtaExpand arity rhs2)
- else WARN(True, text "CorePrep: silly extra arguments:" <+> ppr bndr)
+ else warnPprTrace True (text "CorePrep: silly extra arguments:" <+> ppr bndr) $
-- Note [Silly extra arguments]
(do { v <- newVar (idType bndr)
; let float = mkFloat topDmd False v rhs2
diff --git a/compiler/GHC/Data/Graph/Directed.hs b/compiler/GHC/Data/Graph/Directed.hs
index 7a17f23e7c..d6a9dba9a9 100644
--- a/compiler/GHC/Data/Graph/Directed.hs
+++ b/compiler/GHC/Data/Graph/Directed.hs
@@ -27,8 +27,6 @@ module GHC.Data.Graph.Directed (
EdgeType(..), classifyEdges
) where
-#include "HsVersions.h"
-
------------------------------------------------------------------------------
-- A version of the graph algorithms described in:
--
diff --git a/compiler/GHC/Data/List/SetOps.hs b/compiler/GHC/Data/List/SetOps.hs
index 6c06e6017c..32f373d17b 100644
--- a/compiler/GHC/Data/List/SetOps.hs
+++ b/compiler/GHC/Data/List/SetOps.hs
@@ -23,8 +23,6 @@ module GHC.Data.List.SetOps (
getNth
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Utils.Outputable
@@ -63,7 +61,7 @@ unionLists xs [y]
| isIn "unionLists" y xs = xs
| otherwise = y:xs
unionLists xs ys
- = WARN(lengthExceeds xs 100 || lengthExceeds ys 100, ppr xs $$ ppr ys)
+ = warnPprTrace (lengthExceeds xs 100 || lengthExceeds ys 100) (ppr xs $$ ppr ys) $
[x | x <- xs, isn'tIn "unionLists" x ys] ++ ys
-- | Calculate the set difference of two lists. This is
diff --git a/compiler/GHC/Data/Pair.hs b/compiler/GHC/Data/Pair.hs
index ae51c78edc..b0c6a59c3a 100644
--- a/compiler/GHC/Data/Pair.hs
+++ b/compiler/GHC/Data/Pair.hs
@@ -16,8 +16,6 @@ module GHC.Data.Pair
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Utils.Outputable
diff --git a/compiler/GHC/Data/StringBuffer.hs b/compiler/GHC/Data/StringBuffer.hs
index 0932397ae5..c2dd8e2208 100644
--- a/compiler/GHC/Data/StringBuffer.hs
+++ b/compiler/GHC/Data/StringBuffer.hs
@@ -48,8 +48,6 @@ module GHC.Data.StringBuffer
parseUnsignedInteger,
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Data.FastString
diff --git a/compiler/GHC/Driver/Backpack.hs b/compiler/GHC/Driver/Backpack.hs
index e0e5b183ab..873e7867c2 100644
--- a/compiler/GHC/Driver/Backpack.hs
+++ b/compiler/GHC/Driver/Backpack.hs
@@ -17,8 +17,6 @@
module GHC.Driver.Backpack (doBackpack) where
-#include "HsVersions.h"
-
import GHC.Prelude
-- In a separate module because it hooks into the parser.
diff --git a/compiler/GHC/Driver/CmdLine.hs b/compiler/GHC/Driver/CmdLine.hs
index 1283723e05..56451ec199 100644
--- a/compiler/GHC/Driver/CmdLine.hs
+++ b/compiler/GHC/Driver/CmdLine.hs
@@ -23,8 +23,6 @@ module GHC.Driver.CmdLine
EwM, runEwM, addErr, addWarn, addFlagWarn, getArg, getCurLoc, liftEwM
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Utils.Misc
diff --git a/compiler/GHC/Driver/CodeOutput.hs b/compiler/GHC/Driver/CodeOutput.hs
index 2f028f9c7f..611cf498d3 100644
--- a/compiler/GHC/Driver/CodeOutput.hs
+++ b/compiler/GHC/Driver/CodeOutput.hs
@@ -14,8 +14,6 @@ module GHC.Driver.CodeOutput
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
import GHC.ForeignSrcLang
diff --git a/compiler/GHC/Driver/Env.hs b/compiler/GHC/Driver/Env.hs
index 3d59e72468..4fa77a8eb8 100644
--- a/compiler/GHC/Driver/Env.hs
+++ b/compiler/GHC/Driver/Env.hs
@@ -25,8 +25,6 @@ module GHC.Driver.Env
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Ppr
diff --git a/compiler/GHC/Driver/Main.hs b/compiler/GHC/Driver/Main.hs
index 4768c17f9f..e9e203c06b 100644
--- a/compiler/GHC/Driver/Main.hs
+++ b/compiler/GHC/Driver/Main.hs
@@ -234,9 +234,6 @@ import Data.Functor
import Control.DeepSeq (force)
import Data.Bifunctor (first, bimap)
-#include "HsVersions.h"
-
-
{- **********************************************************************
%* *
Initialisation
diff --git a/compiler/GHC/Driver/Make.hs b/compiler/GHC/Driver/Make.hs
index 4181e13ab5..003bc6e0b0 100644
--- a/compiler/GHC/Driver/Make.hs
+++ b/compiler/GHC/Driver/Make.hs
@@ -40,8 +40,6 @@ module GHC.Driver.Make (
ModNodeMap(..), emptyModNodeMap, modNodeMapElems, modNodeMapLookup, modNodeMapInsert
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Tc.Utils.Backpack
diff --git a/compiler/GHC/Driver/MakeFile.hs b/compiler/GHC/Driver/MakeFile.hs
index bffeb65850..c69e4538fb 100644
--- a/compiler/GHC/Driver/MakeFile.hs
+++ b/compiler/GHC/Driver/MakeFile.hs
@@ -13,8 +13,6 @@ module GHC.Driver.MakeFile
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import qualified GHC
diff --git a/compiler/GHC/Driver/Phases.hs b/compiler/GHC/Driver/Phases.hs
index 40aa2055c3..4f9cbf83a1 100644
--- a/compiler/GHC/Driver/Phases.hs
+++ b/compiler/GHC/Driver/Phases.hs
@@ -38,8 +38,6 @@ module GHC.Driver.Phases (
phaseForeignLanguage
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
diff --git a/compiler/GHC/Driver/Pipeline.hs b/compiler/GHC/Driver/Pipeline.hs
index b116c30693..d9246ac0f9 100644
--- a/compiler/GHC/Driver/Pipeline.hs
+++ b/compiler/GHC/Driver/Pipeline.hs
@@ -35,9 +35,7 @@ module GHC.Driver.Pipeline (
linkingNeeded, checkLinkInfo, writeInterfaceOnlyMode
) where
-#include <ghcplatform.h>
-#include "HsVersions.h"
-
+#include "ghcplatform.h"
import GHC.Prelude
import GHC.Platform
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs
index 25c55819c5..6a2f4c6b73 100644
--- a/compiler/GHC/Driver/Session.hs
+++ b/compiler/GHC/Driver/Session.hs
@@ -216,8 +216,6 @@ module GHC.Driver.Session (
initSDocContext, initDefaultSDocContext,
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
diff --git a/compiler/GHC/Hs/Doc.hs b/compiler/GHC/Hs/Doc.hs
index 425cc03bf0..d0b9348676 100644
--- a/compiler/GHC/Hs/Doc.hs
+++ b/compiler/GHC/Hs/Doc.hs
@@ -23,8 +23,6 @@ module GHC.Hs.Doc
, ExtractedTHDocs(..)
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Utils.Binary
diff --git a/compiler/GHC/Hs/Expr.hs b/compiler/GHC/Hs/Expr.hs
index 305b27f327..776e1cb8b5 100644
--- a/compiler/GHC/Hs/Expr.hs
+++ b/compiler/GHC/Hs/Expr.hs
@@ -28,8 +28,6 @@ module GHC.Hs.Expr
, module GHC.Hs.Expr
) where
-#include "HsVersions.h"
-
import Language.Haskell.Syntax.Expr
-- friends:
diff --git a/compiler/GHC/Hs/Lit.hs b/compiler/GHC/Hs/Lit.hs
index 9aaadba24f..c0a683746c 100644
--- a/compiler/GHC/Hs/Lit.hs
+++ b/compiler/GHC/Hs/Lit.hs
@@ -21,8 +21,6 @@ module GHC.Hs.Lit
, module GHC.Hs.Lit
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import {-# SOURCE #-} GHC.Hs.Expr( pprExpr )
diff --git a/compiler/GHC/Hs/Type.hs b/compiler/GHC/Hs/Type.hs
index 917063d6f4..61f72eb782 100644
--- a/compiler/GHC/Hs/Type.hs
+++ b/compiler/GHC/Hs/Type.hs
@@ -85,8 +85,6 @@ module GHC.Hs.Type (
hsTypeNeedsParens, parenthesizeHsType, parenthesizeHsContext
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import Language.Haskell.Syntax.Type
diff --git a/compiler/GHC/Hs/Utils.hs b/compiler/GHC/Hs/Utils.hs
index 3c152af242..417f0b1a8a 100644
--- a/compiler/GHC/Hs/Utils.hs
+++ b/compiler/GHC/Hs/Utils.hs
@@ -111,8 +111,6 @@ module GHC.Hs.Utils(
lStmtsImplicits, hsValBindsImplicits, lPatImplicits
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Hs.Decls
diff --git a/compiler/GHC/HsToCore.hs b/compiler/GHC/HsToCore.hs
index 2db6b6b18f..d1315ee0a0 100644
--- a/compiler/GHC/HsToCore.hs
+++ b/compiler/GHC/HsToCore.hs
@@ -16,8 +16,6 @@ module GHC.HsToCore (
deSugar, deSugarExpr
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Session
diff --git a/compiler/GHC/HsToCore/Arrows.hs b/compiler/GHC/HsToCore/Arrows.hs
index f1dee3f3b4..2c57baeb3e 100644
--- a/compiler/GHC/HsToCore/Arrows.hs
+++ b/compiler/GHC/HsToCore/Arrows.hs
@@ -13,8 +13,6 @@ Desugaring arrow commands
module GHC.HsToCore.Arrows ( dsProcExpr ) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.HsToCore.Match
diff --git a/compiler/GHC/HsToCore/Binds.hs b/compiler/GHC/HsToCore/Binds.hs
index 760fbe166c..a4f182f036 100644
--- a/compiler/GHC/HsToCore/Binds.hs
+++ b/compiler/GHC/HsToCore/Binds.hs
@@ -22,8 +22,6 @@ module GHC.HsToCore.Binds
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import {-# SOURCE #-} GHC.HsToCore.Expr ( dsLExpr )
diff --git a/compiler/GHC/HsToCore/Expr.hs b/compiler/GHC/HsToCore/Expr.hs
index 64e799d0e9..686d4ee7ef 100644
--- a/compiler/GHC/HsToCore/Expr.hs
+++ b/compiler/GHC/HsToCore/Expr.hs
@@ -18,8 +18,6 @@ module GHC.HsToCore.Expr
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.HsToCore.Match
diff --git a/compiler/GHC/HsToCore/Foreign/Call.hs b/compiler/GHC/HsToCore/Foreign/Call.hs
index f946a8be25..52d7918fc5 100644
--- a/compiler/GHC/HsToCore/Foreign/Call.hs
+++ b/compiler/GHC/HsToCore/Foreign/Call.hs
@@ -19,8 +19,6 @@ module GHC.HsToCore.Foreign.Call
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Core
diff --git a/compiler/GHC/HsToCore/Foreign/Decl.hs b/compiler/GHC/HsToCore/Foreign/Decl.hs
index ff1fb52eba..4dcefc427d 100644
--- a/compiler/GHC/HsToCore/Foreign/Decl.hs
+++ b/compiler/GHC/HsToCore/Foreign/Decl.hs
@@ -14,7 +14,6 @@ Desugaring foreign declarations (see also GHC.HsToCore.Foreign.Call).
module GHC.HsToCore.Foreign.Decl ( dsForeigns ) where
-#include "HsVersions.h"
import GHC.Prelude
import GHC.Tc.Utils.Monad -- temp
diff --git a/compiler/GHC/HsToCore/GuardedRHSs.hs b/compiler/GHC/HsToCore/GuardedRHSs.hs
index 6469b7b969..b74d329417 100644
--- a/compiler/GHC/HsToCore/GuardedRHSs.hs
+++ b/compiler/GHC/HsToCore/GuardedRHSs.hs
@@ -10,8 +10,6 @@ Matching guarded right-hand-sides (GRHSs)
module GHC.HsToCore.GuardedRHSs ( dsGuarded, dsGRHSs, isTrueLHsExpr ) where
-#include "HsVersions.h"
-
import GHC.Prelude
import {-# SOURCE #-} GHC.HsToCore.Expr ( dsLExpr, dsLocalBinds )
diff --git a/compiler/GHC/HsToCore/ListComp.hs b/compiler/GHC/HsToCore/ListComp.hs
index d96825937b..d716dcc3ff 100644
--- a/compiler/GHC/HsToCore/ListComp.hs
+++ b/compiler/GHC/HsToCore/ListComp.hs
@@ -11,8 +11,6 @@ Desugaring list comprehensions, monad comprehensions and array comprehensions
module GHC.HsToCore.ListComp ( dsListComp, dsMonadComp ) where
-#include "HsVersions.h"
-
import GHC.Prelude
import {-# SOURCE #-} GHC.HsToCore.Expr ( dsExpr, dsLExpr, dsLExprNoLP, dsLocalBinds, dsSyntaxExpr )
diff --git a/compiler/GHC/HsToCore/Match.hs b/compiler/GHC/HsToCore/Match.hs
index e80c751cb4..c5caf1a9a4 100644
--- a/compiler/GHC/HsToCore/Match.hs
+++ b/compiler/GHC/HsToCore/Match.hs
@@ -20,8 +20,6 @@ module GHC.HsToCore.Match
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
diff --git a/compiler/GHC/HsToCore/Match/Constructor.hs b/compiler/GHC/HsToCore/Match/Constructor.hs
index b4acb7fa47..f7cbc9238d 100644
--- a/compiler/GHC/HsToCore/Match/Constructor.hs
+++ b/compiler/GHC/HsToCore/Match/Constructor.hs
@@ -13,8 +13,6 @@ Pattern-matching constructors
module GHC.HsToCore.Match.Constructor ( matchConFamily, matchPatSyn ) where
-#include "HsVersions.h"
-
import GHC.Prelude
import {-# SOURCE #-} GHC.HsToCore.Match ( match )
diff --git a/compiler/GHC/HsToCore/Match/Literal.hs b/compiler/GHC/HsToCore/Match/Literal.hs
index 1a1ce99ead..d34549d0d3 100644
--- a/compiler/GHC/HsToCore/Match/Literal.hs
+++ b/compiler/GHC/HsToCore/Match/Literal.hs
@@ -24,8 +24,6 @@ module GHC.HsToCore.Match.Literal
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
diff --git a/compiler/GHC/HsToCore/Pmc.hs b/compiler/GHC/HsToCore/Pmc.hs
index a66a54df36..2563e4af05 100644
--- a/compiler/GHC/HsToCore/Pmc.hs
+++ b/compiler/GHC/HsToCore/Pmc.hs
@@ -41,8 +41,6 @@ module GHC.HsToCore.Pmc (
addTyCs, addCoreScrutTmCs, addHsScrutTmCs
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.HsToCore.Pmc.Types
diff --git a/compiler/GHC/HsToCore/Pmc/Check.hs b/compiler/GHC/HsToCore/Pmc/Check.hs
index 10d8574093..772877d3e8 100644
--- a/compiler/GHC/HsToCore/Pmc/Check.hs
+++ b/compiler/GHC/HsToCore/Pmc/Check.hs
@@ -22,8 +22,6 @@ module GHC.HsToCore.Pmc.Check (
checkMatchGroup, checkGRHSs, checkPatBind, checkEmptyCase
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Builtin.Names ( hasKey, considerAccessibleIdKey, trueDataConKey )
diff --git a/compiler/GHC/HsToCore/Pmc/Desugar.hs b/compiler/GHC/HsToCore/Pmc/Desugar.hs
index 7d7ea92071..5b0662cdd3 100644
--- a/compiler/GHC/HsToCore/Pmc/Desugar.hs
+++ b/compiler/GHC/HsToCore/Pmc/Desugar.hs
@@ -13,8 +13,6 @@ module GHC.HsToCore.Pmc.Desugar (
desugarPatBind, desugarGRHSs, desugarMatches, desugarEmptyCase
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.HsToCore.Pmc.Types
diff --git a/compiler/GHC/HsToCore/Pmc/Ppr.hs b/compiler/GHC/HsToCore/Pmc/Ppr.hs
index 7a15a18528..e8a5182bf9 100644
--- a/compiler/GHC/HsToCore/Pmc/Ppr.hs
+++ b/compiler/GHC/HsToCore/Pmc/Ppr.hs
@@ -8,8 +8,6 @@ module GHC.HsToCore.Pmc.Ppr (
pprUncovered
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Types.Basic
diff --git a/compiler/GHC/HsToCore/Pmc/Solver.hs b/compiler/GHC/HsToCore/Pmc/Solver.hs
index bc663a3184..4880a627e4 100644
--- a/compiler/GHC/HsToCore/Pmc/Solver.hs
+++ b/compiler/GHC/HsToCore/Pmc/Solver.hs
@@ -34,8 +34,6 @@ module GHC.HsToCore.Pmc.Solver (
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.HsToCore.Pmc.Types
diff --git a/compiler/GHC/HsToCore/Pmc/Solver/Types.hs b/compiler/GHC/HsToCore/Pmc/Solver/Types.hs
index 2961cb7433..17edf6fb77 100644
--- a/compiler/GHC/HsToCore/Pmc/Solver/Types.hs
+++ b/compiler/GHC/HsToCore/Pmc/Solver/Types.hs
@@ -32,8 +32,6 @@ module GHC.HsToCore.Pmc.Solver.Types (
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Data.Bag
diff --git a/compiler/GHC/HsToCore/Pmc/Types.hs b/compiler/GHC/HsToCore/Pmc/Types.hs
index abee31839c..b33602eb4a 100644
--- a/compiler/GHC/HsToCore/Pmc/Types.hs
+++ b/compiler/GHC/HsToCore/Pmc/Types.hs
@@ -34,8 +34,6 @@ module GHC.HsToCore.Pmc.Types (
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.HsToCore.Pmc.Solver.Types
diff --git a/compiler/GHC/HsToCore/Pmc/Utils.hs b/compiler/GHC/HsToCore/Pmc/Utils.hs
index 79959c4661..013006f8c3 100644
--- a/compiler/GHC/HsToCore/Pmc/Utils.hs
+++ b/compiler/GHC/HsToCore/Pmc/Utils.hs
@@ -11,8 +11,6 @@ module GHC.HsToCore.Pmc.Utils (
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Types.Basic (Origin(..), isGenerated)
diff --git a/compiler/GHC/HsToCore/Quote.hs b/compiler/GHC/HsToCore/Quote.hs
index 26341017ba..ad6ec602b4 100644
--- a/compiler/GHC/HsToCore/Quote.hs
+++ b/compiler/GHC/HsToCore/Quote.hs
@@ -29,8 +29,6 @@
module GHC.HsToCore.Quote( dsBracket ) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
diff --git a/compiler/GHC/HsToCore/Usage.hs b/compiler/GHC/HsToCore/Usage.hs
index 4b1e6e4346..ce1a32950c 100644
--- a/compiler/GHC/HsToCore/Usage.hs
+++ b/compiler/GHC/HsToCore/Usage.hs
@@ -7,8 +7,6 @@ module GHC.HsToCore.Usage (
mkUsageInfo, mkUsedNames, mkDependencies
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Env
diff --git a/compiler/GHC/HsToCore/Utils.hs b/compiler/GHC/HsToCore/Utils.hs
index 32e4e0990d..4787bb3844 100644
--- a/compiler/GHC/HsToCore/Utils.hs
+++ b/compiler/GHC/HsToCore/Utils.hs
@@ -45,8 +45,6 @@ module GHC.HsToCore.Utils (
isTrueLHsExpr
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import {-# SOURCE #-} GHC.HsToCore.Match ( matchSimply )
diff --git a/compiler/GHC/Iface/Binary.hs b/compiler/GHC/Iface/Binary.hs
index c796ed1713..7a732cd48b 100644
--- a/compiler/GHC/Iface/Binary.hs
+++ b/compiler/GHC/Iface/Binary.hs
@@ -30,8 +30,6 @@ module GHC.Iface.Binary (
BinDictionary(..)
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Tc.Utils.Monad
diff --git a/compiler/GHC/Iface/Env.hs b/compiler/GHC/Iface/Env.hs
index 169ffaef29..b79264e22b 100644
--- a/compiler/GHC/Iface/Env.hs
+++ b/compiler/GHC/Iface/Env.hs
@@ -21,8 +21,6 @@ module GHC.Iface.Env (
allocateGlobalBinder,
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Env
diff --git a/compiler/GHC/Iface/Ext/Ast.hs b/compiler/GHC/Iface/Ext/Ast.hs
index d2e172dbba..ccc99696d8 100644
--- a/compiler/GHC/Iface/Ext/Ast.hs
+++ b/compiler/GHC/Iface/Ext/Ast.hs
@@ -19,8 +19,6 @@
Main functions for .hie file generation
-}
-#include "HsVersions.h"
-
module GHC.Iface.Ext.Ast ( mkHieFile, mkHieFileWithSource, getCompressedAsts, enrichHie) where
import GHC.Utils.Outputable(ppr)
diff --git a/compiler/GHC/Iface/Load.hs b/compiler/GHC/Iface/Load.hs
index 2d474d0da3..41fe389b46 100644
--- a/compiler/GHC/Iface/Load.hs
+++ b/compiler/GHC/Iface/Load.hs
@@ -35,8 +35,6 @@ module GHC.Iface.Load (
module Iface_Errors -- avoids boot files in Ppr modules
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import {-# SOURCE #-} GHC.IfaceToCore
@@ -537,7 +535,7 @@ loadInterface doc_str mod from
-- of one's own boot file! (one-shot only)
-- See Note [Loading your own hi-boot file]
- ; WARN( bad_boot, ppr mod )
+ ; warnPprTrace bad_boot (ppr mod) $
updateEps_ $ \ eps ->
if elemModuleEnv mod (eps_PIT eps) || is_external_sig home_unit iface
then eps
diff --git a/compiler/GHC/Iface/Make.hs b/compiler/GHC/Iface/Make.hs
index 01c547023c..9fc9fca257 100644
--- a/compiler/GHC/Iface/Make.hs
+++ b/compiler/GHC/Iface/Make.hs
@@ -19,8 +19,6 @@ module GHC.Iface.Make
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Hs
@@ -161,7 +159,7 @@ updateDecl decls (Just CgInfos{ cgNonCafs = NonCaffySet non_cafs, cgLFInfos = lf
update_decl (IfaceId nm ty details infos)
| let not_caffy = elemNameSet nm non_cafs
, let mb_lf_info = lookupNameEnv lf_infos nm
- , WARN( isNothing mb_lf_info, text "Name without LFInfo:" <+> ppr nm ) True
+ , warnPprTrace (isNothing mb_lf_info) (text "Name without LFInfo:" <+> ppr nm) True
-- Only allocate a new IfaceId if we're going to update the infos
, isJust mb_lf_info || not_caffy
= IfaceId nm ty details $
diff --git a/compiler/GHC/Iface/Recomp.hs b/compiler/GHC/Iface/Recomp.hs
index 3d84c17565..ede395aa67 100644
--- a/compiler/GHC/Iface/Recomp.hs
+++ b/compiler/GHC/Iface/Recomp.hs
@@ -10,8 +10,6 @@ module GHC.Iface.Recomp
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Backend
diff --git a/compiler/GHC/Iface/Recomp/Binary.hs b/compiler/GHC/Iface/Recomp/Binary.hs
index fd14c86673..c4e1d65a17 100644
--- a/compiler/GHC/Iface/Recomp/Binary.hs
+++ b/compiler/GHC/Iface/Recomp/Binary.hs
@@ -8,8 +8,6 @@ module GHC.Iface.Recomp.Binary
, putNameLiterally
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Utils.Fingerprint
diff --git a/compiler/GHC/Iface/Rename.hs b/compiler/GHC/Iface/Rename.hs
index 2df946529a..edc166acf3 100644
--- a/compiler/GHC/Iface/Rename.hs
+++ b/compiler/GHC/Iface/Rename.hs
@@ -14,8 +14,6 @@ module GHC.Iface.Rename (
tcRnModExports,
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Env
diff --git a/compiler/GHC/Iface/Syntax.hs b/compiler/GHC/Iface/Syntax.hs
index 1f2cd97937..483a18465a 100644
--- a/compiler/GHC/Iface/Syntax.hs
+++ b/compiler/GHC/Iface/Syntax.hs
@@ -41,8 +41,6 @@ module GHC.Iface.Syntax (
AltPpr(..), ShowSub(..), ShowHowMuch(..), showToIface, showToHeader
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Builtin.Names ( unrestrictedFunTyConKey, liftedTypeKindTyConKey )
diff --git a/compiler/GHC/Iface/Tidy.hs b/compiler/GHC/Iface/Tidy.hs
index e9e69f5c68..418e878ea5 100644
--- a/compiler/GHC/Iface/Tidy.hs
+++ b/compiler/GHC/Iface/Tidy.hs
@@ -13,8 +13,6 @@ module GHC.Iface.Tidy (
mkBootModDetailsTc, tidyProgram
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Session
@@ -701,7 +699,7 @@ chooseExternalIds hsc_env mod omit_prags expose_all binds implicit_binds imp_id_
-- unfolding in the *definition*; so look up in binder_set
refined_id = case lookupVarSet binder_set idocc of
Just id -> id
- Nothing -> WARN( True, ppr idocc ) idocc
+ Nothing -> warnPprTrace True (ppr idocc) idocc
unfold_env' = extendVarEnv unfold_env idocc (name',show_unfold)
referrer' | isExportedId refined_id = refined_id
@@ -1218,7 +1216,7 @@ tidyTopIdInfo uf_opts rhs_tidy_env name orig_rhs tidy_rhs idinfo show_unfold
sig = dmdSigInfo idinfo
final_sig | not $ isTopSig sig
- = WARN( _bottom_hidden sig , ppr name ) sig
+ = warnPprTrace (_bottom_hidden sig) (ppr name) sig
-- try a cheap-and-cheerful bottom analyser
| Just (_, nsig) <- mb_bot_str = nsig
| otherwise = sig
diff --git a/compiler/GHC/Iface/Type.hs b/compiler/GHC/Iface/Type.hs
index 034198bd9a..f1326b3461 100644
--- a/compiler/GHC/Iface/Type.hs
+++ b/compiler/GHC/Iface/Type.hs
@@ -67,8 +67,6 @@ module GHC.Iface.Type (
many_ty
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import {-# SOURCE #-} GHC.Builtin.Types
diff --git a/compiler/GHC/IfaceToCore.hs b/compiler/GHC/IfaceToCore.hs
index 9c96fd8ece..1f5d7e3d58 100644
--- a/compiler/GHC/IfaceToCore.hs
+++ b/compiler/GHC/IfaceToCore.hs
@@ -24,8 +24,6 @@ module GHC.IfaceToCore (
tcIfaceOneShot
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Env
diff --git a/compiler/GHC/Linker/Dynamic.hs b/compiler/GHC/Linker/Dynamic.hs
index c9d0f0db73..5c96eb55aa 100644
--- a/compiler/GHC/Linker/Dynamic.hs
+++ b/compiler/GHC/Linker/Dynamic.hs
@@ -8,8 +8,6 @@ module GHC.Linker.Dynamic
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
import GHC.Platform.Ways
diff --git a/compiler/GHC/Linker/Loader.hs b/compiler/GHC/Linker/Loader.hs
index 6a5a87ca97..b026536937 100644
--- a/compiler/GHC/Linker/Loader.hs
+++ b/compiler/GHC/Linker/Loader.hs
@@ -31,8 +31,6 @@ module GHC.Linker.Loader
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Settings
diff --git a/compiler/GHC/Llvm/Ppr.hs b/compiler/GHC/Llvm/Ppr.hs
index eb48179330..0bf4e53d60 100644
--- a/compiler/GHC/Llvm/Ppr.hs
+++ b/compiler/GHC/Llvm/Ppr.hs
@@ -30,8 +30,6 @@ module GHC.Llvm.Ppr (
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Llvm.Syntax
diff --git a/compiler/GHC/Llvm/Types.hs b/compiler/GHC/Llvm/Types.hs
index a30605d3cd..8b568d3d1f 100644
--- a/compiler/GHC/Llvm/Types.hs
+++ b/compiler/GHC/Llvm/Types.hs
@@ -7,8 +7,6 @@
module GHC.Llvm.Types where
-#include "HsVersions.h"
-
import GHC.Prelude
import Data.Char
diff --git a/compiler/GHC/Parser/CharClass.hs b/compiler/GHC/Parser/CharClass.hs
index 7834109e8c..e287508dab 100644
--- a/compiler/GHC/Parser/CharClass.hs
+++ b/compiler/GHC/Parser/CharClass.hs
@@ -14,8 +14,6 @@ module GHC.Parser.CharClass
, hexDigit, octDecDigit
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import Data.Char ( ord, chr )
diff --git a/compiler/GHC/Parser/Header.hs b/compiler/GHC/Parser/Header.hs
index 02503924ee..7fada7a704 100644
--- a/compiler/GHC/Parser/Header.hs
+++ b/compiler/GHC/Parser/Header.hs
@@ -21,8 +21,6 @@ module GHC.Parser.Header
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
diff --git a/compiler/GHC/Parser/PostProcess.hs b/compiler/GHC/Parser/PostProcess.hs
index 742e659605..34e1a8401a 100644
--- a/compiler/GHC/Parser/PostProcess.hs
+++ b/compiler/GHC/Parser/PostProcess.hs
@@ -152,8 +152,6 @@ import Data.Char
import Data.Data ( dataTypeOf, fromConstr, dataTypeConstrs )
import Data.Kind ( Type )
-#include "HsVersions.h"
-
{- **********************************************************************
Construction functions for Rdr stuff
diff --git a/compiler/GHC/Platform/Ways.hs b/compiler/GHC/Platform/Ways.hs
index 3759df0021..f9e70b7b92 100644
--- a/compiler/GHC/Platform/Ways.hs
+++ b/compiler/GHC/Platform/Ways.hs
@@ -49,8 +49,6 @@ module GHC.Platform.Ways
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
import GHC.Driver.Flags
diff --git a/compiler/GHC/Rename/Env.hs b/compiler/GHC/Rename/Env.hs
index 2425a253a5..9a4f22979e 100644
--- a/compiler/GHC/Rename/Env.hs
+++ b/compiler/GHC/Rename/Env.hs
@@ -55,8 +55,6 @@ module GHC.Rename.Env (
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Iface.Load ( loadInterfaceForName, loadSrcInterface_maybe )
diff --git a/compiler/GHC/Rename/Expr.hs b/compiler/GHC/Rename/Expr.hs
index 3d27e77ea5..e1b68e2504 100644
--- a/compiler/GHC/Rename/Expr.hs
+++ b/compiler/GHC/Rename/Expr.hs
@@ -25,8 +25,6 @@ module GHC.Rename.Expr (
AnnoBody
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Rename.Bind ( rnLocalBindsAndThen, rnLocalValBindsLHS, rnLocalValBindsRHS
diff --git a/compiler/GHC/Rename/HsType.hs b/compiler/GHC/Rename/HsType.hs
index c827b92a45..268e6418cf 100644
--- a/compiler/GHC/Rename/HsType.hs
+++ b/compiler/GHC/Rename/HsType.hs
@@ -77,8 +77,6 @@ import qualified Data.List.NonEmpty as NE
import Data.List.NonEmpty (NonEmpty(..))
import Control.Monad
-#include "HsVersions.h"
-
{-
These type renamers are in a separate module, rather than in (say) GHC.Rename.Module,
to break several loops.
diff --git a/compiler/GHC/Rename/Module.hs b/compiler/GHC/Rename/Module.hs
index 1a5fcedf8f..0e536b7461 100644
--- a/compiler/GHC/Rename/Module.hs
+++ b/compiler/GHC/Rename/Module.hs
@@ -16,8 +16,6 @@ module GHC.Rename.Module (
rnSrcDecls, addTcgDUs, findSplice
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import {-# SOURCE #-} GHC.Rename.Expr( rnLExpr )
diff --git a/compiler/GHC/Rename/Names.hs b/compiler/GHC/Rename/Names.hs
index 40853a16e2..f4bde99be0 100644
--- a/compiler/GHC/Rename/Names.hs
+++ b/compiler/GHC/Rename/Names.hs
@@ -30,8 +30,6 @@ module GHC.Rename.Names (
ImportDeclUsage
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Env
@@ -341,7 +339,7 @@ rnImportDecl this_mod
-- Compiler sanity check: if the import didn't say
-- {-# SOURCE #-} we should not get a hi-boot file
- WARN( (want_boot == NotBoot) && (mi_boot iface == IsBoot), ppr imp_mod_name ) do
+ warnPprTrace ((want_boot == NotBoot) && (mi_boot iface == IsBoot)) (ppr imp_mod_name) $ do
-- Issue a user warning for a redundant {- SOURCE -} import
-- NB that we arrange to read all the ordinary imports before
diff --git a/compiler/GHC/Rename/Pat.hs b/compiler/GHC/Rename/Pat.hs
index 5934f36f54..0d14420be4 100644
--- a/compiler/GHC/Rename/Pat.hs
+++ b/compiler/GHC/Rename/Pat.hs
@@ -49,8 +49,6 @@ import GHC.Prelude
import {-# SOURCE #-} GHC.Rename.Expr ( rnLExpr )
import {-# SOURCE #-} GHC.Rename.Splice ( rnSplicePat )
-#include "HsVersions.h"
-
import GHC.Hs
import GHC.Tc.Utils.Monad
import GHC.Tc.Utils.Zonk ( hsOverLitName )
diff --git a/compiler/GHC/Rename/Splice.hs b/compiler/GHC/Rename/Splice.hs
index f3bab6c3fe..4027c89e79 100644
--- a/compiler/GHC/Rename/Splice.hs
+++ b/compiler/GHC/Rename/Splice.hs
@@ -11,8 +11,6 @@ module GHC.Rename.Splice (
, traceSplice, SpliceInfo(..)
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Types.Name
diff --git a/compiler/GHC/Runtime/Eval.hs b/compiler/GHC/Runtime/Eval.hs
index 6880c2fec7..217df11ffb 100644
--- a/compiler/GHC/Runtime/Eval.hs
+++ b/compiler/GHC/Runtime/Eval.hs
@@ -44,8 +44,6 @@ module GHC.Runtime.Eval (
Term(..), obtainTermFromId, obtainTermFromVal, reconstructType
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Monad
@@ -667,7 +665,7 @@ rttiEnvironment hsc_env@HscEnv{hsc_IC=ic} = do
Just new_ty -> do
case improveRTTIType hsc_env old_ty new_ty of
Nothing -> return $
- WARN(True, text (":print failed to calculate the "
+ warnPprTrace True (text (":print failed to calculate the "
++ "improvement for a type")) hsc_env
Just subst -> do
let dflags = hsc_dflags hsc_env
diff --git a/compiler/GHC/Runtime/Heap/Inspect.hs b/compiler/GHC/Runtime/Heap/Inspect.hs
index fae6bcb59c..5c00d21ed1 100644
--- a/compiler/GHC/Runtime/Heap/Inspect.hs
+++ b/compiler/GHC/Runtime/Heap/Inspect.hs
@@ -23,8 +23,6 @@ module GHC.Runtime.Heap.Inspect(
constrClosToName -- exported to use in test T4891
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
diff --git a/compiler/GHC/Settings/IO.hs b/compiler/GHC/Settings/IO.hs
index 51f101aaad..dd6f5a8c1d 100644
--- a/compiler/GHC/Settings/IO.hs
+++ b/compiler/GHC/Settings/IO.hs
@@ -7,8 +7,6 @@ module GHC.Settings.IO
, initSettings
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Settings.Utils
diff --git a/compiler/GHC/Stg/Lift.hs b/compiler/GHC/Stg/Lift.hs
index 32e94234b4..5527f37165 100644
--- a/compiler/GHC/Stg/Lift.hs
+++ b/compiler/GHC/Stg/Lift.hs
@@ -15,8 +15,6 @@ module GHC.Stg.Lift
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Types.Basic
diff --git a/compiler/GHC/Stg/Lift/Monad.hs b/compiler/GHC/Stg/Lift/Monad.hs
index c34c74d505..0671bd537e 100644
--- a/compiler/GHC/Stg/Lift/Monad.hs
+++ b/compiler/GHC/Stg/Lift/Monad.hs
@@ -20,8 +20,6 @@ module GHC.Stg.Lift.Monad (
substOcc, isLifted, formerFreeVars, liftedIdsExpander
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Types.Basic
diff --git a/compiler/GHC/Stg/Pipeline.hs b/compiler/GHC/Stg/Pipeline.hs
index d9f1342b66..8c57ad7577 100644
--- a/compiler/GHC/Stg/Pipeline.hs
+++ b/compiler/GHC/Stg/Pipeline.hs
@@ -11,8 +11,6 @@
module GHC.Stg.Pipeline ( stg2stg ) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Stg.Syntax
diff --git a/compiler/GHC/Stg/Stats.hs b/compiler/GHC/Stg/Stats.hs
index debe53201f..485ddbf055 100644
--- a/compiler/GHC/Stg/Stats.hs
+++ b/compiler/GHC/Stg/Stats.hs
@@ -25,8 +25,6 @@ The program gather statistics about
module GHC.Stg.Stats ( showStgStats ) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Stg.Syntax
diff --git a/compiler/GHC/Stg/Subst.hs b/compiler/GHC/Stg/Subst.hs
index 798a1f38bd..c5aa65c7f1 100644
--- a/compiler/GHC/Stg/Subst.hs
+++ b/compiler/GHC/Stg/Subst.hs
@@ -2,8 +2,6 @@
module GHC.Stg.Subst where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Types.Id
@@ -57,8 +55,7 @@ lookupIdSubst id (Subst in_scope env)
| not (isLocalId id) = id
| Just id' <- lookupVarEnv env id = id'
| Just id' <- lookupInScope in_scope id = id'
- | otherwise = WARN( True, text "StgSubst.lookupIdSubst" <+> ppr id $$ ppr in_scope)
- id
+ | otherwise = warnPprTrace True (text "StgSubst.lookupIdSubst" <+> ppr id $$ ppr in_scope) id
-- | Substitutes an occurrence of an identifier for its counterpart recorded
-- in the 'Subst'. Does not generate a debug warning if the identifier to
diff --git a/compiler/GHC/Stg/Syntax.hs b/compiler/GHC/Stg/Syntax.hs
index 50fdea3dce..6728a3fc87 100644
--- a/compiler/GHC/Stg/Syntax.hs
+++ b/compiler/GHC/Stg/Syntax.hs
@@ -65,8 +65,6 @@ module GHC.Stg.Syntax (
pprGenStgTopBindings, pprStgTopBindings
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Core ( AltCon )
diff --git a/compiler/GHC/Stg/Unarise.hs b/compiler/GHC/Stg/Unarise.hs
index 4a4fef1402..014d3807a1 100644
--- a/compiler/GHC/Stg/Unarise.hs
+++ b/compiler/GHC/Stg/Unarise.hs
@@ -241,8 +241,6 @@ STG programs after unarisation have these invariants:
module GHC.Stg.Unarise (unarise) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Types.Basic
diff --git a/compiler/GHC/StgToByteCode.hs b/compiler/GHC/StgToByteCode.hs
index d27d2ce746..1849480934 100644
--- a/compiler/GHC/StgToByteCode.hs
+++ b/compiler/GHC/StgToByteCode.hs
@@ -13,8 +13,6 @@
-- | GHC.StgToByteCode: Generate bytecode from STG
module GHC.StgToByteCode ( UnlinkedBCO, byteCodeGen, stgExprToBCOs ) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Session
diff --git a/compiler/GHC/StgToCmm.hs b/compiler/GHC/StgToCmm.hs
index 04d76eeb9b..20bde7c3bd 100644
--- a/compiler/GHC/StgToCmm.hs
+++ b/compiler/GHC/StgToCmm.hs
@@ -13,8 +13,6 @@
module GHC.StgToCmm ( codeGen ) where
-#include "HsVersions.h"
-
import GHC.Prelude as Prelude
import GHC.Driver.Backend
diff --git a/compiler/GHC/StgToCmm/Closure.hs b/compiler/GHC/StgToCmm/Closure.hs
index f3619413a8..bbfcdd9811 100644
--- a/compiler/GHC/StgToCmm/Closure.hs
+++ b/compiler/GHC/StgToCmm/Closure.hs
@@ -68,8 +68,6 @@ module GHC.StgToCmm.Closure (
staticClosureNeedsLink,
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
import GHC.Platform.Profile
diff --git a/compiler/GHC/StgToCmm/DataCon.hs b/compiler/GHC/StgToCmm/DataCon.hs
index 49cbc2b78d..282d9116bf 100644
--- a/compiler/GHC/StgToCmm/DataCon.hs
+++ b/compiler/GHC/StgToCmm/DataCon.hs
@@ -15,8 +15,6 @@ module GHC.StgToCmm.DataCon (
cgTopRhsCon, buildDynCon, bindConArgs
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
diff --git a/compiler/GHC/StgToCmm/Env.hs b/compiler/GHC/StgToCmm/Env.hs
index db97e6176f..5d8e2ecfaa 100644
--- a/compiler/GHC/StgToCmm/Env.hs
+++ b/compiler/GHC/StgToCmm/Env.hs
@@ -21,8 +21,6 @@ module GHC.StgToCmm.Env (
maybeLetNoEscape,
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
diff --git a/compiler/GHC/StgToCmm/Expr.hs b/compiler/GHC/StgToCmm/Expr.hs
index beadc9af8d..c777c2b406 100644
--- a/compiler/GHC/StgToCmm/Expr.hs
+++ b/compiler/GHC/StgToCmm/Expr.hs
@@ -12,8 +12,6 @@
module GHC.StgToCmm.Expr ( cgExpr, cgLit ) where
-#include "HsVersions.h"
-
import GHC.Prelude hiding ((<*>))
import {-# SOURCE #-} GHC.StgToCmm.Bind ( cgBind )
diff --git a/compiler/GHC/StgToCmm/Layout.hs b/compiler/GHC/StgToCmm/Layout.hs
index c6c24b7862..eeae70f747 100644
--- a/compiler/GHC/StgToCmm/Layout.hs
+++ b/compiler/GHC/StgToCmm/Layout.hs
@@ -31,8 +31,6 @@ module GHC.StgToCmm.Layout (
) where
-#include "HsVersions.h"
-
import GHC.Prelude hiding ((<*>))
import GHC.Driver.Session
diff --git a/compiler/GHC/StgToCmm/Lit.hs b/compiler/GHC/StgToCmm/Lit.hs
index 244a593f9a..6a7c37258b 100644
--- a/compiler/GHC/StgToCmm/Lit.hs
+++ b/compiler/GHC/StgToCmm/Lit.hs
@@ -13,8 +13,6 @@ module GHC.StgToCmm.Lit (
newStringCLit, newByteStringCLit
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
diff --git a/compiler/GHC/StgToCmm/Prim.hs b/compiler/GHC/StgToCmm/Prim.hs
index c6c227f4e6..a004411d89 100644
--- a/compiler/GHC/StgToCmm/Prim.hs
+++ b/compiler/GHC/StgToCmm/Prim.hs
@@ -16,8 +16,6 @@ module GHC.StgToCmm.Prim (
shouldInlinePrimOp
) where
-#include "HsVersions.h"
-
import GHC.Prelude hiding ((<*>))
import GHC.Platform
diff --git a/compiler/GHC/StgToCmm/Types.hs b/compiler/GHC/StgToCmm/Types.hs
index 2788a4a7cc..5428430093 100644
--- a/compiler/GHC/StgToCmm/Types.hs
+++ b/compiler/GHC/StgToCmm/Types.hs
@@ -10,8 +10,6 @@ module GHC.StgToCmm.Types
, WordOff
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Types.Basic
diff --git a/compiler/GHC/StgToCmm/Utils.hs b/compiler/GHC/StgToCmm/Utils.hs
index adbd04b49e..bd5d578188 100644
--- a/compiler/GHC/StgToCmm/Utils.hs
+++ b/compiler/GHC/StgToCmm/Utils.hs
@@ -45,8 +45,6 @@ module GHC.StgToCmm.Utils (
convertInfoProvMap, cmmInfoTableToInfoProvEnt
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
diff --git a/compiler/GHC/SysTools.hs b/compiler/GHC/SysTools.hs
index 91b72513f3..ebaa74793c 100644
--- a/compiler/GHC/SysTools.hs
+++ b/compiler/GHC/SysTools.hs
@@ -28,8 +28,6 @@ module GHC.SysTools (
expandTopDir,
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Settings.Utils
diff --git a/compiler/GHC/SysTools/BaseDir.hs b/compiler/GHC/SysTools/BaseDir.hs
index ba401de2de..ad16fac025 100644
--- a/compiler/GHC/SysTools/BaseDir.hs
+++ b/compiler/GHC/SysTools/BaseDir.hs
@@ -17,8 +17,6 @@ module GHC.SysTools.BaseDir
, tryFindTopDir
) where
-#include "HsVersions.h"
-
import GHC.Prelude
-- See note [Base Dir] for why some of this logic is shared with ghc-pkg.
diff --git a/compiler/GHC/SysTools/Process.hs b/compiler/GHC/SysTools/Process.hs
index 522c50f354..7328a1c57f 100644
--- a/compiler/GHC/SysTools/Process.hs
+++ b/compiler/GHC/SysTools/Process.hs
@@ -8,8 +8,6 @@
-----------------------------------------------------------------------------
module GHC.SysTools.Process where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Session
diff --git a/compiler/GHC/Tc/Deriv.hs b/compiler/GHC/Tc/Deriv.hs
index fa1a0afb45..ded92fde1e 100644
--- a/compiler/GHC/Tc/Deriv.hs
+++ b/compiler/GHC/Tc/Deriv.hs
@@ -13,8 +13,6 @@
-- | Handles @deriving@ clauses on @data@ declarations.
module GHC.Tc.Deriv ( tcDeriving, DerivInfo(..) ) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Hs
diff --git a/compiler/GHC/Tc/Deriv/Functor.hs b/compiler/GHC/Tc/Deriv/Functor.hs
index d61b7180ef..d9aa90d6b2 100644
--- a/compiler/GHC/Tc/Deriv/Functor.hs
+++ b/compiler/GHC/Tc/Deriv/Functor.hs
@@ -22,8 +22,6 @@ module GHC.Tc.Deriv.Functor
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Data.Bag
diff --git a/compiler/GHC/Tc/Deriv/Generate.hs b/compiler/GHC/Tc/Deriv/Generate.hs
index 69af151327..465651a2ef 100644
--- a/compiler/GHC/Tc/Deriv/Generate.hs
+++ b/compiler/GHC/Tc/Deriv/Generate.hs
@@ -39,8 +39,6 @@ module GHC.Tc.Deriv.Generate (
getPossibleDataCons, tyConInstArgTys
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Tc.Utils.Monad
diff --git a/compiler/GHC/Tc/Deriv/Generics.hs b/compiler/GHC/Tc/Deriv/Generics.hs
index 9e2dbf07df..d2acbd515a 100644
--- a/compiler/GHC/Tc/Deriv/Generics.hs
+++ b/compiler/GHC/Tc/Deriv/Generics.hs
@@ -62,8 +62,6 @@ import Control.Monad (mplus)
import Data.List (zip4, partition)
import Data.Maybe (isJust)
-#include "HsVersions.h"
-
{-
************************************************************************
* *
diff --git a/compiler/GHC/Tc/Deriv/Infer.hs b/compiler/GHC/Tc/Deriv/Infer.hs
index 5caf62e6c0..b09070e653 100644
--- a/compiler/GHC/Tc/Deriv/Infer.hs
+++ b/compiler/GHC/Tc/Deriv/Infer.hs
@@ -14,8 +14,6 @@ module GHC.Tc.Deriv.Infer
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Data.Bag
diff --git a/compiler/GHC/Tc/Errors.hs b/compiler/GHC/Tc/Errors.hs
index 40810ee619..e4a9abb3ee 100644
--- a/compiler/GHC/Tc/Errors.hs
+++ b/compiler/GHC/Tc/Errors.hs
@@ -12,8 +12,6 @@ module GHC.Tc.Errors(
solverDepthErrorTcS
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Tc.Types
diff --git a/compiler/GHC/Tc/Gen/App.hs b/compiler/GHC/Tc/Gen/App.hs
index 1c5876df52..53f13cc645 100644
--- a/compiler/GHC/Tc/Gen/App.hs
+++ b/compiler/GHC/Tc/Gen/App.hs
@@ -54,8 +54,6 @@ import qualified GHC.LanguageExtensions as LangExt
import Control.Monad
import Data.Function
-#include "HsVersions.h"
-
import GHC.Prelude
{- *********************************************************************
diff --git a/compiler/GHC/Tc/Gen/Bind.hs b/compiler/GHC/Tc/Gen/Bind.hs
index 386f1959b6..135cc67f3b 100644
--- a/compiler/GHC/Tc/Gen/Bind.hs
+++ b/compiler/GHC/Tc/Gen/Bind.hs
@@ -79,8 +79,6 @@ import qualified GHC.LanguageExtensions as LangExt
import Control.Monad
import Data.Foldable (find)
-#include "HsVersions.h"
-
{-
************************************************************************
* *
diff --git a/compiler/GHC/Tc/Gen/Expr.hs b/compiler/GHC/Tc/Gen/Expr.hs
index edcd4fc4d5..c9d18bca27 100644
--- a/compiler/GHC/Tc/Gen/Expr.hs
+++ b/compiler/GHC/Tc/Gen/Expr.hs
@@ -26,8 +26,6 @@ module GHC.Tc.Gen.Expr
addAmbiguousNameErr,
getFixedTyVars ) where
-#include "HsVersions.h"
-
import GHC.Prelude
import {-# SOURCE #-} GHC.Tc.Gen.Splice( tcSpliceExpr, tcTypedBracket, tcUntypedBracket )
diff --git a/compiler/GHC/Tc/Gen/Foreign.hs b/compiler/GHC/Tc/Gen/Foreign.hs
index 166f366038..892cb6764e 100644
--- a/compiler/GHC/Tc/Gen/Foreign.hs
+++ b/compiler/GHC/Tc/Gen/Foreign.hs
@@ -35,8 +35,6 @@ module GHC.Tc.Gen.Foreign
, tcCheckFEType
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Hs
diff --git a/compiler/GHC/Tc/Gen/Head.hs b/compiler/GHC/Tc/Gen/Head.hs
index 9767681607..a03f941168 100644
--- a/compiler/GHC/Tc/Gen/Head.hs
+++ b/compiler/GHC/Tc/Gen/Head.hs
@@ -78,8 +78,6 @@ import Control.Monad
import Data.Function
import qualified Data.List.NonEmpty as NE
-#include "HsVersions.h"
-
import GHC.Prelude
diff --git a/compiler/GHC/Tc/Gen/HsType.hs b/compiler/GHC/Tc/Gen/HsType.hs
index 18af6a8ea4..297df294d3 100644
--- a/compiler/GHC/Tc/Gen/HsType.hs
+++ b/compiler/GHC/Tc/Gen/HsType.hs
@@ -74,8 +74,6 @@ module GHC.Tc.Gen.HsType (
funAppCtxt, addTyConFlavCtxt
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Hs
diff --git a/compiler/GHC/Tc/Gen/Match.hs b/compiler/GHC/Tc/Gen/Match.hs
index 2f62d3d712..0605767a47 100644
--- a/compiler/GHC/Tc/Gen/Match.hs
+++ b/compiler/GHC/Tc/Gen/Match.hs
@@ -76,8 +76,6 @@ import GHC.Types.SrcLoc
import Control.Monad
import Control.Arrow ( second )
-#include "HsVersions.h"
-
{-
************************************************************************
* *
diff --git a/compiler/GHC/Tc/Gen/Pat.hs b/compiler/GHC/Tc/Gen/Pat.hs
index f21b5d9593..892aef0a0b 100644
--- a/compiler/GHC/Tc/Gen/Pat.hs
+++ b/compiler/GHC/Tc/Gen/Pat.hs
@@ -25,8 +25,6 @@ module GHC.Tc.Gen.Pat
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import {-# SOURCE #-} GHC.Tc.Gen.Expr( tcSyntaxOp, tcSyntaxOpGen, tcInferRho )
diff --git a/compiler/GHC/Tc/Gen/Sig.hs b/compiler/GHC/Tc/Gen/Sig.hs
index f327d8f9f7..54108bfaa1 100644
--- a/compiler/GHC/Tc/Gen/Sig.hs
+++ b/compiler/GHC/Tc/Gen/Sig.hs
@@ -24,8 +24,6 @@ module GHC.Tc.Gen.Sig(
mkPragEnv, tcSpecPrags, tcSpecWrapper, tcImpPrags, addInlinePrags
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Hs
@@ -577,7 +575,7 @@ mkPragEnv sigs binds
-- add arity only for real INLINE pragmas, not INLINABLE
= case lookupNameEnv ar_env n of
Just ar -> inl_prag { inl_sat = Just ar }
- Nothing -> WARN( True, text "mkPragEnv no arity" <+> ppr n )
+ Nothing -> warnPprTrace True (text "mkPragEnv no arity" <+> ppr n) $
-- There really should be a binding for every INLINE pragma
inl_prag
| otherwise
diff --git a/compiler/GHC/Tc/Gen/Splice.hs b/compiler/GHC/Tc/Gen/Splice.hs
index 8748fd3786..3c0c85f7c4 100644
--- a/compiler/GHC/Tc/Gen/Splice.hs
+++ b/compiler/GHC/Tc/Gen/Splice.hs
@@ -30,8 +30,6 @@ module GHC.Tc.Gen.Splice(
finishTH, runTopSplice
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Errors
diff --git a/compiler/GHC/Tc/Instance/Class.hs b/compiler/GHC/Tc/Instance/Class.hs
index 84b523eb93..9ba131873b 100644
--- a/compiler/GHC/Tc/Instance/Class.hs
+++ b/compiler/GHC/Tc/Instance/Class.hs
@@ -9,8 +9,6 @@ module GHC.Tc.Instance.Class (
AssocInstInfo(..), isNotAssociated
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Session
diff --git a/compiler/GHC/Tc/Instance/Family.hs b/compiler/GHC/Tc/Instance/Family.hs
index ffd2f84f80..8e4181d969 100644
--- a/compiler/GHC/Tc/Instance/Family.hs
+++ b/compiler/GHC/Tc/Instance/Family.hs
@@ -62,8 +62,6 @@ import Data.Function ( on )
import qualified GHC.LanguageExtensions as LangExt
-#include "HsVersions.h"
-
{- Note [The type family instance consistency story]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/compiler/GHC/Tc/Instance/FunDeps.hs b/compiler/GHC/Tc/Instance/FunDeps.hs
index c3bf31fed3..f5b5b7b4eb 100644
--- a/compiler/GHC/Tc/Instance/FunDeps.hs
+++ b/compiler/GHC/Tc/Instance/FunDeps.hs
@@ -21,8 +21,6 @@ module GHC.Tc.Instance.FunDeps
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Types.Name
diff --git a/compiler/GHC/Tc/Instance/Typeable.hs b/compiler/GHC/Tc/Instance/Typeable.hs
index 0de6ec4e78..193ee75009 100644
--- a/compiler/GHC/Tc/Instance/Typeable.hs
+++ b/compiler/GHC/Tc/Instance/Typeable.hs
@@ -10,8 +10,6 @@
module GHC.Tc.Instance.Typeable(mkTypeableBinds, tyConIsTypeable) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
diff --git a/compiler/GHC/Tc/Module.hs b/compiler/GHC/Tc/Module.hs
index 72b588a921..5e3f0b3501 100644
--- a/compiler/GHC/Tc/Module.hs
+++ b/compiler/GHC/Tc/Module.hs
@@ -179,8 +179,6 @@ import qualified Data.Set as S
import Control.DeepSeq
import Control.Monad
-#include "HsVersions.h"
-
{-
************************************************************************
* *
diff --git a/compiler/GHC/Tc/Solver.hs b/compiler/GHC/Tc/Solver.hs
index 373483b5d7..31d6eabe41 100644
--- a/compiler/GHC/Tc/Solver.hs
+++ b/compiler/GHC/Tc/Solver.hs
@@ -26,8 +26,6 @@ module GHC.Tc.Solver(
approximateWC, runTcSDeriveds
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Data.Bag
diff --git a/compiler/GHC/Tc/Solver/Canonical.hs b/compiler/GHC/Tc/Solver/Canonical.hs
index 9e47c6ce8d..f0b4e9deb2 100644
--- a/compiler/GHC/Tc/Solver/Canonical.hs
+++ b/compiler/GHC/Tc/Solver/Canonical.hs
@@ -10,8 +10,6 @@ module GHC.Tc.Solver.Canonical(
solveCallStack -- For GHC.Tc.Solver
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Tc.Types.Constraint
diff --git a/compiler/GHC/Tc/Solver/Interact.hs b/compiler/GHC/Tc/Solver/Interact.hs
index 9ccdc5bc60..b28e88412c 100644
--- a/compiler/GHC/Tc/Solver/Interact.hs
+++ b/compiler/GHC/Tc/Solver/Interact.hs
@@ -8,8 +8,6 @@ module GHC.Tc.Solver.Interact (
solveSimpleWanteds, -- Solves Cts
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Types.Basic ( SwapFlag(..),
infinity, IntWithInf, intGtLimit )
diff --git a/compiler/GHC/Tc/Solver/Monad.hs b/compiler/GHC/Tc/Solver/Monad.hs
index cf116996d5..3428e811ad 100644
--- a/compiler/GHC/Tc/Solver/Monad.hs
+++ b/compiler/GHC/Tc/Solver/Monad.hs
@@ -133,8 +133,6 @@ module GHC.Tc.Solver.Monad (
breakTyVarCycle, rewriterView
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Env
diff --git a/compiler/GHC/Tc/Solver/Rewrite.hs b/compiler/GHC/Tc/Solver/Rewrite.hs
index 2c95f78f6d..b9e6a997bb 100644
--- a/compiler/GHC/Tc/Solver/Rewrite.hs
+++ b/compiler/GHC/Tc/Solver/Rewrite.hs
@@ -9,8 +9,6 @@ module GHC.Tc.Solver.Rewrite(
rewriteType
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Core.TyCo.Ppr ( pprTyVar )
diff --git a/compiler/GHC/Tc/TyCl.hs b/compiler/GHC/Tc/TyCl.hs
index 800e240f4e..6f41870632 100644
--- a/compiler/GHC/Tc/TyCl.hs
+++ b/compiler/GHC/Tc/TyCl.hs
@@ -25,8 +25,6 @@ module GHC.Tc.TyCl (
wrongKindOfFamily
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Env
diff --git a/compiler/GHC/Tc/TyCl/Build.hs b/compiler/GHC/Tc/TyCl/Build.hs
index 4e877471bb..8c370ce87c 100644
--- a/compiler/GHC/Tc/TyCl/Build.hs
+++ b/compiler/GHC/Tc/TyCl/Build.hs
@@ -15,8 +15,6 @@ module GHC.Tc.TyCl.Build (
newImplicitBinder, newTyConRepName
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Iface.Env
diff --git a/compiler/GHC/Tc/TyCl/Class.hs b/compiler/GHC/Tc/TyCl/Class.hs
index ea09c89ddb..05565c8467 100644
--- a/compiler/GHC/Tc/TyCl/Class.hs
+++ b/compiler/GHC/Tc/TyCl/Class.hs
@@ -27,8 +27,6 @@ module GHC.Tc.TyCl.Class
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Hs
diff --git a/compiler/GHC/Tc/TyCl/Instance.hs b/compiler/GHC/Tc/TyCl/Instance.hs
index 8a80baaa90..5bd1521113 100644
--- a/compiler/GHC/Tc/TyCl/Instance.hs
+++ b/compiler/GHC/Tc/TyCl/Instance.hs
@@ -19,8 +19,6 @@ module GHC.Tc.TyCl.Instance
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Hs
diff --git a/compiler/GHC/Tc/TyCl/PatSyn.hs b/compiler/GHC/Tc/TyCl/PatSyn.hs
index 660b0da6da..400a4d770a 100644
--- a/compiler/GHC/Tc/TyCl/PatSyn.hs
+++ b/compiler/GHC/Tc/TyCl/PatSyn.hs
@@ -65,8 +65,6 @@ import Data.Maybe( mapMaybe )
import Control.Monad ( zipWithM )
import Data.List( partition, mapAccumL )
-#include "HsVersions.h"
-
{-
************************************************************************
* *
diff --git a/compiler/GHC/Tc/TyCl/Utils.hs b/compiler/GHC/Tc/TyCl/Utils.hs
index 02c681926f..4c47d6d706 100644
--- a/compiler/GHC/Tc/TyCl/Utils.hs
+++ b/compiler/GHC/Tc/TyCl/Utils.hs
@@ -27,8 +27,6 @@ module GHC.Tc.TyCl.Utils(
tcRecSelBinds, mkRecSelBinds, mkOneRecordSelector
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Tc.Utils.Monad
diff --git a/compiler/GHC/Tc/Types.hs b/compiler/GHC/Tc/Types.hs
index 3156a581e8..dcaa4509e5 100644
--- a/compiler/GHC/Tc/Types.hs
+++ b/compiler/GHC/Tc/Types.hs
@@ -87,8 +87,6 @@ module GHC.Tc.Types(
TcRnMessage
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
diff --git a/compiler/GHC/Tc/Types/Constraint.hs b/compiler/GHC/Tc/Types/Constraint.hs
index 2cff342eee..76a51f0f5e 100644
--- a/compiler/GHC/Tc/Types/Constraint.hs
+++ b/compiler/GHC/Tc/Types/Constraint.hs
@@ -70,8 +70,6 @@ module GHC.Tc.Types.Constraint (
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import {-# SOURCE #-} GHC.Tc.Types ( TcLclEnv, setLclEnvTcLevel, getLclEnvTcLevel
diff --git a/compiler/GHC/Tc/Types/Evidence.hs b/compiler/GHC/Tc/Types/Evidence.hs
index a6dfc4e5f8..e851797f7a 100644
--- a/compiler/GHC/Tc/Types/Evidence.hs
+++ b/compiler/GHC/Tc/Types/Evidence.hs
@@ -60,7 +60,6 @@ module GHC.Tc.Types.Evidence (
-- * QuoteWrapper
QuoteWrapper(..), applyQuoteWrapper, quoteWrapperTyVarTy
) where
-#include "HsVersions.h"
import GHC.Prelude
diff --git a/compiler/GHC/Tc/Types/Origin.hs b/compiler/GHC/Tc/Types/Origin.hs
index b386c65a39..a8263d4c2d 100644
--- a/compiler/GHC/Tc/Types/Origin.hs
+++ b/compiler/GHC/Tc/Types/Origin.hs
@@ -22,8 +22,6 @@ module GHC.Tc.Types.Origin (
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Tc.Utils.TcType
@@ -287,7 +285,7 @@ pprSkolInfo RuntimeUnkSkol = text "Unknown type from GHCi runtime"
-- UnkSkol
-- For type variables the others are dealt with by pprSkolTvBinding.
-- For Insts, these cases should not happen
-pprSkolInfo UnkSkol = WARN( True, text "pprSkolInfo: UnkSkol" ) text "UnkSkol"
+pprSkolInfo UnkSkol = warnPprTrace True (text "pprSkolInfo: UnkSkol") $ text "UnkSkol"
pprSigSkolInfo :: UserTypeCtxt -> TcType -> SDoc
-- The type is already tidied
diff --git a/compiler/GHC/Tc/Utils/Backpack.hs b/compiler/GHC/Tc/Utils/Backpack.hs
index 592b3a64ac..ef2f4e3cb5 100644
--- a/compiler/GHC/Tc/Utils/Backpack.hs
+++ b/compiler/GHC/Tc/Utils/Backpack.hs
@@ -89,8 +89,6 @@ import Data.List (find)
import {-# SOURCE #-} GHC.Tc.Module
-#include "HsVersions.h"
-
fixityMisMatch :: TyThing -> Fixity -> Fixity -> SDoc
fixityMisMatch real_thing real_fixity sig_fixity =
vcat [ppr real_thing <+> text "has conflicting fixities in the module",
diff --git a/compiler/GHC/Tc/Utils/Env.hs b/compiler/GHC/Tc/Utils/Env.hs
index cf0f1b706b..7c809a752d 100644
--- a/compiler/GHC/Tc/Utils/Env.hs
+++ b/compiler/GHC/Tc/Utils/Env.hs
@@ -70,8 +70,6 @@ module GHC.Tc.Utils.Env(
mkWrapperName
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Env
diff --git a/compiler/GHC/Tc/Utils/Instantiate.hs b/compiler/GHC/Tc/Utils/Instantiate.hs
index 7edaab0e42..e3dcd8c5fd 100644
--- a/compiler/GHC/Tc/Utils/Instantiate.hs
+++ b/compiler/GHC/Tc/Utils/Instantiate.hs
@@ -38,8 +38,6 @@ module GHC.Tc.Utils.Instantiate (
tyCoVarsOfCt, tyCoVarsOfCts,
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Session
diff --git a/compiler/GHC/Tc/Utils/Monad.hs b/compiler/GHC/Tc/Utils/Monad.hs
index aea13efbc0..46dd001960 100644
--- a/compiler/GHC/Tc/Utils/Monad.hs
+++ b/compiler/GHC/Tc/Utils/Monad.hs
@@ -148,8 +148,6 @@ module GHC.Tc.Utils.Monad(
module GHC.Data.IOEnv
) where
-#include "HsVersions.h"
-
import GHC.Prelude
diff --git a/compiler/GHC/Tc/Utils/TcMType.hs b/compiler/GHC/Tc/Utils/TcMType.hs
index 00b16f8380..360ffbc8ba 100644
--- a/compiler/GHC/Tc/Utils/TcMType.hs
+++ b/compiler/GHC/Tc/Utils/TcMType.hs
@@ -96,8 +96,6 @@ module GHC.Tc.Utils.TcMType (
ensureNotLevPoly, checkForLevPoly, checkForLevPolyX, formatLevPolyErr
) where
-#include "HsVersions.h"
-
-- friends:
import GHC.Prelude
@@ -1894,7 +1892,7 @@ skolemiseUnboundMetaTyVar tv
do { cts <- readMetaTyVar tv
; case cts of
Flexi -> return ()
- Indirect ty -> WARN( True, ppr tv $$ ppr ty )
+ Indirect ty -> warnPprTrace True (ppr tv $$ ppr ty) $
return () }
{- Note [Error on unconstrained meta-variables]
diff --git a/compiler/GHC/Tc/Utils/TcType.hs b/compiler/GHC/Tc/Utils/TcType.hs
index bebc370d39..b0b49be7be 100644
--- a/compiler/GHC/Tc/Utils/TcType.hs
+++ b/compiler/GHC/Tc/Utils/TcType.hs
@@ -193,8 +193,6 @@ module GHC.Tc.Utils.TcType (
) where
-#include "HsVersions.h"
-
-- friends:
import GHC.Prelude
diff --git a/compiler/GHC/Tc/Utils/Unify.hs b/compiler/GHC/Tc/Utils/Unify.hs
index 76d0418eef..4e72cbf61d 100644
--- a/compiler/GHC/Tc/Utils/Unify.hs
+++ b/compiler/GHC/Tc/Utils/Unify.hs
@@ -41,8 +41,6 @@ module GHC.Tc.Utils.Unify (
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Hs
diff --git a/compiler/GHC/Tc/Utils/Zonk.hs b/compiler/GHC/Tc/Utils/Zonk.hs
index e2fe09991f..4ff7e175a8 100644
--- a/compiler/GHC/Tc/Utils/Zonk.hs
+++ b/compiler/GHC/Tc/Utils/Zonk.hs
@@ -43,8 +43,6 @@ module GHC.Tc.Utils.Zonk (
lookupTyVarOcc
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform
diff --git a/compiler/GHC/Tc/Validity.hs b/compiler/GHC/Tc/Validity.hs
index 0605926d94..25828a7f11 100644
--- a/compiler/GHC/Tc/Validity.hs
+++ b/compiler/GHC/Tc/Validity.hs
@@ -20,8 +20,6 @@ module GHC.Tc.Validity (
allDistinctTyVars
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Data.Maybe
diff --git a/compiler/GHC/Types/Avail.hs b/compiler/GHC/Types/Avail.hs
index 7c033a9863..897cfcc39f 100644
--- a/compiler/GHC/Types/Avail.hs
+++ b/compiler/GHC/Types/Avail.hs
@@ -4,8 +4,6 @@
-- (c) The University of Glasgow
--
-#include "HsVersions.h"
-
module GHC.Types.Avail (
Avails,
AvailInfo(..),
diff --git a/compiler/GHC/Types/Demand.hs b/compiler/GHC/Types/Demand.hs
index c4e25a1a47..52cca60cfb 100644
--- a/compiler/GHC/Types/Demand.hs
+++ b/compiler/GHC/Types/Demand.hs
@@ -77,8 +77,6 @@ module GHC.Types.Demand (
zapUsageDemand, zapDmdEnvSig, zapUsedOnceDemand, zapUsedOnceSig
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Types.Var ( Var, Id )
diff --git a/compiler/GHC/Types/Id.hs b/compiler/GHC/Types/Id.hs
index 172f9f4d18..e4c0432500 100644
--- a/compiler/GHC/Types/Id.hs
+++ b/compiler/GHC/Types/Id.hs
@@ -121,8 +121,6 @@ module GHC.Types.Id (
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Core ( CoreRule, isStableUnfolding, evaldUnfolding,
@@ -629,10 +627,10 @@ idJoinArity :: JoinId -> JoinArity
idJoinArity id = isJoinId_maybe id `orElse` pprPanic "idJoinArity" (ppr id)
asJoinId :: Id -> JoinArity -> JoinId
-asJoinId id arity = WARN(not (isLocalId id),
- text "global id being marked as join var:" <+> ppr id)
- WARN(not (is_vanilla_or_join id),
- ppr id <+> pprIdDetails (idDetails id))
+asJoinId id arity = warnPprTrace (not (isLocalId id))
+ (text "global id being marked as join var:" <+> ppr id) $
+ warnPprTrace (not (is_vanilla_or_join id))
+ (ppr id <+> pprIdDetails (idDetails id)) $
id `setIdDetails` JoinId arity
where
is_vanilla_or_join id = case Var.idDetails id of
diff --git a/compiler/GHC/Types/Id/Info.hs b/compiler/GHC/Types/Id/Info.hs
index f02409d03c..602a22823e 100644
--- a/compiler/GHC/Types/Id/Info.hs
+++ b/compiler/GHC/Types/Id/Info.hs
@@ -87,8 +87,6 @@ module GHC.Types.Id.Info (
isNeverLevPolyIdInfo
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Core hiding( hasCoreUnfolding )
diff --git a/compiler/GHC/Types/Id/Make.hs b/compiler/GHC/Types/Id/Make.hs
index d87db65f0f..86f68f04dc 100644
--- a/compiler/GHC/Types/Id/Make.hs
+++ b/compiler/GHC/Types/Id/Make.hs
@@ -38,8 +38,6 @@ module GHC.Types.Id.Make (
module GHC.Core.Opt.ConstantFold
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Builtin.Types.Prim
diff --git a/compiler/GHC/Types/Literal.hs b/compiler/GHC/Types/Literal.hs
index 4552f45bf8..51b88994fa 100644
--- a/compiler/GHC/Types/Literal.hs
+++ b/compiler/GHC/Types/Literal.hs
@@ -63,8 +63,6 @@ module GHC.Types.Literal
, nullAddrLit, floatToDoubleLit, doubleToFloatLit
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Builtin.Types.Prim
diff --git a/compiler/GHC/Types/Name/Cache.hs b/compiler/GHC/Types/Name/Cache.hs
index d1ba2b54d4..f1c62c0e56 100644
--- a/compiler/GHC/Types/Name/Cache.hs
+++ b/compiler/GHC/Types/Name/Cache.hs
@@ -31,8 +31,6 @@ import GHC.Utils.Panic
import Control.Concurrent.MVar
import Control.Monad
-#include "HsVersions.h"
-
{-
Note [The Name Cache]
diff --git a/compiler/GHC/Types/Name/Env.hs b/compiler/GHC/Types/Name/Env.hs
index 509ea5f7bb..854f7706fe 100644
--- a/compiler/GHC/Types/Name/Env.hs
+++ b/compiler/GHC/Types/Name/Env.hs
@@ -35,8 +35,6 @@ module GHC.Types.Name.Env (
depAnal
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Data.Graph.Directed
diff --git a/compiler/GHC/Types/Name/Ppr.hs b/compiler/GHC/Types/Name/Ppr.hs
index ac19547738..0ed83cdce7 100644
--- a/compiler/GHC/Types/Name/Ppr.hs
+++ b/compiler/GHC/Types/Name/Ppr.hs
@@ -8,8 +8,6 @@ module GHC.Types.Name.Ppr
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Unit
diff --git a/compiler/GHC/Types/Name/Reader.hs b/compiler/GHC/Types/Name/Reader.hs
index bdf2eae770..9571fc17b1 100644
--- a/compiler/GHC/Types/Name/Reader.hs
+++ b/compiler/GHC/Types/Name/Reader.hs
@@ -77,8 +77,6 @@ module GHC.Types.Name.Reader (
opIsAt,
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Unit.Module
diff --git a/compiler/GHC/Types/Name/Set.hs b/compiler/GHC/Types/Name/Set.hs
index 218f796c6c..426b363ee7 100644
--- a/compiler/GHC/Types/Name/Set.hs
+++ b/compiler/GHC/Types/Name/Set.hs
@@ -35,8 +35,6 @@ module GHC.Types.Name.Set (
NonCaffySet(..)
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Types.Name
diff --git a/compiler/GHC/Types/Name/Shape.hs b/compiler/GHC/Types/Name/Shape.hs
index c65124d51c..aca51faaab 100644
--- a/compiler/GHC/Types/Name/Shape.hs
+++ b/compiler/GHC/Types/Name/Shape.hs
@@ -11,8 +11,6 @@ module GHC.Types.Name.Shape
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Env
diff --git a/compiler/GHC/Types/RepType.hs b/compiler/GHC/Types/RepType.hs
index de7b36583b..28df42c4ca 100644
--- a/compiler/GHC/Types/RepType.hs
+++ b/compiler/GHC/Types/RepType.hs
@@ -21,8 +21,6 @@ module GHC.Types.RepType
slotPrimRep, primRepSlot
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Types.Basic (Arity, RepArity)
diff --git a/compiler/GHC/Types/TyThing/Ppr.hs b/compiler/GHC/Types/TyThing/Ppr.hs
index b4084f9bf8..6b30a9c7b1 100644
--- a/compiler/GHC/Types/TyThing/Ppr.hs
+++ b/compiler/GHC/Types/TyThing/Ppr.hs
@@ -16,8 +16,6 @@ module GHC.Types.TyThing.Ppr (
pprFamInst
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Ppr (warnPprTrace)
@@ -187,7 +185,7 @@ pprTyThing ss ty_thing
= case nameModule_maybe name of
Just mod -> Just $ \occ -> getPprStyle $ \sty ->
pprModulePrefix sty mod occ <> ppr occ
- Nothing -> WARN( True, ppr name ) Nothing
+ Nothing -> warnPprTrace True (ppr name) Nothing
-- Nothing is unexpected here; TyThings have External names
showWithLoc :: SDoc -> SDoc -> SDoc
diff --git a/compiler/GHC/Types/Unique.hs b/compiler/GHC/Types/Unique.hs
index b74119caa3..5dffb1bbc8 100644
--- a/compiler/GHC/Types/Unique.hs
+++ b/compiler/GHC/Types/Unique.hs
@@ -45,7 +45,6 @@ module GHC.Types.Unique (
mkLocalUnique, minLocalUnique, maxLocalUnique,
) where
-#include "HsVersions.h"
#include "Unique.h"
import GHC.Prelude
diff --git a/compiler/GHC/Types/Unique/FM.hs b/compiler/GHC/Types/Unique/FM.hs
index 27371d0647..07aa675d3b 100644
--- a/compiler/GHC/Types/Unique/FM.hs
+++ b/compiler/GHC/Types/Unique/FM.hs
@@ -77,8 +77,6 @@ module GHC.Types.Unique.FM (
pprUniqFM, pprUFM, pprUFMWithKeys, pluralUFM
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Types.Unique ( Uniquable(..), Unique, getKey )
diff --git a/compiler/GHC/Types/Unique/Supply.hs b/compiler/GHC/Types/Unique/Supply.hs
index c477177f09..e2ecb16355 100644
--- a/compiler/GHC/Types/Unique/Supply.hs
+++ b/compiler/GHC/Types/Unique/Supply.hs
@@ -47,7 +47,6 @@ import GHC.Exts( Int(..), word2Int#, fetchAddWordAddr#, plusWord#, readWordOffAd
import Foreign.Storable
#include "Unique.h"
-#include "HsVersions.h"
{-
************************************************************************
diff --git a/compiler/GHC/Types/Var.hs b/compiler/GHC/Types/Var.hs
index f00ad29256..be860ef2c3 100644
--- a/compiler/GHC/Types/Var.hs
+++ b/compiler/GHC/Types/Var.hs
@@ -95,8 +95,6 @@ module GHC.Types.Var (
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import {-# SOURCE #-} GHC.Core.TyCo.Rep( Type, Kind, Mult )
diff --git a/compiler/GHC/Types/Var/Set.hs b/compiler/GHC/Types/Var/Set.hs
index b6f4663974..109f370f98 100644
--- a/compiler/GHC/Types/Var/Set.hs
+++ b/compiler/GHC/Types/Var/Set.hs
@@ -46,8 +46,6 @@ module GHC.Types.Var.Set (
dVarSetToVarSet,
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Types.Var ( Var, TyVar, CoVar, TyCoVar, Id )
diff --git a/compiler/GHC/Unit/Finder.hs b/compiler/GHC/Unit/Finder.hs
index 903fd27891..4f0ec1030b 100644
--- a/compiler/GHC/Unit/Finder.hs
+++ b/compiler/GHC/Unit/Finder.hs
@@ -32,8 +32,6 @@ module GHC.Unit.Finder (
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Session
diff --git a/compiler/GHC/Unit/Info.hs b/compiler/GHC/Unit/Info.hs
index f88a9ea94b..b112bd7fee 100644
--- a/compiler/GHC/Unit/Info.hs
+++ b/compiler/GHC/Unit/Info.hs
@@ -29,8 +29,6 @@ module GHC.Unit.Info
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Platform.Ways
diff --git a/compiler/GHC/Unit/State.hs b/compiler/GHC/Unit/State.hs
index 9e154152d7..5ae835bc51 100644
--- a/compiler/GHC/Unit/State.hs
+++ b/compiler/GHC/Unit/State.hs
@@ -69,8 +69,6 @@ module GHC.Unit.State (
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Session
diff --git a/compiler/GHC/Utils/Binary.hs b/compiler/GHC/Utils/Binary.hs
index 37b303a3cd..24122488a3 100644
--- a/compiler/GHC/Utils/Binary.hs
+++ b/compiler/GHC/Utils/Binary.hs
@@ -72,8 +72,6 @@ module GHC.Utils.Binary
putDictionary, getDictionary, putFS,
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import {-# SOURCE #-} GHC.Types.Name (Name)
diff --git a/compiler/GHC/Utils/Binary/Typeable.hs b/compiler/GHC/Utils/Binary/Typeable.hs
index 636733357a..b0f4833cbf 100644
--- a/compiler/GHC/Utils/Binary/Typeable.hs
+++ b/compiler/GHC/Utils/Binary/Typeable.hs
@@ -15,8 +15,6 @@ module GHC.Utils.Binary.Typeable
)
where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Utils.Binary
diff --git a/compiler/GHC/Utils/Error.hs b/compiler/GHC/Utils/Error.hs
index 2692b30acb..4f681861c2 100644
--- a/compiler/GHC/Utils/Error.hs
+++ b/compiler/GHC/Utils/Error.hs
@@ -61,8 +61,6 @@ module GHC.Utils.Error (
sortMsgBag
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Driver.Session
diff --git a/compiler/GHC/Utils/Fingerprint.hs b/compiler/GHC/Utils/Fingerprint.hs
index b8c2091135..c52dc4ed94 100644
--- a/compiler/GHC/Utils/Fingerprint.hs
+++ b/compiler/GHC/Utils/Fingerprint.hs
@@ -22,8 +22,6 @@ module GHC.Utils.Fingerprint (
getFileHash
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import Foreign
diff --git a/compiler/GHC/Utils/IO/Unsafe.hs b/compiler/GHC/Utils/IO/Unsafe.hs
index 27efe373f7..40872d43b9 100644
--- a/compiler/GHC/Utils/IO/Unsafe.hs
+++ b/compiler/GHC/Utils/IO/Unsafe.hs
@@ -9,8 +9,6 @@ module GHC.Utils.IO.Unsafe
)
where
-#include "HsVersions.h"
-
import GHC.Prelude ()
import GHC.Exts
diff --git a/compiler/GHC/Utils/Misc.hs b/compiler/GHC/Utils/Misc.hs
index 5629b339b9..8dde1c7296 100644
--- a/compiler/GHC/Utils/Misc.hs
+++ b/compiler/GHC/Utils/Misc.hs
@@ -127,8 +127,6 @@ module GHC.Utils.Misc (
overrideWith,
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Utils.Exception
@@ -539,7 +537,7 @@ isIn msg x ys
elem100 :: Eq a => Int -> a -> [a] -> Bool
elem100 _ _ [] = False
elem100 i x (y:ys)
- | i > 100 = WARN(True, text ("Over-long elem in " ++ msg)) (x `elem` (y:ys))
+ | i > 100 = warnPprTrace True (text ("Over-long elem in " ++ msg)) (x `elem` (y:ys))
| otherwise = x == y || elem100 (i + 1) x ys
isn'tIn msg x ys
@@ -548,7 +546,7 @@ isn'tIn msg x ys
notElem100 :: Eq a => Int -> a -> [a] -> Bool
notElem100 _ _ [] = True
notElem100 i x (y:ys)
- | i > 100 = WARN(True, text ("Over-long notElem in " ++ msg)) (x `notElem` (y:ys))
+ | i > 100 = warnPprTrace True (text ("Over-long notElem in " ++ msg)) (x `notElem` (y:ys))
| otherwise = x /= y && notElem100 (i + 1) x ys
# endif /* DEBUG */
diff --git a/compiler/GHC/Utils/Panic/Plain.hs b/compiler/GHC/Utils/Panic/Plain.hs
index 048fdf23b1..a058f0e0b3 100644
--- a/compiler/GHC/Utils/Panic/Plain.hs
+++ b/compiler/GHC/Utils/Panic/Plain.hs
@@ -26,8 +26,6 @@ module GHC.Utils.Panic.Plain
, progName
) where
-#include "HsVersions.h"
-
import GHC.Settings.Config
import GHC.Utils.Constants
import GHC.Utils.Exception as Exception
diff --git a/compiler/HsVersions.h b/compiler/HsVersions.h
deleted file mode 100644
index 10cc152ea1..0000000000
--- a/compiler/HsVersions.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#pragma once
-
-#if 0
-
-IMPORTANT! If you put extra tabs/spaces in these macro definitions,
-you will screw up the layout where they are used in case expressions!
-
-(This is cpp-dependent, of course)
-
-#endif
-
-#define ASSERT(e) if debugIsOn && not (e) then (assertPanic __FILE__ __LINE__) else
-#define ASSERT2(e,msg) if debugIsOn && not (e) then (assertPprPanic (msg)) else
-#define WARN( e, msg ) (warnPprTrace (e) (msg)) $
-
--- Examples: Assuming flagSet :: String -> m Bool
---
--- do { c <- getChar; MASSERT( isUpper c ); ... }
--- do { c <- getChar; MASSERT2( isUpper c, text "Bad" ); ... }
--- do { str <- getStr; ASSERTM( flagSet str ); .. }
--- do { str <- getStr; ASSERTM2( flagSet str, text "Bad" ); .. }
-#define MASSERT(e) ASSERT(e) return ()
-#define MASSERT2(e,msg) ASSERT2(e,msg) return ()
-#define ASSERTM(e) do { bool <- e; MASSERT(bool) }
-#define ASSERTM2(e,msg) do { bool <- e; MASSERT2(bool,msg) }
diff --git a/compiler/Language/Haskell/Syntax/Expr.hs b/compiler/Language/Haskell/Syntax/Expr.hs
index bc60b30e38..722c8f2ccb 100644
--- a/compiler/Language/Haskell/Syntax/Expr.hs
+++ b/compiler/Language/Haskell/Syntax/Expr.hs
@@ -23,9 +23,6 @@
-- | Abstract Haskell syntax for expressions.
module Language.Haskell.Syntax.Expr where
-#include "HsVersions.h"
-
--- friends:
import GHC.Prelude
import Language.Haskell.Syntax.Decls
diff --git a/compiler/Language/Haskell/Syntax/Lit.hs b/compiler/Language/Haskell/Syntax/Lit.hs
index 1cdcfe8779..568f885011 100644
--- a/compiler/Language/Haskell/Syntax/Lit.hs
+++ b/compiler/Language/Haskell/Syntax/Lit.hs
@@ -18,8 +18,6 @@
-- | Source-language literals
module Language.Haskell.Syntax.Lit where
-#include "HsVersions.h"
-
import GHC.Prelude
import {-# SOURCE #-} Language.Haskell.Syntax.Expr ( HsExpr )
diff --git a/compiler/Language/Haskell/Syntax/Type.hs b/compiler/Language/Haskell/Syntax/Type.hs
index 66c4cb97c7..c9e19b421c 100644
--- a/compiler/Language/Haskell/Syntax/Type.hs
+++ b/compiler/Language/Haskell/Syntax/Type.hs
@@ -54,8 +54,6 @@ module Language.Haskell.Syntax.Type (
hsPatSigType,
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import {-# SOURCE #-} Language.Haskell.Syntax.Expr ( HsSplice )
diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in
index fc71a26596..1b7c8d4eb4 100644
--- a/compiler/ghc.cabal.in
+++ b/compiler/ghc.cabal.in
@@ -138,8 +138,6 @@ Library
if flag(stage3)
Include-Dirs: stage2
- Install-Includes: HsVersions.h
-
c-sources:
cbits/cutils.c
cbits/genSym.c
diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs
index 0b5076e390..8dfe49303d 100644
--- a/ghc/GHCi/UI.hs
+++ b/ghc/GHCi/UI.hs
@@ -30,8 +30,6 @@ module GHCi.UI (
ghciWelcomeMsg
) where
-#include "HsVersions.h"
-
-- GHCi
import qualified GHCi.UI.Monad as GhciMonad ( args, runStmt, runDecls' )
import GHCi.UI.Monad hiding ( args, runStmt )
@@ -99,6 +97,7 @@ import qualified GHC.Linker.Loader as Loader
import GHC.Data.Maybe ( orElse, expectJust )
import GHC.Types.Name.Set
import GHC.Utils.Panic hiding ( showException, try )
+import GHC.Utils.Panic.Plain
import GHC.Utils.Misc
import qualified GHC.LanguageExtensions as LangExt
import GHC.Data.Bag (unitBag)
@@ -1833,7 +1832,7 @@ checkModule m = do
case GHC.moduleInfo r of
cm | Just scope <- GHC.modInfoTopLevelScope cm ->
let
- (loc, glob) = ASSERT( all isExternalName scope )
+ (loc, glob) = assert (all isExternalName scope) $
partition ((== modl) . GHC.moduleName . GHC.nameModule) scope
in
(text "global names: " <+> ppr glob) $$
@@ -2568,7 +2567,7 @@ browseModule bang modl exports_only = do
-- identifiers first. We would like to improve this; see #1799.
sorted_names = loc_sort local ++ occ_sort external
where
- (local,external) = ASSERT( all isExternalName names )
+ (local,external) = assert (all isExternalName names) $
partition ((==modl) . nameModule) names
occ_sort = sortBy (compare `on` nameOccName)
-- try to sort by src location. If the first name in our list
@@ -3764,7 +3763,7 @@ enclosingTickSpan _ (UnhelpfulSpan _) = panic "enclosingTickSpan UnhelpfulSpan"
enclosingTickSpan md (RealSrcSpan src _) = do
ticks <- getTickArray md
let line = srcSpanStartLine src
- ASSERT(inRange (bounds ticks) line) do
+ massert (inRange (bounds ticks) line)
let enclosing_spans = [ pan | (_,pan) <- ticks ! line
, realSrcSpanEnd pan >= realSrcSpanEnd src]
return . head . sortBy leftmostLargestRealSrcSpan $ enclosing_spans
@@ -4250,7 +4249,7 @@ list2 [arg] = do
let loc = GHC.srcSpanStart (GHC.nameSrcSpan name)
case loc of
RealSrcLoc l _ ->
- do tickArray <- ASSERT( isExternalName name )
+ do tickArray <- assert (isExternalName name) $
getTickArray (GHC.nameModule name)
let mb_span = findBreakByCoord (Just (GHC.srcLocFile l))
(GHC.srcLocLine l, GHC.srcLocCol l)
@@ -4552,7 +4551,7 @@ wantNameFromInterpretedModule noCanDo str and_then =
case names of
[] -> return ()
(n:_) -> do
- let modl = ASSERT( isExternalName n ) GHC.nameModule n
+ let modl = assert (isExternalName n) $ GHC.nameModule n
if not (GHC.isExternalName n)
then noCanDo n $ ppr n <>
text " is not defined in an interpreted module"
diff --git a/ghc/GHCi/UI/Monad.hs b/ghc/GHCi/UI/Monad.hs
index 11d575524f..ee6fa2f750 100644
--- a/ghc/GHCi/UI/Monad.hs
+++ b/ghc/GHCi/UI/Monad.hs
@@ -35,8 +35,6 @@ module GHCi.UI.Monad (
mkEvalWrapper
) where
-#include "HsVersions.h"
-
import GHCi.UI.Info (ModInfo)
import qualified GHC
import GHC.Driver.Monad hiding (liftIO)
diff --git a/hadrian/src/Rules/Lint.hs b/hadrian/src/Rules/Lint.hs
index ad278b60fb..c48ac51106 100644
--- a/hadrian/src/Rules/Lint.hs
+++ b/hadrian/src/Rules/Lint.hs
@@ -66,11 +66,10 @@ compiler = do
let stage1Lib = buildDir </> "stage1/lib"
let stage1Compiler = buildDir </> "stage1/compiler/build"
let machDeps = "includes/MachDeps.h"
- let hsVersions = "compiler/HsVersions.h"
let compilerDir = "compiler"
let ghcautoconf = stage1Lib </> "ghcautoconf.h"
let ghcplatform = stage1Lib </> "ghcplatform.h"
- need $ mconcat [[ghcautoconf, ghcplatform], hsIncls stage1Compiler, [machDeps, hsVersions]]
+ need $ mconcat [[ghcautoconf, ghcplatform], hsIncls stage1Compiler, [machDeps]]
let includeDirs =
[ "includes"
, stage1Lib
diff --git a/utils/haddock b/utils/haddock
-Subproject cafb48118f7c111020663776845897e225607b4
+Subproject ef2304bbff1e30fcd9306b5b211f045d608753c