[Git][ghc/ghc][wip/tc-lcl-env-refactor] 12 commits: base: Add build-order import of GHC.Types in GHC.IO.Handle.Types
Matthew Pickering (@mpickering)
gitlab at gitlab.haskell.org
Mon Jun 5 07:59:58 UTC 2023
Matthew Pickering pushed to branch wip/tc-lcl-env-refactor at Glasgow Haskell Compiler / GHC
Commits:
4a4eb761 by Ben Gamari at 2023-06-02T23:53:21-04:00
base: Add build-order import of GHC.Types in GHC.IO.Handle.Types
For reasons similar to those described in Note [Depend on
GHC.Num.Integer].
Fixes #23411.
- - - - -
f53ac0ae by Sylvain Henry at 2023-06-02T23:54:01-04:00
JS: fix and enhance non-minimized code generation (#22455)
Flag -ddisable-js-minimizer was producing invalid code. Fix that and
also a few other things to generate nicer JS code for debugging.
The added test checks that we don't regress when using the flag.
- - - - -
f7744e8e by Andrey Mokhov at 2023-06-03T16:49:44-04:00
[hadrian] Fix multiline synopsis rendering
- - - - -
b2c745db by Bodigrim at 2023-06-03T16:50:23-04:00
Elaborate on performance properties of Data.List.++
- - - - -
2382313d by Matthew Pickering at 2023-06-05T07:59:53+00:00
Big TcLclEnv and CtLoc refactoring
The overall goal of this refactoring is to reduce the dependency
footprint of the parser and syntax tree. Good reasons include:
- Better module graph parallelisability
- Make it easier to migrate error messages without introducing module loops
- Philosophically, there's not reason for the AST to depend on half the
compiler.
One of the key edges which added this dependency was
> GHC.Hs.Expr -> GHC.Tc.Types (TcLclEnv)
As this in turn depending on TcM which depends on HscEnv and so on.
Therefore the goal of this patch is to move `TcLclEnv` out of
`GHC.Tc.Types` so that `GHC.Hs.Expr` can import TcLclEnv without
incurring a huge dependency chain.
The changes in this patch are:
* Move TcLclEnv from GHC.Tc.Types to GHC.Tc.Types.LclEnv
* Create new smaller modules for the types used in TcLclEnv
New Modules:
- GHC.Tc.Types.ErrCtxt
- GHC.Tc.Types.BasicTypes
- GHC.Tc.Types.TH
- GHC.Tc.Types.LclEnv
- GHC.Tc.Types.CtLocEnv
- GHC.Tc.Errors.Types.PromotionErr
Removed Boot File:
- {-# SOURCE #-} GHC.Tc.Types
* Introduce TcLclCtxt, the part of the TcLclEnv which doesn't
participate in restoreLclEnv.
* Replace TcLclEnv in CtLoc with specific CtLocEnv which is defined in
GHC.Tc.Types.CtLocEnv. Use CtLocEnv in Implic and CtLoc to record the
location of the implication and constraint.
By splitting up TcLclEnv from GHC.Tc.Types we allow GHC.Hs.Expr to no
longer depend on the TcM monad and all that entails.
Fixes #23389 #23409
- - - - -
7823bb3f by Matthew Pickering at 2023-06-05T07:59:53+00:00
Remove dependency of GHC.Tc.Utils.TcType on GHC.Driver.Session
This removes the usage of DynFlags from Tc.Utils.TcType so that it no
longer depends on GHC.Driver.Session. In general we don't want anything
which is a dependency of Language.Haskell.Syntax to depend on
GHC.Driver.Session and removing this edge gets us closer to that goal.
- - - - -
cc08424a by Matthew Pickering at 2023-06-05T07:59:53+00:00
Move isIrrefutableHsPat to GHC.Rename.Utils and rename to isIrrefutableHsPatRn
This removes edge from GHC.Hs.Pat to GHC.Driver.Session, which makes
Language.Haskell.Syntax end up depending on GHC.Driver.Session.
- - - - -
e5a154fc by Matthew Pickering at 2023-06-05T07:59:53+00:00
Remove dependency of GHC.Tc.Types.Constraint on GHC.Driver.Session
- - - - -
7fa5a237 by Matthew Pickering at 2023-06-05T07:59:53+00:00
hole fit plugins: Split definition into own module
The hole fit plugins are defined in terms of TcM, a type we want to
avoid depending on from `GHC.Tc.Errors.Types`. By moving it into its own
module we can remove this dependency. It also simplifies the necessary
boot file.
- - - - -
45c68176 by Matthew Pickering at 2023-06-05T07:59:53+00:00
Move GHC.Core.Opt.CallerCC Types into separate module
This allows `GHC.Driver.DynFlags` to depend on these types without
depending on CoreM and hence the entire simplifier pipeline.
We can also remove a hs-boot file with this change.
- - - - -
fb457141 by Matthew Pickering at 2023-06-05T07:59:53+00:00
Remove unecessary SOURCE import
- - - - -
88887ea9 by Matthew Pickering at 2023-06-05T07:59:53+00:00
testsuite: Accept new output for CountDepsAst and CountDepsParser tests
These are in a separate commit as the improvement to these tests is the
cumulative effect of the previous set of patches rather than just the
responsibility of the last one in the patchset.
- - - - -
30 changed files:
- compiler/GHC/Core/Opt/CallerCC.hs
- − compiler/GHC/Core/Opt/CallerCC.hs-boot
- + compiler/GHC/Core/Opt/CallerCC/Types.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Plugins.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Pat.hs
- compiler/GHC/Iface/Errors/Types.hs
- compiler/GHC/JS/Make.hs
- compiler/GHC/JS/Ppr.hs
- compiler/GHC/Plugins.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/Expr.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Rename/Utils.hs
- compiler/GHC/StgToJS/Apply.hs
- compiler/GHC/StgToJS/Closure.hs
- compiler/GHC/StgToJS/CodeGen.hs
- compiler/GHC/StgToJS/Linker/Linker.hs
- compiler/GHC/StgToJS/Linker/Opt.hs
- compiler/GHC/StgToJS/Rts/Rts.hs
- compiler/GHC/Tc/Errors.hs
- compiler/GHC/Tc/Errors/Hole.hs
- compiler/GHC/Tc/Errors/Hole/FitTypes.hs
- − compiler/GHC/Tc/Errors/Hole/FitTypes.hs-boot
- + compiler/GHC/Tc/Errors/Hole/Plugin.hs
- + compiler/GHC/Tc/Errors/Hole/Plugin.hs-boot
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- + compiler/GHC/Tc/Errors/Types/PromotionErr.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/46d1de4824bfcc9d8ab1ca6396fd097554eab7e9...88887ea9e52aa10ab3f53dd6b8c5a30a70eab207
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/46d1de4824bfcc9d8ab1ca6396fd097554eab7e9...88887ea9e52aa10ab3f53dd6b8c5a30a70eab207
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230605/9d093743/attachment.html>
More information about the ghc-commits
mailing list