[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 5 commits: Convert diagnostics in GHC.Rename.HsType to proper TcRnMessage

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Tue Apr 4 01:04:03 UTC 2023



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


Commits:
8b092910 by Haskell-mouse at 2023-04-03T19:31:26-04:00
Convert diagnostics in GHC.Rename.HsType to proper TcRnMessage

I've turned all occurrences of TcRnUnknownMessage in GHC.Rename.HsType
module into a proper TcRnMessage.
Instead, these TcRnMessage messages were introduced:

TcRnDataKindsError
TcRnUnusedQuantifiedTypeVar
TcRnIllegalKindSignature
TcRnUnexpectedPatSigType
TcRnSectionPrecedenceError
TcRnPrecedenceParsingError
TcRnIllegalKind
TcRnNegativeNumTypeLiteral
TcRnUnexpectedKindVar
TcRnBindMultipleVariables
TcRnBindVarAlreadyInScope

- - - - -
220a7a48 by Krzysztof Gogolewski at 2023-04-03T19:32:02-04:00
Fixes around unsafeCoerce#

1. `unsafeCoerce#` was documented in `GHC.Prim`. But since the overhaul
in 74ad75e87317, `unsafeCoerce#` is no longer defined there.
I've combined the documentation in `GHC.Prim` with the `Unsafe.Coerce` module.

2. The documentation of `unsafeCoerce#` stated that you should not
cast a function to an algebraic type, even if you later cast it back
before applying it. But ghci was doing that type of cast, as can be seen
with 'ghci -ddump-ds' and typing 'x = not'. I've changed it to use Any
following the documentation.

- - - - -
3af52963 by Matthew Craven at 2023-04-03T21:03:55-04:00
Add a few more memcpy-ish primops

* copyMutableByteArrayNonOverlapping#
* copyAddrToAddr#
* copyAddrToAddrNonOverlapping#
* setAddrRange#

The implementations of copyBytes, moveBytes, and fillBytes
in base:Foreign.Marshal.Utils now use these new primops,
which can cause us to work a bit harder generating code for them,
resulting in the metric increase in T21839c observed by CI on
some architectures.  But in exchange, we get better code!

Metric Increase:
    T21839c

- - - - -
ebcfaf7f by Matthew Craven at 2023-04-03T21:03:55-04:00
StgToCmm: Upgrade -fcheck-prim-bounds behavior

Fixes #21054. Additionally, we can now check for range overlap
when generating Cmm for primops that use memcpy internally.

- - - - -
74a98378 by sheaf at 2023-04-03T21:03:59-04:00
Relax assertion in varToRecFieldOcc

When using Template Haskell, it is possible to re-parent a field OccName
belonging to one data constructor to another data constructor. The
lsp-types package did this in order to "extend" a data constructor
with additional fields.

This ran into an assertion in 'varToRecFieldOcc'. This assertion
can simply be relaxed, as the resulting splices are perfectly sound.

Fixes #23220

- - - - -


30 changed files:

- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/Hs/Type.hs
- compiler/GHC/Rename/HsType.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/StgToCmm/Foreign.hs
- compiler/GHC/StgToCmm/Prim.hs
- compiler/GHC/StgToJS/Prim.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Types/Name/Occurrence.hs
- libraries/base/Data/Array/Byte.hs
- libraries/base/Foreign/Marshal/Utils.hs
- libraries/base/Unsafe/Coerce.hs
- libraries/ghc-prim/changelog.md
- rts/RtsMessages.c
- + testsuite/tests/codeGen/should_fail/CheckBoundsCompareByteArray2.hs
- + testsuite/tests/codeGen/should_fail/CheckBoundsCompareByteArray3.hs
- + testsuite/tests/codeGen/should_fail/CheckBoundsReadInt64Array.hs
- + testsuite/tests/codeGen/should_fail/CheckBoundsReadSmallArray.hs
- + testsuite/tests/codeGen/should_fail/CheckBoundsReadWord64Array.hs
- + testsuite/tests/codeGen/should_fail/CheckBoundsReadWord8ArrayAsWord32.hs
- + testsuite/tests/codeGen/should_fail/CheckOverlapCopyAddrToByteArray.hs
- + testsuite/tests/codeGen/should_fail/CheckOverlapCopyByteArray.hs
- testsuite/tests/codeGen/should_fail/all.T
- + testsuite/tests/codeGen/should_run/CheckBoundsOK.hs
- testsuite/tests/codeGen/should_run/all.T
- testsuite/tests/ghci/should_run/T16096.stdout


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/841d10c29ded1fe856ca127ed0fb4f42a0d6d9df...74a983783cab24435658a1da81b19e85f41baa10

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/841d10c29ded1fe856ca127ed0fb4f42a0d6d9df...74a983783cab24435658a1da81b19e85f41baa10
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/20230403/2f9ec903/attachment.html>


More information about the ghc-commits mailing list