[Git][ghc/ghc][master] 5 commits: Fix typo in Prelude doc for (>>=)
Matthew Pickering (@mpickering)
gitlab at gitlab.haskell.org
Sat Sep 28 07:52:05 UTC 2024
Matthew Pickering pushed to branch master 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
- - - - -
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/ghc-internal/src/GHC/Internal/Base.hs
- testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr
- testsuite/tests/parser/should_compile/DumpParsedAst.stderr
- testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
- testsuite/tests/parser/should_compile/DumpSemis.stderr
- testsuite/tests/parser/should_compile/KindSigs.stderr
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7cb7172eff9e18ed1c98f65a98018f76c4fcc9f6...e4ac1b0d281b85a0144d1ef6f84a1df00e236052
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7cb7172eff9e18ed1c98f65a98018f76c4fcc9f6...e4ac1b0d281b85a0144d1ef6f84a1df00e236052
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/57bfc7eb/attachment.html>
More information about the ghc-commits
mailing list