[Haskell-beginners] Re: Apparent bug

Ozgur Akgun ozgurakgun at gmail.com
Tue Nov 16 13:46:40 EST 2010


Hi,

On 16 November 2010 17:52, Russ Abbott <russ.abbott at gmail.com> wrote:

> I'm surprised that there is so much resistance to acknowledging what
> appears to be a bug.  Why not just fix it?


I'd really like it, if ghci was clever enough to automatically detect the
fact that you haven't provided enough function definitions for the minimal
instance. Do you have a fix in mind?Other than something like annotating
class declarations, which is a cool idea and has been suggested by ezyang
already.

What interpretation justifies GHCi going into an uninterruptible state at
> this point?


This is really bad. It should still be interruptible. I think I can break my
resistance and say this (ghci not being interruptible) is a bug :)

Strangely, if you define two empty functions, just calling each other, this
infinite loop can be easily interrupted. Try it with:

f = g
g = f

Moreover, if you compile&run your original code, a very quick 'stack space
overflow' occurs. Nothing to interrupt there. At least it doesn't eat up all
your system resources as you say ghci does. I just killed the process, saved
before the need to restart :)

Best,
Ozgur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20101116/28dcde91/attachment-0001.html


More information about the Beginners mailing list