[Git][ghc/ghc][wip/js-th] 16 commits: Change WarningWithFlag to plural WarningWithFlags

Sylvain Henry (@hsyl20) gitlab at gitlab.haskell.org
Tue Jun 13 14:04:38 UTC 2023



Sylvain Henry pushed to branch wip/js-th at Glasgow Haskell Compiler / GHC


Commits:
a1f350e2 by Oleg Grenrus at 2023-06-13T09:42:16-04:00
Change WarningWithFlag to plural WarningWithFlags

Resolves #22825

Now each diagnostic can name multiple different warning flags for its reason.

There is currently one use case: missing signatures.
Currently we need to check which warning flags are enabled when
generating the diagnostic, which is against the declarative nature of
the diagnostic framework.

This patch allows a warning diagnostic to have multiple warning flags,
which makes setup more declarative.

The WarningWithFlag pattern synonym is added for backwards compatibility

The 'msgEnvReason' field is added to MsgEnvelope to store the
`ResolvedDiagnosticReason`, which accounts for the enabled flags, and
then that is used for pretty printing the diagnostic.

- - - - -
ec01f0ec by Matthew Pickering at 2023-06-13T09:42:59-04:00
Add a test Way for running ghci with Core optimizations

Tracking ticket: #23059

This runs compile_and_run tests with optimised code with bytecode
interpreter

Changed submodules: hpc, process

Co-authored-by: Torsten Schmits <git at tryp.io>

- - - - -
c6741e72 by Rodrigo Mesquita at 2023-06-13T09:43:38-04:00
Configure -Qunused-arguments instead of hardcoding it

When GHC invokes clang, it currently passes -Qunused-arguments to
discard warnings resulting from GHC using multiple options that aren't
used.

In this commit, we configure -Qunused-arguments into the Cc options
instead of checking if the compiler is clang at runtime and hardcoding
the flag into GHC.

This is part of the effort to centralise toolchain information in
toolchain target files at configure time with the end goal of a runtime
retargetable GHC.

This also means we don't need to call getCompilerInfo ever, which
improves performance considerably (see !10589).

Metric Decrease:
    PmSeriesG
    T10421
    T11303b
    T12150
    T12227
    T12234
    T12425
    T13035
    T13253-spj
    T13386
    T15703
    T16875
    T17836b
    T17977
    T17977b
    T18140
    T18282
    T18304
    T18698a
    T18698b
    T18923
    T20049
    T21839c
    T3064
    T5030
    T5321FD
    T5321Fun
    T5837
    T6048
    T9020
    T9198
    T9872d
    T9961

- - - - -
0128db87 by Victor Cacciari Miraldo at 2023-06-13T09:44:18-04:00
Improve docs for Data.Fixed; adds 'realToFrac' as an option for conversion
between different precisions.

- - - - -
95b69cfb by Ryan Scott at 2023-06-13T09:44:55-04:00
Add regression test for #23143

!10541, the fix for #23323, also fixes #23143. Let's add a regression test to
ensure that it stays fixed.

Fixes #23143.

- - - - -
ed2dbdca by Emily Martins at 2023-06-13T09:45:37-04:00
delete GHCi.UI.Tags module and remove remaining references

Co-authored-by: Tilde Rose <t1lde at protonmail.com>

- - - - -
c90d96e4 by Victor Cacciari Miraldo at 2023-06-13T09:46:26-04:00
Add regression test for 17328

- - - - -
de58080c by Victor Cacciari Miraldo at 2023-06-13T09:46:26-04:00
Skip checking whether constructors are in scope when deriving
newtype instances.

Fixes #17328

- - - - -
5e3c2b05 by Philip Hazelden at 2023-06-13T09:47:07-04:00
Don't suggest `DeriveAnyClass` when instance can't be derived.

Fixes #19692.

Prototypical cases:

    class C1 a where
      x1 :: a -> Int
    data G1 = G1 deriving C1

    class C2 a where
      x2 :: a -> Int
      x2 _ = 0
    data G2 = G2 deriving C2

Both of these used to give this suggestion, but for C1 the suggestion
would have failed (generated code with undefined methods, which compiles
but warns). Now C2 still gives the suggestion but C1 doesn't.

- - - - -
80a0b099 by David Binder at 2023-06-13T09:47:49-04:00
Add testcase for error GHC-00711 to testsuite

- - - - -
1c6e23b4 by Sylvain Henry at 2023-06-13T16:09:43+02:00
JS: implement TH support

- Add ghc-interp.js bootstrap script for the JS interpreter
- Interactively link and execute iserv code from the ghci package
- Incrementally load and run JS code for splices into the running iserv

Co-authored-by: Luite Stegeman <stegeman at gmail.com>

- - - - -
3b11dcb1 by Sylvain Henry at 2023-06-13T16:09:56+02:00
Don't use getKey

- - - - -
3844c803 by Sylvain Henry at 2023-06-13T16:09:56+02:00
Stg: return imported FVs

This is used to determine what to link when using the interpreter.
For now it's only used by the JS interpreter but it could easily be used
by the native interpreter too (instead of extracting names from compiled BCOs).

- - - - -
63081421 by Sylvain Henry at 2023-06-13T16:09:56+02:00
Fix some recompilation avoidance tests

- - - - -
56ef2659 by Sylvain Henry at 2023-06-13T16:09:56+02:00
TH_import_loop is now broken as expected

- - - - -
525a9447 by Sylvain Henry at 2023-06-13T16:09:56+02:00
JS: always recompile when TH is enabled (cf #23013)

- - - - -


28 changed files:

- compiler/GHC.hs
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Driver/Errors.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Iface/Recomp.hs
- compiler/GHC/Linker/Loader.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Runtime/Context.hs
- compiler/GHC/Runtime/Interpreter.hs
- + compiler/GHC/Runtime/Interpreter/JS.hs
- + compiler/GHC/Runtime/Interpreter/Process.hs
- compiler/GHC/Runtime/Interpreter/Types.hs
- + compiler/GHC/Runtime/Utils.hs
- compiler/GHC/Stg/FVs.hs
- compiler/GHC/Stg/Pipeline.hs
- compiler/GHC/StgToJS/CodeGen.hs
- compiler/GHC/StgToJS/Deps.hs
- compiler/GHC/StgToJS/Linker/Linker.hs
- compiler/GHC/StgToJS/Linker/Types.hs
- compiler/GHC/StgToJS/Object.hs
- compiler/GHC/StgToJS/Types.hs
- compiler/GHC/Tc/Deriv.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/Splice.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0de58ca1b9076a6c12b43ba426233fe8581a8a9c...525a94473c4b0e6e572ecbe8a178972fa1b127e0

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0de58ca1b9076a6c12b43ba426233fe8581a8a9c...525a94473c4b0e6e572ecbe8a178972fa1b127e0
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/20230613/c0a35d63/attachment.html>


More information about the ghc-commits mailing list