compiler: introduce custom "GhcPrelude" Prelude
authorHerbert Valerio Riedel <hvr@gnu.org>
Tue, 19 Sep 2017 18:35:36 +0000 (14:35 -0400)
committerBen Gamari <ben@smart-cactus.org>
Tue, 19 Sep 2017 18:35:38 +0000 (14:35 -0400)
commitf63bc730c7ea42ca6882f8078eb86be8bf1cc6ad
tree3273e53bf00121c2a2657a9fe997283300e997e9
parent12a92fedf8b1997f2e26800929be117d54536b7e
compiler: introduce custom "GhcPrelude" Prelude

This switches the compiler/ component to get compiled with
-XNoImplicitPrelude and a `import GhcPrelude` is inserted in all
modules.

This is motivated by the upcoming "Prelude" re-export of
`Semigroup((<>))` which would cause lots of name clashes in every
modulewhich imports also `Outputable`

Reviewers: austin, goldfire, bgamari, alanz, simonmar

Reviewed By: bgamari

Subscribers: goldfire, rwbarton, thomie, mpickering, bgamari

Differential Revision: https://phabricator.haskell.org/D3989
484 files changed:
compiler/backpack/BkpSyn.hs
compiler/backpack/DriverBkp.hs
compiler/backpack/NameShape.hs
compiler/backpack/RnModIface.hs
compiler/basicTypes/Avail.hs
compiler/basicTypes/BasicTypes.hs
compiler/basicTypes/ConLike.hs
compiler/basicTypes/DataCon.hs
compiler/basicTypes/DataCon.hs-boot
compiler/basicTypes/Demand.hs
compiler/basicTypes/FieldLabel.hs
compiler/basicTypes/Id.hs
compiler/basicTypes/IdInfo.hs
compiler/basicTypes/IdInfo.hs-boot
compiler/basicTypes/Lexeme.hs
compiler/basicTypes/Literal.hs
compiler/basicTypes/MkId.hs
compiler/basicTypes/Module.hs
compiler/basicTypes/Module.hs-boot
compiler/basicTypes/Name.hs
compiler/basicTypes/Name.hs-boot
compiler/basicTypes/NameCache.hs
compiler/basicTypes/NameEnv.hs
compiler/basicTypes/NameSet.hs
compiler/basicTypes/OccName.hs
compiler/basicTypes/OccName.hs-boot
compiler/basicTypes/PatSyn.hs
compiler/basicTypes/RdrName.hs
compiler/basicTypes/SrcLoc.hs
compiler/basicTypes/UniqSupply.hs
compiler/basicTypes/Unique.hs
compiler/basicTypes/Var.hs
compiler/basicTypes/VarEnv.hs
compiler/basicTypes/VarSet.hs
compiler/cmm/Bitmap.hs
compiler/cmm/BlockId.hs
compiler/cmm/CLabel.hs
compiler/cmm/Cmm.hs
compiler/cmm/CmmBuildInfoTables.hs
compiler/cmm/CmmCallConv.hs
compiler/cmm/CmmCommonBlockElim.hs
compiler/cmm/CmmContFlowOpt.hs
compiler/cmm/CmmExpr.hs
compiler/cmm/CmmImplementSwitchPlans.hs
compiler/cmm/CmmInfo.hs
compiler/cmm/CmmLayoutStack.hs
compiler/cmm/CmmLex.x
compiler/cmm/CmmLint.hs
compiler/cmm/CmmLive.hs
compiler/cmm/CmmMachOp.hs
compiler/cmm/CmmMonad.hs
compiler/cmm/CmmNode.hs
compiler/cmm/CmmOpt.hs
compiler/cmm/CmmParse.y
compiler/cmm/CmmPipeline.hs
compiler/cmm/CmmProcPoint.hs
compiler/cmm/CmmSink.hs
compiler/cmm/CmmSwitch.hs
compiler/cmm/CmmType.hs
compiler/cmm/CmmUtils.hs
compiler/cmm/Debug.hs
compiler/cmm/Hoopl/Block.hs
compiler/cmm/Hoopl/Collections.hs
compiler/cmm/Hoopl/Dataflow.hs
compiler/cmm/Hoopl/Graph.hs
compiler/cmm/Hoopl/Label.hs
compiler/cmm/Hoopl/Unique.hs
compiler/cmm/MkGraph.hs
compiler/cmm/PprC.hs
compiler/cmm/PprCmm.hs
compiler/cmm/PprCmmDecl.hs
compiler/cmm/PprCmmExpr.hs
compiler/cmm/SMRep.hs
compiler/codeGen/CgUtils.hs
compiler/codeGen/CodeGen/Platform.hs
compiler/codeGen/CodeGen/Platform/ARM.hs
compiler/codeGen/CodeGen/Platform/ARM64.hs
compiler/codeGen/CodeGen/Platform/NoRegs.hs
compiler/codeGen/CodeGen/Platform/PPC.hs
compiler/codeGen/CodeGen/Platform/PPC_Darwin.hs
compiler/codeGen/CodeGen/Platform/SPARC.hs
compiler/codeGen/CodeGen/Platform/X86.hs
compiler/codeGen/CodeGen/Platform/X86_64.hs
compiler/codeGen/StgCmm.hs
compiler/codeGen/StgCmmArgRep.hs
compiler/codeGen/StgCmmBind.hs
compiler/codeGen/StgCmmClosure.hs
compiler/codeGen/StgCmmCon.hs
compiler/codeGen/StgCmmEnv.hs
compiler/codeGen/StgCmmExpr.hs
compiler/codeGen/StgCmmExtCode.hs
compiler/codeGen/StgCmmForeign.hs
compiler/codeGen/StgCmmHeap.hs
compiler/codeGen/StgCmmHpc.hs
compiler/codeGen/StgCmmLayout.hs
compiler/codeGen/StgCmmMonad.hs
compiler/codeGen/StgCmmPrim.hs
compiler/codeGen/StgCmmProf.hs
compiler/codeGen/StgCmmTicky.hs
compiler/codeGen/StgCmmUtils.hs
compiler/coreSyn/CoreArity.hs
compiler/coreSyn/CoreFVs.hs
compiler/coreSyn/CoreLint.hs
compiler/coreSyn/CoreOpt.hs
compiler/coreSyn/CorePrep.hs
compiler/coreSyn/CoreSeq.hs
compiler/coreSyn/CoreStats.hs
compiler/coreSyn/CoreSubst.hs
compiler/coreSyn/CoreSyn.hs
compiler/coreSyn/CoreTidy.hs
compiler/coreSyn/CoreUnfold.hs
compiler/coreSyn/CoreUtils.hs
compiler/coreSyn/MkCore.hs
compiler/coreSyn/PprCore.hs
compiler/coreSyn/TrieMap.hs
compiler/deSugar/Check.hs
compiler/deSugar/Coverage.hs
compiler/deSugar/Desugar.hs
compiler/deSugar/DsArrows.hs
compiler/deSugar/DsBinds.hs
compiler/deSugar/DsCCall.hs
compiler/deSugar/DsExpr.hs
compiler/deSugar/DsForeign.hs
compiler/deSugar/DsGRHSs.hs
compiler/deSugar/DsListComp.hs
compiler/deSugar/DsMeta.hs
compiler/deSugar/DsMonad.hs
compiler/deSugar/DsUsage.hs
compiler/deSugar/DsUtils.hs
compiler/deSugar/Match.hs
compiler/deSugar/Match.hs-boot
compiler/deSugar/MatchCon.hs
compiler/deSugar/MatchLit.hs
compiler/deSugar/PmExpr.hs
compiler/deSugar/TmOracle.hs
compiler/ghc.cabal.in
compiler/ghc.mk
compiler/ghci/ByteCodeAsm.hs
compiler/ghci/ByteCodeGen.hs
compiler/ghci/ByteCodeInstr.hs
compiler/ghci/ByteCodeItbls.hs
compiler/ghci/ByteCodeLink.hs
compiler/ghci/ByteCodeTypes.hs
compiler/ghci/Debugger.hs
compiler/ghci/DebuggerUtils.hs
compiler/ghci/GHCi.hs
compiler/ghci/Linker.hs
compiler/ghci/RtClosureInspect.hs
compiler/hsSyn/Convert.hs
compiler/hsSyn/HsBinds.hs
compiler/hsSyn/HsDecls.hs
compiler/hsSyn/HsDoc.hs
compiler/hsSyn/HsDumpAst.hs
compiler/hsSyn/HsExpr.hs
compiler/hsSyn/HsExtension.hs
compiler/hsSyn/HsImpExp.hs
compiler/hsSyn/HsLit.hs
compiler/hsSyn/HsPat.hs
compiler/hsSyn/HsSyn.hs
compiler/hsSyn/HsTypes.hs
compiler/hsSyn/HsUtils.hs
compiler/hsSyn/PlaceHolder.hs
compiler/iface/BinFingerprint.hs
compiler/iface/BinIface.hs
compiler/iface/BuildTyCl.hs
compiler/iface/FlagChecker.hs
compiler/iface/IfaceEnv.hs
compiler/iface/IfaceSyn.hs
compiler/iface/IfaceType.hs
compiler/iface/LoadIface.hs
compiler/iface/MkIface.hs
compiler/iface/TcIface.hs
compiler/iface/TcIface.hs-boot
compiler/iface/ToIface.hs
compiler/llvmGen/Llvm/AbsSyn.hs
compiler/llvmGen/Llvm/MetaData.hs
compiler/llvmGen/Llvm/PpLlvm.hs
compiler/llvmGen/Llvm/Types.hs
compiler/llvmGen/LlvmCodeGen.hs
compiler/llvmGen/LlvmCodeGen/Base.hs
compiler/llvmGen/LlvmCodeGen/CodeGen.hs
compiler/llvmGen/LlvmCodeGen/Data.hs
compiler/llvmGen/LlvmCodeGen/Ppr.hs
compiler/llvmGen/LlvmCodeGen/Regs.hs
compiler/llvmGen/LlvmMangler.hs
compiler/main/Annotations.hs
compiler/main/Ar.hs
compiler/main/CmdLineParser.hs
compiler/main/CodeOutput.hs
compiler/main/Constants.hs
compiler/main/DriverMkDepend.hs
compiler/main/DriverPhases.hs
compiler/main/DriverPipeline.hs
compiler/main/DynFlags.hs
compiler/main/DynFlags.hs-boot
compiler/main/DynamicLoading.hs
compiler/main/Elf.hs
compiler/main/ErrUtils.hs
compiler/main/ErrUtils.hs-boot
compiler/main/FileCleanup.hs
compiler/main/Finder.hs
compiler/main/GHC.hs
compiler/main/GhcMake.hs
compiler/main/GhcMonad.hs
compiler/main/HeaderInfo.hs
compiler/main/Hooks.hs
compiler/main/Hooks.hs-boot
compiler/main/HscMain.hs
compiler/main/HscStats.hs
compiler/main/HscTypes.hs
compiler/main/InteractiveEval.hs
compiler/main/InteractiveEvalTypes.hs
compiler/main/PackageConfig.hs
compiler/main/Packages.hs
compiler/main/Packages.hs-boot
compiler/main/PipelineMonad.hs
compiler/main/PlatformConstants.hs
compiler/main/Plugins.hs
compiler/main/PprTyThing.hs
compiler/main/StaticPtrTable.hs
compiler/main/SysTools.hs
compiler/main/SysTools/Terminal.hs
compiler/main/TidyPgm.hs
compiler/nativeGen/AsmCodeGen.hs
compiler/nativeGen/CPrim.hs
compiler/nativeGen/Dwarf.hs
compiler/nativeGen/Dwarf/Constants.hs
compiler/nativeGen/Dwarf/Types.hs
compiler/nativeGen/Format.hs
compiler/nativeGen/Instruction.hs
compiler/nativeGen/NCGMonad.hs
compiler/nativeGen/PIC.hs
compiler/nativeGen/PPC/CodeGen.hs
compiler/nativeGen/PPC/Cond.hs
compiler/nativeGen/PPC/Instr.hs
compiler/nativeGen/PPC/Ppr.hs
compiler/nativeGen/PPC/RegInfo.hs
compiler/nativeGen/PPC/Regs.hs
compiler/nativeGen/PprBase.hs
compiler/nativeGen/Reg.hs
compiler/nativeGen/RegAlloc/Graph/ArchBase.hs
compiler/nativeGen/RegAlloc/Graph/ArchX86.hs
compiler/nativeGen/RegAlloc/Graph/Coalesce.hs
compiler/nativeGen/RegAlloc/Graph/Main.hs
compiler/nativeGen/RegAlloc/Graph/Spill.hs
compiler/nativeGen/RegAlloc/Graph/SpillClean.hs
compiler/nativeGen/RegAlloc/Graph/SpillCost.hs
compiler/nativeGen/RegAlloc/Graph/Stats.hs
compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs
compiler/nativeGen/RegAlloc/Linear/Base.hs
compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs
compiler/nativeGen/RegAlloc/Linear/JoinToTargets.hs
compiler/nativeGen/RegAlloc/Linear/Main.hs
compiler/nativeGen/RegAlloc/Linear/PPC/FreeRegs.hs
compiler/nativeGen/RegAlloc/Linear/SPARC/FreeRegs.hs
compiler/nativeGen/RegAlloc/Linear/StackMap.hs
compiler/nativeGen/RegAlloc/Linear/State.hs
compiler/nativeGen/RegAlloc/Linear/Stats.hs
compiler/nativeGen/RegAlloc/Linear/X86/FreeRegs.hs
compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs
compiler/nativeGen/RegAlloc/Liveness.hs
compiler/nativeGen/RegClass.hs
compiler/nativeGen/SPARC/AddrMode.hs
compiler/nativeGen/SPARC/Base.hs
compiler/nativeGen/SPARC/CodeGen.hs
compiler/nativeGen/SPARC/CodeGen/Amode.hs
compiler/nativeGen/SPARC/CodeGen/Base.hs
compiler/nativeGen/SPARC/CodeGen/CondCode.hs
compiler/nativeGen/SPARC/CodeGen/Expand.hs
compiler/nativeGen/SPARC/CodeGen/Gen32.hs
compiler/nativeGen/SPARC/CodeGen/Gen64.hs
compiler/nativeGen/SPARC/CodeGen/Sanity.hs
compiler/nativeGen/SPARC/Cond.hs
compiler/nativeGen/SPARC/Imm.hs
compiler/nativeGen/SPARC/Instr.hs
compiler/nativeGen/SPARC/Ppr.hs
compiler/nativeGen/SPARC/Regs.hs
compiler/nativeGen/SPARC/ShortcutJump.hs
compiler/nativeGen/SPARC/Stack.hs
compiler/nativeGen/TargetReg.hs
compiler/nativeGen/X86/CodeGen.hs
compiler/nativeGen/X86/Cond.hs
compiler/nativeGen/X86/Instr.hs
compiler/nativeGen/X86/Ppr.hs
compiler/nativeGen/X86/RegInfo.hs
compiler/nativeGen/X86/Regs.hs
compiler/parser/ApiAnnotation.hs
compiler/parser/Ctype.hs
compiler/parser/HaddockUtils.hs
compiler/parser/Lexer.x
compiler/parser/Parser.y
compiler/parser/RdrHsSyn.hs
compiler/prelude/ForeignCall.hs
compiler/prelude/KnownUniques.hs
compiler/prelude/KnownUniques.hs-boot
compiler/prelude/PrelInfo.hs
compiler/prelude/PrelNames.hs
compiler/prelude/PrelRules.hs
compiler/prelude/PrimOp.hs
compiler/prelude/PrimOp.hs-boot
compiler/prelude/THNames.hs
compiler/prelude/TysPrim.hs
compiler/prelude/TysWiredIn.hs
compiler/profiling/CostCentre.hs
compiler/profiling/ProfInit.hs
compiler/profiling/SCCfinal.hs
compiler/rename/RnBinds.hs
compiler/rename/RnEnv.hs
compiler/rename/RnExpr.hs
compiler/rename/RnFixity.hs
compiler/rename/RnHsDoc.hs
compiler/rename/RnNames.hs
compiler/rename/RnPat.hs
compiler/rename/RnSource.hs
compiler/rename/RnSplice.hs
compiler/rename/RnSplice.hs-boot
compiler/rename/RnTypes.hs
compiler/rename/RnUnbound.hs
compiler/rename/RnUtils.hs
compiler/simplCore/CSE.hs
compiler/simplCore/CallArity.hs
compiler/simplCore/CoreMonad.hs
compiler/simplCore/FloatIn.hs
compiler/simplCore/FloatOut.hs
compiler/simplCore/LiberateCase.hs
compiler/simplCore/OccurAnal.hs
compiler/simplCore/SAT.hs
compiler/simplCore/SetLevels.hs
compiler/simplCore/SimplCore.hs
compiler/simplCore/SimplEnv.hs
compiler/simplCore/SimplMonad.hs
compiler/simplCore/SimplUtils.hs
compiler/simplCore/Simplify.hs
compiler/simplStg/RepType.hs
compiler/simplStg/SimplStg.hs
compiler/simplStg/StgCse.hs
compiler/simplStg/StgStats.hs
compiler/simplStg/UnariseStg.hs
compiler/specialise/Rules.hs
compiler/specialise/SpecConstr.hs
compiler/specialise/Specialise.hs
compiler/stgSyn/CoreToStg.hs
compiler/stgSyn/StgLint.hs
compiler/stgSyn/StgSyn.hs
compiler/stranal/DmdAnal.hs
compiler/stranal/WorkWrap.hs
compiler/stranal/WwLib.hs
compiler/typecheck/FamInst.hs
compiler/typecheck/FunDeps.hs
compiler/typecheck/Inst.hs
compiler/typecheck/TcAnnotations.hs
compiler/typecheck/TcArrows.hs
compiler/typecheck/TcBackpack.hs
compiler/typecheck/TcBinds.hs
compiler/typecheck/TcCanonical.hs
compiler/typecheck/TcClassDcl.hs
compiler/typecheck/TcDefaults.hs
compiler/typecheck/TcDeriv.hs
compiler/typecheck/TcDerivInfer.hs
compiler/typecheck/TcDerivUtils.hs
compiler/typecheck/TcEnv.hs
compiler/typecheck/TcErrors.hs
compiler/typecheck/TcEvidence.hs
compiler/typecheck/TcExpr.hs
compiler/typecheck/TcFlatten.hs
compiler/typecheck/TcForeign.hs
compiler/typecheck/TcGenDeriv.hs
compiler/typecheck/TcGenFunctor.hs
compiler/typecheck/TcGenGenerics.hs
compiler/typecheck/TcHsSyn.hs
compiler/typecheck/TcHsType.hs
compiler/typecheck/TcInstDcls.hs
compiler/typecheck/TcInteract.hs
compiler/typecheck/TcMType.hs
compiler/typecheck/TcMatches.hs
compiler/typecheck/TcPat.hs
compiler/typecheck/TcPatSyn.hs
compiler/typecheck/TcPluginM.hs
compiler/typecheck/TcRnDriver.hs
compiler/typecheck/TcRnDriver.hs-boot
compiler/typecheck/TcRnExports.hs
compiler/typecheck/TcRnMonad.hs
compiler/typecheck/TcRnTypes.hs
compiler/typecheck/TcRules.hs
compiler/typecheck/TcSMonad.hs
compiler/typecheck/TcSigs.hs
compiler/typecheck/TcSimplify.hs
compiler/typecheck/TcSplice.hs
compiler/typecheck/TcSplice.hs-boot
compiler/typecheck/TcTyClsDecls.hs
compiler/typecheck/TcTyDecls.hs
compiler/typecheck/TcType.hs
compiler/typecheck/TcTypeNats.hs
compiler/typecheck/TcTypeable.hs
compiler/typecheck/TcUnify.hs
compiler/typecheck/TcUnify.hs-boot
compiler/typecheck/TcValidity.hs
compiler/types/Class.hs
compiler/types/CoAxiom.hs
compiler/types/Coercion.hs
compiler/types/Coercion.hs-boot
compiler/types/FamInstEnv.hs
compiler/types/InstEnv.hs
compiler/types/Kind.hs
compiler/types/OptCoercion.hs
compiler/types/TyCoRep.hs
compiler/types/TyCon.hs
compiler/types/TyCon.hs-boot
compiler/types/Type.hs
compiler/types/Type.hs-boot
compiler/types/Unify.hs
compiler/utils/AsmUtils.hs
compiler/utils/Bag.hs
compiler/utils/Binary.hs
compiler/utils/BooleanFormula.hs
compiler/utils/BufWrite.hs
compiler/utils/Digraph.hs
compiler/utils/Encoding.hs
compiler/utils/EnumSet.hs
compiler/utils/Exception.hs
compiler/utils/FV.hs
compiler/utils/FastFunctions.hs
compiler/utils/FastMutInt.hs
compiler/utils/FastString.hs
compiler/utils/FastStringEnv.hs
compiler/utils/Fingerprint.hsc
compiler/utils/FiniteMap.hs
compiler/utils/GhcPrelude.hs [new file with mode: 0644]
compiler/utils/GraphBase.hs
compiler/utils/GraphColor.hs
compiler/utils/GraphOps.hs
compiler/utils/GraphPpr.hs
compiler/utils/IOEnv.hs
compiler/utils/Json.hs
compiler/utils/ListSetOps.hs
compiler/utils/ListT.hs
compiler/utils/Maybes.hs
compiler/utils/MonadUtils.hs
compiler/utils/OrdList.hs
compiler/utils/Outputable.hs
compiler/utils/Outputable.hs-boot
compiler/utils/Pair.hs
compiler/utils/Panic.hs
compiler/utils/Platform.hs
compiler/utils/PprColour.hs
compiler/utils/Pretty.hs
compiler/utils/State.hs
compiler/utils/Stream.hs
compiler/utils/StringBuffer.hs
compiler/utils/UnVarGraph.hs
compiler/utils/UniqDFM.hs
compiler/utils/UniqDSet.hs
compiler/utils/UniqFM.hs
compiler/utils/UniqMap.hs
compiler/utils/UniqSet.hs
compiler/utils/Util.hs
compiler/vectorise/Vectorise.hs
compiler/vectorise/Vectorise/Builtins/Base.hs
compiler/vectorise/Vectorise/Builtins/Initialise.hs
compiler/vectorise/Vectorise/Convert.hs
compiler/vectorise/Vectorise/Env.hs
compiler/vectorise/Vectorise/Exp.hs
compiler/vectorise/Vectorise/Generic/Description.hs
compiler/vectorise/Vectorise/Generic/PADict.hs
compiler/vectorise/Vectorise/Generic/PAMethods.hs
compiler/vectorise/Vectorise/Generic/PData.hs
compiler/vectorise/Vectorise/Monad.hs
compiler/vectorise/Vectorise/Monad/Base.hs
compiler/vectorise/Vectorise/Monad/Global.hs
compiler/vectorise/Vectorise/Monad/InstEnv.hs
compiler/vectorise/Vectorise/Monad/Local.hs
compiler/vectorise/Vectorise/Monad/Naming.hs
compiler/vectorise/Vectorise/Type/Classify.hs
compiler/vectorise/Vectorise/Type/Env.hs
compiler/vectorise/Vectorise/Type/TyConDecl.hs
compiler/vectorise/Vectorise/Type/Type.hs
compiler/vectorise/Vectorise/Utils.hs
compiler/vectorise/Vectorise/Utils/Base.hs
compiler/vectorise/Vectorise/Utils/Closure.hs
compiler/vectorise/Vectorise/Utils/Hoisting.hs
compiler/vectorise/Vectorise/Utils/PADict.hs
compiler/vectorise/Vectorise/Utils/Poly.hs
compiler/vectorise/Vectorise/Var.hs
compiler/vectorise/Vectorise/Vect.hs