[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 8 commits: Bump bytestring submodule to 0.12.0.2
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Wed Oct 4 00:11:08 UTC 2023
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
b0c5dfb9 by Andrew Lelechenko at 2023-10-03T20:10:37-04:00
Bump bytestring submodule to 0.12.0.2
- - - - -
903a870e by Andrew Lelechenko at 2023-10-03T20:10:37-04:00
Inline bucket_match
- - - - -
4e09b8b9 by Ben Gamari at 2023-10-03T20:10:37-04:00
configure: Fix #21712 again
This is a bit of a shot in the dark to fix #24033, which appears to be
another instance of #21712. For some reason the ld-override logic
*still* appears to be active on Darwin targets (or at least one).
Consequently, on misconfigured systems we may choose a non-`ld64`
linker.
It's a bit unclear exactly what happened in #24033 but ultimately the
check added for #21712 was not quite right, checking for the
`ghc_host_os` (the value of which depends upon the bootstrap compiler)
instead of the target platform. Fix this.
Fixes #24033.
- - - - -
b6776454 by Krzysztof Gogolewski at 2023-10-03T20:10:38-04:00
Add a regression test for #24029
- - - - -
eb467fc5 by sheaf at 2023-10-03T20:10:40-04:00
Fix non-symbolic children lookup of fixity decl
The fix for #23664 did not correctly account for non-symbolic names
when looking up children of a given parent. This one-line fix changes
that.
Fixes #24037
- - - - -
6453b59a by Ben Gamari at 2023-10-03T20:10:40-04:00
rts/nonmoving: Fix on LLP64 platforms
Previously `NONMOVING_SEGMENT_MASK` and friends were defined with the `UL`
size suffix. However, this is wrong on LLP64 platforms like Windows,
where `long` is 32-bits.
Fixes #23003.
Fixes #23042.
- - - - -
fd31d659 by Cheng Shao at 2023-10-03T20:10:42-04:00
rts: fix incorrect ticket reference
- - - - -
703a4505 by Ben Gamari at 2023-10-03T20:10:42-04:00
users-guide: Fix discussion of -Wpartial-fields
* fix a few typos
* add a new example showing when the warning fires
* clarify the existing example
* point out -Wincomplete-record-selects
Fixes #24049.
- - - - -
19 changed files:
- compiler/GHC/Data/FastString.hs
- compiler/GHC/Types/Name/Reader.hs
- compiler/ghc.cabal.in
- docs/users_guide/using-warnings.rst
- ghc/ghc-bin.cabal.in
- hadrian/hadrian.cabal
- libraries/bytestring
- libraries/ghc-boot/ghc-boot.cabal.in
- libraries/ghc-compact/ghc-compact.cabal
- libraries/ghci/ghci.cabal.in
- libraries/haskeline
- m4/find_ld.m4
- rts/include/rts/ghc_ffi.h
- rts/sm/NonMoving.h
- + testsuite/tests/rename/should_compile/T24037.hs
- testsuite/tests/rename/should_compile/all.T
- + testsuite/tests/simplCore/should_compile/T24029.hs
- testsuite/tests/simplCore/should_compile/all.T
- utils/iserv/iserv.cabal.in
Changes:
=====================================
compiler/GHC/Data/FastString.hs
=====================================
@@ -506,6 +506,10 @@ bucket_match fs sbs = go fs
go (fs@(FastString {fs_sbs=fs_sbs}) : ls)
| fs_sbs == sbs = Just fs
| otherwise = go ls
+-- bucket_match used to inline before changes to instance Eq ShortByteString
+-- in bytestring-0.12, which made it slighhtly larger than inlining threshold.
+-- Non-inlining causes a small, but measurable performance regression, so let's force it.
+{-# INLINE bucket_match #-}
mkFastStringBytes :: Ptr Word8 -> Int -> FastString
mkFastStringBytes !ptr !len =
=====================================
compiler/GHC/Types/Name/Reader.hs
=====================================
@@ -1308,12 +1308,16 @@ childGREPriority (LookupChild { wantedParent = wanted_parent
| isTermVarOrFieldNameSpace ns
, isTermVarOrFieldNameSpace other_ns
= Just 0
- | ns == varName
+ | isValNameSpace varName
, other_ns == tcName
- -- When looking up children, we sometimes want to a symbolic variable
- -- name to resolve to a type constructor, e.g. for an infix declaration
- -- "infix +!" we want to take into account both class methods and associated
- -- types. See test T10816.
+ -- When looking up children, we sometimes want a value name
+ -- to resolve to a type constructor.
+ -- For example, for an infix declaration "infixr 3 +!" or "infix 2 `Fun`"
+ -- inside a class declaration, we want to account for the possibility
+ -- that the identifier refers to an associated type (type constructor
+ -- NameSpace), when otherwise "+!" would be in the term-level variable
+ -- NameSpace, and "Fun" would be in the term-level data constructor
+ -- NameSpace. See tests T10816, T23664, T24037.
= Just 1
| ns == tcName
, other_ns == dataName
=====================================
compiler/ghc.cabal.in
=====================================
@@ -98,7 +98,7 @@ Library
deepseq >= 1.4 && < 1.6,
directory >= 1 && < 1.4,
process >= 1 && < 1.7,
- bytestring >= 0.9 && < 0.12,
+ bytestring >= 0.9 && < 0.13,
binary == 0.8.*,
time >= 1.4 && < 1.13,
containers >= 0.6.2.1 && < 0.7,
=====================================
docs/users_guide/using-warnings.rst
=====================================
@@ -2157,16 +2157,19 @@ of ``-W(no-)*``.
:since: 8.4
The option :ghc-flag:`-Wpartial-fields` warns about a record field
- `f` that is defined in some, but not all, the contructors of a
- data type, because `f`'s record selector function may fail. For
- exampe, the record selector function `f`, defined in the `Foo`
- constructor record below, will fail when applied to ``Bar``, so
- the compiler will emit a warning at its definition when
- :ghc-flag:`-Wpartial-fields` is enabled.
+ ``f`` that is defined in some, but not all, of the constructors of a
+ data type, as such selector functions are partial. For example, when
+ :ghc-flag:`-Wpartial-fields` is enabled the compiler will emit a warning at
+ the definition of ``Foo`` below: ::
+
+ data Foo = Foo { f :: Int } | Bar
The warning is suppressed if the field name begins with an underscore. ::
- data Foo = Foo { f :: Int } | Bar
+ data Foo = Foo { _f :: Int } | Bar
+
+ Another related warning is :ghc-flag:`-Wincomplete-record-selectors`,
+ which warns at use sites rather than definition sites.
.. ghc-flag:: -Wunused-packages
:shortdesc: warn when package is requested on command line, but not needed.
=====================================
ghc/ghc-bin.cabal.in
=====================================
@@ -33,7 +33,7 @@ Executable ghc
Main-Is: Main.hs
Build-Depends: base >= 4 && < 5,
array >= 0.1 && < 0.6,
- bytestring >= 0.9 && < 0.12,
+ bytestring >= 0.9 && < 0.13,
directory >= 1 && < 1.4,
process >= 1 && < 1.7,
filepath >= 1 && < 1.5,
=====================================
hadrian/hadrian.cabal
=====================================
@@ -153,7 +153,7 @@ executable hadrian
, TypeFamilies
build-depends: Cabal >= 3.10 && < 3.11
, base >= 4.11 && < 5
- , bytestring >= 0.10 && < 0.12
+ , bytestring >= 0.10 && < 0.13
, containers >= 0.5 && < 0.7
, directory >= 1.3.1.0 && < 1.4
, extra >= 1.4.7
=====================================
libraries/bytestring
=====================================
@@ -1 +1 @@
-Subproject commit 2bdeb7b0e7dd100fce9e1f4d1ecf1cd6b5b9702c
+Subproject commit 39f40116a4adf8a3296067d64bd00e1a1e5e15bd
=====================================
libraries/ghc-boot/ghc-boot.cabal.in
=====================================
@@ -75,7 +75,7 @@ Library
build-depends: base >= 4.7 && < 4.20,
binary == 0.8.*,
- bytestring >= 0.10 && < 0.12,
+ bytestring >= 0.10 && < 0.13,
containers >= 0.5 && < 0.7,
directory >= 1.2 && < 1.4,
filepath >= 1.3 && < 1.5,
=====================================
libraries/ghc-compact/ghc-compact.cabal
=====================================
@@ -41,7 +41,7 @@ library
build-depends: ghc-prim >= 0.5.3 && < 0.11,
base >= 4.9.0 && < 4.20,
- bytestring >= 0.10.6.0 && <0.12
+ bytestring >= 0.10.6.0 && <0.13
ghc-options: -Wall
exposed-modules: GHC.Compact
=====================================
libraries/ghci/ghci.cabal.in
=====================================
@@ -78,7 +78,7 @@ library
base >= 4.8 && < 4.20,
ghc-prim >= 0.5.0 && < 0.11,
binary == 0.8.*,
- bytestring >= 0.10 && < 0.12,
+ bytestring >= 0.10 && < 0.13,
containers >= 0.5 && < 0.7,
deepseq >= 1.4 && < 1.6,
filepath == 1.4.*,
=====================================
libraries/haskeline
=====================================
@@ -1 +1 @@
-Subproject commit 0ea07e223685787893dccbcbb67f1720ef4cf80e
+Subproject commit 16ee820fc86f43045365f2c3536ad18147eb0b79
=====================================
m4/find_ld.m4
=====================================
@@ -70,19 +70,23 @@ AC_DEFUN([FIND_LD],[
AC_CHECK_TARGET_TOOL([LD], [ld])
}
- if test "$ghc_host_os" = "darwin" ; then
+ case "$target" in
+ *-darwin)
dnl N.B. Don't even try to find a more efficient linker on Darwin where
dnl broken setups (e.g. unholy mixtures of Homebrew and the native
dnl toolchain) are far too easy to come across.
dnl
dnl See #21712.
AC_CHECK_TARGET_TOOL([LD], [ld])
- elif test "x$enable_ld_override" = "xyes"; then
- find_ld
- else
- AC_CHECK_TARGET_TOOL([LD], [ld])
- fi
-
+ ;;
+ *)
+ if test "x$enable_ld_override" = "xyes"; then
+ find_ld
+ else
+ AC_CHECK_TARGET_TOOL([LD], [ld])
+ fi
+ ;;
+ esac
CHECK_LD_COPY_BUG([$1])
])
=====================================
rts/include/rts/ghc_ffi.h
=====================================
@@ -1,5 +1,5 @@
/*
- * <ffi.h> wrapper working around #23586.
+ * <ffi.h> wrapper working around #23568.
*
* (c) The University of Glasgow 2023
*
=====================================
rts/sm/NonMoving.h
=====================================
@@ -17,13 +17,13 @@
#include "BeginPrivate.h"
// Segments
-#define NONMOVING_SEGMENT_BITS 15UL // 2^15 = 32kByte
+#define NONMOVING_SEGMENT_BITS 15ULL // 2^15 = 32kByte
// Mask to find base of segment
-#define NONMOVING_SEGMENT_MASK ((1UL << NONMOVING_SEGMENT_BITS) - 1)
+#define NONMOVING_SEGMENT_MASK ((1ULL << NONMOVING_SEGMENT_BITS) - 1)
// In bytes
-#define NONMOVING_SEGMENT_SIZE (1UL << NONMOVING_SEGMENT_BITS)
+#define NONMOVING_SEGMENT_SIZE (1ULL << NONMOVING_SEGMENT_BITS)
// In words
-#define NONMOVING_SEGMENT_SIZE_W ((1UL << NONMOVING_SEGMENT_BITS) / SIZEOF_VOID_P)
+#define NONMOVING_SEGMENT_SIZE_W ((1ULL << NONMOVING_SEGMENT_BITS) / SIZEOF_VOID_P)
// In blocks
#define NONMOVING_SEGMENT_BLOCKS (NONMOVING_SEGMENT_SIZE / BLOCK_SIZE)
=====================================
testsuite/tests/rename/should_compile/T24037.hs
=====================================
@@ -0,0 +1,7 @@
+{-# LANGUAGE TypeFamilies, TypeOperators #-}
+
+module T24037 where
+
+class POrd a where
+ type Geq a b
+ infixr 6 `Geq`
=====================================
testsuite/tests/rename/should_compile/all.T
=====================================
@@ -215,6 +215,7 @@ test('T23434', normal, compile, [''])
test('T23510b', normal, compile, [''])
test('T23512b', normal, compile, [''])
test('T23664', normal, compile, [''])
+test('T24037', normal, compile, [''])
test('ExportWarnings1', extra_files(['ExportWarnings_base.hs', 'ExportWarnings_aux.hs']), multimod_compile, ['ExportWarnings1', '-v0 -Wno-duplicate-exports -Wx-custom'])
test('ExportWarnings2', extra_files(['ExportWarnings_base.hs', 'ExportWarnings_aux.hs', 'ExportWarnings_aux2.hs']), multimod_compile, ['ExportWarnings2', '-v0 -Wno-duplicate-exports -Wx-custom'])
test('ExportWarnings3', extra_files(['ExportWarnings_base.hs', 'ExportWarnings_aux.hs']), multimod_compile, ['ExportWarnings3', '-v0 -Wno-duplicate-exports -Wx-custom'])
=====================================
testsuite/tests/simplCore/should_compile/T24029.hs
=====================================
@@ -0,0 +1,21 @@
+{-# OPTIONS_GHC -O #-}
+module T24029 (surround) where
+
+data Buffer where
+ Buffer :: !Int -> Buffer
+
+newtype Builder = Builder (Buffer -> Buffer)
+
+c :: Builder -> Builder -> Builder
+c (Builder f) (Builder g) = Builder (\b -> f (g b))
+
+i :: Buffer -> Buffer
+i (Buffer x) = Buffer x
+
+surround :: Builder -> Builder
+surround f = f
+{-# NOINLINE [1] surround #-}
+
+{-# RULES
+"surround/surround" forall a. surround a = c (Builder (i . i)) a
+ #-}
=====================================
testsuite/tests/simplCore/should_compile/all.T
=====================================
@@ -502,3 +502,4 @@ test('T23938', [extra_files(['T23938A.hs'])], multimod_compile, ['T23938', '-O -
test('T23922a', normal, compile, ['-O'])
test('T23952', [extra_files(['T23952a.hs'])], multimod_compile, ['T23952', '-v0 -O'])
test('T24014', normal, compile, ['-dcore-lint'])
+test('T24029', normal, compile, [''])
=====================================
utils/iserv/iserv.cabal.in
=====================================
@@ -33,7 +33,7 @@ Executable iserv
Build-Depends: array >= 0.5 && < 0.6,
base >= 4 && < 5,
binary >= 0.7 && < 0.11,
- bytestring >= 0.10 && < 0.12,
+ bytestring >= 0.10 && < 0.13,
containers >= 0.5 && < 0.7,
deepseq >= 1.4 && < 1.6,
ghci == @ProjectVersionMunged@
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/dad88a7b4ffb22c062ada80c070cf11aaed0f576...703a4505469edd30a44b33bc973fe0f10b2d78c2
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/dad88a7b4ffb22c062ada80c070cf11aaed0f576...703a4505469edd30a44b33bc973fe0f10b2d78c2
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/20231003/a801e7ea/attachment-0001.html>
More information about the ghc-commits
mailing list