John Peterson
  Lennart Augustsson
Joe Fasel

| > This whole issue regarding redefinition of + and - is getting confused
| > unnecessarily.  Both of these are in PreludeCore and cannot be renamed
| > or hidden.  Because of this their fixities cannot be changed.  It is
| > possible to locally shadow + and - but this cannot change their
| > fixities and has no effect on + in n+k patterns.
| Exactly!  But what I find a bit strange is that even when + and -
| are overridden locally n+k and prefix - still have their old meanings.
| Well, it's just one more exception to the rule to remember about Haskell.

Yes, but we need to emphasize that rebinding such operators is a Bad Idea.
(Maybe Phil is right, that we should simply forbid it.)  What you want
to do instead is provide a Num (in this case) instance.  If you complain
that your funny + and - don't have the right types to be part of a Num
instance, I have no sympathy.  ("Pathetic, ruddy planet---I've no sympathy
at all.")

--Joe

Reply via email to