[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 5 commits: Turn "ambiguous import" error into a panic
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Mon May 15 15:59:10 UTC 2023
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
5b9e9300 by sheaf at 2023-05-15T11:26:59-04:00
Turn "ambiguous import" error into a panic
This error should never occur, as a lookup of a type or data constructor
should never be ambiguous. This is because a single module cannot export
multiple Names with the same OccName, as per item (1) of
Note [Exporting duplicate declarations] in GHC.Tc.Gen.Export.
This code path was intended to handle duplicate record fields, but the
rest of the code had since been refactored to handle those in a
different way.
We also remove the AmbiguousImport constructor of IELookupError, as
it is no longer used.
Fixes #23302
- - - - -
e305e60c by M Farkas-Dyck at 2023-05-15T11:27:41-04:00
Unbreak some tests with latest GNU grep, which now warns about stray '\'.
Confusingly, the testsuite mangled the error to say "stray /".
We also migrate some tests from grep to grep -E, as it seems the author actually wanted an "POSIX extended" (a.k.a. sane) regex.
Background: POSIX specifies 2 "regex" syntaxen: "basic" and "extended". Of these, only "extended" syntax is actually a regular expression. Furthermore, "basic" syntax is inconsistent in its use of the '\' character — sometimes it escapes a regex metacharacter, but sometimes it unescapes it, i.e. it makes an otherwise normal character become a metacharacter. This baffles me and it seems also the authors of these tests. Also, the regex(7) man page (at least on Linux) says "basic" syntax is obsolete. Nearly all modern tools and libraries are consistent in this use of the '\' character (of which many use "extended" syntax by default).
- - - - -
cda3c16b by sheaf at 2023-05-15T11:58:53-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
- - - - -
8d616842 by Sylvain Henry at 2023-05-15T11:59:04-04:00
Fix GHCJS OS platform (fix #23346)
- - - - -
36e08885 by Oleg Grenrus at 2023-05-15T11:59:04-04:00
Split DynFlags structure into own module
This will allow to make command line parsing to depend on
diagnostic system (which depends on dynflags)
- - - - -
30 changed files:
- compiler/GHC/Core/Opt/CallerCC.hs
- compiler/GHC/Core/Opt/Monad.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/Data/IOEnv.hs
- compiler/GHC/Driver/Config/Diagnostic.hs
- compiler/GHC/Driver/Config/Logger.hs
- + compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Env.hs
- compiler/GHC/Driver/Env/Types.hs
- compiler/GHC/Driver/Errors/Ppr.hs
- compiler/GHC/Driver/Errors/Types.hs
- compiler/GHC/Driver/Hooks.hs
- compiler/GHC/Driver/Ppr.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Pat.hs
- compiler/GHC/HsToCore/Errors/Types.hs
- compiler/GHC/Platform.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Rename/Utils.hs
- compiler/GHC/Runtime/Context.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/Types/Constraint.hs
- compiler/GHC/Tc/Utils/TcType.hs
- compiler/GHC/Unit/Env.hs
- compiler/GHC/Unit/Module/Graph.hs
- compiler/GHC/Unit/Module/ModSummary.hs
- compiler/GHC/Unit/State.hs
- compiler/GHC/Utils/Outputable.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a6b1fe863df264586a91d398eeca46d29cc981d2...36e08885da884a924b05fecd3f4badb5c8cc75ed
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a6b1fe863df264586a91d398eeca46d29cc981d2...36e08885da884a924b05fecd3f4badb5c8cc75ed
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/618675d5/attachment.html>
More information about the ghc-commits
mailing list