The following program:
module Main(main) where
main:: IO()
main = do {
xs - mapM readFile (take 1000 (repeat "tmp"));
return ();
}
Results in the error:
Fail: resource exhausted
Action: openFile
Reason: process file table full tmp
That looks reasonable - there's
From: Simon Marlow [EMAIL PROTECTED]
Subject: RE: openFile, process file table full
Date: Mon, 11 Sep 2000 02:10:59 -0700
The following program:
module Main(main) where
main:: IO()
main = do {
xs - mapM readFile (take 1000 (repeat "tmp"));
return ();
}
Mon, 11 Sep 2000 02:10:59 -0700, Simon Marlow [EMAIL PROTECTED] pisze:
xs - mapM readFile (take 1000 (repeat "tmp"));
That looks reasonable - there's usually some kind of limit on the
number of files a process may have open, for example it's 1024 on
our Linux box, and 64 on our
Arguably, readFile is too strict: why is the file opened, if there
aren't any characters needed. What is the motivation for opening the
file eagerly?
Once we've started reading lazilly, it's hard to generate errors. The file
is opened eagerly so that any errors generated (such as if the
Simon Marlow wrote:
I'm of the opinion that readFile/hGetContents are useful for small programs,
Personally I think Haskell would be a better language without them. But maybe
it's too late now . . .
Hello,
I'm considering for the near future to "hack" with the core language
module of GHC, but I'm not sure whether it's good to use the
current definitions or data structures because things may change
with the new GHC.
Is there an agreement that the data structures used for the
core language
An attempt to build the latest version of GHC, using ghc-4.08, gives this
error message:
[...]
/usr/local/bin/ghc -cpp -fglasgow-exts -Rghc-timing -I. -IcodeGen -InativeGe
n -I
parser -iutils:basicTypes:types:hsSyn:prelude:rename:typecheck:deSugar:coreS
yn:s