On 2 Apr 2008, at 13:51, [EMAIL PROTECTED] 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.

So, declare them, even if they are vacuous. I did it several times, I am
still alive, so no need to say "this does not work".

That is possible, of course - I did that, too. But it means that the syntax and semantics do not work together; an invitation to pitfalls. So this ought to be avoided, except if there are no other workarounds.

It would be better to write a new Prelude. :-)

  Hans


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to