[Haskell-cafe] Lazier I/O?
duncan.coutts at worc.ox.ac.uk
Mon Nov 28 07:46:00 EST 2005
On Mon, 2005-11-28 at 07:27 -0500, Dimitry Golubovsky wrote:
> This may be a stupud question, but how to make I/O in Haskell really lazy?
> What is desired is to have the IO actions perform as their results are
> needed. I am assuming some knowledge that those actions have only
> limited scope of side effects (e. g. order of outputs within a window is
> significant, but order of appearance of those windows on the screen may
> not be). I see some way to do this by writing regular non-monadic
> Haskell stuff, representing each side effects scope (i. e. where
> ordering of actions is necessary) with its own instance of an I/O like
> monad (but runnable from an outside non-monadic code), and then using
> unsafePerformIO as needed. But there may be some framework already
> developed (albeit with unsafePerformIO, but hiding it from application
> Any ideas, pointers?
More information about the Haskell-Cafe