[darcs-users] Re: Darcs record hangs

Ganesh Sittampalam ganesh at earth.li
Mon Mar 15 00:42:02 UTC 2004


[let me know if you want to be snipped from CCs]

> I'm not sure it is actually an infinite loop. Such a thing can be
> detected by the runtime system, which will generate an exception:
>
>         Prelude> let f = f
>         Prelude> f
>         *** Exception: <<loop>>

The RTS isn't magic. It can detect "black-holes" of that nature, but not
things like

Prelude> let f n = f (n+1)
Prelude> f 0

(this literally is the famous "halting problem", and you can't in general
tell whether something is infinite looping or just running for a very long
time).

Cheers,

Ganesh





More information about the darcs-users mailing list