[Haskell-cafe] Default implementation of type class member function not working as expected.
allbery.b at gmail.com
Wed May 21 01:54:09 UTC 2014
On Tue, May 20, 2014 at 9:34 PM, David Banas <capn.freako at gmail.com> wrote:
> The first one must be defined uniquely by each instance, but the second
> never needs a unique definition.
> So, I provided its implementation in the typeclass definition, as shown.
This makes no sense; if there's only one definition, then define it
*outside* the typeclass. A definition *inside* the class is there to be
overridden by specific instances that need to do so.
That said, you haven't said what you are getting that is not expected, and
there isn't enough information here to really say what might or might not
be going on.
brandon s allbery kf8nh sine nomine associates
allbery.b at gmail.com ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe