[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 6 commits: Introduce ListTuplePuns extension

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Sat Mar 2 19:11:16 UTC 2024



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


Commits:
d91d00fc by Torsten Schmits at 2024-03-01T15:01:50-05:00
Introduce ListTuplePuns extension

This implements Proposal 0475, introducing the `ListTuplePuns` extension
which is enabled by default.

Disabling this extension makes it invalid to refer to list, tuple and
sum type constructors by using built-in syntax like `[Int]`,
`(Int, Int)`, `(# Int#, Int# #)` or `(# Int | Int #)`.
Instead, this syntax exclusively denotes data constructors for use with
`DataKinds`.
The conventional way of referring to these data constructors by
prefixing them with a single quote (`'(Int, Int)`) is now a parser
error.

Tuple declarations have been moved to `GHC.Tuple.Prim` and the `Solo`
data constructor has been renamed to `MkSolo` (in a previous commit).
Unboxed tuples and sums now have real source declarations in `GHC.Types`.
Unit and solo types for tuples are now called `Unit`, `Unit#`, `Solo`
and `Solo#`.
Constraint tuples now have the unambiguous type constructors `CTuple<n>`
as well as `CUnit` and `CSolo`, defined in `GHC.Classes` like before.

A new parser construct has been added for the unboxed sum data
constructor declarations.

The type families `Tuple`, `Sum#` etc. that were intended to provide
nicer syntax have been omitted from this change set due to inference
problems, to be implemented at a later time.
See the MR discussion for more info.

Updates the submodule utils/haddock.
Updates the cabal submodule due to new language extension.

    Metric Increase:
        haddock.base

    Metric Decrease:
        MultiLayerModulesTH_OneShot
        size_hello_artifact

Proposal document: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0475-tuple-syntax.rst

Merge request: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/8820

Tracking ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/21294

- - - - -
bbdb6286 by Sylvain Henry at 2024-03-01T15:01:50-05:00
JS linker: filter unboxed tuples

- - - - -
dec6d8d3 by Arnaud Spiwack at 2024-03-01T15:02:30-05:00
Improve error messages coming from non-linear patterns

This enriched the `CtOrigin` for non-linear patterns to include data
of the pattern that created the constraint (which can be quite useful
if it occurs nested in a pattern) as well as an explanation why the
pattern is non-restricted in (at least in some cases).

- - - - -
6612388e by Arnaud Spiwack at 2024-03-01T15:02:30-05:00
Adjust documentation of linear lets according to committee decision

- - - - -
338b923b by Cheng Shao at 2024-03-02T14:11:12-05:00
compiler: start deprecating cmmToRawCmmHook

cmmToRawCmmHook was added 4 years ago in
d561c8f6244f8280a2483e8753c38e39d34c1f01. Its only user is the
Asterius project, which has been archived and deprecated in favor of
the ghc wasm backend. This patch starts deprecating cmmToRawCmmHook by
placing a DEPRECATED pragma, and actual removal shall happen in a
future GHC major release if no issue to oppose the deprecation has
been raised in the meantime.

- - - - -
df863128 by Andrew Lelechenko at 2024-03-02T14:11:13-05:00
Data.List.NonEmpty.unzip: use WARNING with category instead of DEPRECATED

CLC proposal: https://github.com/haskell/core-libraries-committee/issues/258

- - - - -


30 changed files:

- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/Types.hs
- compiler/GHC/Builtin/Types.hs-boot
- compiler/GHC/Builtin/Uniques.hs
- compiler/GHC/Core/Predicate.hs
- compiler/GHC/Data/Bag.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Hooks.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Type.hs
- compiler/GHC/HsToCore/Match/Constructor.hs
- compiler/GHC/Iface/Type.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Errors/Ppr.hs
- compiler/GHC/Parser/Errors/Types.hs
- compiler/GHC/Parser/Lexer.x
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Runtime/Eval.hs
- compiler/GHC/StgToJS/Linker/Linker.hs
- compiler/GHC/StgToJS/Linker/Utils.hs
- compiler/GHC/StgToJS/Utils.hs
- compiler/GHC/Tc/Errors.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Gen/Bind.hs
- compiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/Gen/Pat.hs
- compiler/GHC/Tc/Instance/Typeable.hs
- compiler/GHC/Tc/Types/Origin.hs
- compiler/GHC/Tc/Validity.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/fefb63f1fad3c66f8984636bbaad541de6c28137...df8631287d4fa20ca2f19619c289c630e3e1c040

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/fefb63f1fad3c66f8984636bbaad541de6c28137...df8631287d4fa20ca2f19619c289c630e3e1c040
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/20240302/0e54ab29/attachment.html>


More information about the ghc-commits mailing list