<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Thanks, good to know. Yes, I did git submodule update.  I'll look again tomorrow</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">S<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 6 Sept 2022 at 17:27, Sam Derbyshire <<a href="mailto:sam.derbyshire@gmail.com">sam.derbyshire@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Simon,</div><div><br></div><div>This is due to my patch <a href="https://gitlab.haskell.org/ghc/ghc/-/commit/4786acf758ef064d3b79593774d1672e294b0afb" target="_blank">4786acf7</a> landing, which means GHC does better at recognising the redundant pattern match.</div><div>That MR also updated the unix submodule, in order to suppress that pattern match warning.</div><div><br></div><div>So I would guess that you have not updated the unix submodule after rebasing your MR; perhaps try "git submodule update"? <br></div><div>The unix submodule is currently on commit 
<a href="https://gitlab.haskell.org/ghc/ghc/-/commit/4786acf758ef064d3b79593774d1672e294b0afb" target="_blank">2a6079a2</a>.<br></div><div><br></div><div>Hope that helps,</div><div><br></div><div>Sam<br></div><div><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 6 Sept 2022 at 17:52, Simon Peyton Jones <<a href="mailto:simon.peytonjones@gmail.com" target="_blank">simon.peytonjones@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-family:tahoma,sans-serif">My !8750 builds are failing in the Unix library with the "pattern match is redundant" message below.</div><div style="font-family:tahoma,sans-serif"><br></div><div style="font-family:tahoma,sans-serif">And indeed the pattern match is redundant.  Here's the .hs version of the file</div><div style="font-family:tahoma,sans-serif"><br></div><div style="font-family:tahoma,sans-serif;margin-left:40px"><span style="font-family:monospace">unpackRLimit :: CRLim -> ResourceLimit<br><span style="color:rgb(255,0,0)">unpackRLimit (18446744073709551615)  =</span> ResourceLimitInfinity<br>{-# LINE 101 "libraries/unix/System/Posix/Resource.hsc" #-}<br>unpackRLimit other<br><br>{-# LINE 103 "libraries/unix/System/Posix/Resource.hsc" #-}<br><span style="color:rgb(0,0,255)">    | ((18446744073709551615) :: CRLim) /= (18446744073709551615) &&<br>{-# LINE 104 "libraries/unix/System/Posix/Resource.hsc" #-}<br>      other == (18446744073709551615) = ResourceLimitUnknown</span><br>{-# LINE 105 "libraries/unix/System/Posix/Resource.hsc" #-}<br><br>{-# LINE 106 "libraries/unix/System/Posix/Resource.hsc" #-}<br><br>{-# LINE 107 "libraries/unix/System/Posix/Resource.hsc" #-}<br>    | ((18446744073709551615) :: CRLim) /= (18446744073709551615) &&<br>{-# LINE 108 "libraries/unix/System/Posix/Resource.hsc" #-}<br>      other == (18446744073709551615) = ResourceLimitUnknown<br>{-# LINE 109 "libraries/unix/System/Posix/Resource.hsc" #-}<br><br>{-# LINE 110 "libraries/unix/System/Posix/Resource.hsc" #-}<br>    | otherwise = ResourceLimit (fromIntegral other)</span><br></div><div style="font-family:tahoma,sans-serif"><br></div><div style="font-family:tahoma,sans-serif">The red line means that the blue lines will fail.</div><div style="font-family:tahoma,sans-serif"><br></div><div style="font-family:tahoma,sans-serif">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?</div><div style="font-family:tahoma,sans-serif"><br></div><div style="font-family:tahoma,sans-serif">Thanks</div><div style="font-family:tahoma,sans-serif"><br></div><div style="font-family:tahoma,sans-serif">Simon</div><div style="font-family:tahoma,sans-serif"><br></div><div style="font-family:tahoma,sans-serif"><br></div><div style="font-family:tahoma,sans-serif">
<code><div><span>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</span></div><div></div></code><code><div><span>===> Command failed with error code: 1</span></div><div></div></code><code><div><span>libraries/unix/System/Posix/Resource.hsc:107:7: error: [-Woverlapping-patterns, -Werror=overlapping-patterns]</span></div><div></div></code><code><div><span>    Pattern match is redundant</span></div><div></div></code><code><div><span>    In an equation for ‘unpackRLimit’:</span></div><div></div></code><code><div><span>        unpackRLimit other | ((18446744073709551615) :: CRLim)</span></div><div></div></code><code><div><span>                               /= (18446744073709551615)</span></div><div></div></code><code><div><span>                               && other == (18446744073709551615) = ...</span></div><div></div></code><code><div><span>    |</span></div><div></div></code><code><div><span>107 |     | ((#const RLIM_SAVED_CUR) :: CRLim) /= (#const RLIM_INFINITY) &&</span></div><div></div></code><code><span>    |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...</span></code>

</div></div>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
</blockquote></div></div>
</blockquote></div>