Quoth Gregg Reynolds <[email protected]>,
..
> A minor point maybe, but germane to the original post (I hope).
It isn't - I mean, I'm not really sure what your point is, but
the example really returns the same IO value, not just one of
the same type.
Consider an example with implementation:
wint :: Int -> IO Int
wint a = let s = show a in do
putStr s
return (length s)
Now the expression "wint 994" is a value of type IO Int, and
any instance of that expression is the same value - an action
is not the same as the action's result. You can use this
value in pure Haskell expressions with confidence.
Donn
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe