[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 7 commits: Bump bytestring submodule to 0.12.0.2

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Wed Oct 4 05:02:16 UTC 2023



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


Commits:
83e5368d by Andrew Lelechenko at 2023-10-04T01:01:36-04:00
Bump bytestring submodule to 0.12.0.2

- - - - -
5f609a5b by Andrew Lelechenko at 2023-10-04T01:01:36-04:00
Inline bucket_match

- - - - -
0c84ded0 by Ben Gamari at 2023-10-04T01:01:36-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.

- - - - -
b9f07804 by Krzysztof Gogolewski at 2023-10-04T01:01:37-04:00
Add a regression test for #24029

- - - - -
697d1ea1 by sheaf at 2023-10-04T01:01:39-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

- - - - -
7ce19e36 by Cheng Shao at 2023-10-04T01:01:40-04:00
rts: fix incorrect ticket reference

- - - - -
ae6f38a3 by Ben Gamari at 2023-10-04T01:01:41-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.

- - - - -


18 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
- + 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
  *


=====================================
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/703a4505469edd30a44b33bc973fe0f10b2d78c2...ae6f38a340e5facc8f27921fb0a0ea2398827b69

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/703a4505469edd30a44b33bc973fe0f10b2d78c2...ae6f38a340e5facc8f27921fb0a0ea2398827b69
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/20231004/f71f2071/attachment-0001.html>


More information about the ghc-commits mailing list