[Haskell-cafe] Alternative name for return

David Thomas davidleothomas at gmail.com
Wed Aug 7 17:00:17 CEST 2013


> 2. This is the only way you can evaluate your "pure value", and because of
> the monadic chaining, you cannot do it twice, you cannot "re-evaluate" it.
>

I'm sure there is a sense in which this is true, but I'm not seeing it.
How would you describe what's going on here?

twice :: IO () -> IO ()
twice x = x >> x

main = twice $ putStrLn "foo"

I would call that evaluating x twice (incidentally creating two separate
evaluations of one pure action description), but I'd like to better see
your perspective here.



Regarding this issue generally, I feel like everyone's climbed on their
particular war horses when someone sounded the PURITY trumpet, when *I
don't think this is the kind of purity Applicative is talking about* -
different things can be pure in different ways.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130807/867ede65/attachment.htm>


More information about the Haskell-Cafe mailing list