[Haskell] Blocked STM & GC question

2007-09-15 Thread Ashley Yakeley
If I have a thread that's blocked on an STM retry or TChan read, and none of its TVars are referenced elsewhere, will it get stopped and garbage-collected? I have in mind a pump thread that eternally reads off a TChan and pushes the result to some function. If the TChan is forgotten elsewhere,

[Haskell] question about a failure to generalize

2007-09-15 Thread Norman Ramsey
Dear Haskellers, I've had a Haskell program rejected for reasons I don't understand. Here's the relevant bit of code; the problem is that I expected the type-inference engine to generalize the abbreviation 'fold' to an overloaded function, but it doesn't---to make the code work, I had to expand 'f

[Haskell] Linear Equation Solver Using Arrays

2007-09-15 Thread Xiao-Yong Jin
Dear Haskellers, My thanks to people on the irc channel, especially `int-e'. With their help, I managed to write a linear equation solver using STUArrays. MatrixOp.hs.gz Description: MatrixOp, only contains a linear solver, yet It is basically a direct rewrite of a C version, which adopts Crou