[Haskell-cafe] Lazier I/O?

2005-11-28 Thread Dimitry Golubovsky
This may be a stupud question, but how to make I/O in Haskell really lazy? Here is a simple program: module Main where import System.IO import Foreign import Data.Word import Data.Char s2c :: String - [Word8] s2c s = map (fromIntegral . ord) s sendstr :: Handle - String - IO Int

Re: [Haskell-cafe] Lazier I/O?

2005-11-28 Thread David Roundy
On Mon, Nov 28, 2005 at 07:27:44AM -0500, Dimitry Golubovsky wrote: Any ideas, pointers? unsafeInterleaveIO does what you want. -- David Roundy http://www.darcs.net ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Lazier I/O?

2005-11-28 Thread Wolfgang Jeltsch
Am Montag, 28. November 2005 13:27 schrieb Dimitry Golubovsky: [...] 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,