diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2021-05-05 13:48:19 +0100 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2021-05-18 11:24:38 +0100 |
commit | 71971c323b0ff2c2c53eb428d9508144eb00a438 (patch) | |
tree | 7ddde4dd2f94da7e8465c2b9ba7423c64572c450 /compiler/GHC/Rename/Module.hs | |
parent | fc9546caf3e16db070bfc7bb5523c38595233e26 (diff) | |
download | haskell-wip/ghc-transitive-deps.tar.gz |
Remove transitive information about modules and packages from interface fileswip/ghc-transitive-deps
This commit modifies interface files so that *only* direct information
about modules and packages is stored in the interface file.
* Only direct module and direct package dependencies are stored in the
interface files.
* Trusted packages are now stored separately as they need to be checked
transitively.
* hs-boot files below the compiled module in the home module are stored
so that eps_is_boot can be calculated in one-shot mode without loading
all interface files in the home package.
* The transitive closure of signatures is stored separately
This is important for two reasons
* Less recompilation is needed, as motivated by #16885, a lot of
redundant compilation was triggered when adding new imports deep in the
module tree as all the parent interface files had to be redundantly
updated.
* Checking an interface file is cheaper because you don't have to
perform a transitive traversal to check the dependencies are up-to-date.
In the code, places where we would have used the transitive closure, we
instead compute the necessary transitive closure. The closure is not
computed very often, was already happening in checkDependencies, and
was already happening in getLinkDeps.
Fixes #16885
-------------------------
Metric Decrease:
MultiLayerModules
T13701
T13719
-------------------------
Diffstat (limited to 'compiler/GHC/Rename/Module.hs')
-rw-r--r-- | compiler/GHC/Rename/Module.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Rename/Module.hs b/compiler/GHC/Rename/Module.hs index 8bb8557186..2eb048f3f6 100644 --- a/compiler/GHC/Rename/Module.hs +++ b/compiler/GHC/Rename/Module.hs @@ -763,10 +763,10 @@ rnFamEqn doc atfi extra_kvars -- See Note [Renaming associated types]. -- Per that Note, the LHS type variables consist of: -- - -- * The variables mentioned in the instance's type patterns + -- - The variables mentioned in the instance's type patterns -- (pat_fvs), and -- - -- * The variables mentioned in an outermost kind signature on the + -- - The variables mentioned in an outermost kind signature on the -- RHS. This is a subset of `rhs_fvs`. To compute it, we look up -- each RdrName in `extra_kvars` to find its corresponding Name in -- the LocalRdrEnv. |