On 8/4/05, Dinh Tien Tuan Anh <[EMAIL PROTECTED]> wrote:
>
> Can thread pool be implemented in GHC ?
>
> I have a program that is currently using about 12-15 threads (launch and
> kill for infinite times) and when running, especially after Ctrl-C, my
> computer got freezed up. And if i ran it s
Can thread pool be implemented in GHC ?
I have a program that is currently using about 12-15 threads (launch and
kill for infinite times) and when running, especially after Ctrl-C, my
computer got freezed up. And if i ran it several times, the "Stack
overflows" occurs.
Cheers
TuanAnh
Ralf,
The problem is the type-scheme polymorphic result type of
castItem which is consumed by a type-variable polymorphic
but type-class bounded argument type of process.
Thanks for your explanation: I hope it's still safe to say that I did
not miss something entirely obvious. :) Anyway, inde
Stefan,
the problem can be spotted in the following erased version of your
program.
data Identity a
instance Monad Identity
class (Monad m) => IsItem m i where
processItem :: i -> m ()
class (Monad m) => IsProcessor p m | m -> p where
process :: (IsItem m i) => i -> m ()
newtype Item m =
Yoann,
I have also one time read an example where you use monads while
implementing the unification or type inference algorithm, perhaps in
the original
monad paper (the essence of functional programming).
I guess you are referring to Mark Jones' _Functional Programming with
Overloading and
On 2 août 05, at 22:03, Paul Moore wrote:
I've started learning Haskell, and I'm going through all the tutorial
material I can find - there's a lot of good stuff available.
One thing I haven't found a really good discussion of, is practical
examples of building monads. There's plenty of discus
Dear Haskellers,
Yesterday I stumbled upon a problem type checking a program involving
multi-parameter type classes. GHC rejected the program; still, I was
not immediately convinced it contained a type error. Having given it
some more thoughts, I start to suspect that the type checker is in er