[Git][ghc/ghc][wip/T22151] 10 commits: Document the semantics of pattern bindings a bit better

Ryan Scott (@RyanGlScott) gitlab at gitlab.haskell.org
Wed Jan 18 12:51:42 UTC 2023



Ryan Scott pushed to branch wip/T22151 at Glasgow Haskell Compiler / GHC


Commits:
003b6d44 by Simon Peyton Jones at 2023-01-17T16:33:05-05:00
Document the semantics of pattern bindings a bit better

This MR is in response to the discussion on #22719

- - - - -
f4d50baf by Vladislav Zavialov at 2023-01-17T16:33:41-05:00
Hadrian: fix warnings (#22783)

This change fixes the following warnings when building Hadrian:

	src/Hadrian/Expression.hs:38:10: warning: [-Wredundant-constraints]
	src/Hadrian/Expression.hs:84:13: warning: [-Wtype-equality-requires-operators]
	src/Hadrian/Expression.hs:84:21: warning: [-Wtype-equality-requires-operators]
	src/Hadrian/Haskell/Cabal/Parse.hs:67:1: warning: [-Wunused-imports]

- - - - -
06036d93 by Sylvain Henry at 2023-01-18T01:55:10-05:00
testsuite: req_smp --> req_target_smp, req_ghc_smp

See #22630 and !9552

This commit:
 - splits req_smp into req_target_smp and req_ghc_smp
 - changes the testsuite driver to calculate req_ghc_smp
 - changes a handful of tests to use req_target_smp instead of req_smp
 - changes a handful of tests to use req_host_smp when needed

The problem:
 - the problem this solves is the ambiguity surrounding req_smp
 - on master req_smp was used to express the constraint that the program
 being compiled supports smp _and_ that the host RTS (i.e., the RTS used
 to compile the program) supported smp. Normally that is fine, but in
 cross compilation this is not always the case as was discovered in #22630.

The solution:
 - Differentiate the two constraints:
   - use req_target_smp to say the RTS the compiled program is linked
   with (and the platform) supports smp
   - use req_host_smp to say the RTS the host is linked with supports smp

WIP: fix req_smp (target vs ghc)

add flag to separate bootstrapper

split req_smp -> req_target_smp and req_ghc_smp

update tests smp flags

cleanup and add some docstrings

only set ghc_with_smp to bootstrapper on S1 or CC

Only set ghc_with_smp to bootstrapperWithSMP of when testing stage 1
and cross compiling

test the RTS in config/ghc not hadrian

re-add ghc_with_smp

fix and align req names

fix T11760 to use req_host_smp

test the rts directly, avoid python 3.5 limitation

test the compiler in a try block

align out of tree and in tree withSMP flags

mark failing tests as host req smp

testsuite: req_host_smp --> req_ghc_smp

Fix ghc vs host, fix ghc_with_smp leftover

- - - - -
ee9b78aa by Krzysztof Gogolewski at 2023-01-18T01:55:45-05:00
Use -Wdefault when running Python testdriver (#22727)

- - - - -
e9c0537c by Vladislav Zavialov at 2023-01-18T01:56:22-05:00
Enable -Wstar-is-type by default (#22759)

Following the plan in GHC Proposal #143 "Remove the * kind syntax",
which states:

	In the next release (or 3 years in), enable -fwarn-star-is-type by default.

The "next release" happens to be 9.6.1

I also moved the T21583 test case from should_fail to should_compile,
because the only reason it was failing was -Werror=compat in our test
suite configuration.

- - - - -
4efee43d by Ryan Scott at 2023-01-18T01:56:59-05:00
Add missing parenthesizeHsType in cvtSigTypeKind

We need to ensure that the output of `cvtSigTypeKind` is parenthesized (at
precedence `sigPrec`) so that any type signatures with an outermost, explicit
kind signature can parse correctly.

Fixes #22784.

- - - - -
f891a442 by Ben Gamari at 2023-01-18T07:28:00-05:00
Bump ghc-tarballs to fix #22497

It turns out that gmp 6.2.1 uses the platform-reserved `x18` register on
AArch64/Darwin. This was fixed in upstream changeset 18164:5f32dbc41afc,
which was merged in 2020. Here I backport this patch although I do hope
that a new release is forthcoming soon.

Bumps gmp-tarballs submodule.

Fixes #22497.

- - - - -
b13c6ea5 by Ben Gamari at 2023-01-18T07:28:00-05:00
Bump gmp-tarballs submodule

This backports the upstream fix for CVE-2021-43618, fixing #22789.

- - - - -
c45a5fff by Cheng Shao at 2023-01-18T07:28:37-05:00
Fix typo in recent darwin tests fix

Corrects a typo in !9647. Otherwise T18623 will still fail on darwin
and stall other people's work.

- - - - -
d79692c4 by Ryan Scott at 2023-01-18T07:51:14-05:00
Add regression test for #22151

Issue #22151 was coincidentally fixed in commit
aed1974e92366ab8e117734f308505684f70cddf (`Refactor the treatment of loopy
superclass dicts`). This adds a regression test to ensure that the issue
remains fixed.

Fixes #22151.

- - - - -


30 changed files:

- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/ThToHs.hs
- docs/users_guide/9.6.1-notes.rst
- docs/users_guide/exts/primitives.rst
- docs/users_guide/exts/strict.rst
- docs/users_guide/using-warnings.rst
- hadrian/hadrian.cabal
- hadrian/src/Hadrian/Expression.hs
- hadrian/src/Hadrian/Haskell/Cabal/Parse.hs
- hadrian/src/Settings/Builders/RunTest.hs
- libraries/base/tests/all.T
- libraries/ghc-bignum/gmp/gmp-tarballs
- testsuite/config/ghc
- testsuite/driver/cpu_features.py
- testsuite/driver/runtests.py
- testsuite/driver/testglobals.py
- testsuite/driver/testlib.py
- testsuite/mk/test.mk
- testsuite/tests/codeGen/should_compile/all.T
- testsuite/tests/codeGen/should_run/all.T
- testsuite/tests/concurrent/T13615/all.T
- testsuite/tests/concurrent/should_run/all.T
- + testsuite/tests/deSugar/should_compile/T22719.hs
- + testsuite/tests/deSugar/should_compile/T22719.stderr
- testsuite/tests/deSugar/should_compile/all.T
- testsuite/tests/driver/T14075/all.T
- testsuite/tests/driver/T20030/test1/all.T


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f23af1a0ad236c8a309042025241b277626de3d7...d79692c4e048fbe4336b78e43e6c4977cb109970

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f23af1a0ad236c8a309042025241b277626de3d7...d79692c4e048fbe4336b78e43e6c4977cb109970
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/20230118/3fd36fb3/attachment.html>


More information about the ghc-commits mailing list