[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 13 commits: Improve "ambiguous occurrence" error messages

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Mon May 15 19:21:41 UTC 2023



Marge Bot pushed to branch wip/marge_bot_batch_merge_job 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

- - - - -
2f571afe by Sylvain Henry at 2023-05-15T14:50:07-04:00
Fix GHCJS OS platform (fix #23346)

- - - - -
86aae570 by Oleg Grenrus at 2023-05-15T14:50:43-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)

- - - - -
bcf8f5b5 by Josh Meredith at 2023-05-15T15:21:33-04:00
Replace the implementation of CodeBuffers with unboxed types

- - - - -
a2c482f6 by Josh Meredith at 2023-05-15T15:21:33-04:00
Use unboxed codebuffers in base

Metric Decrease:
    encodingAllocations

- - - - -
8f8a6de6 by Ben Gamari at 2023-05-15T15:21:33-04:00
rts: Weak pointer cleanups

Various stylistic cleanups. No functional changes.

- - - - -
a8dcc15f by Ben Gamari at 2023-05-15T15:21:33-04:00
rts: Don't force debug output to stderr

Previously `+RTS -Dw -l` would emit debug output to the eventlog while
`+RTS -l -Dw` would emit it to stderr. This was because the parser for
`-D` would unconditionally override the debug output target. Now we
instead only do so if no it is currently `TRACE_NONE`.

- - - - -
c645436a by Ben Gamari at 2023-05-15T15:21:34-04:00
rts: Forcibly flush eventlog on barf

Previously we would attempt to flush via `endEventLogging` which can
easily deadlock, e.g., if `barf` fails during GC.

Using `flushEventLog` directly may result in slightly less consistent
eventlog output (since we don't take all capabilities before flushing)
but avoids deadlocking.

- - - - -
a3b80361 by Ben Gamari at 2023-05-15T15:21:34-04:00
rts: Assert that pointers aren't cleared by -DZ

This turns many segmentation faults into much easier-to-debug assertion
failures by ensuring that LOOKS_LIKE_*_PTR checks recognize bit-patterns
produced by `+RTS -DZ` clearing as invalid pointers.

This is a bit ad-hoc but this is the debug runtime.

- - - - -
8664aa6c by Ben Gamari at 2023-05-15T15:21:34-04:00
rts: Introduce printGlobalThreads

- - - - -
68b7e139 by Ben Gamari at 2023-05-15T15:21:34-04:00
rts: Don't sanity-check StgTSO.global_link

See Note [Avoid dangling global_link pointers].

Fixes #19146.

- - - - -
2645d451 by sheaf at 2023-05-15T15:21:36-04:00
Split up tyThingToIfaceDecl from GHC.Iface.Make

This commit moves tyThingToIfaceDecl and coAxiomToIfaceDecl
from GHC.Iface.Make into GHC.Iface.Decl.
This avoids GHC.Types.TyThing.Ppr, which needs tyThingToIfaceDecl,
transitively depending on e.g. GHC.Iface.Load and GHC.Tc.Utils.Monad.

- - - - -
9bcc9738 by sheaf at 2023-05-15T15:21:36-04:00
Migrate errors to diagnostics in GHC.Tc.Module

This commit migrates the errors in GHC.Tc.Module to use the new
diagnostic infrastructure.

It required a significant overhaul of the compatibility checks between
an hs-boot or signature module and its implementation; we now use
a Writer monad to accumulate errors; see the BootMismatch datatype
in GHC.Tc.Errors.Types, with its panoply of subtypes.
For the sake of readability, several local functions inside the
'checkBootTyCon' function were split off into top-level functions.

We split off GHC.Types.HscSource into a "boot or sig" vs "normal hs file"
datatype, as this mirrors the logic in several other places where we
want to treat hs-boot and hsig files in a similar fashion.

This commit also refactors the Backpack checks for type synonyms
implementing abstract data, to correctly reject implementations that
contain qualified or quantified types (this fixes #23342 and #23344).

- - - - -


23 changed files:

- compiler/GHC/Core/Opt/CallerCC.hs
- compiler/GHC/Core/Opt/Monad.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Data/IOEnv.hs
- compiler/GHC/Driver/Backpack.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/Make.hs
- compiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Driver/Ppr.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Pat.hs
- compiler/GHC/HsToCore/Errors/Types.hs
- + compiler/GHC/Iface/Decl.hs
- compiler/GHC/Iface/Load.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/36e08885da884a924b05fecd3f4badb5c8cc75ed...9bcc97386291df4f52b4310dda425ea885613737

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/36e08885da884a924b05fecd3f4badb5c8cc75ed...9bcc97386291df4f52b4310dda425ea885613737
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/018f1cbc/attachment.html>


More information about the ghc-commits mailing list