Re: Yet another weakly defined bug report

2003-02-13 Thread Peter Thiemann
Hi Ketil, I know your problem all too well. If you are sure that you need all of the file's content, then you should read it all from the start. I've found this little function handy and I'm using it all over the place: readFileStrictly :: FilePath -> IO String readFileStrictly filePath = do h

Re: Yet another weakly defined bug report

2003-02-13 Thread Daan Leijen
> These things are always tricky to understand, which is why I recommend > not using lazy I/O. File reading is not a pure operation: running out > of file descriptors is a good counter-example. Without saying wether I agree with lazy I/O or not, I suggest that this particular problem may also be

Re: Learning Haskell moved

2003-02-13 Thread Matthew Donadio
>> I would add some significant papers, such as John Hughes' >> "Why functional programming matters", etc. > >I've added that paper to the introduction. Other suggestions are welcome. "Conception, Evolution, and Application of Functional Programming Languages", Paul Hudak, ACM Computing Surveys,

Re: Yet another weakly defined bug report

2003-02-13 Thread Ganesh Sittampalam
On Thu, 13 Feb 2003 10:45:10 -, "Simon Marlow" <[EMAIL PROTECTED]> wrote: >File reading is not a pure operation: running out >of file descriptors is a good counter-example. How does this differ from running out of memory whilst trying to evaluate something? Cheers, Ganesh __

Re: Yet another weakly defined bug report

2003-02-13 Thread Dean Herington
"Ketil Z. Malde" wrote: > "Simon Marlow" <[EMAIL PROTECTED]> writes: > > > > > -- | add data from a file to the histogram > > > > addFile :: FiniteMap String Int -> String -> IO (FiniteMap > > > String Int) > > > > addFile fm name = do > > > > x <- readFile name > > > > ret

Learning Haskell moved

2003-02-13 Thread Arjan van IJzendoorn
Hello all, The Learning Haskell page has moved to a better place, the official Haskell homepage. You can now find it at http://www.haskell.org/learning.html and through a link on the Haskell homepage index. Jerzy wrote: > I would add some significant papers, such as John Hughes' > "Why functio

ANN: C->Haskell 0.11.1 "Powder Snow"

2003-02-13 Thread Manuel M T Chakravarty
I am pleased to announce version 0.11.1 "Powder Snow" of the C interface generator C->Haskell. This is a source-only testing release, which introduces two major features: * Arbitrary C pre-processor directives can be included into a Haskell binding module. These will be placed into a custom

Re: Yet another weakly defined bug report

2003-02-13 Thread Ketil Z. Malde
"Simon Marlow" <[EMAIL PROTECTED]> writes: > > > -- | add data from a file to the histogram > > > addFile :: FiniteMap String Int -> String -> IO (FiniteMap > > String Int) > > > addFile fm name = do > > > x <- readFile name > > > return (addHist fm x) > > > > > > -- | ad

RE: Yet another weakly defined bug report

2003-02-13 Thread Simon Marlow
> The following code runs out of file handles, so I am seeking > enlightenment as to why. > > > -- | add data from a file to the histogram > > addFile :: FiniteMap String Int -> String -> IO (FiniteMap > String Int) > > addFile fm name = do > > x <- readFile name > > r

Re: Yet another weakly defined bug report

2003-02-13 Thread Ketil Z. Malde
[EMAIL PROTECTED] (Ketil Z. Malde) writes: [EMAIL PROTECTED] (Ketil Z. Malde) writes: > Prelude> :r > phase `Literate pre-processor' failed (exitcode = 1) > I've no idea what trigged this, perhaps running out of file handles? I forgot: GHC version 5.04.1. It seems that this is definitely t

Re: silly questions about 'seq'

2003-02-13 Thread Koen Claessen
John Meacham wondered: | what does it mean to apply 'seq' to a function? how | does one place an abstraction in WHNF? it seems that | the ONLY thing one can do to a function is apply it to | some argument so does seq need to apply the function | to a dummy argument or something? Here is a si

Re: ANNOUNCE: Learning Haskell portal, version 0.1

2003-02-13 Thread Jerzy Karczmarczuk
Arjan van IJzendoorn wrote: Often we see messages from people who want to learn Haskell (something we applaud), but don't know where to begin. ... Enough talk: http://www.cs.uu.nl/~afie/haskell/LearningHaskell.html Thanks, Arjan, nice work. I would add some significant papers, such as John