[Git][ghc/ghc][wip/T24978] 2 commits: Accept CountDeps changes

Simon Peyton Jones (@simonpj) gitlab at gitlab.haskell.org
Fri Jul 5 08:20:02 UTC 2024



Simon Peyton Jones pushed to branch wip/T24978 at Glasgow Haskell Compiler / GHC


Commits:
06f2598d by Simon Peyton Jones at 2024-07-05T09:19:23+01:00
Accept CountDeps changes

- - - - -
c92444cf by Simon Peyton Jones at 2024-07-05T09:19:37+01:00
Fix bug in fundeps

- - - - -


3 changed files:

- compiler/GHC/Tc/Solver/Equality.hs
- testsuite/tests/count-deps/CountDepsAst.stdout
- testsuite/tests/count-deps/CountDepsParser.stdout


Changes:

=====================================
compiler/GHC/Tc/Solver/Equality.hs
=====================================
@@ -3017,10 +3017,11 @@ improve_injective_wanted_top fam_envs inj_args fam_tc lhs_tys rhs_ty
   where
     branches :: [CoAxBranch]
     branches | isOpenTypeFamilyTyCon fam_tc
-             , (fam_inst1 : _) <- lookupFamInstEnvByTyCon fam_envs fam_tc
-             = fromBranches (coAxiomBranches (fi_axiom fam_inst1))
+             , let fam_insts = lookupFamInstEnvByTyCon fam_envs fam_tc
+             = concatMap (fromBranches . coAxiomBranches . fi_axiom) fam_insts
              -- fam_inst1: It is possible to have several compatible equations in an open
              -- type family but we only want to derive equalities from one such equation.
+     -- ToDo: fix this comment
 
              | Just ax <- isClosedSynFamilyTyConWithAxiom_maybe fam_tc
              = fromBranches (coAxiomBranches ax)


=====================================
testsuite/tests/count-deps/CountDepsAst.stdout
=====================================
@@ -2,6 +2,7 @@ Found Language.Haskell.Syntax module dependencies
 GHC.Builtin.Names
 GHC.Builtin.PrimOps
 GHC.Builtin.Types
+GHC.Builtin.Types.Literals
 GHC.Builtin.Types.Prim
 GHC.Builtin.Uniques
 GHC.ByteCode.Types


=====================================
testsuite/tests/count-deps/CountDepsParser.stdout
=====================================
@@ -2,6 +2,7 @@ Found GHC.Parser module dependencies
 GHC.Builtin.Names
 GHC.Builtin.PrimOps
 GHC.Builtin.Types
+GHC.Builtin.Types.Literals
 GHC.Builtin.Types.Prim
 GHC.Builtin.Uniques
 GHC.ByteCode.Types



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a9123575f42bd1aa00d05bf5951f05976c655343...c92444cf0385a74ec2441e44f7952cdbcaed0859

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a9123575f42bd1aa00d05bf5951f05976c655343...c92444cf0385a74ec2441e44f7952cdbcaed0859
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/20240705/16148afc/attachment-0001.html>


More information about the ghc-commits mailing list