[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 7 commits: Fix typo in Prelude doc for (>>=)
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Sat Sep 28 08:00:48 UTC 2024
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
9ffd6163 by Leo at 2024-09-27T16:26:01+05:30
Fix typo in Prelude doc for (>>=)
Fix a minor typo ("equivialent" instead of "equivalent") in the documentation for (>>=) in the prelude.
- - - - -
5745dbd3 by Vladislav Zavialov at 2024-09-27T16:26:52+05:30
Wildcard binders in type declarations (#23501)
Add support for wildcard binders in type declarations:
type Const a b = a -- BEFORE: the `b` had to be named
-- even if unused on the RHS
type Const a _ = a -- AFTER: the compiler accepts
-- a wildcard binder `_`
The new feature is part of GHC Proposal #425 "Invisible binders
in type declarations", and more specifically its amendment #641.
Just like a named binder, a wildcard binder `_` may be:
* plain: _
* kinded: (_ :: k -> Type)
* invisible, plain: @_
* invisible, kinded: @(_ :: k -> Type)
Those new forms of binders are allowed to occur on the LHSs of
data, newtype, type, class, and type/data family declarations:
data D _ = ...
newtype N _ = ...
type T _ = ...
class C _ where ...
type family F _
data family DF _
(Test case: testsuite/tests/typecheck/should_compile/T23501a.hs)
However, we choose to reject them in forall telescopes and
type family result variable binders (the latter being part
of the TypeFamilyDependencies extension):
type family Fd a = _ -- disallowed (WildcardBndrInTyFamResultVar)
fn :: forall _. Int -- disallowed (WildcardBndrInForallTelescope)
(Test case: testsuite/tests/rename/should_fail/T23501_fail.hs)
See the new Notes:
* Note [Type variable binders]
* Note [Wildcard binders in disallowed contexts]
To accommodate the new forms of binders, HsTyVarBndr was changed
as follows (demonstrated without x-fields for clarity)
-- BEFORE (ignoring x-fields and locations)
data HsTyVarBndr flag
= UserTyVar flag Name
| KindedTyVar flag Name HsKind
-- AFTER (ignoring x-fields and locations)
data HsTyVarBndr flag = HsTvb flag HsBndrVar HsBndrKind
data HsBndrVar = HsBndrVar Name | HsBndrWildCard
data HsBndrKind = HsBndrNoKind | HsBndrKind LHsKind
The rest of the patch is downstream from this change.
To avoid a breaking change to the TH AST, we generate fresh
names to replace wildcard binders instead of adding a dedicated
representation for them (as discussed in #641).
And to put a cherry on top of the cake, we now allow wildcards in
kind-polymorphic type variable binders in constructor patterns,
see Note [Type patterns: binders and unifiers] and the tyPatToBndr
function in GHC.Tc.Gen.HsType; example:
fn (MkT @(_ :: forall k. k -> Type) _ _) = ...
(Test case: testsuite/tests/typecheck/should_compile/T23501b.hs)
- - - - -
ff2bdca2 by Matthew Pickering at 2024-09-27T16:27:08+05:30
ci: Push perf notes from wasm jobs
It was observed in #25299 that we were failing to push performance
numbers from the wasm jobs.
In future we might want to remove this ad-hoc check but for now it's
easier to add another special case.
Towards #25299
- - - - -
4c76f75c by Zubin Duggal at 2024-09-27T16:44:00+05:30
Bump GHC version to 9.12
- - - - -
e4ac1b0d by Zubin Duggal at 2024-09-27T19:12:24+05:30
Bump GHC version to 9.13
- - - - -
5a103a4b by Andreas Klebinger at 2024-09-28T04:00:24-04:00
ghc-experimental: Expose primops and ghc extensions via GHC.PrimOps
This will be the new place for functions that would have gone into
GHC.Exts in the past but are not stable enough to do so now.
Addresses #25242
- - - - -
f678355c by Sylvain Henry at 2024-09-28T04:00:35-04:00
RTS: cleanup timerfd file descriptors after a fork (#25280)
When we init a timerfd-based ticker, we should be careful to cleanup the
old file descriptors (e.g. after a fork).
- - - - -
30 changed files:
- .gitlab/ci.sh
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Instances.hs
- compiler/GHC/Hs/Type.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Rename/HsType.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/Gen/Sig.hs
- compiler/GHC/Tc/TyCl.hs
- compiler/GHC/ThToHs.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/Language/Haskell/Syntax/Extension.hs
- compiler/Language/Haskell/Syntax/Type.hs
- configure.ac
- − docs/users_guide/9.12.1-notes.rst
- + docs/users_guide/9.14.1-notes.rst
- docs/users_guide/exts/type_abstractions.rst
- libraries/base/src/GHC/Exts.hs
- libraries/ghc-experimental/ghc-experimental.cabal.in
- + libraries/ghc-experimental/src/GHC/PrimOps.hs
- libraries/ghc-internal/src/GHC/Internal/Base.hs
- libraries/ghc-internal/src/GHC/Internal/Exts.hs
- rts/posix/ticker/TimerFd.c
- testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1877884729ffd43bf02a7936c4ead50f1a9ba2dc...f678355cebdc1432e52514ecf8f27dd5066ccead
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1877884729ffd43bf02a7936c4ead50f1a9ba2dc...f678355cebdc1432e52514ecf8f27dd5066ccead
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/20240928/b5ec80f1/attachment-0001.html>
More information about the ghc-commits
mailing list