[Haskell-beginners] Re: Apparent bug

Russ Abbott russ.abbott at gmail.com
Tue Nov 16 12:52:17 EST 2010

I can understand "while(true) { }" producing an endless loop.  Can you
explain how the code I entered is interpreted to mean an unending cycle?
 Furthermore most systems can be interrupted, even when in a tight while(true)
{ } loop. In the example I gave, it seems that GHCi cannot be interrupted.
 (When I try it on some machines I get an out-of-memory error, but it
still(!) can't be interrupted.)

I think GHCi is wonderful software. But I doubt that anyone would claim that
it's bug-free. I'm surprised that there is so
much resistance to acknowledging what appears to be a bug.  Why not just fix

To review, how should this be interpreted?

data Test = Test
instance Show Test    -- The problem occurs even without "where"

> Test

What interpretation justifies GHCi going into an uninterruptable state at
this point?
-- Russ *

On Tue, Nov 16, 2010 at 9:00 AM, <beginners-request at haskell.org> wrote:

> On 16 November 2010 12:17, Thomas Davie <tom.davie at gmail.com> wrote:
> > GHCi's job is to run the code you enter.
> Likewise, in many other languages when you write the following you'll get
> an
> infinite rule. And it just compiles (or gets interpreted) fine.
> while(true) { }
> Just another perspective.
> Ozgur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20101116/b1d84c22/attachment.html

More information about the Beginners mailing list