[Haskell-beginners] GHCi bug?

Thomas Davie tom.davie at gmail.com
Tue Nov 16 07:17:01 EST 2010


To explain that further as to why it's not a bug...

GHCi's job is to run the code you enter.  You asked it to show a value, so it executed the show function (correctly).  The default implementation called showPrec, which invoked show, etc.

There may well be a missing feature here (to check of you implement nothing other than the defaults which are very likely to loop), but not a bug.

Bob

On 16 Nov 2010, at 11:44, Ozgur Akgun wrote:

> Unfortunately, yes.
> 
> On 16 November 2010 11:39, Russ Abbott <russ.abbott at gmail.com> wrote:
> 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 <ozgurakgun at gmail.com> wrote:
> 
> On 16 November 2010 05:12, Russ Abbott <russ.abbott at gmail.com> 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
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20101116/550ebf5f/attachment-0001.html


More information about the Beginners mailing list