
8 Jul
2010
8 Jul
'10
12:24 p.m.
On Thu, Jul 8, 2010 at 3:45 PM, Daniel Fischer
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.
Unfortunately, it would catch some perfectly valid cases, see the list of instances for flat datatypes here: http://hackage.haskell.org/packages/archive/deepseq/1.1.0.0/doc/html/src/Con... This demonstrates that there is at least one (admittedly probably not much more than one) case where a class with methods would have a default implementation that was total and valid in some cases.