On 11/2/07, Stuart Cook <[EMAIL PROTECTED]> wrote: > The solution would be to use a version of "readFile" that works in a > stricter way, by reading the file when it's told to, but I don't have > an implementation handy.
I guess this does the job: > readFile' fp = do > contents <- readFile fp > let ret (x:xs) = x `seq` ret xs > ret [] = return contents > ret contents Maybe the "x `seq`" part isn't necessary at all. -- Felipe. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe