[Git][ghc/ghc][wip/T23162-part2] Back off on always reporting insolubles
Simon Peyton Jones pushed to branch wip/T23162-part2 at Glasgow Haskell Compiler / GHC Commits: 67b1e382 by Simon Peyton Jones at 2025-12-11T13:35:03+00:00 Back off on always reporting insolubles - - - - - 1 changed file: - compiler/GHC/Tc/Errors.hs Changes: ===================================== compiler/GHC/Tc/Errors.hs ===================================== @@ -1322,8 +1322,13 @@ maybeReportError ctxt items@(item1:|_) (SolverReport { sr_important_msg = import -- report nothing. (If at least one is not suppressed, do report: the function that -- generates the error message should look for an unsuppressed error item.) - | any ei_insoluble items - = False -- Don't suppress insolubles even if cec_suppress is True +-- It is tempting to say that we always want to see all insoluble errors +-- But then we get a bit more than we want. Examples: +-- a ~ t a occurs check errors (T2534, mc25) +-- T @X1 T1 ~ T @X2 T2 gives two insolubles: X1~X2 and T1~T2 (KindVType, T17380, T22332b) +-- +-- | any ei_insoluble items +-- = False -- Don't suppress insolubles even if cec_suppress is True | cec_suppress ctxt = True -- Some earlier error has occurred, so suppress this diagnostic View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/67b1e382acd47c364715d33bdd6a6f6d... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/67b1e382acd47c364715d33bdd6a6f6d... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Simon Peyton Jones (@simonpj)