[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 13 commits: Allow configuration of error message printing
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Tue Oct 18 22:11:50 UTC 2022
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
e1bbd368 by Matthew Pickering at 2022-10-18T16:15:49+02:00
Allow configuration of error message printing
This MR implements the idea of #21731 that the printing of a diagnostic
method should be configurable at the printing time.
The interface of the `Diagnostic` class is modified from:
```
class Diagnostic a where
diagnosticMessage :: a -> DecoratedSDoc
diagnosticReason :: a -> DiagnosticReason
diagnosticHints :: a -> [GhcHint]
```
to
```
class Diagnostic a where
type DiagnosticOpts a
defaultDiagnosticOpts :: DiagnosticOpts a
diagnosticMessage :: DiagnosticOpts a -> a -> DecoratedSDoc
diagnosticReason :: a -> DiagnosticReason
diagnosticHints :: a -> [GhcHint]
```
and so each `Diagnostic` can implement their own configuration record
which can then be supplied by a client in order to dictate how to print
out the error message.
At the moment this only allows us to implement #21722 nicely but in
future it is more natural to separate the configuration of how much
information we put into an error message and how much we decide to print
out of it.
Updates Haddock submodule
- - - - -
99dc3e3d by Matthew Pickering at 2022-10-18T16:15:53+02:00
Add -fsuppress-error-contexts to disable printing error contexts in errors
In many development environments, the source span is the primary means
of seeing what an error message relates to, and the In the expression:
and In an equation for: clauses are not particularly relevant. However,
they can grow to be quite long, which can make the message itself both
feel overwhelming and interact badly with limited-space areas.
It's simple to implement this flag so we might as well do it and give
the user control about how they see their messages.
Fixes #21722
- - - - -
6bb96725 by Dai at 2022-10-18T18:11:11-04:00
Add VecSlot for unboxed sums of SIMD vectors
This patch adds the missing `VecRep` case to `primRepSlot` function and
all the necessary machinery to carry this new `VecSlot` through code
generation. This allows programs involving unboxed sums of SIMD vectors
to be written and compiled.
Fixes #22187
- - - - -
ca1c4c94 by sheaf at 2022-10-18T18:11:11-04:00
Remove SIMD conversions
This patch makes it so that packing/unpacking SIMD
vectors always uses the right sized types, e.g.
unpacking a Word16X4# will give a tuple of Word16#s.
As a result, we can get rid of the conversion instructions
that were previously required.
Fixes #22296
- - - - -
1d5e65ca by sheaf at 2022-10-18T18:11:11-04:00
Cmm Lint: relax SIMD register assignment check
As noted in #22297, SIMD vector registers can be used
to store different kinds of values, e.g. xmm1 can be used
both to store integer and floating point values.
The Cmm type system doesn't properly account for this, so
we weaken the Cmm register assignment lint check to only
compare widths when comparing a vector type with its
allocated vector register.
- - - - -
8b4e520e by sheaf at 2022-10-18T18:11:11-04:00
Disable some SIMD tests on non-X86 architectures
- - - - -
98ef609a by M Farkas-Dyck at 2022-10-18T18:11:16-04:00
Scrub various partiality involving lists (again).
Lets us avoid some use of `head` and `tail`, and some panics.
- - - - -
8a092c18 by M Farkas-Dyck at 2022-10-18T18:11:22-04:00
Enforce invariant of `ListBag` constructor.
- - - - -
b7ef23cf by Bodigrim at 2022-10-18T18:11:24-04:00
More precise types for fields of OverlappingInstances and UnsafeOverlap in TcSolverReportMsg
It's clear from asserts in `GHC.Tc.Errors` that `overlappingInstances_matches`
and `unsafeOverlapped` are supposed to be non-empty, and `unsafeOverlap_matches`
contains a single instance, but these invariants are immediately lost afterwards
and not encoded in types. This patch enforces the invariants by pattern matching
and makes types more precise, avoiding asserts and partial functions such as `head`.
- - - - -
a77d6961 by sheaf at 2022-10-18T18:11:24-04:00
Rename unsafeOverlap_matches -> unsafeOverlap_match in UnsafeOverlap
- - - - -
5bea8bb1 by Matthew Pickering at 2022-10-18T18:11:25-04:00
Add SpliceTypes test for hie files
This test checks that typed splices and quotes get the right type
information when used in hiefiles.
See #21619
- - - - -
c24ce551 by Jan Hrček at 2022-10-18T18:11:27-04:00
Small language fixes in 'Using GHC'
- - - - -
08c4e5f7 by Gergő Érdi at 2022-10-18T18:11:30-04:00
Fix typo in `Opt_WriteIfSimplifiedCore`'s name
- - - - -
30 changed files:
- compiler/GHC.hs
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/Cmm/Info/Build.hs
- compiler/GHC/Cmm/Lint.hs
- compiler/GHC/Cmm/MachOp.hs
- compiler/GHC/Cmm/Utils.hs
- compiler/GHC/CmmToAsm/BlockLayout.hs
- compiler/GHC/CmmToAsm/PPC/Instr.hs
- compiler/GHC/CmmToAsm/X86/CodeGen.hs
- compiler/GHC/Core/InstEnv.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Opt/Monad.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/Data/Bag.hs
- compiler/GHC/Driver/Backpack.hs
- compiler/GHC/Driver/Config/Diagnostic.hs
- compiler/GHC/Driver/Env.hs
- compiler/GHC/Driver/Errors.hs
- compiler/GHC/Driver/Errors/Ppr.hs
- compiler/GHC/Driver/Errors/Types.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/Monad.hs
- compiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Errors/Ppr.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bc63233031162738f6f66a474987dd9a260dd315...08c4e5f7ac81eec7f7a230dff304c690b1b9e4fd
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bc63233031162738f6f66a474987dd9a260dd315...08c4e5f7ac81eec7f7a230dff304c690b1b9e4fd
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/20221018/17f917e5/attachment.html>
More information about the ghc-commits
mailing list