
I'm getting this with "sh validate -legacy" compiler/main/DynFlags.hs:1344:15: error: [-Woverlapping-patterns, -Werror=overlapping-patterns] Pattern match is redundant In an equation for 'settings': settings s | otherwise = ... | 1344 | | otherwise = panic $ "Invalid cfg parameters." ++ exampleString | ^^^^^^^^^ This is when compiling the stage-2 compiler. There's an ifdef in DynFlags thus #if __GLASGOW_HASKELL__ <= 810 | otherwise = panic $ "Invalid cfg parameters." ++ exampleString #endif but somehow it's not triggering for the stage2 compiler. Any ideas? It's blocking a full build. This #ifdef was added in 8038cbd96f4, when GHC became better at reporting redundant code. Simon

It would be good to know how to fix this. It's blocking my builds.
For some reason it doesn't seem to kill CI
Simon
From: Simon Peyton Jones
Sent: 25 January 2020 20:26
To: ghc-devs

Which stage 0 compiler are you using? It seems to be <= 8.10 and still has 8038cbd96f4 merged which seems contradictory. Anyway the alternative seems to be redundant from the beginning and should have been removed IMO. I have opened https://gitlab.haskell.org/ghc/ghc/merge_requests/2564 to fix this. Does it work after applying this patch? Sylvain On 27/01/2020 12:42, Simon Peyton Jones via ghc-devs wrote:
It would be good to know how to fix this. It’s blocking my builds.
For some reason it doesn’t seem to kill CI
Simon
*From:*Simon Peyton Jones *Sent:* 25 January 2020 20:26 *To:* ghc-devs
*Subject:* stage2 build fails I’m getting this with “sh validate –legacy”
compiler/main/DynFlags.hs:1344:15: error: [-Woverlapping-patterns, -Werror=overlapping-patterns]
Pattern match is redundant
In an equation for ‘settings’: settings s | otherwise = ...
|
1344 | | otherwise = panic $ "Invalid cfg parameters." ++ exampleString
| ^^^^^^^^^
This is when compiling the stage-2 compiler. There’s an ifdef in DynFlags thus
#if __GLASGOW_HASKELL__ <= 810
| otherwise = panic $ "Invalid cfg parameters." ++ exampleString
#endif
but somehow it’s not triggering for the stage2 compiler.
Any ideas? It’s blocking a full build.
This #ifdef was added in 8038cbd96f4, when GHC became better at reporting redundant code.
Simon
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Simon Peyton Jones via ghc-devs
I'm getting this with "sh validate -legacy"
compiler/main/DynFlags.hs:1344:15: error: [-Woverlapping-patterns, -Werror=overlapping-patterns]
Pattern match is redundant
In an equation for 'settings': settings s | otherwise = ...
|
1344 | | otherwise = panic $ "Invalid cfg parameters." ++ exampleString
| ^^^^^^^^^ This is when compiling the stage-2 compiler. There's an ifdef in DynFlags thus
#if __GLASGOW_HASKELL__ <= 810
| otherwise = panic $ "Invalid cfg parameters." ++ exampleString
#endif but somehow it's not triggering for the stage2 compiler. Any ideas? It's blocking a full build. This #ifdef was added in 8038cbd96f4, when GHC became better at reporting redundant code. Simon
Indeed it would be nice to know which compiler you are using to bootstrap. I suspect Sylvain is correct that the alternative can be removed but first I would like to understand why this is arising only now. Cheers, - Ben

| Indeed it would be nice to know which compiler you are using to
| bootstrap. I suspect Sylvain is correct that the alternative can be
| removed but first I would like to understand why this is arising only
| now.
I'm using 8.6.4 as my bootstrap compiler. But this message occurs only when compiling the *stage2* compiler with the *stage1* compiler. At that moment the bootstrap compiler is irrelevant.
It's as if the build system doesn't know that the stage1 compiler is >= 8.10
Simon
| -----Original Message-----
| From: Ben Gamari

