Since there is still no accepted answer I did a little of research about this interesting question because I found it unanswered on another place too.
Short answer is: the grammar doesn't allow it.
Let me explain that a little bit more datailed, but first let's remember this:
On haskell, operators are functions on infix notation.
Now, let's see the error message:
Precedence parsing error
cannot mix `*' [infixl 7] and prefix `-' [infixl 6] in the same infix expression
What does that means? Well, we should start defining what infixl 7
and infixl 6
are. On their grammar they have something like this:
infixr 9 .
infixr 8 ^, ^^, **
infixl 7 *, /, `quot`, `rem`, `div`, `mod`
infixl 6 +, -
infixr 5 :
infix 4 ==, /=, <, <=, >=, >
infixr 3 &&
infixr 2 ||
infixl 1 >>, >>=
infixr 1 =<<
infixr 0 $, $!, `seq`
Note: You can see that here, at the standard prelude.
What they mean on the error message is you can't join infixl 7
elements with infixl 6
, that's would be the same reason that you can't do something like this:
Prelude> 5 * +3
You will get this error:
parse error on input `+'
Wait, if that is a sintax error, why the error message is different?
Well, it seems that the unary "-" operator
is very special in haskell (as other answers said) and is being used on other parts of the grammar, so, in theory this will go to a different branch of the syntax tree and will throw an error somewhere else.
If you want to read more about the unary "-" operator
you can go here.