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

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Mon Apr 3 20:21:04 UTC 2023



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


Commits:
6d5bcc20 by Haskell-mouse at 2023-04-03T16:20:59-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

- - - - -
841d10c2 by Krzysztof Gogolewski at 2023-04-03T16:20:59-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.

- - - - -


30 changed files:

- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/Hs/Type.hs
- compiler/GHC/Rename/HsType.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Types/Error/Codes.hs
- libraries/base/Unsafe/Coerce.hs
- testsuite/tests/ghci/should_run/T16096.stdout
- testsuite/tests/ghci/should_run/T21052.stdout
- testsuite/tests/linear/should_fail/T18888.stderr
- testsuite/tests/module/mod61.stderr
- testsuite/tests/overloadedrecflds/should_fail/T13132_duplicaterecflds.stderr
- testsuite/tests/parser/should_fail/readFail016.stderr
- testsuite/tests/parser/should_fail/readFail023.stderr
- testsuite/tests/polykinds/BadKindVar.stderr
- testsuite/tests/polykinds/T14710.stderr
- testsuite/tests/polykinds/T16762b.stderr
- testsuite/tests/polykinds/T7151.stderr
- testsuite/tests/rename/should_compile/ExplicitForAllRules1.stderr
- testsuite/tests/rename/should_compile/T5331.stderr
- testsuite/tests/rename/should_fail/T11663.stderr
- testsuite/tests/rename/should_fail/rnfail017.stderr
- testsuite/tests/rename/should_fail/rnfail019.stderr
- testsuite/tests/saks/should_fail/T16722.stderr
- testsuite/tests/th/T8412.stderr
- testsuite/tests/th/TH_Promoted1Tuple.stderr
- testsuite/tests/th/TH_unresolvedInfix2.stderr
- testsuite/tests/typecheck/should_fail/T18252a.stderr
- testsuite/tests/typecheck/should_fail/T8306.stderr


The diff was not included because it is too large.


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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ae2b002e357b7db02c82705508a3b99019a9b763...841d10c29ded1fe856ca127ed0fb4f42a0d6d9df
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/3884ac1c/attachment.html>


More information about the ghc-commits mailing list