Monad of no `return` Proposal (MRP): Moving `return` out of `Monad`
Henning Thielemann
lemming at henning-thielemann.de
Sun Oct 18 18:15:40 UTC 2015
On Fri, 2 Oct 2015, Manuel Gómez wrote:
> In a post-AMP Haskell, however, retaining `return` in `Monad` does not
> serve any purpose: any `Monad` instance requires an `Applicative`
> instance, wherein `pure` must be defined, and it is a law required by
> all instances that they behave identically. The only expressive purpose
> of `return` being in the `Monad` type class is providing an opportunity
> to break the laws the community expects for all instances of `Monad`.
We will get constant breakage this way. You mentioned Pointed class. If it
appears one day then your argument would translate to: We must acknowledge
that 'pure' was always wrong in Applicative. Then we will have an APP
(Applicative without 'pure' proposal) that again breaks lots of code
without a way to code for multiple versions of base.
More information about the Libraries
mailing list