Peter Verswyvelen wrote:

> http://www.haskell.org/ghc/docs/2.10/users_guide/user_146.html <http://www.haskell.org/ghc/docs/2.10/users_guide/user_146.html>seems to confirm that?

Oops, sorry, these seems to be docs for Concurrent Haskell... But maybe the experts can confirm if the principle still stands?


I guess you entered a black hole! :-)

The problem is that don't understand black holes myself, I just got introduced with the same thing yesterday :-) I confused me a lot too.

The only explanation I could give you intuitively is that GHCi is running in multi threaded execution mode, and that two or more execution threads are waiting for each other forever, creating a "deadlock".

http://www.haskell.org/ghc/docs/2.10/users_guide/user_146.html <http://www.haskell.org/ghc/docs/2.10/users_guide/user_146.html>seems to confirm that?

If you try the same using (Win)HUGS, you'll get 100% CPU time usage.

Cheers,
Peter Verswyvelen

Pasqualino 'Titto' Assini wrote:
Hi,

if I define:

f = f

and then try to evaluate 'f' in GHCi, as one would expect, the interpreter never returns an answer.

The funny thing is that, while it is stuck in an infinite loop, GHCi doesn't seem to use any CPU time at all.

How is this possible?

Thanks

            titto






_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe



------------------------------------------------------------------------

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to