In GHCi:
- Prelude> (+3) 2
5- Prelude> (*3) 2
6- Prelude> (/3) 2
0.6666666666666666- Prelu
As a footnote to grddev's answer, here's the relevant paragraph from the Haskell 98 Report:
The special form
-edenotes prefix negation, the only prefix operator in Haskell, and is syntax fornegate (e). The binary-operator does not necessarily refer to the definition of-in the Prelude; it may be rebound by the module system. However, unary-will always refer to thenegatefunction defined in the Prelude. There is no link between the local meaning of the-operator and unary negation.
This is something that frustrated me when I first came across it: I couldn't understand why the operators behaved so differently in this context when :info (+) and :info (-) looked basically identical.
You could use subtract, as grddev suggests, or you could just define a new infix operator:
Prelude> let (#) = (-)
Prelude> (# 3) 2
-1
subtract has the advantage of being familiar to other people who might read your code.