diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2021-08-09 11:29:45 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-08-13 07:54:32 -0400 |
commit | c367b39e5236b86b4923d826ab0395b33211d30a (patch) | |
tree | 658e595a18356bcda04f3f72b168eb86bc51bf99 /compiler/GHC/Tc/Module.hs | |
parent | 7ad813a480c9ed383fe1fea11a57f90d4f6f9b71 (diff) | |
download | haskell-c367b39e5236b86b4923d826ab0395b33211d30a.tar.gz |
Refactoring module dependencies
* Make mkDependencies pure
* Use Sets instead of sorted lists
Notable perf changes:
MultiLayerModules(normal) ghc/alloc 4130851520.0 2981473072.0 -27.8%
T13719(normal) ghc/alloc 4313296052.0 4151647512.0 -3.7%
Metric Decrease:
MultiLayerModules
T13719
Diffstat (limited to 'compiler/GHC/Tc/Module.hs')
-rw-r--r-- | compiler/GHC/Tc/Module.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/GHC/Tc/Module.hs b/compiler/GHC/Tc/Module.hs index 5be998e07a..e0a4f58d39 100644 --- a/compiler/GHC/Tc/Module.hs +++ b/compiler/GHC/Tc/Module.hs @@ -381,7 +381,8 @@ tcRnImports hsc_env import_decls -- filtering also ensures that we don't see instances from -- modules batch (@--make@) compiled before this one, but -- which are not below this one. - ; (home_insts, home_fam_insts) = hptInstancesBelow hsc_env (moduleName this_mod) (eltsUFM dep_mods) + ; (home_insts, home_fam_insts) = hptInstancesBelow hsc_env (moduleName this_mod) + (S.fromList (eltsUFM dep_mods)) } ; -- Record boot-file info in the EPS, so that it's |