That argument makes sense, although I find it a bit counter-intuitive still. If 
I saw the function `pure` for the first time, my first impression (however 
wrong it may be) would be that it takes a pure value (regardless of context) 
and does something with it. Applying `pure` to an IO operation goes against 
that intuition.

Looking at the type of `return :: a -> m a", there are several slightly more 
intuitive (to me) options in this discussion already:

lift: the value `a` is lifted into the monad `m`
pack: the value `a` is packed into the monad `m`
wrap: the value `a` is wrapped in the monad `m`
inject: the value `a` is injected into the monad `m`
promote: the value `a` is promoted to a monad `m a`


On 6 Aug 2013, at 10:16, Tobias Dammers <tdamm...@gmail.com> wrote:

> It is a pure value in the context of the outer monad (the one you wrap it 
> in). I'd say pure is still appropriate.
> 
> On Aug 6, 2013 10:14 AM, "Tom Ellis" 
> <tom-lists-haskell-cafe-2...@jaguarpaw.co.uk> wrote:
> On Tue, Aug 06, 2013 at 10:03:04AM +0200, J. Stutterheim wrote:
> > `putStrLn "Hi"` is not a pure value...
> 
> Why not?
> 
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to