[Haskell-cafe] Lazy Evaluation in Monads

Daniel Fischer daniel.is.fischer at googlemail.com
Tue May 31 22:59:06 CEST 2011


On Tuesday 31 May 2011 22:35:26, Yves Parès wrote:
> He intended to show that, indeed, it is not, or else side-effects would
> never be performed

On the other hand, IO is lazy in the values it produces.
Going with the IO a = State RealWorld a fiction, IO is state-strict but 
value-lazy. The side-effects affect the state, hence are performed, the 
values are only evaluated to the extent required to determine the state.



More information about the Haskell-Cafe mailing list