[Git][ghc/ghc][master] Improve "ambiguous occurrence" error messages

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Mon May 15 18:49:35 UTC 2023



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
5ae81842 by sheaf at 2023-05-15T14:49:17-04:00
Improve "ambiguous occurrence" error messages

This error was sometimes a bit confusing, especially when data families
were involved. This commit improves the general presentation of the
"ambiguous occurrence" error, and adds a bit of extra context in the
case of data families.

Fixes #23301

- - - - -


30 changed files:

- compiler/GHC/Rename/Utils.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Utils/Outputable.hs
- testsuite/tests/module/mod110.stderr
- testsuite/tests/module/mod151.stderr
- testsuite/tests/module/mod152.stderr
- testsuite/tests/module/mod153.stderr
- testsuite/tests/module/mod164.stderr
- testsuite/tests/module/mod165.stderr
- testsuite/tests/overloadedrecflds/ghci/GHCiDRF.stdout
- testsuite/tests/overloadedrecflds/ghci/duplicaterecfldsghci01.stdout
- testsuite/tests/overloadedrecflds/should_compile/BootFldReexport.stderr
- testsuite/tests/overloadedrecflds/should_fail/DRFUnused.stderr
- testsuite/tests/overloadedrecflds/should_fail/NoFieldSelectorsFail.stderr
- testsuite/tests/overloadedrecflds/should_fail/T11167_ambiguous_fixity.stderr
- testsuite/tests/overloadedrecflds/should_fail/T13132_duplicaterecflds.stderr
- testsuite/tests/overloadedrecflds/should_fail/T16745.stderr
- testsuite/tests/overloadedrecflds/should_fail/T17420.stderr
- testsuite/tests/overloadedrecflds/should_fail/T18999_NoDisambiguateRecordFields.stderr
- testsuite/tests/overloadedrecflds/should_fail/T23010_fail.stderr
- testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail02.stderr
- testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail04.stderr
- testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail11.stderr
- testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail12.stderr
- testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail13.stderr
- testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldswasrunnowfail06.stderr
- testsuite/tests/rename/should_fail/T11167_ambig.stderr
- testsuite/tests/rename/should_fail/T15487.stderr


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5ae81842d36a6091b406bfce98c60e8a7fa24240

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5ae81842d36a6091b406bfce98c60e8a7fa24240
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/20230515/6eca7bf8/attachment.html>


More information about the ghc-commits mailing list