Committee Review #314: Enable `-Wnoncanonical-monad-instances` and `-Wnoncanonical-monoid-instances` by default

Friends, This proposal seems very reasonable to me, and the ramifications are minimal. Consequently, I recommend that we accept. I’d now like to open the proposal up to committee discussion. My belief is that the issue be fairly uncontentious (particularly as prior behaviour can be fully restored by explicitly passing the relevant `-Wno-...` flags to the compiler), but I welcome any thoughts either way. Thanks, Tom

Dear all,
Can someone enlighten me as to the current status of the Monad-of-no-return
proposal? Which is the motivation for this proposal.
Best,
Arnaud
On Wed, Apr 1, 2020 at 12:50 AM Tom Harding
Friends,
This proposal seems very reasonable to me, and the ramifications are minimal. Consequently, I recommend that we accept.
I’d now like to open the proposal up to committee discussion. My belief is that the issue be fairly uncontentious (particularly as prior behaviour can be fully restored by explicitly passing the relevant `-Wno-...` flags to the compiler), but I welcome any thoughts either way.
Thanks, Tom _______________________________________________ ghc-steering-committee mailing list ghc-steering-committee@haskell.org https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee

Hi Arnaud,
My understanding is we’re past phase 1, en route to phase 2, and may be here for quite a while. For reference, phase 1:
Implement new warning in GHC which gets triggered when Monad instances explicitly override the default return and (>>) method implementations with non-lawful definitions (see compatible instance definition example in previous section).
The warning was implemented in GHC 8.0 and is called -Wnoncanonical-monad-instances (there are variants of this warning flag for Monoid and Fail) but it is not included in either -Wall or -Wcompat.
With that completed, phase 2 will be:
When we're confident that the majority of Hackage has reacted to the warning (with the help of Stackage actively purs
uing maintainers to update their packages) we turn the return and (>>) methods into a top-level binding and let GHC ignore lawful method definitions of return and (>>).
https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return
As Ben was the last to edit the page (albeit a year ago), perhaps he has some further insight?
I’ve CC’d him, just in case.
Thanks,
Tom
On 1 Apr 2020, at 12:48, Spiwack, Arnaud

Hi,
I support this proposal.
Vitaly
ср, 1 апр. 2020 г. в 01:50, Tom Harding
Friends,
This proposal seems very reasonable to me, and the ramifications are minimal. Consequently, I recommend that we accept.
I’d now like to open the proposal up to committee discussion. My belief is that the issue be fairly uncontentious (particularly as prior behaviour can be fully restored by explicitly passing the relevant `-Wno-...` flags to the compiler), but I welcome any thoughts either way.
Thanks, Tom _______________________________________________ ghc-steering-committee mailing list ghc-steering-committee@haskell.org https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee

I'm also happy with the proposal as it stands.
Alejandro
El dom., 5 abr. 2020 a las 7:14, Vitaly Bragilevsky (
Hi,
I support this proposal.
Vitaly
ср, 1 апр. 2020 г. в 01:50, Tom Harding
: Friends,
This proposal seems very reasonable to me, and the ramifications are minimal. Consequently, I recommend that we accept.
I’d now like to open the proposal up to committee discussion. My belief is that the issue be fairly uncontentious (particularly as prior behaviour can be fully restored by explicitly passing the relevant `-Wno-...` flags to the compiler), but I welcome any thoughts either way.
Thanks, Tom _______________________________________________ ghc-steering-committee mailing list ghc-steering-committee@haskell.org https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
_______________________________________________ ghc-steering-committee mailing list ghc-steering-committee@haskell.org https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee

I think doing this only makes sense if the "Monad of no return" proposal is
accepted. I know we have not discussed it here, so I imagine it is a
libraries proposal, but I all I can find is some discussion from 2015, and
not any kind of status page... Looks like Cale is a on that committee as
well, so maybe he knows the status?
Having said that, I personally already write my instances in the "new"
style, so I am not opposed to enabling the warnings by default.
-Iavor
On Sun, Apr 5, 2020 at 2:24 AM Alejandro Serrano Mena
I'm also happy with the proposal as it stands.
Alejandro
El dom., 5 abr. 2020 a las 7:14, Vitaly Bragilevsky (
) escribió: Hi,
I support this proposal.
Vitaly
ср, 1 апр. 2020 г. в 01:50, Tom Harding
: Friends,
This proposal seems very reasonable to me, and the ramifications are minimal. Consequently, I recommend that we accept.
I’d now like to open the proposal up to committee discussion. My belief is that the issue be fairly uncontentious (particularly as prior behaviour can be fully restored by explicitly passing the relevant `-Wno-...` flags to the compiler), but I welcome any thoughts either way.
Thanks, Tom _______________________________________________ ghc-steering-committee mailing list ghc-steering-committee@haskell.org https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
_______________________________________________ ghc-steering-committee mailing list ghc-steering-committee@haskell.org https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
_______________________________________________ ghc-steering-committee mailing list ghc-steering-committee@haskell.org https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
participants (5)
-
Alejandro Serrano Mena
-
Iavor Diatchki
-
Spiwack, Arnaud
-
Tom Harding
-
Vitaly Bragilevsky