On Wed, 2 Apr 2008, Hans Aberg wrote:
But one should also be able to write (f+g)(x). - This does not work in Haskell, because Num requires an instance of Eq and Show.
You could define these instances with undefined function implementations anyway. But also in a more cleaner type hierarchy like that of NumericPrelude you should not define this instance, because it would open new surprising sources of errors:
http://www.haskell.org/haskellwiki/Num_instance_for_functions _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe