Re: hGetContents and laziness in file io

2001-07-24 Thread Hal Daume
Okay, I understand the problem. I would do something like the solution you propose, except that in the input file, trees span multiple lines. So the input file looks something like: (:cat S :subs ((() (:cat NP :subs ((() (:surf "John") (() (:cat VP :subs (

Re: hGetContents and laziness in file io

2001-07-23 Thread Thomas Hallgren
Hi, My guess is that there is a space leak in your program. In both function convert and parseAll, there are references (the variable ulf) to the contents of the input file, and they will probably not be released until the functions return (unless you use a compiler that is clever enough to d