> In trying out a particularly large set of files (circa 450) with
> ghc --make I get
>
> ghc-5.00: panic! (the `impossible' happened, GHC version 5.00):
>         resource exhausted
> Action: openFile
> Reason: process file table full
> File: /tmp/ghc14562.hspp

'hmake' had a similar problem at one time.  It turned out that it was
reading each file twice, once to determine whether cpp was required,
and then again to read the imports.  The lazy behaviour of determining
the dependencies meant that the files were actually used at unexpected
times, and not being closed as soon as they were finished with.
The solution was to strictify some values computed from the file,
to ensure that its handle was GC'd sooner.

I can imagine that GHC does something similar - open the file once to
read imports, and again to compile it.  I would recommend checking the
laziness of the dependency analysis and inserting a `seq` somewhere
near the (readFile>>=parseImports) or equivalent.

Regards,
    Malcolm

_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to