My !8750 builds are failing in the Unix library with the "pattern match is redundant" message below.

And indeed the pattern match is redundant.  Here's the .hs version of the file

unpackRLimit :: CRLim -> ResourceLimit
unpackRLimit (18446744073709551615)  = ResourceLimitInfinity
{-# LINE 101 "libraries/unix/System/Posix/Resource.hsc" #-}
unpackRLimit other

{-# LINE 103 "libraries/unix/System/Posix/Resource.hsc" #-}
    | ((18446744073709551615) :: CRLim) /= (18446744073709551615) &&
{-# LINE 104 "libraries/unix/System/Posix/Resource.hsc" #-}
      other == (18446744073709551615) = ResourceLimitUnknown

{-# LINE 105 "libraries/unix/System/Posix/Resource.hsc" #-}

{-# LINE 106 "libraries/unix/System/Posix/Resource.hsc" #-}

{-# LINE 107 "libraries/unix/System/Posix/Resource.hsc" #-}
    | ((18446744073709551615) :: CRLim) /= (18446744073709551615) &&
{-# LINE 108 "libraries/unix/System/Posix/Resource.hsc" #-}
      other == (18446744073709551615) = ResourceLimitUnknown
{-# LINE 109 "libraries/unix/System/Posix/Resource.hsc" #-}

{-# LINE 110 "libraries/unix/System/Posix/Resource.hsc" #-}
    | otherwise = ResourceLimit (fromIntegral other)


The red line means that the blue lines will fail.

So the warning looks correct.  But it's stopping my CI from working.  I have no idea why this doesn't happen in HEAD.   Can anyone help?

Thanks

Simon


Command line: _build/stage0/bin/aarch64-linux-gnu-ghc -Wall -Wcompat -fdiagnostics-color=never -dynamic-too -hisuf hi -osuf o -hcsuf hc -static -hide-all-packages -no-user-package-db '-package-env -' '-package-db _build/stage1/lib/package.conf.d' '-this-unit-id unix-2.7.2.2' '-package-id base-4.17.0.0' '-package-id bytestring-0.11.3.1' '-package-id time-1.12.2' -i -i/builds/ghc/ghc/_build/stage1/libraries/unix/build -i/builds/ghc/ghc/_build/stage1/libraries/unix/build/autogen -i/builds/ghc/ghc/libraries/unix -Irts/include -I_build/stage1/libraries/unix/build -I_build/stage1/libraries/unix/build/include -Ilibraries/unix/include -I/builds/ghc/ghc/_build/stage1/lib/aarch64-linux-ghc-9.5.20220906/time-1.12.2/include -I/builds/ghc/ghc/_build/stage1/lib/aarch64-linux-ghc-9.5.20220906/bytestring-0.11.3.1/include -I/builds/ghc/ghc/_build/stage1/lib/aarch64-linux-ghc-9.5.20220906/base-4.17.0.0/include -I/builds/ghc/ghc/_build/stage1/lib/aarch64-linux-ghc-9.5.20220906/ghc-bignum-1.3/include -I/builds/ghc/ghc/_build/stage1/lib/aarch64-linux-ghc-9.5.20220906/rts-1.0.2/include -optP-include -optP_build/stage1/libraries/unix/build/autogen/cabal_macros.h -outputdir _build/stage1/libraries/unix/build -Wnoncanonical-monad-instances -optc-Wno-error=inline -optP-Wno-nonportable-include-path -c _build/stage1/libraries/unix/build/System/Posix/Resource.hs -o _build/stage1/libraries/unix/build/System/Posix/Resource.o -fllvm-fill-undef-with-garbage -dno-debug-output -Wall -XHaskell2010 -no-global-package-db -package-db=/builds/ghc/ghc/_build/stage1/lib/package.conf.d -ghcversion-file=rts/include/ghcversion.h -ghcversion-file=rts/include/ghcversion.h -O -Wno-deprecated-flags -Werror -dlint
===> Command failed with error code: 1
libraries/unix/System/Posix/Resource.hsc:107:7: error: [-Woverlapping-patterns, -Werror=overlapping-patterns]
Pattern match is redundant
In an equation for ‘unpackRLimit’:
unpackRLimit other | ((18446744073709551615) :: CRLim)
/= (18446744073709551615)
&& other == (18446744073709551615) = ...
|
107 | | ((#const RLIM_SAVED_CUR) :: CRLim) /= (#const RLIM_INFINITY) &&
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...