
In article <41F4C18C.7030508@imperial.ac.uk>,
Keean Schupke
Yes it is, side effects are quite clearly not counted. The value of (putStrLn "Hello" >> mzero") is mzero.
I don't believe this represents a good understanding of IO actions as Haskell values. For instance, 'return ()' and 'putStrLn "Hello"' are the same type, but are clearly different actions and so are usually considered to be different values. That the latter prints out text might be better considered not so much a "side effect" as the actual action itself. You've introduced the concept of "the value of" an IO action, apparently as something separated from "side effects". I don't believe you can properly define this. For instance, what is the "value" of getChar such that it doesn't involve "side effects"? -- Ashley Yakeley, Seattle WA