[Haskell-cafe] resolving missing class instances @ compile time
naesten at gmail.com
Thu May 12 15:09:47 EDT 2005
On 12/05/05, Greg Buchholz <haskell at sleepingsquirrel.org> wrote:
> Bernard Pope wrote:
> > Perhaps this section of the report might help:
> > >From Section "4.3.2 Instance Declarations" in the Haskell Report:
> > http://www.haskell.org/onlinereport/decls.html#instance-decls
> > "If no binding is given for some class method then the corresponding
> > default class method in the class declaration is used (if present); if
> > such a default does not exist then the class method of this instance is
> > bound to undefined and no compile-time error results."
> I may be missing the big picture, but why is this behavior more
> desirable than failing with an error at compile time?
Aren't the warnings just about as usefull as failures? Anyway, you
could always use the -Werrror flag for ghc...
In any case, I would not like to have to implement an entire typeclass
at once... it would interfere with incremental development.
More information about the Haskell-Cafe