[Haskell-cafe] bug in ghci ?

Daniel Fischer daniel.is.fischer at web.de
Thu Jul 8 10:45:18 EDT 2010


On Thursday 08 July 2010 16:11:58, Ivan Lazar Miljenovic wrote:
> "Pasqualino \"Titto\" Assini" <tittoassini at gmail.com> writes:
> > Well the problem is that no warnings are generated.
> >
> > If you have a class with some methods that do not have a default
> > implementation and you do not provide them when defining your
> > instance, GHC will at least politely complain.
> >
> > Ideally, GHC would detect that a Show instance requires one of its two
> > functions to be declared as they are mutually recursive and complain.
>
> So you're volunteering to write such functionality? :p

Well, I made the suggestion of emitting a warning on instance declarations 
without method definitions. That would be comparatively easy to implement 
(even with an additional check to only emit the warning if the class 
defines any methods) and catch many (if not most) cases.

If somebody points me to the relevant modules, I could be persuaded to 
write it, even.



More information about the Haskell-Cafe mailing list