
2 Nov
2007
2 Nov
'07
9:03 a.m.
On 11/2/07, Stuart Cook
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.