[commit: ghc] wip/rwbarton-dep-finsts: WIP (untested): FamInst: Don't need to check imports against their dep_finsts (ab037ee)
git at git.haskell.org
git at git.haskell.org
Mon Jan 9 20:44:11 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/rwbarton-dep-finsts
Link : http://ghc.haskell.org/trac/ghc/changeset/ab037eee89364e31ad99ee470bf13c16fb04fb59/ghc
>---------------------------------------------------------------
commit ab037eee89364e31ad99ee470bf13c16fb04fb59
Author: Reid Barton <rwbarton at gmail.com>
Date: Mon Jan 9 13:43:36 2017 -0500
WIP (untested): FamInst: Don't need to check imports against their dep_finsts
Test Plan: harbormaster
Reviewers: austin, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2947
>---------------------------------------------------------------
ab037eee89364e31ad99ee470bf13c16fb04fb59
compiler/typecheck/FamInst.hs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/compiler/typecheck/FamInst.hs b/compiler/typecheck/FamInst.hs
index 0c1bdef..0dd385d 100644
--- a/compiler/typecheck/FamInst.hs
+++ b/compiler/typecheck/FamInst.hs
@@ -120,6 +120,9 @@ modules where both modules occur in the `HscTypes.dep_finsts' set (of the
already been checked. Everything else, we check now. (So that we can be
certain that the modules in our `HscTypes.dep_finsts' are consistent.)
+XXX Presumably, each of our imports has itself already been checked against
+its dep_finsts, as well.
+
There is some fancy footwork regarding hs-boot module loops, see
Note [Don't check hs-boot type family instances too early]
-}
@@ -211,7 +214,7 @@ checkFamInstConsistency famInstMods directlyImpMods
. md_fam_insts . hm_details
; hpt_fam_insts = mkModuleEnv [ (hmiModule hmi, hmiFamInstEnv hmi)
| hmi <- eltsHpt hpt]
- ; groups = map (dep_finsts . mi_deps . modIface)
+ ; groups = map (\mod -> mod : (dep_finsts . mi_deps . modIface $ mod))
directlyImpMods
; okPairs = listToSet $ concatMap allPairs groups
-- instances of okPairs are consistent
More information about the ghc-commits
mailing list