Ketil Malde <[EMAIL PROTECTED]> writes:
I guess I owe it to the list to elaborate on my stupidity here.
> Unfortunately, and I'm going to agree with graham here, the resulting
> program uses a lot of memory (parsing about one meg of HTML, producing
> about 200K of results makes my 128Mb machine suffer), and I get a
> run-time error[1] if I feed it too much data.
> [1] Prelude.(!!) index too large. Sounds almost entirely, but not
> quite, unlike out of memory. Anybody know?
Well, it said index too large, but what was really meant was that my
list was too short. So what I thought a problem rising from the
depths of the libraries, turned out to be a simple "error" case in th
ePrelude. A quick glance in the Prelude was enough to
establish that, and consequently, I found an error in my input data,
which I added handling for, and the error was history.
Apologies to the GHC people who obviously write much better code
than I. And now that the error is fixed, the run-time behaviour
(i.e. memory consumption) seems much better, too. Go figure.
(The only complaint left, is that GHC is dog slow, but I don't really
care - I use Hugs for quick type checking, and turn to GHC for real
error messages and run-time testing)
(And, of course, that output appeared to be truncated at some
arbitrary buffer limit - it would have been helpful if buffers were
flushed before the error was reported and execution aborted. Two
complaints, then.)
-kzm
--
If I haven't seen further, it is by standing in the footprints of giants