
Hi Russ,
On 16 November 2010 18:52, Russ Abbott
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 it? 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
It's not a bug but it should give a warning. The reason why this compiles is that there are default implementations for all members of the Show class. Unfortunately, they are defined in terms of them selves (show uses shows uses showPrec uses show). You have to define at least one to not get caught in an endless loop. But there is no way for GHC to know that. Regards, Tobias