[Haskell-cafe] Custom unary operator extension?

Peter Verswyvelen bf3 at telenet.be
Sun Sep 9 13:36:03 EDT 2007


Malcolm Wallace wrote:
> Incidentally, the nhc98 compiler has always permitted the definition of
> unary operators, as an extension to the language.  (It was just more
> convenient to create a general mechanism for unary/prefix operators,
> than to code the special case for negative numbers.)
Cool! I found it rather ugly that the negation operator was wired-in. 
It's a petty this is not part of the upcoming Haskell standard, or is 
it? GHC can't do this right?

Peter


More information about the Haskell-Cafe mailing list