Simon Peyton Jones
| Indeed it would be nice to know which compiler you are using to | bootstrap. I suspect Sylvain is correct that the alternative can be | removed but first I would like to understand why this is arising only | now.
I'm using 8.6.4 as my bootstrap compiler. But this message occurs only when compiling the *stage2* compiler with the *stage1* compiler. At that moment the bootstrap compiler is irrelevant.
It's as if the build system doesn't know that the stage1 compiler is >= 8.10
Hmm, interesting. Has this tree been cleaned in the last month or two? I suspect that this may have something to do with the changes to the GHC_STAGE macro that were merged a while back (perhaps a stale header file?). Cheers, - Ben

I did "sh validate --legacy" which uses "make maintainer-clean".
I'll try again to double check. Is there any particular file I should remove?
Simon
| -----Original Message-----
| From: Ben Gamari

I ran into a similar(?) problem a while ago. "make maintainer-clean" does not necessarily remove every generated file. See for example https://mail.haskell.org/pipermail/ghc-devs/2019-August/018049.html Since then I only use git clean -dfxq && git submodule foreach git clean -dfxq which worked reliably for me (beware that this removes any untracked file). Maybe this helps? Cheers, Stefan On Tue, Jan 28, 2020 at 10:41:33AM +0000, Simon Peyton Jones via ghc-devs wrote:
I did "sh validate --legacy" which uses "make maintainer-clean".
I'll try again to double check. Is there any particular file I should remove?
Simon
| -----Original Message----- | From: Ben Gamari
| Sent: 27 January 2020 18:59 | To: Simon Peyton Jones ; ghc-devs | Subject: RE: stage2 build fails | | Simon Peyton Jones writes: | | > | Indeed it would be nice to know which compiler you are using to | > | bootstrap. I suspect Sylvain is correct that the alternative can be | > | removed but first I would like to understand why this is arising only | > | now. | > | > I'm using 8.6.4 as my bootstrap compiler. But this message occurs only | when compiling the *stage2* compiler with the *stage1* compiler. At that | moment the bootstrap compiler is irrelevant. | > | > It's as if the build system doesn't know that the stage1 compiler is >= | 8.10 | > | Hmm, interesting. Has this tree been cleaned in the last month or two? | I suspect that this may have something to do with the changes to the | GHC_STAGE macro that were merged a while back (perhaps a stale header | file?). | | Cheers, | | - Ben _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Thanks -- I'll try that.
Simion
| -----Original Message-----
| From: Stefan Schulze Frielinghaus

git clean -dfxq && git submodule foreach git clean -dfxq
That made it work! Thank you.
(Of course I have no idea *what* file 'make maintainer-clean' isn't removing, but maybe we should not worry over-much.)
Simon
| -----Original Message-----
| From: Stefan Schulze Frielinghaus

Simon Peyton Jones
git clean -dfxq && git submodule foreach git clean -dfxq
That made it work! Thank you.
(Of course I have no idea *what* file 'make maintainer-clean' isn't removing, but maybe we should not worry over-much.)
Right, given that this only occurs with the make build system my inclination has been to just live with it until we finally switch to Hadrian. Out of curiosity, is there a reason you are not using Hadrian in this tree? Cheers, - Ben

| Out of curiosity, is there a reason you are not using Hadrian in this
| tree?
Yes... I tried again three weeks ago and ran into several obstacles that I asked about on ghc-devs at the time. I'd be happy to re-state them when it's a good time to do so.
I think this thread is the most recent one:
https://mail.haskell.org/pipermail/ghc-devs/2019-December/018362.html
Simon
| -----Original Message-----
| From: Ben Gamari

Simon Peyton Jones
| Out of curiosity, is there a reason you are not using Hadrian in this | tree?
Yes... I tried again three weeks ago and ran into several obstacles that I asked about on ghc-devs at the time. I'd be happy to re-state them when it's a good time to do so.
Ahh yes, #17534. I've been working around this when it occurs by removing the dyn_o errant file. However, I agree that this gets rather tiresome. We'll have to prioritize this. Cheers, - Ben
participants (4)
-
Ben Gamari
-
Simon Peyton Jones
-
Stefan Schulze Frielinghaus
-
Sylvain Henry