[Git][ghc/ghc][wip/torsten.schmits/0475-tuple-syntax-2] 3 commits: rts: avoid checking bdescr of value outside of Haskell heap

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Thu Feb 29 14:16:03 UTC 2024



Ben Gamari pushed to branch wip/torsten.schmits/0475-tuple-syntax-2 at Glasgow Haskell Compiler / GHC


Commits:
74b24a9b by Teo Camarasu at 2024-02-28T16:32:58+00:00
rts: avoid checking bdescr of value outside of Haskell heap

In nonmovingTidyWeaks we want to check if the key of a weak pointer
lives in the non-moving heap. We do this by checking the flags of the
block the key lives in. But we need to be careful with values that live
outside the Haskell heap, since they will lack a block descriptor and
looking for one may lead to a segfault. In this case we should just
accept that it isn't on the non-moving heap.

Resolves #24492

- - - - -
b4cae4ec by Simon Peyton Jones at 2024-02-29T02:10:08-05:00
In mkDataConRep, ensure the in-scope set is right

A small change that fixes #24489

- - - - -
481f8d43 by Torsten Schmits at 2024-02-29T09:08:14-05:00
Implement Proposal 0475

This introduces the extension ListTuplePuns, 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

- - - - -


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/Driver/DynFlags.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Type.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/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/Instance/Typeable.hs
- compiler/GHC/Tc/Validity.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Types/Id/Make.hs
- compiler/GHC/Types/Name.hs
- compiler/GHC/Types/Name/Cache.hs
- compiler/GHC/Types/Name/Ppr.hs
- compiler/GHC/Unit/Types.hs
- compiler/GHC/Utils/Outputable.hs
- docs/users_guide/9.10.1-notes.rst
- docs/users_guide/exts/data_kinds.rst


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8d5c6a76b40121ee7a82972a74b870e70c60bf39...481f8d43933c93fbdd308a9fa3acb7393e1f7969

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8d5c6a76b40121ee7a82972a74b870e70c60bf39...481f8d43933c93fbdd308a9fa3acb7393e1f7969
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/20240229/d16cb48d/attachment.html>


More information about the ghc-commits mailing list