[Haskell-cafe] Unary Minus

Lennart Augustsson lennart at augustsson.net
Mon Apr 6 05:14:52 EDT 2009


Unary minus is a hack in the syntax for allowing the function negate
to be written as prefix -.

On Mon, Apr 6, 2009 at 10:36 AM, Martijn van Steenbergen
<martijn at van.steenbergen.nl> wrote:
> Paul Keir wrote:
>>
>> If I use :info (-) I get information on the binary minus. Is unary minus
>> also a function?
>
> No, as far as I know the unary minus is part of the number literals. You can
> use "negate" if you want it as a function.
>
> Hope this helps,
>
> Martijn.
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>


More information about the Haskell-Cafe mailing list