On 25 July 2011 13:50, Sebastien Zany <[email protected]> wrote: > I was thinking the reverse. We can already give default implementations of > class operations that can be overridden by giving them explicitly when we > declare instances, so why shouldn't we be able to give default > implementations of operations of more general classes, which could be > overridden by a separate instance declaration for these? > > Then I could say something like "a monad is also automatically a functor with > fmap by default given by..." and if I wanted to give a more efficient fmap > for a particular monad I would just instantiate it as a functor explicitly.
I believe this has been proposed before, but a major problem is that you cannot do such overriding. -- Ivan Lazar Miljenovic [email protected] IvanMiljenovic.wordpress.com _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
