Daniel Fischer <[EMAIL PROTECTED]> writes:

> Yes, I did it wrong, but I didn't keep anything (but the first and last Char 
> of each line) in memory on purpose. I hoped for the lines to be read one 
> after the other, head and last extracted 
   [...]
> Profiling (hy,hc) shows that the IO part of the programme holds on to tons of 
> lists - that couldn't be anything but parts of the file-contents, I believe.

Chances are that you don't evaluate these characters right away, so
what you are retaining is just unevaluated thunks that refer to the
lines themselves.  So the fix is to make the extraction of the
characters stricter.

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to