[Git][ghc/ghc][wip/T26255] Wibble comments

Simon Peyton Jones pushed to branch wip/T26255 at Glasgow Haskell Compiler / GHC Commits: fa3dd3c6 by Simon Peyton Jones at 2025-08-23T17:57:08+01:00 Wibble comments - - - - - 1 changed file: - compiler/GHC/Tc/Errors.hs Changes: ===================================== compiler/GHC/Tc/Errors.hs ===================================== @@ -854,7 +854,16 @@ Currently, the constraints to ignore are: (CIG2) Superclasses of Wanteds. These are generated on in case they trigger functional dependencies. If such a constraint is unsolved, then its "parent" constraint must - also be unsolved, and is much more informative to the user (#26255). + also be unsolved, and is much more informative to the user. Example (#26255): + class (MinVersion <= F era) => Era era where { ... } + f :: forall era. EraFamily era -> IO () + f = ..blah... -- [W] Era era + Here we have simply omitted "Era era =>" from f's type. But we'll end up with + /two/ Wanted constraints: + [W] d1 : Era era + [W] d2 : MinVersion <= F era -- Superclass of d1 + We definitely want to report d1 and not d2! Happily it's easy to filter out those + superclass-Wanteds, becuase their Origin betrays them. Note [Implementation of Unsatisfiable constraints] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fa3dd3c6932891bcdeab954b7e5083f9... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fa3dd3c6932891bcdeab954b7e5083f9... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Simon Peyton Jones (@simonpj)