Mon(a|oi)d of No (Return|Mappend)
CLC: https://github.com/haskell/core-libraries-committee/issues/328#issuecomment-2874130488
Adding warnings for method definitions of return and mappend even for canonical definitions, and making the old warnings of noncanonical definitions of those methods errors at all times.
There is some complexity in reusing the same warning as both a warning and an error (noncanonical monad methods is an error for return and pure noncanonical definitions but an optional warning for (>>) and (*>) non-canonical definitions).
As expected there will likely be a lot of stackage breakage due to this change. This breakage is being tracked and managed from this issue: https://github.com/haskell/core-libraries-committee/issues/418.
Where is the key part of this patch? That is, what should reviewers look at first?
compiler/GHC/Rename/Module.hs, compiler/GHC/Tc/Errors/Ppr.hs, the added test cases
Please take a few moments to address the following points:
-
if your MR touches base(or touches parts ofghc-internalused or re-exported bybase) more substantially than just amending comments or documentation, you likely need to raise a CLC proposal before merging it. -
if your MR may break existing programs (e.g. causes the compiler to reject programs), please describe the expected breakage and add the user-facing label. This will run ghc/head.hackage> to characterise the effect of your change on Hackage. -
ensure that your commits are either individually buildable or squashed - After review I'll squash the commits into one; for now it is more reviewable to have separate commits.
-
ensure that your commit messages describe what they do (referring to tickets using #NNNNsyntax when appropriate) -
have added source comments describing your change. For larger changes you likely should add a [Note][notes] and cross-reference it from the relevant places. -
add a [testcase to the testsuite][adding test]. -
updates the users guide if applicable -
mentions new features in the release notes for the next release