
2 Apr
2008
2 Apr
'08
8:14 a.m.
On 2 Apr 2008, at 13:51, jerzy.karczmarczuk@info.unicaen.fr 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