[Haskell-beginners] annoying precedence of unary negate

John M. Dlugosz ngnr63q02 at sneakemail.com
Mon Apr 28 03:59:27 UTC 2014

	[ ⋯ , translate (-50) 0 $ color green $ Circle 50 , ⋯]

The parens around -50 are necessary.
Is there a more elegant way to write it?

Without the parens, I don't understand what the compiler sees it as, based on the error 
message.  How does the compiler parse it in that case?

Also, is the comma in a list different from the operator comma which is noted as 
right-associative precedence 5?  I had thought that the item separator in the list was 
special syntax that had very low precedence.  After all, I can write f$g as a list item 
without parens, and $ is lower than comma.
What is comma (as an operator) used for?

More information about the Beginners mailing list