[Haskell-cafe] Alternative name for return

Dan Burton danburton.email at gmail.com
Tue Aug 6 20:23:47 CEST 2013


Bikeshedding at its finest. I think if we are very lucky, then a long time
from now we will be able to deprecate "return" in favor of
"Control.Applicative.pure"

As for making it "invisible", that's what idiom brackets and monad
comprehensions are for. But for those creating an *instance* of Monad,
well, we obviously need to be able to refer to which operation we are
implementing.

I like the idea of using "lift", because this is the word used for
MonadTrans, which is the same operation, but in the category of Haskell
Monads instead of the category of Hask. However, it is convenient to have
both in scope unqualified, so maybe lift would not be the best choice.

-- Dan Burton
On Aug 6, 2013 7:38 AM, "Tom Ellis" <
tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk> wrote:

> On Tue, Aug 06, 2013 at 04:26:05PM +0200, Jerzy Karczmarczuk wrote:
> > 1. First, it is not true  that you can do with, say, (printStr "Ho!"
> > ) whatever you want. In fact, you can do almost nothing with it. You
> > can transport it "as such", and you can use it as the argument of
> > (>>=).
>
> I don't think this argument holds much water.  You can do even less with
> ().
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130806/cda274bd/attachment.htm>


More information about the Haskell-Cafe mailing list