Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
rebindable-clash-warning-fix : correct warning logic #245
A warning of the form "The fallible pattern ... is used together with -XRebindableSyntax. If this is intentional compile with -Wno-missing-monad-fail-instances" is colloquially called a "rebindable clash" warning.
If the rebindable syntax and monad fail desugaring language extensions are enabled, rebindable clash warnings are issued irrespective of the setting of
Put another way, we expect rebindable clash warnings iff rebindable syntax is enabled and monad fail desugaring is enabled and the
Program for testing:
To be clear, before this patch there was no way to suppress this warning. Thanks Shayne for fixing that!
The other alternative, given that the warning is pretty useless (in my opinion) and was never correct (so unlikely anyone hit it usefully and no one could have correctly followed its advice) would be to remove the warning from this branch regardless and simplify the code. However, this patch goes in the right direction anyway.
Replacing this PR with merge request https://gitlab.haskell.org/ghc/ghc/merge_requests/46 on gitlab.