[Haskell-cafe] Re: evaluation semantics of bind

Ketil Malde ketil at malde.org
Fri Feb 6 05:46:50 EST 2009


Gregg Reynolds <dev at mobileink.com> writes:

> You've defined >>= in such a way that it carries additional semantic
> weight. 

Would it be appropriate to sum up this discussion thusly:

1. What gets and gets not optimized away in a monad depends on the
   implementation of (>>=)
2. For IO, (>>=) is - must be - implemented in such a way that actions
   don't get    optimized away.  For instance as passing around
   RealWorld as state. 
3. While the reason for this should be obvious, any formal specification
   for this requirement is missing.

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants


More information about the Haskell-Cafe mailing list