Monad of no `return` Proposal (MRP): Moving `return` out of `Monad`
S. Doaitse Swierstra
doaitse at swierstra.net
Wed Sep 30 09:27:40 UTC 2015
> On 25 Sep 2015, at 20:47 , wren romano <wren at community.haskell.org> wrote:
> On Fri, Sep 25, 2015 at 1:23 AM, Bardur Arantsson <spam at scientician.net> wrote:
>> Reasoning: I happen to rather like "return" for purely pedagogical
>> purposes since it lets you pretend (as a sufficient-for-beginners
>> approximation) that code in the do-notation in IO is imperative code and
>> "return" is the usual name for what it does in that context.
do a <- return 5
b <- return 3
I think that calling pure return was a big mistake from the very beginning,
>> I think
>> that has a certain value, but "Legacy" is quite off-putting.
> I like the proposal to merge pure/return into a single thing, but I
> rather prefer the name "return" for all the same pedagogical reasons
> it was originally chosen.
> Live well,
> Libraries mailing list
> Libraries at haskell.org
More information about the Libraries