MRP Summary & revised MRP 2ed

Herbert Valerio Riedel hvriedel at gmail.com
Fri Nov 27 09:42:14 UTC 2015


Hi,

On 2015-11-27 at 10:29:09 +0100, Akio Takano wrote:

[...]

> Thank you for the information. If I understand correctly, this
> -fwarn-noncanonical-monad-instances warning doesn't address my
> concern, because it won't warn about a monad that defines neither (>>)
> nor (*>) explicitly, which I expect to be a common case.

You're right, from what I've seen the majority of Monad instances don't
bother to override (>>)/(*>) currently.

But do we really want every Applicative/Monad to explicitly define (*>)
(and consequently (>>)=(*>)) ?

If so, it seems to be unfortunate that we have an overridable default
implementation for (*>)/(>>) in place, as that IMO suggests that you're
only supposed to override (*>) in those less common cases where it
provides a benefit over the default implementation. What's the point of
the default implementation otherwise?


-- hvr


More information about the Libraries mailing list