Split GHC.Driver.Types
I was working on making DynFlags stateless (#17957), especially by storing loaded plugins into HscEnv instead of DynFlags. It turned out to be complicated because HscEnv is in GHC.Driver.Types but LoadedPlugin isn't: it is in GHC.Driver.Plugins which depends on GHC.Driver.Types. I didn't feel like introducing yet another hs-boot file to break the loop. Additionally I remember that while we introduced the module hierarchy (#13009) we talked about splitting GHC.Driver.Types because it contained various unrelated types and functions, but we never executed. I didn't feel like making GHC.Driver.Types bigger with more unrelated Plugins related types, so finally I bit the bullet and split GHC.Driver.Types. As a consequence this patch moves a lot of things. I've tried to put them into appropriate modules but nothing is set in stone. Several other things moved to avoid loops. * Removed Binary instances from GHC.Utils.Binary for random compiler things * Moved Typeable Binary instances into GHC.Utils.Binary.Typeable: they import a lot of things that users of GHC.Utils.Binary don't want to depend on. * put everything related to Units/Modules under GHC.Unit: GHC.Unit.Finder, GHC.Unit.Module.{ModGuts,ModIface,Deps,etc.} * Created several modules under GHC.Types: GHC.Types.Fixity, SourceText, etc. * Split GHC.Utils.Error (into GHC.Types.Error) * Finally removed GHC.Driver.Types Note that this patch doesn't put loaded plugins into HscEnv. It's left for another patch. Bump haddock submodule
Showing
- compiler/GHC.hs 85 additions, 47 deletionscompiler/GHC.hs
- compiler/GHC/Builtin/PrimOps.hs 3 additions, 2 deletionscompiler/GHC/Builtin/PrimOps.hs
- compiler/GHC/Builtin/Types.hs 3 additions, 1 deletioncompiler/GHC/Builtin/Types.hs
- compiler/GHC/Builtin/Types/Prim.hs 4 additions, 3 deletionscompiler/GHC/Builtin/Types/Prim.hs
- compiler/GHC/Builtin/Utils.hs 15 additions, 12 deletionscompiler/GHC/Builtin/Utils.hs
- compiler/GHC/ByteCode/Asm.hs 11 additions, 8 deletionscompiler/GHC/ByteCode/Asm.hs
- compiler/GHC/ByteCode/InfoTable.hs 8 additions, 3 deletionscompiler/GHC/ByteCode/InfoTable.hs
- compiler/GHC/ByteCode/Linker.hs 10 additions, 5 deletionscompiler/GHC/ByteCode/Linker.hs
- compiler/GHC/Cmm/Pipeline.hs 1 addition, 1 deletioncompiler/GHC/Cmm/Pipeline.hs
- compiler/GHC/Core.hs 1 addition, 1 deletioncompiler/GHC/Core.hs
- compiler/GHC/Core/Coercion/Axiom.hs 1 addition, 1 deletioncompiler/GHC/Core/Coercion/Axiom.hs
- compiler/GHC/Core/ConLike.hs-boot 0 additions, 9 deletionscompiler/GHC/Core/ConLike.hs-boot
- compiler/GHC/Core/DataCon.hs 5 additions, 3 deletionscompiler/GHC/Core/DataCon.hs
- compiler/GHC/Core/FamInstEnv.hs 1 addition, 1 deletioncompiler/GHC/Core/FamInstEnv.hs
- compiler/GHC/Core/Lint.hs 8 additions, 4 deletionscompiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Make.hs 18 additions, 16 deletionscompiler/GHC/Core/Make.hs
- compiler/GHC/Core/Opt/FloatIn.hs 9 additions, 5 deletionscompiler/GHC/Core/Opt/FloatIn.hs
- compiler/GHC/Core/Opt/Monad.hs 18 additions, 11 deletionscompiler/GHC/Core/Opt/Monad.hs
- compiler/GHC/Core/Opt/Pipeline.hs 26 additions, 16 deletionscompiler/GHC/Core/Opt/Pipeline.hs
- compiler/GHC/Core/Opt/Simplify.hs 1 addition, 0 deletionscompiler/GHC/Core/Opt/Simplify.hs
Loading
Please register or sign in to comment