All Monads are Functors

Taral taralx at
Mon Aug 14 07:34:29 EDT 2006

On 8/14/06, Jon Fairbairn <jon.fairbairn at> wrote:
> of course, there's no reason to do that, but what I'm
> proposing is that we allow default instance declarations in
> class declarations in much the same way as default methods:

I just realized that default superclass methods have a small problem:

module A contains instance Monad []
module B contains instance Functor []
module C imports A and B.

Do we complain about a duplicate instance declarations? If not, does
the use of fmap in A use the default definition, or the one from B?

Taral <taralx at>
"You can't prove anything."
    -- Gödel's Incompetence Theorem

More information about the Haskell-prime mailing list