[Git][ghc/ghc][wip/T23479] 21 commits: Fix typo in Prelude doc for (>>=)

Serge S. Gulin (@gulin.serge) gitlab at gitlab.haskell.org
Wed Oct 2 08:37:47 UTC 2024



Serge S. Gulin pushed to branch wip/T23479 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

- - - - -
28b3198d by Serge S. Gulin at 2024-10-02T11:37:35+03:00
JS: Re-add optimization for literal strings in genApp (fixes 23479 (muted temporary))

Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/

- - - - -
c9a63b0a by Serge S. Gulin at 2024-10-02T11:37:35+03:00
Use name defined at `GHC.Builtin.Names`

- - - - -
3369920a by Serge S. Gulin at 2024-10-02T11:37:35+03:00
Apply 1 suggestion(s) to 1 file(s)

Co-authored-by: Sylvain Henry <sylvain at haskus.fr>
- - - - -
3a602c9d by Serge S. Gulin at 2024-10-02T11:37:35+03:00
Attempt to take 805 for id

- - - - -
c921dd45 by Serge S. Gulin at 2024-10-02T11:37:35+03:00
Attempt to add to basicKnownKeyNames

Co-authored-by: Andrei Borzenkov <root at sandwitch.dev>
Co-authored-by: Danil Berestov <goosedb at yandex.ru>

- - - - -
02460cb2 by Serge S. Gulin at 2024-10-02T11:37:35+03:00
Naive attempt to add `StgLitArg (LitString bs)`

- - - - -
2b784cf2 by Serge S. Gulin at 2024-10-02T11:37:35+03:00
WIP add logging

- - - - -
feb7a942 by Serge S. Gulin at 2024-10-02T11:37:35+03:00
WIP add logging

- - - - -
94685387 by Serge S. Gulin at 2024-10-02T11:37:35+03:00
Add STG debug from JS Sinker

- - - - -
6b74dadd by Serge S. Gulin at 2024-10-02T11:37:35+03:00
Add eager Sinker's strings unfloater

- - - - -
a9e62049 by Serge S. Gulin at 2024-10-02T11:37:35+03:00
Add STG debug from JS Sinker

- - - - -
cfc3dfd6 by Serge S. Gulin at 2024-10-02T11:37:35+03:00
Add limitations to unfloat string lits

- - - - -
b1e7ec27 by Serge S. Gulin at 2024-10-02T11:37:35+03:00
Fix build

- - - - -
00a7c409 by Serge S. Gulin at 2024-10-02T11:37:35+03:00
String lits were removed too early, need do it at Linker instead

- - - - -
91de105f by Serge S. Gulin at 2024-10-02T11:37:35+03:00
Add tracing capabilities for JS Modules

- - - - -
f3650b38 by Serge S. Gulin at 2024-10-02T11:37:35+03:00
Add tracing capabilities for GlobalOcc's

- - - - -


30 changed files:

- .gitlab/ci.sh
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Session.hs
- 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/StgToJS/Apply.hs
- compiler/GHC/StgToJS/CodeGen.hs
- compiler/GHC/StgToJS/Linker/Linker.hs
- compiler/GHC/StgToJS/Monad.hs
- + compiler/GHC/StgToJS/Sinker/Collect.hs
- compiler/GHC/StgToJS/Sinker.hs → compiler/GHC/StgToJS/Sinker/Sinker.hs
- + compiler/GHC/StgToJS/Sinker/StringsUnfloat.hs
- compiler/GHC/StgToJS/Symbols.hs
- compiler/GHC/StgToJS/Types.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/GHC/Types/ForeignCall.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/285413a01582a9621cc10a4d4d9dea4a276e6598...f3650b382f006777edc1a144b5dce183d8871926

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/285413a01582a9621cc10a4d4d9dea4a276e6598...f3650b382f006777edc1a144b5dce183d8871926
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/20241002/70553982/attachment-0001.html>


More information about the ghc-commits mailing list