
Unfortunately, yes.
On 16 November 2010 11:39, Russ Abbott
I'm not sure what you are saying here. Are you saying that it's not a bug that GHCi went into a coma when I file was loaded and a prompt entered? * -- Russ* *** * **
On Tue, Nov 16, 2010 at 3:34 AM, Ozgur Akgun
wrote: On 16 November 2010 05:12, Russ Abbott
wrote: I know the code isn't correct. My point is that the compiler didn't complain when the code was loaded, and the interpreter died when it was executed. That shouldn't happen. * -- Russ*
It would be *cool* for GHC to make an analysis about the instance methods of a type class, and their default implementations to find the minimal subset of methods you have to implement to get a valid (for some definition of valid) instance declaration. But it doesn't do such a thing. And it is not an easy task.
GHC only warns you if you do not implement a method which doesn't have a default implementation. In your example, this is not the case.
Best,
-- Ozgur Akgun
-- Ozgur Akgun