[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 4 commits: GHC proposal 496 - Nullary record wildcards

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Wed Feb 22 02:08:05 UTC 2023



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


Commits:
172ff88f by Georgi Lyubenov at 2023-02-21T18:35:56-05:00
GHC proposal 496 - Nullary record wildcards

This patch implements GHC proposal 496, which allows record wildcards
to be used for nullary constructors, e.g.

  data A = MkA1 | MkA2 { fld1 :: Int }
  f :: A -> Int
  f (MkA1 {..}) = 0
  f (MkA2 {..}) = fld1

To achieve this, we add arity information to the record field
environment, so that we can accept a constructor which has no fields
while continuing to reject non-record constructors with more than 1
field. See Note [Nullary constructors and empty record wildcards],
as well as the more general overview in Note [Local constructor info in the renamer],
both in the newly introduced GHC.Types.ConInfo module.

Fixes #22161

- - - - -
f70a0239 by sheaf at 2023-02-21T18:36:35-05:00
ghc-prim: levity-polymorphic array equality ops

This patch changes the pointer-equality comparison operations in
GHC.Prim.PtrEq to work with arrays of unlifted values, e.g.

  sameArray# :: forall {l} (a :: TYPE (BoxedRep l)). Array# a -> Array# a -> Int#

Fixes #22976

- - - - -
8bb80e17 by Andreas Klebinger at 2023-02-21T21:07:59-05:00
base: Correct @since annotation for FP<->Integral bit cast operations.

Fixes #22708

- - - - -
f8e79d96 by romes at 2023-02-21T21:07:59-05:00
fix: Update documentation links

Closes #23008

Additionally batches some fixes to pointers to the Note [Wired-in units],
and a typo in said note.

- - - - -


30 changed files:

- compiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Rename/Pat.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/Types.hs
- compiler/GHC/Tc/Utils/Monad.hs
- + compiler/GHC/Types/ConInfo.hs
- compiler/GHC/Unit.hs
- compiler/GHC/Unit/State.hs
- compiler/Language/Haskell/Syntax/Type.hs
- compiler/ghc.cabal.in
- docs/users_guide/9.8.1-notes.rst
- docs/users_guide/exts/deriving_strategies.rst
- libraries/base/GHC/Float.hs
- libraries/ghc-prim/GHC/Prim/PtrEq.hs
- libraries/ghc-prim/changelog.md
- testsuite/tests/count-deps/CountDepsAst.stdout
- testsuite/tests/count-deps/CountDepsParser.stdout
- + testsuite/tests/rename/should_compile/GADTNullaryRecordRecordWildcard.hs
- + testsuite/tests/rename/should_compile/GADTNullaryRecordWildcard.hs
- + testsuite/tests/rename/should_compile/GADTSymbolicRecordRecordWildcard.hs
- + testsuite/tests/rename/should_compile/GHCIImplicitImportNullaryRecordWildcard.script
- + testsuite/tests/rename/should_compile/GHCINullaryRecordWildcard.script
- + testsuite/tests/rename/should_compile/ImportNullaryRecordWildcard.hs
- + testsuite/tests/rename/should_compile/NullaryRecordRecordWildcard.hs
- + testsuite/tests/rename/should_compile/NullaryRecordWildcard.hs
- testsuite/tests/rename/should_compile/all.T


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6763d04653113fbe0c9eceb8321c0710af9a111c...f8e79d96bd7e9be648c80909c7dbc789ebdaff58

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6763d04653113fbe0c9eceb8321c0710af9a111c...f8e79d96bd7e9be648c80909c7dbc789ebdaff58
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/20230221/a9d4e979/attachment.html>


More information about the ghc-commits mailing list