Re: [Haskell-cafe] foldl and space problems

2005-06-13 Thread Gracjan Polak
Bernard Pope wrote: Perhaps you could post the definition of the state type? Or even better, a small example of code that runs badly. I still don't know where old code had problems, but after rewriting everything it seems to run smoothly now :) Thanks for all ideas, btw. I invented

Re: [Haskell-cafe] foldl and space problems

2005-06-13 Thread Andrew Pimlott
On Mon, Jun 13, 2005 at 03:29:21PM +0200, Gracjan Polak wrote: Bernard Pope wrote: Perhaps you could post the definition of the state type? Or even better, a small example of code that runs badly. I still don't know where old code had problems, but after rewriting everything it seems to

Re: [Haskell-cafe] foldl and space problems

2005-06-09 Thread Samuel Bronson
On 06/06/05, Gracjan Polak [EMAIL PROTECTED] wrote: Question: is there any way to see what is holding my source list? I did try to guess, but without results as of now:( How do I debug and/or reason about such situation? I heard that NHC has excellent heap profiling support, maybe it would

Re: [Haskell-cafe] foldl and space problems

2005-06-07 Thread Gracjan Polak
Bernard Pope wrote: A more practical solution is to force the compiler to generate more strict code. I tried to put strictness annotation in every place I could think of. Without result :( You might also find GHood useful:

Re: [Haskell-cafe] foldl and space problems

2005-06-07 Thread Bernard Pope
On Tue, 2005-06-07 at 12:35 +0200, Gracjan Polak wrote: Bernard Pope wrote: A more practical solution is to force the compiler to generate more strict code. I tried to put strictness annotation in every place I could think of. Without result :( Did you try Data.List.foldl' ?

[Haskell-cafe] foldl and space problems

2005-06-06 Thread Gracjan Polak
Hello, My space problems continued... I have foldl that produces list, some combining function and quite large source list: let xyz = foldl f state myBigList This setting should lazyli consume myBigList when next elements of xyz are demanded. Except that it seems that myBigList is held by

Re: [Haskell-cafe] foldl and space problems

2005-06-06 Thread Bernard Pope
On Mon, 2005-06-06 at 13:15 +0200, Gracjan Polak wrote: Hello, My space problems continued... I have foldl that produces list, some combining function and quite large source list: let xyz = foldl f state myBigList This setting should lazyli consume myBigList when next elements of