From: Albert G. <Dr....@t-...> - 2008-07-06 09:30:52
|
Eddie Rucker wrote: > With that precedence, how can I write something like [1=>"a",2=>"b"] without a syntax error? Oops, you're right, of course you want to bind it stronger than ',', but weaker than the logical operators. Also, I'm wondering whether '$' has the right precedence. I made it weaker than ',' so that you can write something like foo $ x,y,z. But now I think that this is wrong, it should be: infixr 0 , ; infix 1 => ; infixr 1 $ ; Then you'll have to write foo (x,y,z) (which looks nicer anyway), but you can also use $ inside list elements without parenthesizing it. Any objections? Also, on second thought I'm willing to add => to the prelude after all. If two completely unrelated modules use this, then others may follow suit, and it's going to be a mess if we need to change the precedence again. Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |