[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 9 commits: Fix -Wterm-variable-capture scope (#23434)

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Mon Jun 12 08:58:52 UTC 2023



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
b84a2900 by Andrei Borzenkov at 2023-06-10T08:27:28-04:00
Fix -Wterm-variable-capture scope (#23434)

-Wterm-variable-capture wasn't accordant with type variable
scoping in associated types, in type classes. For example,
this code produced the warning:
  k = 12

  class C k a where
    type AT a :: k -> Type

I solved this issue by reusing machinery of newTyVarNameRn function
that is accordand with associated types: it does lookup for each free type
variable when we are in the type class context. And in this patch I
use result of this work to make sure that -Wterm-variable-capture warns
only on implicitly quantified type variables.

- - - - -
9d1a8d87 by Jorge Mendes at 2023-06-10T08:28:10-04:00
Remove redundant case statement in rts/js/mem.js.
- - - - -
53b05d09 by Oleg Grenrus at 2023-06-12T04:58:25-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 cache
the "effective" (small) diagnosticReason, which is then used for
pretty-printing of the diagnostic.

- - - - -
12b48c9d by Matthew Pickering at 2023-06-12T04:58:36-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>

- - - - -
7d931a46 by Rodrigo Mesquita at 2023-06-12T04:58:36-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

- - - - -
9bc85075 by Victor Cacciari Miraldo at 2023-06-12T04:58:40-04:00
Improve docs for Data.Fixed; adds 'realToFrac' as an option for conversion
between different precisions.

- - - - -
fe955ff5 by Emily Martins at 2023-06-12T04:58:44-04:00
delete GHCi.UI.Tags module and remove remaining references

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

- - - - -
34c93b0b by Victor Cacciari Miraldo at 2023-06-12T04:58:46-04:00
Add regression test for 17328

- - - - -
b3c6d543 by Victor Cacciari Miraldo at 2023-06-12T04:58:46-04:00
Skip checking whether constructors are in scope when deriving
newtype instances.

Fixes #17328

- - - - -


30 changed files:

- compiler/GHC/Driver/Errors.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Rename/HsType.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Tc/Deriv.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Utils/Env.hs
- compiler/GHC/Types/Error.hs
- compiler/GHC/Utils/Error.hs
- configure.ac
- distrib/configure.ac.in
- docs/users_guide/9.8.1-notes.rst
- docs/users_guide/ghci.rst
- ghc/GHCi/UI.hs
- − ghc/GHCi/UI/Tags.hs
- ghc/ghc-bin.cabal.in
- libraries/base/Data/Fixed.hs
- libraries/base/tests/IO/all.T
- libraries/base/tests/all.T
- libraries/ghc-compact/tests/all.T
- libraries/ghc-heap/tests/all.T
- libraries/hpc
- libraries/process
- + m4/fp_cc_ignore_unused_args.m4
- rts/js/mem.js
- testsuite/config/ghc
- testsuite/driver/testlib.py
- testsuite/tests/cmm/should_run/all.T


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/229b60d30c7a6dbafb9afc970d511c8c02191d78...b3c6d543c12ec40ac779e8c114f548fe70f70356

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/229b60d30c7a6dbafb9afc970d511c8c02191d78...b3c6d543c12ec40ac779e8c114f548fe70f70356
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/20230612/1a6388da/attachment.html>


More information about the ghc-commits mailing list